s3: re-run make samba3-idl.
[Samba.git] / librpc / gen_ndr / ndr_dfs.c
blob6e36cb31ecf77a473fc51d9280a36753de335fc0
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_dfs.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r)
9 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
10 return NDR_ERR_SUCCESS;
13 static enum ndr_err_code ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r)
15 uint32_t v;
16 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
17 *r = v;
18 return NDR_ERR_SUCCESS;
21 _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r)
23 const char *val = NULL;
25 switch (r) {
26 case DFS_MANAGER_VERSION_NT4: val = "DFS_MANAGER_VERSION_NT4"; break;
27 case DFS_MANAGER_VERSION_W2K: val = "DFS_MANAGER_VERSION_W2K"; break;
28 case DFS_MANAGER_VERSION_W2K3: val = "DFS_MANAGER_VERSION_W2K3"; break;
29 case DFS_MANAGER_VERSION_W2K8: val = "DFS_MANAGER_VERSION_W2K8"; break;
31 ndr_print_enum(ndr, name, "ENUM", val, r);
34 static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
36 if (ndr_flags & NDR_SCALARS) {
37 NDR_CHECK(ndr_push_align(ndr, 1));
39 if (ndr_flags & NDR_BUFFERS) {
41 return NDR_ERR_SUCCESS;
44 static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
46 if (ndr_flags & NDR_SCALARS) {
47 NDR_CHECK(ndr_pull_align(ndr, 1));
49 if (ndr_flags & NDR_BUFFERS) {
51 return NDR_ERR_SUCCESS;
54 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r)
56 ndr_print_struct(ndr, name, "dfs_Info0");
57 ndr->depth++;
58 ndr->depth--;
61 static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
63 if (ndr_flags & NDR_SCALARS) {
64 NDR_CHECK(ndr_push_align(ndr, 4));
65 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
67 if (ndr_flags & NDR_BUFFERS) {
68 if (r->path) {
69 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
70 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
71 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
72 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
75 return NDR_ERR_SUCCESS;
78 static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
80 uint32_t _ptr_path;
81 TALLOC_CTX *_mem_save_path_0;
82 if (ndr_flags & NDR_SCALARS) {
83 NDR_CHECK(ndr_pull_align(ndr, 4));
84 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
85 if (_ptr_path) {
86 NDR_PULL_ALLOC(ndr, r->path);
87 } else {
88 r->path = NULL;
91 if (ndr_flags & NDR_BUFFERS) {
92 if (r->path) {
93 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
94 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
95 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
96 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
97 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
98 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));
100 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
101 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
102 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
105 return NDR_ERR_SUCCESS;
108 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
110 ndr_print_struct(ndr, name, "dfs_Info1");
111 ndr->depth++;
112 ndr_print_ptr(ndr, "path", r->path);
113 ndr->depth++;
114 if (r->path) {
115 ndr_print_string(ndr, "path", r->path);
117 ndr->depth--;
118 ndr->depth--;
121 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
123 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
124 return NDR_ERR_SUCCESS;
127 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
129 uint32_t v;
130 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
131 *r = v;
132 return NDR_ERR_SUCCESS;
135 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r)
137 ndr_print_uint32(ndr, name, r);
138 ndr->depth++;
139 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r);
140 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r);
141 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r);
142 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r);
143 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r);
144 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r);
145 ndr->depth--;
148 static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
150 if (ndr_flags & NDR_SCALARS) {
151 NDR_CHECK(ndr_push_align(ndr, 4));
152 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
153 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
154 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
157 if (ndr_flags & NDR_BUFFERS) {
158 if (r->path) {
159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
162 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
164 if (r->comment) {
165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
168 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
171 return NDR_ERR_SUCCESS;
174 static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
176 uint32_t _ptr_path;
177 TALLOC_CTX *_mem_save_path_0;
178 uint32_t _ptr_comment;
179 TALLOC_CTX *_mem_save_comment_0;
180 if (ndr_flags & NDR_SCALARS) {
181 NDR_CHECK(ndr_pull_align(ndr, 4));
182 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
183 if (_ptr_path) {
184 NDR_PULL_ALLOC(ndr, r->path);
185 } else {
186 r->path = NULL;
188 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
189 if (_ptr_comment) {
190 NDR_PULL_ALLOC(ndr, r->comment);
191 } else {
192 r->comment = NULL;
194 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
195 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
197 if (ndr_flags & NDR_BUFFERS) {
198 if (r->path) {
199 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
200 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
201 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
202 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
203 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
204 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));
206 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
207 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
208 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
210 if (r->comment) {
211 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
212 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
213 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
214 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
215 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
216 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));
218 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
219 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
220 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
223 return NDR_ERR_SUCCESS;
226 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
228 ndr_print_struct(ndr, name, "dfs_Info2");
229 ndr->depth++;
230 ndr_print_ptr(ndr, "path", r->path);
231 ndr->depth++;
232 if (r->path) {
233 ndr_print_string(ndr, "path", r->path);
235 ndr->depth--;
236 ndr_print_ptr(ndr, "comment", r->comment);
237 ndr->depth++;
238 if (r->comment) {
239 ndr_print_string(ndr, "comment", r->comment);
241 ndr->depth--;
242 ndr_print_dfs_VolumeState(ndr, "state", r->state);
243 ndr_print_uint32(ndr, "num_stores", r->num_stores);
244 ndr->depth--;
247 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
249 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
250 return NDR_ERR_SUCCESS;
253 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
255 uint32_t v;
256 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
257 *r = v;
258 return NDR_ERR_SUCCESS;
261 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r)
263 ndr_print_uint32(ndr, name, r);
264 ndr->depth++;
265 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r);
266 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r);
267 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r);
268 ndr->depth--;
271 static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
273 if (ndr_flags & NDR_SCALARS) {
274 NDR_CHECK(ndr_push_align(ndr, 4));
275 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
276 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
277 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
279 if (ndr_flags & NDR_BUFFERS) {
280 if (r->server) {
281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
284 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
286 if (r->share) {
287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
290 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
293 return NDR_ERR_SUCCESS;
296 static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
298 uint32_t _ptr_server;
299 TALLOC_CTX *_mem_save_server_0;
300 uint32_t _ptr_share;
301 TALLOC_CTX *_mem_save_share_0;
302 if (ndr_flags & NDR_SCALARS) {
303 NDR_CHECK(ndr_pull_align(ndr, 4));
304 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
305 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
306 if (_ptr_server) {
307 NDR_PULL_ALLOC(ndr, r->server);
308 } else {
309 r->server = NULL;
311 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
312 if (_ptr_share) {
313 NDR_PULL_ALLOC(ndr, r->share);
314 } else {
315 r->share = NULL;
318 if (ndr_flags & NDR_BUFFERS) {
319 if (r->server) {
320 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
321 NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
322 NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
323 NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
324 if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) {
325 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));
327 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t)));
328 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16));
329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
331 if (r->share) {
332 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
333 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
334 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
335 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
336 if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
337 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));
339 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
340 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
341 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
344 return NDR_ERR_SUCCESS;
347 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
349 ndr_print_struct(ndr, name, "dfs_StorageInfo");
350 ndr->depth++;
351 ndr_print_dfs_StorageState(ndr, "state", r->state);
352 ndr_print_ptr(ndr, "server", r->server);
353 ndr->depth++;
354 if (r->server) {
355 ndr_print_string(ndr, "server", r->server);
357 ndr->depth--;
358 ndr_print_ptr(ndr, "share", r->share);
359 ndr->depth++;
360 if (r->share) {
361 ndr_print_string(ndr, "share", r->share);
363 ndr->depth--;
364 ndr->depth--;
367 static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
369 uint32_t cntr_stores_1;
370 if (ndr_flags & NDR_SCALARS) {
371 NDR_CHECK(ndr_push_align(ndr, 4));
372 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
373 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
374 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
375 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
376 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
378 if (ndr_flags & NDR_BUFFERS) {
379 if (r->path) {
380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
383 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
385 if (r->comment) {
386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
389 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
391 if (r->stores) {
392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
393 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
394 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
396 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
397 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
401 return NDR_ERR_SUCCESS;
404 static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
406 uint32_t _ptr_path;
407 TALLOC_CTX *_mem_save_path_0;
408 uint32_t _ptr_comment;
409 TALLOC_CTX *_mem_save_comment_0;
410 uint32_t _ptr_stores;
411 uint32_t cntr_stores_1;
412 TALLOC_CTX *_mem_save_stores_0;
413 TALLOC_CTX *_mem_save_stores_1;
414 if (ndr_flags & NDR_SCALARS) {
415 NDR_CHECK(ndr_pull_align(ndr, 4));
416 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
417 if (_ptr_path) {
418 NDR_PULL_ALLOC(ndr, r->path);
419 } else {
420 r->path = NULL;
422 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
423 if (_ptr_comment) {
424 NDR_PULL_ALLOC(ndr, r->comment);
425 } else {
426 r->comment = NULL;
428 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
430 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
431 if (_ptr_stores) {
432 NDR_PULL_ALLOC(ndr, r->stores);
433 } else {
434 r->stores = NULL;
437 if (ndr_flags & NDR_BUFFERS) {
438 if (r->path) {
439 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
440 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
441 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
442 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
443 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
444 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));
446 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
447 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
448 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
450 if (r->comment) {
451 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
452 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
453 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
454 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
455 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
456 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));
458 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
459 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
460 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
462 if (r->stores) {
463 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
464 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
465 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
466 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
467 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
468 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
469 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
470 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
472 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
473 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
476 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
478 if (r->stores) {
479 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
482 return NDR_ERR_SUCCESS;
485 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
487 uint32_t cntr_stores_1;
488 ndr_print_struct(ndr, name, "dfs_Info3");
489 ndr->depth++;
490 ndr_print_ptr(ndr, "path", r->path);
491 ndr->depth++;
492 if (r->path) {
493 ndr_print_string(ndr, "path", r->path);
495 ndr->depth--;
496 ndr_print_ptr(ndr, "comment", r->comment);
497 ndr->depth++;
498 if (r->comment) {
499 ndr_print_string(ndr, "comment", r->comment);
501 ndr->depth--;
502 ndr_print_dfs_VolumeState(ndr, "state", r->state);
503 ndr_print_uint32(ndr, "num_stores", r->num_stores);
504 ndr_print_ptr(ndr, "stores", r->stores);
505 ndr->depth++;
506 if (r->stores) {
507 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
508 ndr->depth++;
509 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
510 char *idx_1=NULL;
511 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
512 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
513 free(idx_1);
516 ndr->depth--;
518 ndr->depth--;
519 ndr->depth--;
522 static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
524 uint32_t cntr_stores_1;
525 if (ndr_flags & NDR_SCALARS) {
526 NDR_CHECK(ndr_push_align(ndr, 4));
527 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
528 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
529 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
531 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
532 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
533 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
535 if (ndr_flags & NDR_BUFFERS) {
536 if (r->path) {
537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
539 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
540 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
542 if (r->comment) {
543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
544 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
545 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
546 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
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 if (r->stores) {
622 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
623 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
624 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
625 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
626 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
627 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
628 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
629 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
631 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
632 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
634 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
637 if (r->stores) {
638 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
641 return NDR_ERR_SUCCESS;
644 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
646 uint32_t cntr_stores_1;
647 ndr_print_struct(ndr, name, "dfs_Info4");
648 ndr->depth++;
649 ndr_print_ptr(ndr, "path", r->path);
650 ndr->depth++;
651 if (r->path) {
652 ndr_print_string(ndr, "path", r->path);
654 ndr->depth--;
655 ndr_print_ptr(ndr, "comment", r->comment);
656 ndr->depth++;
657 if (r->comment) {
658 ndr_print_string(ndr, "comment", r->comment);
660 ndr->depth--;
661 ndr_print_dfs_VolumeState(ndr, "state", r->state);
662 ndr_print_uint32(ndr, "timeout", r->timeout);
663 ndr_print_GUID(ndr, "guid", &r->guid);
664 ndr_print_uint32(ndr, "num_stores", r->num_stores);
665 ndr_print_ptr(ndr, "stores", r->stores);
666 ndr->depth++;
667 if (r->stores) {
668 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
669 ndr->depth++;
670 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
671 char *idx_1=NULL;
672 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
673 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
674 free(idx_1);
677 ndr->depth--;
679 ndr->depth--;
680 ndr->depth--;
683 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
686 return NDR_ERR_SUCCESS;
689 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
691 uint32_t v;
692 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
693 *r = v;
694 return NDR_ERR_SUCCESS;
697 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
699 ndr_print_uint32(ndr, name, r);
700 ndr->depth++;
701 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
702 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
703 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
704 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
705 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
706 ndr->depth--;
709 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
711 if (ndr_flags & NDR_SCALARS) {
712 NDR_CHECK(ndr_push_align(ndr, 4));
713 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
714 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
715 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
716 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
717 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
718 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
722 if (ndr_flags & NDR_BUFFERS) {
723 if (r->path) {
724 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
726 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
727 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
729 if (r->comment) {
730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
733 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
736 return NDR_ERR_SUCCESS;
739 static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
741 uint32_t _ptr_path;
742 TALLOC_CTX *_mem_save_path_0;
743 uint32_t _ptr_comment;
744 TALLOC_CTX *_mem_save_comment_0;
745 if (ndr_flags & NDR_SCALARS) {
746 NDR_CHECK(ndr_pull_align(ndr, 4));
747 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
748 if (_ptr_path) {
749 NDR_PULL_ALLOC(ndr, r->path);
750 } else {
751 r->path = NULL;
753 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
754 if (_ptr_comment) {
755 NDR_PULL_ALLOC(ndr, r->comment);
756 } else {
757 r->comment = NULL;
759 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
760 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
761 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
762 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
763 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
764 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
766 if (ndr_flags & NDR_BUFFERS) {
767 if (r->path) {
768 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
769 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
770 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
771 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
772 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
773 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));
775 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
776 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
777 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
779 if (r->comment) {
780 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
781 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
782 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
783 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
784 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
785 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));
787 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
788 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
789 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
792 return NDR_ERR_SUCCESS;
795 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
797 ndr_print_struct(ndr, name, "dfs_Info5");
798 ndr->depth++;
799 ndr_print_ptr(ndr, "path", r->path);
800 ndr->depth++;
801 if (r->path) {
802 ndr_print_string(ndr, "path", r->path);
804 ndr->depth--;
805 ndr_print_ptr(ndr, "comment", r->comment);
806 ndr->depth++;
807 if (r->comment) {
808 ndr_print_string(ndr, "comment", r->comment);
810 ndr->depth--;
811 ndr_print_dfs_VolumeState(ndr, "state", r->state);
812 ndr_print_uint32(ndr, "timeout", r->timeout);
813 ndr_print_GUID(ndr, "guid", &r->guid);
814 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
815 ndr_print_uint32(ndr, "pktsize", r->pktsize);
816 ndr_print_uint32(ndr, "num_stores", r->num_stores);
817 ndr->depth--;
820 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
823 return NDR_ERR_SUCCESS;
826 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
828 uint32_t v;
829 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
830 *r = v;
831 return NDR_ERR_SUCCESS;
834 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
836 const char *val = NULL;
838 switch (r) {
839 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
840 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
841 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
842 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
843 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
844 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
846 ndr_print_enum(ndr, name, "ENUM", val, r);
849 static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
851 if (ndr_flags & NDR_SCALARS) {
852 NDR_CHECK(ndr_push_align(ndr, 4));
853 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
854 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
855 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
857 if (ndr_flags & NDR_BUFFERS) {
859 return NDR_ERR_SUCCESS;
862 static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
864 if (ndr_flags & NDR_SCALARS) {
865 NDR_CHECK(ndr_pull_align(ndr, 4));
866 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
867 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
868 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
870 if (ndr_flags & NDR_BUFFERS) {
872 return NDR_ERR_SUCCESS;
875 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
877 ndr_print_struct(ndr, name, "dfs_Target_Priority");
878 ndr->depth++;
879 ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
880 ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
881 ndr_print_uint16(ndr, "reserved", r->reserved);
882 ndr->depth--;
885 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
887 if (ndr_flags & NDR_SCALARS) {
888 NDR_CHECK(ndr_push_align(ndr, 4));
889 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
890 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
892 if (ndr_flags & NDR_BUFFERS) {
893 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
895 return NDR_ERR_SUCCESS;
898 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
900 if (ndr_flags & NDR_SCALARS) {
901 NDR_CHECK(ndr_pull_align(ndr, 4));
902 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
903 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
905 if (ndr_flags & NDR_BUFFERS) {
906 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
908 return NDR_ERR_SUCCESS;
911 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
913 ndr_print_struct(ndr, name, "dfs_StorageInfo2");
914 ndr->depth++;
915 ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
916 ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
917 ndr->depth--;
920 static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
922 uint32_t cntr_stores_1;
923 if (ndr_flags & NDR_SCALARS) {
924 NDR_CHECK(ndr_push_align(ndr, 4));
925 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
926 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
927 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
928 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
929 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
930 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
931 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
932 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
933 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
935 if (ndr_flags & NDR_BUFFERS) {
936 if (r->entry_path) {
937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
938 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
939 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
940 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
942 if (r->comment) {
943 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
944 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
945 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
946 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
948 if (r->stores) {
949 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
950 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
951 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
953 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
954 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
958 return NDR_ERR_SUCCESS;
961 static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
963 uint32_t _ptr_entry_path;
964 TALLOC_CTX *_mem_save_entry_path_0;
965 uint32_t _ptr_comment;
966 TALLOC_CTX *_mem_save_comment_0;
967 uint32_t _ptr_stores;
968 uint32_t cntr_stores_1;
969 TALLOC_CTX *_mem_save_stores_0;
970 TALLOC_CTX *_mem_save_stores_1;
971 if (ndr_flags & NDR_SCALARS) {
972 NDR_CHECK(ndr_pull_align(ndr, 4));
973 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
974 if (_ptr_entry_path) {
975 NDR_PULL_ALLOC(ndr, r->entry_path);
976 } else {
977 r->entry_path = NULL;
979 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
980 if (_ptr_comment) {
981 NDR_PULL_ALLOC(ndr, r->comment);
982 } else {
983 r->comment = NULL;
985 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
986 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
987 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
988 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
989 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
990 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
991 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
992 if (_ptr_stores) {
993 NDR_PULL_ALLOC(ndr, r->stores);
994 } else {
995 r->stores = NULL;
998 if (ndr_flags & NDR_BUFFERS) {
999 if (r->entry_path) {
1000 _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1001 NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
1002 NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
1003 NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
1004 if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) {
1005 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));
1007 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t)));
1008 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16));
1009 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
1011 if (r->comment) {
1012 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1013 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1014 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1015 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1016 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1017 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));
1019 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1020 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1021 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1023 if (r->stores) {
1024 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
1025 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1026 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
1027 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
1028 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
1029 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1030 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1031 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1033 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1034 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1036 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
1037 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
1039 if (r->stores) {
1040 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
1043 return NDR_ERR_SUCCESS;
1046 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
1048 uint32_t cntr_stores_1;
1049 ndr_print_struct(ndr, name, "dfs_Info6");
1050 ndr->depth++;
1051 ndr_print_ptr(ndr, "entry_path", r->entry_path);
1052 ndr->depth++;
1053 if (r->entry_path) {
1054 ndr_print_string(ndr, "entry_path", r->entry_path);
1056 ndr->depth--;
1057 ndr_print_ptr(ndr, "comment", r->comment);
1058 ndr->depth++;
1059 if (r->comment) {
1060 ndr_print_string(ndr, "comment", r->comment);
1062 ndr->depth--;
1063 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1064 ndr_print_uint32(ndr, "timeout", r->timeout);
1065 ndr_print_GUID(ndr, "guid", &r->guid);
1066 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1067 ndr_print_uint32(ndr, "pktsize", r->pktsize);
1068 ndr_print_uint16(ndr, "num_stores", r->num_stores);
1069 ndr_print_ptr(ndr, "stores", r->stores);
1070 ndr->depth++;
1071 if (r->stores) {
1072 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
1073 ndr->depth++;
1074 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
1075 char *idx_1=NULL;
1076 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
1077 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
1078 free(idx_1);
1081 ndr->depth--;
1083 ndr->depth--;
1084 ndr->depth--;
1087 static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
1089 if (ndr_flags & NDR_SCALARS) {
1090 NDR_CHECK(ndr_push_align(ndr, 4));
1091 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1093 if (ndr_flags & NDR_BUFFERS) {
1095 return NDR_ERR_SUCCESS;
1098 static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
1100 if (ndr_flags & NDR_SCALARS) {
1101 NDR_CHECK(ndr_pull_align(ndr, 4));
1102 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1104 if (ndr_flags & NDR_BUFFERS) {
1106 return NDR_ERR_SUCCESS;
1109 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
1111 ndr_print_struct(ndr, name, "dfs_Info7");
1112 ndr->depth++;
1113 ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
1114 ndr->depth--;
1117 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
1119 if (ndr_flags & NDR_SCALARS) {
1120 NDR_CHECK(ndr_push_align(ndr, 4));
1121 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1123 if (ndr_flags & NDR_BUFFERS) {
1124 if (r->comment) {
1125 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1126 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1127 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1128 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1131 return NDR_ERR_SUCCESS;
1134 static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
1136 uint32_t _ptr_comment;
1137 TALLOC_CTX *_mem_save_comment_0;
1138 if (ndr_flags & NDR_SCALARS) {
1139 NDR_CHECK(ndr_pull_align(ndr, 4));
1140 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1141 if (_ptr_comment) {
1142 NDR_PULL_ALLOC(ndr, r->comment);
1143 } else {
1144 r->comment = NULL;
1147 if (ndr_flags & NDR_BUFFERS) {
1148 if (r->comment) {
1149 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1150 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1151 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1152 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1153 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1154 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));
1156 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1157 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1158 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1161 return NDR_ERR_SUCCESS;
1164 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
1166 ndr_print_struct(ndr, name, "dfs_Info100");
1167 ndr->depth++;
1168 ndr_print_ptr(ndr, "comment", r->comment);
1169 ndr->depth++;
1170 if (r->comment) {
1171 ndr_print_string(ndr, "comment", r->comment);
1173 ndr->depth--;
1174 ndr->depth--;
1177 static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
1179 if (ndr_flags & NDR_SCALARS) {
1180 NDR_CHECK(ndr_push_align(ndr, 4));
1181 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1183 if (ndr_flags & NDR_BUFFERS) {
1185 return NDR_ERR_SUCCESS;
1188 static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
1190 if (ndr_flags & NDR_SCALARS) {
1191 NDR_CHECK(ndr_pull_align(ndr, 4));
1192 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1194 if (ndr_flags & NDR_BUFFERS) {
1196 return NDR_ERR_SUCCESS;
1199 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
1201 ndr_print_struct(ndr, name, "dfs_Info101");
1202 ndr->depth++;
1203 ndr_print_dfs_StorageState(ndr, "state", r->state);
1204 ndr->depth--;
1207 static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
1209 if (ndr_flags & NDR_SCALARS) {
1210 NDR_CHECK(ndr_push_align(ndr, 4));
1211 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1213 if (ndr_flags & NDR_BUFFERS) {
1215 return NDR_ERR_SUCCESS;
1218 static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
1220 if (ndr_flags & NDR_SCALARS) {
1221 NDR_CHECK(ndr_pull_align(ndr, 4));
1222 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1224 if (ndr_flags & NDR_BUFFERS) {
1226 return NDR_ERR_SUCCESS;
1229 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
1231 ndr_print_struct(ndr, name, "dfs_Info102");
1232 ndr->depth++;
1233 ndr_print_uint32(ndr, "timeout", r->timeout);
1234 ndr->depth--;
1237 static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
1239 if (ndr_flags & NDR_SCALARS) {
1240 NDR_CHECK(ndr_push_align(ndr, 4));
1241 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
1243 if (ndr_flags & NDR_BUFFERS) {
1245 return NDR_ERR_SUCCESS;
1248 static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
1250 if (ndr_flags & NDR_SCALARS) {
1251 NDR_CHECK(ndr_pull_align(ndr, 4));
1252 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1254 if (ndr_flags & NDR_BUFFERS) {
1256 return NDR_ERR_SUCCESS;
1259 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
1261 ndr_print_struct(ndr, name, "dfs_Info103");
1262 ndr->depth++;
1263 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1264 ndr->depth--;
1267 static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
1269 if (ndr_flags & NDR_SCALARS) {
1270 NDR_CHECK(ndr_push_align(ndr, 4));
1271 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1273 if (ndr_flags & NDR_BUFFERS) {
1275 return NDR_ERR_SUCCESS;
1278 static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
1280 if (ndr_flags & NDR_SCALARS) {
1281 NDR_CHECK(ndr_pull_align(ndr, 4));
1282 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1284 if (ndr_flags & NDR_BUFFERS) {
1286 return NDR_ERR_SUCCESS;
1289 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
1291 ndr_print_struct(ndr, name, "dfs_Info104");
1292 ndr->depth++;
1293 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1294 ndr->depth--;
1297 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
1299 if (ndr_flags & NDR_SCALARS) {
1300 NDR_CHECK(ndr_push_align(ndr, 4));
1301 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1302 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
1303 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
1305 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
1307 if (ndr_flags & NDR_BUFFERS) {
1308 if (r->comment) {
1309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1312 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1315 return NDR_ERR_SUCCESS;
1318 static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
1320 uint32_t _ptr_comment;
1321 TALLOC_CTX *_mem_save_comment_0;
1322 if (ndr_flags & NDR_SCALARS) {
1323 NDR_CHECK(ndr_pull_align(ndr, 4));
1324 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1325 if (_ptr_comment) {
1326 NDR_PULL_ALLOC(ndr, r->comment);
1327 } else {
1328 r->comment = NULL;
1330 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1331 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
1333 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
1335 if (ndr_flags & NDR_BUFFERS) {
1336 if (r->comment) {
1337 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1338 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1339 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1340 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1341 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1342 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));
1344 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1345 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1346 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1349 return NDR_ERR_SUCCESS;
1352 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
1354 ndr_print_struct(ndr, name, "dfs_Info105");
1355 ndr->depth++;
1356 ndr_print_ptr(ndr, "comment", r->comment);
1357 ndr->depth++;
1358 if (r->comment) {
1359 ndr_print_string(ndr, "comment", r->comment);
1361 ndr->depth--;
1362 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1363 ndr_print_uint32(ndr, "timeout", r->timeout);
1364 ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
1365 ndr_print_uint32(ndr, "property_flags", r->property_flags);
1366 ndr->depth--;
1369 static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
1371 if (ndr_flags & NDR_SCALARS) {
1372 NDR_CHECK(ndr_push_align(ndr, 4));
1373 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1374 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1376 if (ndr_flags & NDR_BUFFERS) {
1378 return NDR_ERR_SUCCESS;
1381 static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
1383 if (ndr_flags & NDR_SCALARS) {
1384 NDR_CHECK(ndr_pull_align(ndr, 4));
1385 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1386 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1388 if (ndr_flags & NDR_BUFFERS) {
1390 return NDR_ERR_SUCCESS;
1393 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
1395 ndr_print_struct(ndr, name, "dfs_Info106");
1396 ndr->depth++;
1397 ndr_print_dfs_StorageState(ndr, "state", r->state);
1398 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1399 ndr->depth--;
1402 static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
1404 if (ndr_flags & NDR_SCALARS) {
1405 NDR_CHECK(ndr_push_align(ndr, 4));
1406 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1408 if (ndr_flags & NDR_BUFFERS) {
1409 if (r->dom_root) {
1410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1413 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1416 return NDR_ERR_SUCCESS;
1419 static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
1421 uint32_t _ptr_dom_root;
1422 TALLOC_CTX *_mem_save_dom_root_0;
1423 if (ndr_flags & NDR_SCALARS) {
1424 NDR_CHECK(ndr_pull_align(ndr, 4));
1425 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1426 if (_ptr_dom_root) {
1427 NDR_PULL_ALLOC(ndr, r->dom_root);
1428 } else {
1429 r->dom_root = NULL;
1432 if (ndr_flags & NDR_BUFFERS) {
1433 if (r->dom_root) {
1434 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1435 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1436 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1437 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1438 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1439 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));
1441 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1442 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1443 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1446 return NDR_ERR_SUCCESS;
1449 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
1451 ndr_print_struct(ndr, name, "dfs_Info200");
1452 ndr->depth++;
1453 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1454 ndr->depth++;
1455 if (r->dom_root) {
1456 ndr_print_string(ndr, "dom_root", r->dom_root);
1458 ndr->depth--;
1459 ndr->depth--;
1462 static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
1464 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1465 return NDR_ERR_SUCCESS;
1468 static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
1470 uint16_t v;
1471 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1472 *r = v;
1473 return NDR_ERR_SUCCESS;
1476 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
1478 const char *val = NULL;
1480 switch (r) {
1481 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1482 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1484 ndr_print_enum(ndr, name, "ENUM", val, r);
1487 static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
1489 if (ndr_flags & NDR_SCALARS) {
1490 NDR_CHECK(ndr_push_align(ndr, 4));
1491 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
1492 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1494 if (ndr_flags & NDR_BUFFERS) {
1495 if (r->dom_root) {
1496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1498 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1499 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1502 return NDR_ERR_SUCCESS;
1505 static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
1507 uint32_t _ptr_dom_root;
1508 TALLOC_CTX *_mem_save_dom_root_0;
1509 if (ndr_flags & NDR_SCALARS) {
1510 NDR_CHECK(ndr_pull_align(ndr, 4));
1511 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
1512 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1513 if (_ptr_dom_root) {
1514 NDR_PULL_ALLOC(ndr, r->dom_root);
1515 } else {
1516 r->dom_root = NULL;
1519 if (ndr_flags & NDR_BUFFERS) {
1520 if (r->dom_root) {
1521 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1522 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1523 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1524 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1525 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1526 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));
1528 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1529 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1530 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1533 return NDR_ERR_SUCCESS;
1536 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
1538 ndr_print_struct(ndr, name, "dfs_Info300");
1539 ndr->depth++;
1540 ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
1541 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1542 ndr->depth++;
1543 if (r->dom_root) {
1544 ndr_print_string(ndr, "dom_root", r->dom_root);
1546 ndr->depth--;
1547 ndr->depth--;
1550 static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
1552 if (ndr_flags & NDR_SCALARS) {
1553 int level = ndr_push_get_switch_value(ndr, r);
1554 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1555 switch (level) {
1556 case 0: {
1557 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1558 break; }
1560 case 1: {
1561 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1562 break; }
1564 case 2: {
1565 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1566 break; }
1568 case 3: {
1569 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1570 break; }
1572 case 4: {
1573 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1574 break; }
1576 case 5: {
1577 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
1578 break; }
1580 case 6: {
1581 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
1582 break; }
1584 case 7: {
1585 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
1586 break; }
1588 case 100: {
1589 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1590 break; }
1592 case 101: {
1593 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1594 break; }
1596 case 102: {
1597 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1598 break; }
1600 case 103: {
1601 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
1602 break; }
1604 case 104: {
1605 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
1606 break; }
1608 case 105: {
1609 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
1610 break; }
1612 case 106: {
1613 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
1614 break; }
1616 default:
1617 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1620 if (ndr_flags & NDR_BUFFERS) {
1621 int level = ndr_push_get_switch_value(ndr, r);
1622 switch (level) {
1623 case 0:
1624 if (r->info0) {
1625 NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1627 break;
1629 case 1:
1630 if (r->info1) {
1631 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1633 break;
1635 case 2:
1636 if (r->info2) {
1637 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1639 break;
1641 case 3:
1642 if (r->info3) {
1643 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1645 break;
1647 case 4:
1648 if (r->info4) {
1649 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1651 break;
1653 case 5:
1654 if (r->info5) {
1655 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1657 break;
1659 case 6:
1660 if (r->info6) {
1661 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1663 break;
1665 case 7:
1666 if (r->info7) {
1667 NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS, r->info7));
1669 break;
1671 case 100:
1672 if (r->info100) {
1673 NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1675 break;
1677 case 101:
1678 if (r->info101) {
1679 NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1681 break;
1683 case 102:
1684 if (r->info102) {
1685 NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1687 break;
1689 case 103:
1690 if (r->info103) {
1691 NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
1693 break;
1695 case 104:
1696 if (r->info104) {
1697 NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
1699 break;
1701 case 105:
1702 if (r->info105) {
1703 NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
1705 break;
1707 case 106:
1708 if (r->info106) {
1709 NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
1711 break;
1713 default:
1714 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1717 return NDR_ERR_SUCCESS;
1720 static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
1722 int level;
1723 uint32_t _level;
1724 TALLOC_CTX *_mem_save_info0_0;
1725 TALLOC_CTX *_mem_save_info1_0;
1726 TALLOC_CTX *_mem_save_info2_0;
1727 TALLOC_CTX *_mem_save_info3_0;
1728 TALLOC_CTX *_mem_save_info4_0;
1729 TALLOC_CTX *_mem_save_info5_0;
1730 TALLOC_CTX *_mem_save_info6_0;
1731 TALLOC_CTX *_mem_save_info7_0;
1732 TALLOC_CTX *_mem_save_info100_0;
1733 TALLOC_CTX *_mem_save_info101_0;
1734 TALLOC_CTX *_mem_save_info102_0;
1735 TALLOC_CTX *_mem_save_info103_0;
1736 TALLOC_CTX *_mem_save_info104_0;
1737 TALLOC_CTX *_mem_save_info105_0;
1738 TALLOC_CTX *_mem_save_info106_0;
1739 level = ndr_pull_get_switch_value(ndr, r);
1740 if (ndr_flags & NDR_SCALARS) {
1741 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1742 if (_level != level) {
1743 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1745 switch (level) {
1746 case 0: {
1747 uint32_t _ptr_info0;
1748 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1749 if (_ptr_info0) {
1750 NDR_PULL_ALLOC(ndr, r->info0);
1751 } else {
1752 r->info0 = NULL;
1754 break; }
1756 case 1: {
1757 uint32_t _ptr_info1;
1758 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1759 if (_ptr_info1) {
1760 NDR_PULL_ALLOC(ndr, r->info1);
1761 } else {
1762 r->info1 = NULL;
1764 break; }
1766 case 2: {
1767 uint32_t _ptr_info2;
1768 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1769 if (_ptr_info2) {
1770 NDR_PULL_ALLOC(ndr, r->info2);
1771 } else {
1772 r->info2 = NULL;
1774 break; }
1776 case 3: {
1777 uint32_t _ptr_info3;
1778 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1779 if (_ptr_info3) {
1780 NDR_PULL_ALLOC(ndr, r->info3);
1781 } else {
1782 r->info3 = NULL;
1784 break; }
1786 case 4: {
1787 uint32_t _ptr_info4;
1788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1789 if (_ptr_info4) {
1790 NDR_PULL_ALLOC(ndr, r->info4);
1791 } else {
1792 r->info4 = NULL;
1794 break; }
1796 case 5: {
1797 uint32_t _ptr_info5;
1798 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
1799 if (_ptr_info5) {
1800 NDR_PULL_ALLOC(ndr, r->info5);
1801 } else {
1802 r->info5 = NULL;
1804 break; }
1806 case 6: {
1807 uint32_t _ptr_info6;
1808 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
1809 if (_ptr_info6) {
1810 NDR_PULL_ALLOC(ndr, r->info6);
1811 } else {
1812 r->info6 = NULL;
1814 break; }
1816 case 7: {
1817 uint32_t _ptr_info7;
1818 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
1819 if (_ptr_info7) {
1820 NDR_PULL_ALLOC(ndr, r->info7);
1821 } else {
1822 r->info7 = NULL;
1824 break; }
1826 case 100: {
1827 uint32_t _ptr_info100;
1828 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1829 if (_ptr_info100) {
1830 NDR_PULL_ALLOC(ndr, r->info100);
1831 } else {
1832 r->info100 = NULL;
1834 break; }
1836 case 101: {
1837 uint32_t _ptr_info101;
1838 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1839 if (_ptr_info101) {
1840 NDR_PULL_ALLOC(ndr, r->info101);
1841 } else {
1842 r->info101 = NULL;
1844 break; }
1846 case 102: {
1847 uint32_t _ptr_info102;
1848 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1849 if (_ptr_info102) {
1850 NDR_PULL_ALLOC(ndr, r->info102);
1851 } else {
1852 r->info102 = NULL;
1854 break; }
1856 case 103: {
1857 uint32_t _ptr_info103;
1858 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
1859 if (_ptr_info103) {
1860 NDR_PULL_ALLOC(ndr, r->info103);
1861 } else {
1862 r->info103 = NULL;
1864 break; }
1866 case 104: {
1867 uint32_t _ptr_info104;
1868 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
1869 if (_ptr_info104) {
1870 NDR_PULL_ALLOC(ndr, r->info104);
1871 } else {
1872 r->info104 = NULL;
1874 break; }
1876 case 105: {
1877 uint32_t _ptr_info105;
1878 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
1879 if (_ptr_info105) {
1880 NDR_PULL_ALLOC(ndr, r->info105);
1881 } else {
1882 r->info105 = NULL;
1884 break; }
1886 case 106: {
1887 uint32_t _ptr_info106;
1888 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
1889 if (_ptr_info106) {
1890 NDR_PULL_ALLOC(ndr, r->info106);
1891 } else {
1892 r->info106 = NULL;
1894 break; }
1896 default:
1897 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1900 if (ndr_flags & NDR_BUFFERS) {
1901 switch (level) {
1902 case 0:
1903 if (r->info0) {
1904 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1905 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1906 NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1907 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1909 break;
1911 case 1:
1912 if (r->info1) {
1913 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1914 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1915 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1916 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1918 break;
1920 case 2:
1921 if (r->info2) {
1922 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1923 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1924 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
1927 break;
1929 case 3:
1930 if (r->info3) {
1931 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1932 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
1933 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
1936 break;
1938 case 4:
1939 if (r->info4) {
1940 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1941 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
1942 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1943 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
1945 break;
1947 case 5:
1948 if (r->info5) {
1949 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
1950 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
1951 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1952 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
1954 break;
1956 case 6:
1957 if (r->info6) {
1958 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
1959 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
1960 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1961 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
1963 break;
1965 case 7:
1966 if (r->info7) {
1967 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
1968 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
1969 NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS, r->info7));
1970 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
1972 break;
1974 case 100:
1975 if (r->info100) {
1976 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
1977 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
1978 NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1979 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
1981 break;
1983 case 101:
1984 if (r->info101) {
1985 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
1986 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
1987 NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1988 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
1990 break;
1992 case 102:
1993 if (r->info102) {
1994 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
1995 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
1996 NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1997 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
1999 break;
2001 case 103:
2002 if (r->info103) {
2003 _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
2004 NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
2005 NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
2006 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
2008 break;
2010 case 104:
2011 if (r->info104) {
2012 _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
2013 NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
2014 NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
2015 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
2017 break;
2019 case 105:
2020 if (r->info105) {
2021 _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
2022 NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
2023 NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
2024 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
2026 break;
2028 case 106:
2029 if (r->info106) {
2030 _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
2031 NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
2032 NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
2033 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
2035 break;
2037 default:
2038 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2041 return NDR_ERR_SUCCESS;
2044 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
2046 int level;
2047 level = ndr_print_get_switch_value(ndr, r);
2048 ndr_print_union(ndr, name, level, "dfs_Info");
2049 switch (level) {
2050 case 0:
2051 ndr_print_ptr(ndr, "info0", r->info0);
2052 ndr->depth++;
2053 if (r->info0) {
2054 ndr_print_dfs_Info0(ndr, "info0", r->info0);
2056 ndr->depth--;
2057 break;
2059 case 1:
2060 ndr_print_ptr(ndr, "info1", r->info1);
2061 ndr->depth++;
2062 if (r->info1) {
2063 ndr_print_dfs_Info1(ndr, "info1", r->info1);
2065 ndr->depth--;
2066 break;
2068 case 2:
2069 ndr_print_ptr(ndr, "info2", r->info2);
2070 ndr->depth++;
2071 if (r->info2) {
2072 ndr_print_dfs_Info2(ndr, "info2", r->info2);
2074 ndr->depth--;
2075 break;
2077 case 3:
2078 ndr_print_ptr(ndr, "info3", r->info3);
2079 ndr->depth++;
2080 if (r->info3) {
2081 ndr_print_dfs_Info3(ndr, "info3", r->info3);
2083 ndr->depth--;
2084 break;
2086 case 4:
2087 ndr_print_ptr(ndr, "info4", r->info4);
2088 ndr->depth++;
2089 if (r->info4) {
2090 ndr_print_dfs_Info4(ndr, "info4", r->info4);
2092 ndr->depth--;
2093 break;
2095 case 5:
2096 ndr_print_ptr(ndr, "info5", r->info5);
2097 ndr->depth++;
2098 if (r->info5) {
2099 ndr_print_dfs_Info5(ndr, "info5", r->info5);
2101 ndr->depth--;
2102 break;
2104 case 6:
2105 ndr_print_ptr(ndr, "info6", r->info6);
2106 ndr->depth++;
2107 if (r->info6) {
2108 ndr_print_dfs_Info6(ndr, "info6", r->info6);
2110 ndr->depth--;
2111 break;
2113 case 7:
2114 ndr_print_ptr(ndr, "info7", r->info7);
2115 ndr->depth++;
2116 if (r->info7) {
2117 ndr_print_dfs_Info7(ndr, "info7", r->info7);
2119 ndr->depth--;
2120 break;
2122 case 100:
2123 ndr_print_ptr(ndr, "info100", r->info100);
2124 ndr->depth++;
2125 if (r->info100) {
2126 ndr_print_dfs_Info100(ndr, "info100", r->info100);
2128 ndr->depth--;
2129 break;
2131 case 101:
2132 ndr_print_ptr(ndr, "info101", r->info101);
2133 ndr->depth++;
2134 if (r->info101) {
2135 ndr_print_dfs_Info101(ndr, "info101", r->info101);
2137 ndr->depth--;
2138 break;
2140 case 102:
2141 ndr_print_ptr(ndr, "info102", r->info102);
2142 ndr->depth++;
2143 if (r->info102) {
2144 ndr_print_dfs_Info102(ndr, "info102", r->info102);
2146 ndr->depth--;
2147 break;
2149 case 103:
2150 ndr_print_ptr(ndr, "info103", r->info103);
2151 ndr->depth++;
2152 if (r->info103) {
2153 ndr_print_dfs_Info103(ndr, "info103", r->info103);
2155 ndr->depth--;
2156 break;
2158 case 104:
2159 ndr_print_ptr(ndr, "info104", r->info104);
2160 ndr->depth++;
2161 if (r->info104) {
2162 ndr_print_dfs_Info104(ndr, "info104", r->info104);
2164 ndr->depth--;
2165 break;
2167 case 105:
2168 ndr_print_ptr(ndr, "info105", r->info105);
2169 ndr->depth++;
2170 if (r->info105) {
2171 ndr_print_dfs_Info105(ndr, "info105", r->info105);
2173 ndr->depth--;
2174 break;
2176 case 106:
2177 ndr_print_ptr(ndr, "info106", r->info106);
2178 ndr->depth++;
2179 if (r->info106) {
2180 ndr_print_dfs_Info106(ndr, "info106", r->info106);
2182 ndr->depth--;
2183 break;
2185 default:
2186 ndr_print_bad_level(ndr, name, level);
2190 static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
2192 uint32_t cntr_s_1;
2193 if (ndr_flags & NDR_SCALARS) {
2194 NDR_CHECK(ndr_push_align(ndr, 4));
2195 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2196 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2198 if (ndr_flags & NDR_BUFFERS) {
2199 if (r->s) {
2200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2201 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2202 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2204 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2205 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2209 return NDR_ERR_SUCCESS;
2212 static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
2214 uint32_t _ptr_s;
2215 uint32_t cntr_s_1;
2216 TALLOC_CTX *_mem_save_s_0;
2217 TALLOC_CTX *_mem_save_s_1;
2218 if (ndr_flags & NDR_SCALARS) {
2219 NDR_CHECK(ndr_pull_align(ndr, 4));
2220 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2221 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2222 if (_ptr_s) {
2223 NDR_PULL_ALLOC(ndr, r->s);
2224 } else {
2225 r->s = NULL;
2228 if (ndr_flags & NDR_BUFFERS) {
2229 if (r->s) {
2230 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2231 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2232 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2233 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2234 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2235 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2236 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2237 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2239 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2240 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2242 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2243 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2245 if (r->s) {
2246 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2249 return NDR_ERR_SUCCESS;
2252 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
2254 uint32_t cntr_s_1;
2255 ndr_print_struct(ndr, name, "dfs_EnumArray1");
2256 ndr->depth++;
2257 ndr_print_uint32(ndr, "count", r->count);
2258 ndr_print_ptr(ndr, "s", r->s);
2259 ndr->depth++;
2260 if (r->s) {
2261 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2262 ndr->depth++;
2263 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2264 char *idx_1=NULL;
2265 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2266 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
2267 free(idx_1);
2270 ndr->depth--;
2272 ndr->depth--;
2273 ndr->depth--;
2276 static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
2278 uint32_t cntr_s_1;
2279 if (ndr_flags & NDR_SCALARS) {
2280 NDR_CHECK(ndr_push_align(ndr, 4));
2281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2282 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2284 if (ndr_flags & NDR_BUFFERS) {
2285 if (r->s) {
2286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2287 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2288 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2290 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2291 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2295 return NDR_ERR_SUCCESS;
2298 static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
2300 uint32_t _ptr_s;
2301 uint32_t cntr_s_1;
2302 TALLOC_CTX *_mem_save_s_0;
2303 TALLOC_CTX *_mem_save_s_1;
2304 if (ndr_flags & NDR_SCALARS) {
2305 NDR_CHECK(ndr_pull_align(ndr, 4));
2306 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2307 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2308 if (_ptr_s) {
2309 NDR_PULL_ALLOC(ndr, r->s);
2310 } else {
2311 r->s = NULL;
2314 if (ndr_flags & NDR_BUFFERS) {
2315 if (r->s) {
2316 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2317 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2318 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2319 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2320 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2321 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2322 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2323 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2325 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2326 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2331 if (r->s) {
2332 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2335 return NDR_ERR_SUCCESS;
2338 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
2340 uint32_t cntr_s_1;
2341 ndr_print_struct(ndr, name, "dfs_EnumArray2");
2342 ndr->depth++;
2343 ndr_print_uint32(ndr, "count", r->count);
2344 ndr_print_ptr(ndr, "s", r->s);
2345 ndr->depth++;
2346 if (r->s) {
2347 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2348 ndr->depth++;
2349 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2350 char *idx_1=NULL;
2351 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2352 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
2353 free(idx_1);
2356 ndr->depth--;
2358 ndr->depth--;
2359 ndr->depth--;
2362 static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
2364 uint32_t cntr_s_1;
2365 if (ndr_flags & NDR_SCALARS) {
2366 NDR_CHECK(ndr_push_align(ndr, 4));
2367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2368 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2370 if (ndr_flags & NDR_BUFFERS) {
2371 if (r->s) {
2372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2373 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2374 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2376 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2377 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2381 return NDR_ERR_SUCCESS;
2384 static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
2386 uint32_t _ptr_s;
2387 uint32_t cntr_s_1;
2388 TALLOC_CTX *_mem_save_s_0;
2389 TALLOC_CTX *_mem_save_s_1;
2390 if (ndr_flags & NDR_SCALARS) {
2391 NDR_CHECK(ndr_pull_align(ndr, 4));
2392 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2393 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2394 if (_ptr_s) {
2395 NDR_PULL_ALLOC(ndr, r->s);
2396 } else {
2397 r->s = NULL;
2400 if (ndr_flags & NDR_BUFFERS) {
2401 if (r->s) {
2402 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2403 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2404 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2405 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2406 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2407 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2408 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2409 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2411 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2412 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2415 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2417 if (r->s) {
2418 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2421 return NDR_ERR_SUCCESS;
2424 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
2426 uint32_t cntr_s_1;
2427 ndr_print_struct(ndr, name, "dfs_EnumArray3");
2428 ndr->depth++;
2429 ndr_print_uint32(ndr, "count", r->count);
2430 ndr_print_ptr(ndr, "s", r->s);
2431 ndr->depth++;
2432 if (r->s) {
2433 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2434 ndr->depth++;
2435 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2436 char *idx_1=NULL;
2437 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2438 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
2439 free(idx_1);
2442 ndr->depth--;
2444 ndr->depth--;
2445 ndr->depth--;
2448 static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
2450 uint32_t cntr_s_1;
2451 if (ndr_flags & NDR_SCALARS) {
2452 NDR_CHECK(ndr_push_align(ndr, 4));
2453 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2454 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2456 if (ndr_flags & NDR_BUFFERS) {
2457 if (r->s) {
2458 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2459 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2460 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2462 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2463 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2467 return NDR_ERR_SUCCESS;
2470 static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
2472 uint32_t _ptr_s;
2473 uint32_t cntr_s_1;
2474 TALLOC_CTX *_mem_save_s_0;
2475 TALLOC_CTX *_mem_save_s_1;
2476 if (ndr_flags & NDR_SCALARS) {
2477 NDR_CHECK(ndr_pull_align(ndr, 4));
2478 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2479 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2480 if (_ptr_s) {
2481 NDR_PULL_ALLOC(ndr, r->s);
2482 } else {
2483 r->s = NULL;
2486 if (ndr_flags & NDR_BUFFERS) {
2487 if (r->s) {
2488 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2489 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2490 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2491 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2492 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2493 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2494 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2495 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2497 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2498 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2500 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2501 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2503 if (r->s) {
2504 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2507 return NDR_ERR_SUCCESS;
2510 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
2512 uint32_t cntr_s_1;
2513 ndr_print_struct(ndr, name, "dfs_EnumArray4");
2514 ndr->depth++;
2515 ndr_print_uint32(ndr, "count", r->count);
2516 ndr_print_ptr(ndr, "s", r->s);
2517 ndr->depth++;
2518 if (r->s) {
2519 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2520 ndr->depth++;
2521 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2522 char *idx_1=NULL;
2523 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2524 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
2525 free(idx_1);
2528 ndr->depth--;
2530 ndr->depth--;
2531 ndr->depth--;
2534 static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r)
2536 uint32_t cntr_s_1;
2537 if (ndr_flags & NDR_SCALARS) {
2538 NDR_CHECK(ndr_push_align(ndr, 4));
2539 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2540 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2542 if (ndr_flags & NDR_BUFFERS) {
2543 if (r->s) {
2544 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2545 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2546 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2548 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2549 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2553 return NDR_ERR_SUCCESS;
2556 static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r)
2558 uint32_t _ptr_s;
2559 uint32_t cntr_s_1;
2560 TALLOC_CTX *_mem_save_s_0;
2561 TALLOC_CTX *_mem_save_s_1;
2562 if (ndr_flags & NDR_SCALARS) {
2563 NDR_CHECK(ndr_pull_align(ndr, 4));
2564 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2565 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2566 if (_ptr_s) {
2567 NDR_PULL_ALLOC(ndr, r->s);
2568 } else {
2569 r->s = NULL;
2572 if (ndr_flags & NDR_BUFFERS) {
2573 if (r->s) {
2574 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2575 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2576 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2577 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2578 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2579 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2580 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2581 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2583 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2584 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2586 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2587 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2589 if (r->s) {
2590 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2593 return NDR_ERR_SUCCESS;
2596 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r)
2598 uint32_t cntr_s_1;
2599 ndr_print_struct(ndr, name, "dfs_EnumArray5");
2600 ndr->depth++;
2601 ndr_print_uint32(ndr, "count", r->count);
2602 ndr_print_ptr(ndr, "s", r->s);
2603 ndr->depth++;
2604 if (r->s) {
2605 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2606 ndr->depth++;
2607 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2608 char *idx_1=NULL;
2609 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2610 ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
2611 free(idx_1);
2614 ndr->depth--;
2616 ndr->depth--;
2617 ndr->depth--;
2620 static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r)
2622 uint32_t cntr_s_1;
2623 if (ndr_flags & NDR_SCALARS) {
2624 NDR_CHECK(ndr_push_align(ndr, 4));
2625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2626 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2628 if (ndr_flags & NDR_BUFFERS) {
2629 if (r->s) {
2630 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2631 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2632 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2634 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2635 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2639 return NDR_ERR_SUCCESS;
2642 static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r)
2644 uint32_t _ptr_s;
2645 uint32_t cntr_s_1;
2646 TALLOC_CTX *_mem_save_s_0;
2647 TALLOC_CTX *_mem_save_s_1;
2648 if (ndr_flags & NDR_SCALARS) {
2649 NDR_CHECK(ndr_pull_align(ndr, 4));
2650 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2651 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2652 if (_ptr_s) {
2653 NDR_PULL_ALLOC(ndr, r->s);
2654 } else {
2655 r->s = NULL;
2658 if (ndr_flags & NDR_BUFFERS) {
2659 if (r->s) {
2660 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2661 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2662 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2663 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2664 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2665 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2666 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2667 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2669 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2670 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2673 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2675 if (r->s) {
2676 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2679 return NDR_ERR_SUCCESS;
2682 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r)
2684 uint32_t cntr_s_1;
2685 ndr_print_struct(ndr, name, "dfs_EnumArray6");
2686 ndr->depth++;
2687 ndr_print_uint32(ndr, "count", r->count);
2688 ndr_print_ptr(ndr, "s", r->s);
2689 ndr->depth++;
2690 if (r->s) {
2691 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2692 ndr->depth++;
2693 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2694 char *idx_1=NULL;
2695 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2696 ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
2697 free(idx_1);
2700 ndr->depth--;
2702 ndr->depth--;
2703 ndr->depth--;
2706 static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
2708 uint32_t cntr_s_1;
2709 if (ndr_flags & NDR_SCALARS) {
2710 NDR_CHECK(ndr_push_align(ndr, 4));
2711 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2712 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2714 if (ndr_flags & NDR_BUFFERS) {
2715 if (r->s) {
2716 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2717 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2718 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2720 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2721 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2725 return NDR_ERR_SUCCESS;
2728 static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
2730 uint32_t _ptr_s;
2731 uint32_t cntr_s_1;
2732 TALLOC_CTX *_mem_save_s_0;
2733 TALLOC_CTX *_mem_save_s_1;
2734 if (ndr_flags & NDR_SCALARS) {
2735 NDR_CHECK(ndr_pull_align(ndr, 4));
2736 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2737 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2738 if (_ptr_s) {
2739 NDR_PULL_ALLOC(ndr, r->s);
2740 } else {
2741 r->s = NULL;
2744 if (ndr_flags & NDR_BUFFERS) {
2745 if (r->s) {
2746 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2747 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2748 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2749 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2750 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2751 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2752 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2753 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2755 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2756 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2759 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2761 if (r->s) {
2762 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2765 return NDR_ERR_SUCCESS;
2768 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
2770 uint32_t cntr_s_1;
2771 ndr_print_struct(ndr, name, "dfs_EnumArray200");
2772 ndr->depth++;
2773 ndr_print_uint32(ndr, "count", r->count);
2774 ndr_print_ptr(ndr, "s", r->s);
2775 ndr->depth++;
2776 if (r->s) {
2777 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2778 ndr->depth++;
2779 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2780 char *idx_1=NULL;
2781 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2782 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
2783 free(idx_1);
2786 ndr->depth--;
2788 ndr->depth--;
2789 ndr->depth--;
2792 static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
2794 uint32_t cntr_s_1;
2795 if (ndr_flags & NDR_SCALARS) {
2796 NDR_CHECK(ndr_push_align(ndr, 4));
2797 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2798 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2800 if (ndr_flags & NDR_BUFFERS) {
2801 if (r->s) {
2802 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2803 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2804 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2806 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2807 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2811 return NDR_ERR_SUCCESS;
2814 static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
2816 uint32_t _ptr_s;
2817 uint32_t cntr_s_1;
2818 TALLOC_CTX *_mem_save_s_0;
2819 TALLOC_CTX *_mem_save_s_1;
2820 if (ndr_flags & NDR_SCALARS) {
2821 NDR_CHECK(ndr_pull_align(ndr, 4));
2822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2823 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2824 if (_ptr_s) {
2825 NDR_PULL_ALLOC(ndr, r->s);
2826 } else {
2827 r->s = NULL;
2830 if (ndr_flags & NDR_BUFFERS) {
2831 if (r->s) {
2832 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2833 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2834 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2835 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2836 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2837 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2838 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2839 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2841 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2842 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2845 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2847 if (r->s) {
2848 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2851 return NDR_ERR_SUCCESS;
2854 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
2856 uint32_t cntr_s_1;
2857 ndr_print_struct(ndr, name, "dfs_EnumArray300");
2858 ndr->depth++;
2859 ndr_print_uint32(ndr, "count", r->count);
2860 ndr_print_ptr(ndr, "s", r->s);
2861 ndr->depth++;
2862 if (r->s) {
2863 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2864 ndr->depth++;
2865 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2866 char *idx_1=NULL;
2867 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2868 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
2869 free(idx_1);
2872 ndr->depth--;
2874 ndr->depth--;
2875 ndr->depth--;
2878 static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
2880 if (ndr_flags & NDR_SCALARS) {
2881 int level = ndr_push_get_switch_value(ndr, r);
2882 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2883 switch (level) {
2884 case 1: {
2885 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
2886 break; }
2888 case 2: {
2889 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2890 break; }
2892 case 3: {
2893 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2894 break; }
2896 case 4: {
2897 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
2898 break; }
2900 case 5: {
2901 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
2902 break; }
2904 case 6: {
2905 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
2906 break; }
2908 case 200: {
2909 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
2910 break; }
2912 case 300: {
2913 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
2914 break; }
2916 default:
2917 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2920 if (ndr_flags & NDR_BUFFERS) {
2921 int level = ndr_push_get_switch_value(ndr, r);
2922 switch (level) {
2923 case 1:
2924 if (r->info1) {
2925 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
2927 break;
2929 case 2:
2930 if (r->info2) {
2931 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
2933 break;
2935 case 3:
2936 if (r->info3) {
2937 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2939 break;
2941 case 4:
2942 if (r->info4) {
2943 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
2945 break;
2947 case 5:
2948 if (r->info5) {
2949 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
2951 break;
2953 case 6:
2954 if (r->info6) {
2955 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
2957 break;
2959 case 200:
2960 if (r->info200) {
2961 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
2963 break;
2965 case 300:
2966 if (r->info300) {
2967 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
2969 break;
2971 default:
2972 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2975 return NDR_ERR_SUCCESS;
2978 static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
2980 int level;
2981 uint32_t _level;
2982 TALLOC_CTX *_mem_save_info1_0;
2983 TALLOC_CTX *_mem_save_info2_0;
2984 TALLOC_CTX *_mem_save_info3_0;
2985 TALLOC_CTX *_mem_save_info4_0;
2986 TALLOC_CTX *_mem_save_info5_0;
2987 TALLOC_CTX *_mem_save_info6_0;
2988 TALLOC_CTX *_mem_save_info200_0;
2989 TALLOC_CTX *_mem_save_info300_0;
2990 level = ndr_pull_get_switch_value(ndr, r);
2991 if (ndr_flags & NDR_SCALARS) {
2992 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2993 if (_level != level) {
2994 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2996 switch (level) {
2997 case 1: {
2998 uint32_t _ptr_info1;
2999 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
3000 if (_ptr_info1) {
3001 NDR_PULL_ALLOC(ndr, r->info1);
3002 } else {
3003 r->info1 = NULL;
3005 break; }
3007 case 2: {
3008 uint32_t _ptr_info2;
3009 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
3010 if (_ptr_info2) {
3011 NDR_PULL_ALLOC(ndr, r->info2);
3012 } else {
3013 r->info2 = NULL;
3015 break; }
3017 case 3: {
3018 uint32_t _ptr_info3;
3019 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
3020 if (_ptr_info3) {
3021 NDR_PULL_ALLOC(ndr, r->info3);
3022 } else {
3023 r->info3 = NULL;
3025 break; }
3027 case 4: {
3028 uint32_t _ptr_info4;
3029 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
3030 if (_ptr_info4) {
3031 NDR_PULL_ALLOC(ndr, r->info4);
3032 } else {
3033 r->info4 = NULL;
3035 break; }
3037 case 5: {
3038 uint32_t _ptr_info5;
3039 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
3040 if (_ptr_info5) {
3041 NDR_PULL_ALLOC(ndr, r->info5);
3042 } else {
3043 r->info5 = NULL;
3045 break; }
3047 case 6: {
3048 uint32_t _ptr_info6;
3049 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
3050 if (_ptr_info6) {
3051 NDR_PULL_ALLOC(ndr, r->info6);
3052 } else {
3053 r->info6 = NULL;
3055 break; }
3057 case 200: {
3058 uint32_t _ptr_info200;
3059 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
3060 if (_ptr_info200) {
3061 NDR_PULL_ALLOC(ndr, r->info200);
3062 } else {
3063 r->info200 = NULL;
3065 break; }
3067 case 300: {
3068 uint32_t _ptr_info300;
3069 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
3070 if (_ptr_info300) {
3071 NDR_PULL_ALLOC(ndr, r->info300);
3072 } else {
3073 r->info300 = NULL;
3075 break; }
3077 default:
3078 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3081 if (ndr_flags & NDR_BUFFERS) {
3082 switch (level) {
3083 case 1:
3084 if (r->info1) {
3085 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3086 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
3087 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3088 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
3090 break;
3092 case 2:
3093 if (r->info2) {
3094 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3095 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
3096 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
3099 break;
3101 case 3:
3102 if (r->info3) {
3103 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
3104 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
3105 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
3108 break;
3110 case 4:
3111 if (r->info4) {
3112 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
3113 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
3114 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3115 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
3117 break;
3119 case 5:
3120 if (r->info5) {
3121 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
3122 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
3123 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3124 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
3126 break;
3128 case 6:
3129 if (r->info6) {
3130 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
3131 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
3132 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3133 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
3135 break;
3137 case 200:
3138 if (r->info200) {
3139 _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
3140 NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
3141 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3142 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
3144 break;
3146 case 300:
3147 if (r->info300) {
3148 _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
3149 NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
3150 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3151 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
3153 break;
3155 default:
3156 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3159 return NDR_ERR_SUCCESS;
3162 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
3164 int level;
3165 level = ndr_print_get_switch_value(ndr, r);
3166 ndr_print_union(ndr, name, level, "dfs_EnumInfo");
3167 switch (level) {
3168 case 1:
3169 ndr_print_ptr(ndr, "info1", r->info1);
3170 ndr->depth++;
3171 if (r->info1) {
3172 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
3174 ndr->depth--;
3175 break;
3177 case 2:
3178 ndr_print_ptr(ndr, "info2", r->info2);
3179 ndr->depth++;
3180 if (r->info2) {
3181 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
3183 ndr->depth--;
3184 break;
3186 case 3:
3187 ndr_print_ptr(ndr, "info3", r->info3);
3188 ndr->depth++;
3189 if (r->info3) {
3190 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
3192 ndr->depth--;
3193 break;
3195 case 4:
3196 ndr_print_ptr(ndr, "info4", r->info4);
3197 ndr->depth++;
3198 if (r->info4) {
3199 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
3201 ndr->depth--;
3202 break;
3204 case 5:
3205 ndr_print_ptr(ndr, "info5", r->info5);
3206 ndr->depth++;
3207 if (r->info5) {
3208 ndr_print_dfs_EnumArray5(ndr, "info5", r->info5);
3210 ndr->depth--;
3211 break;
3213 case 6:
3214 ndr_print_ptr(ndr, "info6", r->info6);
3215 ndr->depth++;
3216 if (r->info6) {
3217 ndr_print_dfs_EnumArray6(ndr, "info6", r->info6);
3219 ndr->depth--;
3220 break;
3222 case 200:
3223 ndr_print_ptr(ndr, "info200", r->info200);
3224 ndr->depth++;
3225 if (r->info200) {
3226 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
3228 ndr->depth--;
3229 break;
3231 case 300:
3232 ndr_print_ptr(ndr, "info300", r->info300);
3233 ndr->depth++;
3234 if (r->info300) {
3235 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
3237 ndr->depth--;
3238 break;
3240 default:
3241 ndr_print_bad_level(ndr, name, level);
3245 static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
3247 if (ndr_flags & NDR_SCALARS) {
3248 NDR_CHECK(ndr_push_align(ndr, 4));
3249 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3250 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
3251 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3253 if (ndr_flags & NDR_BUFFERS) {
3254 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3256 return NDR_ERR_SUCCESS;
3259 static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
3261 if (ndr_flags & NDR_SCALARS) {
3262 NDR_CHECK(ndr_pull_align(ndr, 4));
3263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3264 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
3265 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3267 if (ndr_flags & NDR_BUFFERS) {
3268 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3270 return NDR_ERR_SUCCESS;
3273 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
3275 ndr_print_struct(ndr, name, "dfs_EnumStruct");
3276 ndr->depth++;
3277 ndr_print_uint32(ndr, "level", r->level);
3278 ndr_print_set_switch_value(ndr, &r->e, r->level);
3279 ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
3280 ndr->depth--;
3283 static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
3285 if (ndr_flags & NDR_SCALARS) {
3286 NDR_CHECK(ndr_push_align(ndr, 4));
3287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3288 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
3290 if (ndr_flags & NDR_BUFFERS) {
3291 if (r->unknown2) {
3292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3295 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3298 return NDR_ERR_SUCCESS;
3301 static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
3303 uint32_t _ptr_unknown2;
3304 TALLOC_CTX *_mem_save_unknown2_0;
3305 if (ndr_flags & NDR_SCALARS) {
3306 NDR_CHECK(ndr_pull_align(ndr, 4));
3307 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3308 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
3309 if (_ptr_unknown2) {
3310 NDR_PULL_ALLOC(ndr, r->unknown2);
3311 } else {
3312 r->unknown2 = NULL;
3315 if (ndr_flags & NDR_BUFFERS) {
3316 if (r->unknown2) {
3317 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3318 NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
3319 NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
3320 NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
3321 if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) {
3322 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));
3324 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t)));
3325 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16));
3326 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
3329 return NDR_ERR_SUCCESS;
3332 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
3334 ndr_print_struct(ndr, name, "dfs_UnknownStruct");
3335 ndr->depth++;
3336 ndr_print_uint32(ndr, "unknown1", r->unknown1);
3337 ndr_print_ptr(ndr, "unknown2", r->unknown2);
3338 ndr->depth++;
3339 if (r->unknown2) {
3340 ndr_print_string(ndr, "unknown2", r->unknown2);
3342 ndr->depth--;
3343 ndr->depth--;
3346 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
3348 if (flags & NDR_IN) {
3350 if (flags & NDR_OUT) {
3351 if (r->out.version == NULL) {
3352 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3354 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
3356 return NDR_ERR_SUCCESS;
3359 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
3361 TALLOC_CTX *_mem_save_version_0;
3362 if (flags & NDR_IN) {
3363 ZERO_STRUCT(r->out);
3365 NDR_PULL_ALLOC(ndr, r->out.version);
3366 ZERO_STRUCTP(r->out.version);
3368 if (flags & NDR_OUT) {
3369 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3370 NDR_PULL_ALLOC(ndr, r->out.version);
3372 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3373 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3374 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
3375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3377 return NDR_ERR_SUCCESS;
3380 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
3382 ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
3383 ndr->depth++;
3384 if (flags & NDR_SET_VALUES) {
3385 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3387 if (flags & NDR_IN) {
3388 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
3389 ndr->depth++;
3390 ndr->depth--;
3392 if (flags & NDR_OUT) {
3393 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
3394 ndr->depth++;
3395 ndr_print_ptr(ndr, "version", r->out.version);
3396 ndr->depth++;
3397 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
3398 ndr->depth--;
3399 ndr->depth--;
3401 ndr->depth--;
3404 static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
3406 if (flags & NDR_IN) {
3407 if (r->in.path == NULL) {
3408 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3413 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3414 if (r->in.server == 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.server, 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.server, CH_UTF16)));
3420 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3421 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
3422 if (r->in.share) {
3423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3425 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3426 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3428 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
3429 if (r->in.comment) {
3430 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, 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.comment, CH_UTF16)));
3433 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3435 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3437 if (flags & NDR_OUT) {
3438 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3440 return NDR_ERR_SUCCESS;
3443 static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
3445 uint32_t _ptr_share;
3446 uint32_t _ptr_comment;
3447 TALLOC_CTX *_mem_save_share_0;
3448 TALLOC_CTX *_mem_save_comment_0;
3449 if (flags & NDR_IN) {
3450 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3451 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3452 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
3453 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));
3455 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
3456 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
3457 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
3458 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
3459 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
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.server), ndr_get_array_length(ndr, &r->in.server));
3462 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
3463 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
3464 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
3465 if (_ptr_share) {
3466 NDR_PULL_ALLOC(ndr, r->in.share);
3467 } else {
3468 r->in.share = NULL;
3470 if (r->in.share) {
3471 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
3472 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
3473 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
3474 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
3475 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
3476 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));
3478 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
3479 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
3480 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
3482 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3483 if (_ptr_comment) {
3484 NDR_PULL_ALLOC(ndr, r->in.comment);
3485 } else {
3486 r->in.comment = NULL;
3488 if (r->in.comment) {
3489 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3490 NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
3491 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
3492 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
3493 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
3494 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));
3496 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
3497 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
3498 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3500 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3502 if (flags & NDR_OUT) {
3503 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3505 return NDR_ERR_SUCCESS;
3508 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
3510 ndr_print_struct(ndr, name, "dfs_Add");
3511 ndr->depth++;
3512 if (flags & NDR_SET_VALUES) {
3513 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3515 if (flags & NDR_IN) {
3516 ndr_print_struct(ndr, "in", "dfs_Add");
3517 ndr->depth++;
3518 ndr_print_ptr(ndr, "path", r->in.path);
3519 ndr->depth++;
3520 ndr_print_string(ndr, "path", r->in.path);
3521 ndr->depth--;
3522 ndr_print_ptr(ndr, "server", r->in.server);
3523 ndr->depth++;
3524 ndr_print_string(ndr, "server", r->in.server);
3525 ndr->depth--;
3526 ndr_print_ptr(ndr, "share", r->in.share);
3527 ndr->depth++;
3528 if (r->in.share) {
3529 ndr_print_string(ndr, "share", r->in.share);
3531 ndr->depth--;
3532 ndr_print_ptr(ndr, "comment", r->in.comment);
3533 ndr->depth++;
3534 if (r->in.comment) {
3535 ndr_print_string(ndr, "comment", r->in.comment);
3537 ndr->depth--;
3538 ndr_print_uint32(ndr, "flags", r->in.flags);
3539 ndr->depth--;
3541 if (flags & NDR_OUT) {
3542 ndr_print_struct(ndr, "out", "dfs_Add");
3543 ndr->depth++;
3544 ndr_print_WERROR(ndr, "result", r->out.result);
3545 ndr->depth--;
3547 ndr->depth--;
3550 static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
3552 if (flags & NDR_IN) {
3553 if (r->in.dfs_entry_path == NULL) {
3554 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3556 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3557 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3558 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3559 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));
3560 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3561 if (r->in.servername) {
3562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3565 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3567 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3568 if (r->in.sharename) {
3569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, 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.sharename, CH_UTF16)));
3572 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3575 if (flags & NDR_OUT) {
3576 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3578 return NDR_ERR_SUCCESS;
3581 static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
3583 uint32_t _ptr_servername;
3584 uint32_t _ptr_sharename;
3585 TALLOC_CTX *_mem_save_servername_0;
3586 TALLOC_CTX *_mem_save_sharename_0;
3587 if (flags & NDR_IN) {
3588 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3589 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3590 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3591 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));
3593 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3594 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));
3595 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3596 if (_ptr_servername) {
3597 NDR_PULL_ALLOC(ndr, r->in.servername);
3598 } else {
3599 r->in.servername = NULL;
3601 if (r->in.servername) {
3602 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3603 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3604 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3605 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3606 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3607 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));
3609 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3610 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3611 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3613 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3614 if (_ptr_sharename) {
3615 NDR_PULL_ALLOC(ndr, r->in.sharename);
3616 } else {
3617 r->in.sharename = NULL;
3619 if (r->in.sharename) {
3620 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3621 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3622 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3623 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3624 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3625 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));
3627 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3628 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3629 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3632 if (flags & NDR_OUT) {
3633 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3635 return NDR_ERR_SUCCESS;
3638 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
3640 ndr_print_struct(ndr, name, "dfs_Remove");
3641 ndr->depth++;
3642 if (flags & NDR_SET_VALUES) {
3643 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3645 if (flags & NDR_IN) {
3646 ndr_print_struct(ndr, "in", "dfs_Remove");
3647 ndr->depth++;
3648 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3649 ndr->depth++;
3650 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3651 ndr->depth--;
3652 ndr_print_ptr(ndr, "servername", r->in.servername);
3653 ndr->depth++;
3654 if (r->in.servername) {
3655 ndr_print_string(ndr, "servername", r->in.servername);
3657 ndr->depth--;
3658 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3659 ndr->depth++;
3660 if (r->in.sharename) {
3661 ndr_print_string(ndr, "sharename", r->in.sharename);
3663 ndr->depth--;
3664 ndr->depth--;
3666 if (flags & NDR_OUT) {
3667 ndr_print_struct(ndr, "out", "dfs_Remove");
3668 ndr->depth++;
3669 ndr_print_WERROR(ndr, "result", r->out.result);
3670 ndr->depth--;
3672 ndr->depth--;
3675 static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
3677 if (flags & NDR_IN) {
3678 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3681 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));
3682 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3683 if (r->in.servername) {
3684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3686 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3687 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3689 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3690 if (r->in.sharename) {
3691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, 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.sharename, CH_UTF16)));
3694 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3696 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3697 if (r->in.info == NULL) {
3698 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3700 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
3701 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3703 if (flags & NDR_OUT) {
3704 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3706 return NDR_ERR_SUCCESS;
3709 static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
3711 uint32_t _ptr_servername;
3712 uint32_t _ptr_sharename;
3713 TALLOC_CTX *_mem_save_servername_0;
3714 TALLOC_CTX *_mem_save_sharename_0;
3715 TALLOC_CTX *_mem_save_info_0;
3716 if (flags & NDR_IN) {
3717 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3718 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3719 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3720 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));
3722 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3723 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));
3724 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3725 if (_ptr_servername) {
3726 NDR_PULL_ALLOC(ndr, r->in.servername);
3727 } else {
3728 r->in.servername = NULL;
3730 if (r->in.servername) {
3731 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3732 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3733 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3734 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3735 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3736 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));
3738 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3739 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3740 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3742 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3743 if (_ptr_sharename) {
3744 NDR_PULL_ALLOC(ndr, r->in.sharename);
3745 } else {
3746 r->in.sharename = NULL;
3748 if (r->in.sharename) {
3749 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3750 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3751 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3752 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3753 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3754 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));
3756 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3757 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3760 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3761 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3762 NDR_PULL_ALLOC(ndr, r->in.info);
3764 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3765 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
3766 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
3767 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3770 if (flags & NDR_OUT) {
3771 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3773 return NDR_ERR_SUCCESS;
3776 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
3778 ndr_print_struct(ndr, name, "dfs_SetInfo");
3779 ndr->depth++;
3780 if (flags & NDR_SET_VALUES) {
3781 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3783 if (flags & NDR_IN) {
3784 ndr_print_struct(ndr, "in", "dfs_SetInfo");
3785 ndr->depth++;
3786 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3787 ndr_print_ptr(ndr, "servername", r->in.servername);
3788 ndr->depth++;
3789 if (r->in.servername) {
3790 ndr_print_string(ndr, "servername", r->in.servername);
3792 ndr->depth--;
3793 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3794 ndr->depth++;
3795 if (r->in.sharename) {
3796 ndr_print_string(ndr, "sharename", r->in.sharename);
3798 ndr->depth--;
3799 ndr_print_uint32(ndr, "level", r->in.level);
3800 ndr_print_ptr(ndr, "info", r->in.info);
3801 ndr->depth++;
3802 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
3803 ndr_print_dfs_Info(ndr, "info", r->in.info);
3804 ndr->depth--;
3805 ndr->depth--;
3807 if (flags & NDR_OUT) {
3808 ndr_print_struct(ndr, "out", "dfs_SetInfo");
3809 ndr->depth++;
3810 ndr_print_WERROR(ndr, "result", r->out.result);
3811 ndr->depth--;
3813 ndr->depth--;
3816 static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
3818 if (flags & NDR_IN) {
3819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3822 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));
3823 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3824 if (r->in.servername) {
3825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3828 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3830 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3831 if (r->in.sharename) {
3832 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, 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.sharename, CH_UTF16)));
3835 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3837 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3839 if (flags & NDR_OUT) {
3840 if (r->out.info == NULL) {
3841 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3843 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
3844 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3845 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3847 return NDR_ERR_SUCCESS;
3850 static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
3852 uint32_t _ptr_servername;
3853 uint32_t _ptr_sharename;
3854 TALLOC_CTX *_mem_save_servername_0;
3855 TALLOC_CTX *_mem_save_sharename_0;
3856 TALLOC_CTX *_mem_save_info_0;
3857 if (flags & NDR_IN) {
3858 ZERO_STRUCT(r->out);
3860 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3861 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3862 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3863 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));
3865 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3866 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));
3867 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3868 if (_ptr_servername) {
3869 NDR_PULL_ALLOC(ndr, r->in.servername);
3870 } else {
3871 r->in.servername = NULL;
3873 if (r->in.servername) {
3874 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3875 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3876 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3877 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3878 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3879 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));
3881 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3882 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3883 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3885 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3886 if (_ptr_sharename) {
3887 NDR_PULL_ALLOC(ndr, r->in.sharename);
3888 } else {
3889 r->in.sharename = NULL;
3891 if (r->in.sharename) {
3892 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3893 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3894 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3895 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3896 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3897 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));
3899 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3900 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3901 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3903 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3904 NDR_PULL_ALLOC(ndr, r->out.info);
3905 ZERO_STRUCTP(r->out.info);
3907 if (flags & NDR_OUT) {
3908 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3909 NDR_PULL_ALLOC(ndr, r->out.info);
3911 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3912 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
3913 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
3914 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3915 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3916 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3918 return NDR_ERR_SUCCESS;
3921 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
3923 ndr_print_struct(ndr, name, "dfs_GetInfo");
3924 ndr->depth++;
3925 if (flags & NDR_SET_VALUES) {
3926 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3928 if (flags & NDR_IN) {
3929 ndr_print_struct(ndr, "in", "dfs_GetInfo");
3930 ndr->depth++;
3931 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3932 ndr_print_ptr(ndr, "servername", r->in.servername);
3933 ndr->depth++;
3934 if (r->in.servername) {
3935 ndr_print_string(ndr, "servername", r->in.servername);
3937 ndr->depth--;
3938 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3939 ndr->depth++;
3940 if (r->in.sharename) {
3941 ndr_print_string(ndr, "sharename", r->in.sharename);
3943 ndr->depth--;
3944 ndr_print_uint32(ndr, "level", r->in.level);
3945 ndr->depth--;
3947 if (flags & NDR_OUT) {
3948 ndr_print_struct(ndr, "out", "dfs_GetInfo");
3949 ndr->depth++;
3950 ndr_print_ptr(ndr, "info", r->out.info);
3951 ndr->depth++;
3952 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
3953 ndr_print_dfs_Info(ndr, "info", r->out.info);
3954 ndr->depth--;
3955 ndr_print_WERROR(ndr, "result", r->out.result);
3956 ndr->depth--;
3958 ndr->depth--;
3961 static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
3963 if (flags & NDR_IN) {
3964 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3965 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
3966 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
3967 if (r->in.info) {
3968 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3970 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
3971 if (r->in.total) {
3972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
3975 if (flags & NDR_OUT) {
3976 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
3977 if (r->out.info) {
3978 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3980 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
3981 if (r->out.total) {
3982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
3984 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3986 return NDR_ERR_SUCCESS;
3989 static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
3991 uint32_t _ptr_info;
3992 uint32_t _ptr_total;
3993 TALLOC_CTX *_mem_save_info_0;
3994 TALLOC_CTX *_mem_save_total_0;
3995 if (flags & NDR_IN) {
3996 ZERO_STRUCT(r->out);
3998 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3999 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
4000 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4001 if (_ptr_info) {
4002 NDR_PULL_ALLOC(ndr, r->in.info);
4003 } else {
4004 r->in.info = NULL;
4006 if (r->in.info) {
4007 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4008 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
4009 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4012 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4013 if (_ptr_total) {
4014 NDR_PULL_ALLOC(ndr, r->in.total);
4015 } else {
4016 r->in.total = NULL;
4018 if (r->in.total) {
4019 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4020 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
4021 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
4022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4025 if (flags & NDR_OUT) {
4026 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4027 if (_ptr_info) {
4028 NDR_PULL_ALLOC(ndr, r->out.info);
4029 } else {
4030 r->out.info = NULL;
4032 if (r->out.info) {
4033 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4034 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
4035 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4036 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4038 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4039 if (_ptr_total) {
4040 NDR_PULL_ALLOC(ndr, r->out.total);
4041 } else {
4042 r->out.total = NULL;
4044 if (r->out.total) {
4045 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4046 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
4047 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
4048 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4050 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4052 return NDR_ERR_SUCCESS;
4055 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
4057 ndr_print_struct(ndr, name, "dfs_Enum");
4058 ndr->depth++;
4059 if (flags & NDR_SET_VALUES) {
4060 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4062 if (flags & NDR_IN) {
4063 ndr_print_struct(ndr, "in", "dfs_Enum");
4064 ndr->depth++;
4065 ndr_print_uint32(ndr, "level", r->in.level);
4066 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
4067 ndr_print_ptr(ndr, "info", r->in.info);
4068 ndr->depth++;
4069 if (r->in.info) {
4070 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
4072 ndr->depth--;
4073 ndr_print_ptr(ndr, "total", r->in.total);
4074 ndr->depth++;
4075 if (r->in.total) {
4076 ndr_print_uint32(ndr, "total", *r->in.total);
4078 ndr->depth--;
4079 ndr->depth--;
4081 if (flags & NDR_OUT) {
4082 ndr_print_struct(ndr, "out", "dfs_Enum");
4083 ndr->depth++;
4084 ndr_print_ptr(ndr, "info", r->out.info);
4085 ndr->depth++;
4086 if (r->out.info) {
4087 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
4089 ndr->depth--;
4090 ndr_print_ptr(ndr, "total", r->out.total);
4091 ndr->depth++;
4092 if (r->out.total) {
4093 ndr_print_uint32(ndr, "total", *r->out.total);
4095 ndr->depth--;
4096 ndr_print_WERROR(ndr, "result", r->out.result);
4097 ndr->depth--;
4099 ndr->depth--;
4102 static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
4104 if (flags & NDR_IN) {
4106 if (flags & NDR_OUT) {
4107 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4109 return NDR_ERR_SUCCESS;
4112 static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
4114 if (flags & NDR_IN) {
4116 if (flags & NDR_OUT) {
4117 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4119 return NDR_ERR_SUCCESS;
4122 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
4124 ndr_print_struct(ndr, name, "dfs_Rename");
4125 ndr->depth++;
4126 if (flags & NDR_SET_VALUES) {
4127 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4129 if (flags & NDR_IN) {
4130 ndr_print_struct(ndr, "in", "dfs_Rename");
4131 ndr->depth++;
4132 ndr->depth--;
4134 if (flags & NDR_OUT) {
4135 ndr_print_struct(ndr, "out", "dfs_Rename");
4136 ndr->depth++;
4137 ndr_print_WERROR(ndr, "result", r->out.result);
4138 ndr->depth--;
4140 ndr->depth--;
4143 static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
4145 if (flags & NDR_IN) {
4147 if (flags & NDR_OUT) {
4148 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4150 return NDR_ERR_SUCCESS;
4153 static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
4155 if (flags & NDR_IN) {
4157 if (flags & NDR_OUT) {
4158 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4160 return NDR_ERR_SUCCESS;
4163 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
4165 ndr_print_struct(ndr, name, "dfs_Move");
4166 ndr->depth++;
4167 if (flags & NDR_SET_VALUES) {
4168 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4170 if (flags & NDR_IN) {
4171 ndr_print_struct(ndr, "in", "dfs_Move");
4172 ndr->depth++;
4173 ndr->depth--;
4175 if (flags & NDR_OUT) {
4176 ndr_print_struct(ndr, "out", "dfs_Move");
4177 ndr->depth++;
4178 ndr_print_WERROR(ndr, "result", r->out.result);
4179 ndr->depth--;
4181 ndr->depth--;
4184 static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
4186 if (flags & NDR_IN) {
4188 if (flags & NDR_OUT) {
4189 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4191 return NDR_ERR_SUCCESS;
4194 static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
4196 if (flags & NDR_IN) {
4198 if (flags & NDR_OUT) {
4199 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4201 return NDR_ERR_SUCCESS;
4204 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
4206 ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
4207 ndr->depth++;
4208 if (flags & NDR_SET_VALUES) {
4209 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4211 if (flags & NDR_IN) {
4212 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
4213 ndr->depth++;
4214 ndr->depth--;
4216 if (flags & NDR_OUT) {
4217 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
4218 ndr->depth++;
4219 ndr_print_WERROR(ndr, "result", r->out.result);
4220 ndr->depth--;
4222 ndr->depth--;
4225 static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
4227 if (flags & NDR_IN) {
4229 if (flags & NDR_OUT) {
4230 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4232 return NDR_ERR_SUCCESS;
4235 static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
4237 if (flags & NDR_IN) {
4239 if (flags & NDR_OUT) {
4240 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4242 return NDR_ERR_SUCCESS;
4245 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
4247 ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
4248 ndr->depth++;
4249 if (flags & NDR_SET_VALUES) {
4250 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4252 if (flags & NDR_IN) {
4253 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
4254 ndr->depth++;
4255 ndr->depth--;
4257 if (flags & NDR_OUT) {
4258 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
4259 ndr->depth++;
4260 ndr_print_WERROR(ndr, "result", r->out.result);
4261 ndr->depth--;
4263 ndr->depth--;
4266 static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
4268 if (flags & NDR_IN) {
4269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4272 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4276 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));
4277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4280 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4284 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4288 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4292 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));
4293 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
4294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4295 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
4296 if (r->in.unknown2) {
4297 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
4298 if (*r->in.unknown2) {
4299 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4303 if (flags & NDR_OUT) {
4304 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
4305 if (r->out.unknown2) {
4306 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
4307 if (*r->out.unknown2) {
4308 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4311 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4313 return NDR_ERR_SUCCESS;
4316 static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
4318 uint32_t _ptr_unknown2;
4319 TALLOC_CTX *_mem_save_unknown2_0;
4320 TALLOC_CTX *_mem_save_unknown2_1;
4321 if (flags & NDR_IN) {
4322 ZERO_STRUCT(r->out);
4324 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4325 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4326 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4327 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));
4329 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4330 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4331 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4332 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4333 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_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.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername));
4336 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4337 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));
4338 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4339 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4340 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
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.dfsname), ndr_get_array_length(ndr, &r->in.dfsname));
4343 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4344 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4345 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4346 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4347 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4350 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4351 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4352 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4353 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4354 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
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.comment), ndr_get_array_length(ndr, &r->in.comment));
4357 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4358 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4359 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
4360 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
4361 if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) {
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.dfs_config_dn), ndr_get_array_length(ndr, &r->in.dfs_config_dn));
4364 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t)));
4365 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));
4366 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
4367 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4368 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4369 if (_ptr_unknown2) {
4370 NDR_PULL_ALLOC(ndr, r->in.unknown2);
4371 } else {
4372 r->in.unknown2 = NULL;
4374 if (r->in.unknown2) {
4375 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4376 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
4377 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4378 if (_ptr_unknown2) {
4379 NDR_PULL_ALLOC(ndr, *r->in.unknown2);
4380 } else {
4381 *r->in.unknown2 = NULL;
4383 if (*r->in.unknown2) {
4384 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4385 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
4386 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4387 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4389 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4392 if (flags & NDR_OUT) {
4393 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4394 if (_ptr_unknown2) {
4395 NDR_PULL_ALLOC(ndr, r->out.unknown2);
4396 } else {
4397 r->out.unknown2 = NULL;
4399 if (r->out.unknown2) {
4400 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4401 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
4402 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4403 if (_ptr_unknown2) {
4404 NDR_PULL_ALLOC(ndr, *r->out.unknown2);
4405 } else {
4406 *r->out.unknown2 = NULL;
4408 if (*r->out.unknown2) {
4409 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4410 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
4411 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4416 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4418 return NDR_ERR_SUCCESS;
4421 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
4423 ndr_print_struct(ndr, name, "dfs_AddFtRoot");
4424 ndr->depth++;
4425 if (flags & NDR_SET_VALUES) {
4426 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4428 if (flags & NDR_IN) {
4429 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
4430 ndr->depth++;
4431 ndr_print_string(ndr, "servername", r->in.servername);
4432 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4433 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4434 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4435 ndr_print_string(ndr, "comment", r->in.comment);
4436 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
4437 ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
4438 ndr_print_uint32(ndr, "flags", r->in.flags);
4439 ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
4440 ndr->depth++;
4441 if (r->in.unknown2) {
4442 ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
4443 ndr->depth++;
4444 if (*r->in.unknown2) {
4445 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
4447 ndr->depth--;
4449 ndr->depth--;
4450 ndr->depth--;
4452 if (flags & NDR_OUT) {
4453 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
4454 ndr->depth++;
4455 ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
4456 ndr->depth++;
4457 if (r->out.unknown2) {
4458 ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
4459 ndr->depth++;
4460 if (*r->out.unknown2) {
4461 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
4463 ndr->depth--;
4465 ndr->depth--;
4466 ndr_print_WERROR(ndr, "result", r->out.result);
4467 ndr->depth--;
4469 ndr->depth--;
4472 static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
4474 if (flags & NDR_IN) {
4475 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4478 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4479 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4480 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4482 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));
4483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4486 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4488 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4490 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4492 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
4493 if (r->in.unknown) {
4494 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
4495 if (*r->in.unknown) {
4496 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4500 if (flags & NDR_OUT) {
4501 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
4502 if (r->out.unknown) {
4503 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
4504 if (*r->out.unknown) {
4505 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4508 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4510 return NDR_ERR_SUCCESS;
4513 static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
4515 uint32_t _ptr_unknown;
4516 TALLOC_CTX *_mem_save_unknown_0;
4517 TALLOC_CTX *_mem_save_unknown_1;
4518 if (flags & NDR_IN) {
4519 ZERO_STRUCT(r->out);
4521 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4522 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4523 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4524 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));
4526 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4527 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4528 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4529 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4530 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_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.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername));
4533 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4534 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));
4535 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4536 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4537 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
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.dfsname), ndr_get_array_length(ndr, &r->in.dfsname));
4540 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4541 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4542 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4543 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4544 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4547 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4548 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4549 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4550 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4551 if (_ptr_unknown) {
4552 NDR_PULL_ALLOC(ndr, r->in.unknown);
4553 } else {
4554 r->in.unknown = NULL;
4556 if (r->in.unknown) {
4557 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4558 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
4559 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4560 if (_ptr_unknown) {
4561 NDR_PULL_ALLOC(ndr, *r->in.unknown);
4562 } else {
4563 *r->in.unknown = NULL;
4565 if (*r->in.unknown) {
4566 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4567 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
4568 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4571 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4574 if (flags & NDR_OUT) {
4575 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4576 if (_ptr_unknown) {
4577 NDR_PULL_ALLOC(ndr, r->out.unknown);
4578 } else {
4579 r->out.unknown = NULL;
4581 if (r->out.unknown) {
4582 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4583 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
4584 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4585 if (_ptr_unknown) {
4586 NDR_PULL_ALLOC(ndr, *r->out.unknown);
4587 } else {
4588 *r->out.unknown = NULL;
4590 if (*r->out.unknown) {
4591 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4592 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
4593 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4594 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4598 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4600 return NDR_ERR_SUCCESS;
4603 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
4605 ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
4606 ndr->depth++;
4607 if (flags & NDR_SET_VALUES) {
4608 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4610 if (flags & NDR_IN) {
4611 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
4612 ndr->depth++;
4613 ndr_print_string(ndr, "servername", r->in.servername);
4614 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4615 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4616 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4617 ndr_print_uint32(ndr, "flags", r->in.flags);
4618 ndr_print_ptr(ndr, "unknown", r->in.unknown);
4619 ndr->depth++;
4620 if (r->in.unknown) {
4621 ndr_print_ptr(ndr, "unknown", *r->in.unknown);
4622 ndr->depth++;
4623 if (*r->in.unknown) {
4624 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
4626 ndr->depth--;
4628 ndr->depth--;
4629 ndr->depth--;
4631 if (flags & NDR_OUT) {
4632 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
4633 ndr->depth++;
4634 ndr_print_ptr(ndr, "unknown", r->out.unknown);
4635 ndr->depth++;
4636 if (r->out.unknown) {
4637 ndr_print_ptr(ndr, "unknown", *r->out.unknown);
4638 ndr->depth++;
4639 if (*r->out.unknown) {
4640 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
4642 ndr->depth--;
4644 ndr->depth--;
4645 ndr_print_WERROR(ndr, "result", r->out.result);
4646 ndr->depth--;
4648 ndr->depth--;
4651 static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
4653 if (flags & NDR_IN) {
4654 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4655 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4656 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4657 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4658 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4659 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4661 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4663 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4664 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4665 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4668 if (flags & NDR_OUT) {
4669 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4671 return NDR_ERR_SUCCESS;
4674 static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
4676 if (flags & NDR_IN) {
4677 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4678 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4679 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4680 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));
4682 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4683 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4684 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4685 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4686 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4689 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4690 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4691 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4692 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4693 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
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.comment), ndr_get_array_length(ndr, &r->in.comment));
4696 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4697 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4698 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4700 if (flags & NDR_OUT) {
4701 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4703 return NDR_ERR_SUCCESS;
4706 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
4708 ndr_print_struct(ndr, name, "dfs_AddStdRoot");
4709 ndr->depth++;
4710 if (flags & NDR_SET_VALUES) {
4711 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4713 if (flags & NDR_IN) {
4714 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
4715 ndr->depth++;
4716 ndr_print_string(ndr, "servername", r->in.servername);
4717 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4718 ndr_print_string(ndr, "comment", r->in.comment);
4719 ndr_print_uint32(ndr, "flags", r->in.flags);
4720 ndr->depth--;
4722 if (flags & NDR_OUT) {
4723 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
4724 ndr->depth++;
4725 ndr_print_WERROR(ndr, "result", r->out.result);
4726 ndr->depth--;
4728 ndr->depth--;
4731 static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
4733 if (flags & NDR_IN) {
4734 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4736 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4737 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4738 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4739 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4741 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4742 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4744 if (flags & NDR_OUT) {
4745 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4747 return NDR_ERR_SUCCESS;
4750 static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
4752 if (flags & NDR_IN) {
4753 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4754 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4755 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4756 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));
4758 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4759 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4760 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4761 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4762 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4765 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4766 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4767 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4769 if (flags & NDR_OUT) {
4770 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4772 return NDR_ERR_SUCCESS;
4775 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
4777 ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
4778 ndr->depth++;
4779 if (flags & NDR_SET_VALUES) {
4780 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4782 if (flags & NDR_IN) {
4783 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
4784 ndr->depth++;
4785 ndr_print_string(ndr, "servername", r->in.servername);
4786 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4787 ndr_print_uint32(ndr, "flags", r->in.flags);
4788 ndr->depth--;
4790 if (flags & NDR_OUT) {
4791 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
4792 ndr->depth++;
4793 ndr_print_WERROR(ndr, "result", r->out.result);
4794 ndr->depth--;
4796 ndr->depth--;
4799 static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
4801 if (flags & NDR_IN) {
4802 if (r->in.servername == NULL) {
4803 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4805 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4807 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4808 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4811 if (flags & NDR_OUT) {
4812 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4814 return NDR_ERR_SUCCESS;
4817 static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
4819 if (flags & NDR_IN) {
4820 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4821 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4822 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4823 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));
4825 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4826 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4827 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4829 if (flags & NDR_OUT) {
4830 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4832 return NDR_ERR_SUCCESS;
4835 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
4837 ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
4838 ndr->depth++;
4839 if (flags & NDR_SET_VALUES) {
4840 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4842 if (flags & NDR_IN) {
4843 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
4844 ndr->depth++;
4845 ndr_print_ptr(ndr, "servername", r->in.servername);
4846 ndr->depth++;
4847 ndr_print_string(ndr, "servername", r->in.servername);
4848 ndr->depth--;
4849 ndr_print_uint32(ndr, "flags", r->in.flags);
4850 ndr->depth--;
4852 if (flags & NDR_OUT) {
4853 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
4854 ndr->depth++;
4855 ndr_print_WERROR(ndr, "result", r->out.result);
4856 ndr->depth--;
4858 ndr->depth--;
4861 static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
4863 if (flags & NDR_IN) {
4864 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4865 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4866 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4867 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4869 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4870 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4871 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4874 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4875 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4877 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4878 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4879 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4881 if (flags & NDR_OUT) {
4882 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4884 return NDR_ERR_SUCCESS;
4887 static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
4889 if (flags & NDR_IN) {
4890 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4891 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4892 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4893 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));
4895 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4896 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4897 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4898 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4899 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4902 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4903 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4904 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4905 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4906 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
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.comment), ndr_get_array_length(ndr, &r->in.comment));
4909 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4910 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4911 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
4912 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
4913 if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) {
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.store), ndr_get_array_length(ndr, &r->in.store));
4916 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t)));
4917 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16));
4919 if (flags & NDR_OUT) {
4920 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4922 return NDR_ERR_SUCCESS;
4925 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
4927 ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
4928 ndr->depth++;
4929 if (flags & NDR_SET_VALUES) {
4930 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4932 if (flags & NDR_IN) {
4933 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
4934 ndr->depth++;
4935 ndr_print_string(ndr, "servername", r->in.servername);
4936 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4937 ndr_print_string(ndr, "comment", r->in.comment);
4938 ndr_print_string(ndr, "store", r->in.store);
4939 ndr->depth--;
4941 if (flags & NDR_OUT) {
4942 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
4943 ndr->depth++;
4944 ndr_print_WERROR(ndr, "result", r->out.result);
4945 ndr->depth--;
4947 ndr->depth--;
4950 static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
4952 if (flags & NDR_IN) {
4953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4956 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4957 if (r->in.server_fullname == NULL) {
4958 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4960 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname));
4961 if (*r->in.server_fullname) {
4962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
4963 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4964 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
4965 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));
4967 if (r->in.is_root == NULL) {
4968 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4970 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root));
4971 if (r->in.ttl == NULL) {
4972 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4974 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl));
4976 if (flags & NDR_OUT) {
4977 if (r->out.server_fullname == NULL) {
4978 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4980 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname));
4981 if (*r->out.server_fullname) {
4982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
4983 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4984 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
4985 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));
4987 if (r->out.is_root == NULL) {
4988 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4990 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root));
4991 if (r->out.ttl == NULL) {
4992 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4994 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl));
4995 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4997 return NDR_ERR_SUCCESS;
5000 static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
5002 uint32_t _ptr_server_fullname;
5003 TALLOC_CTX *_mem_save_server_fullname_0;
5004 TALLOC_CTX *_mem_save_server_fullname_1;
5005 TALLOC_CTX *_mem_save_is_root_0;
5006 TALLOC_CTX *_mem_save_ttl_0;
5007 if (flags & NDR_IN) {
5008 ZERO_STRUCT(r->out);
5010 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5011 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5012 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5013 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));
5015 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5016 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5017 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5018 NDR_PULL_ALLOC(ndr, r->in.server_fullname);
5020 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5021 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5022 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5023 if (_ptr_server_fullname) {
5024 NDR_PULL_ALLOC(ndr, *r->in.server_fullname);
5025 } else {
5026 *r->in.server_fullname = NULL;
5028 if (*r->in.server_fullname) {
5029 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5030 NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0);
5031 NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname));
5032 NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname));
5033 if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) {
5034 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));
5036 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t)));
5037 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));
5038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5040 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5041 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5042 NDR_PULL_ALLOC(ndr, r->in.is_root);
5044 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5045 NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC);
5046 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root));
5047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5048 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5049 NDR_PULL_ALLOC(ndr, r->in.ttl);
5051 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5052 NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC);
5053 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl));
5054 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5055 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5056 *r->out.server_fullname = *r->in.server_fullname;
5057 NDR_PULL_ALLOC(ndr, r->out.is_root);
5058 *r->out.is_root = *r->in.is_root;
5059 NDR_PULL_ALLOC(ndr, r->out.ttl);
5060 *r->out.ttl = *r->in.ttl;
5062 if (flags & NDR_OUT) {
5063 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5064 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5066 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5067 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5068 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5069 if (_ptr_server_fullname) {
5070 NDR_PULL_ALLOC(ndr, *r->out.server_fullname);
5071 } else {
5072 *r->out.server_fullname = NULL;
5074 if (*r->out.server_fullname) {
5075 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5076 NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0);
5077 NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname));
5078 NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname));
5079 if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) {
5080 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));
5082 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t)));
5083 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));
5084 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5086 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5087 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5088 NDR_PULL_ALLOC(ndr, r->out.is_root);
5090 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5091 NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC);
5092 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root));
5093 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5094 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5095 NDR_PULL_ALLOC(ndr, r->out.ttl);
5097 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5098 NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC);
5099 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl));
5100 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5101 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5103 return NDR_ERR_SUCCESS;
5106 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
5108 ndr_print_struct(ndr, name, "dfs_GetDcAddress");
5109 ndr->depth++;
5110 if (flags & NDR_SET_VALUES) {
5111 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5113 if (flags & NDR_IN) {
5114 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
5115 ndr->depth++;
5116 ndr_print_string(ndr, "servername", r->in.servername);
5117 ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname);
5118 ndr->depth++;
5119 ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname);
5120 ndr->depth++;
5121 if (*r->in.server_fullname) {
5122 ndr_print_string(ndr, "server_fullname", *r->in.server_fullname);
5124 ndr->depth--;
5125 ndr->depth--;
5126 ndr_print_ptr(ndr, "is_root", r->in.is_root);
5127 ndr->depth++;
5128 ndr_print_uint8(ndr, "is_root", *r->in.is_root);
5129 ndr->depth--;
5130 ndr_print_ptr(ndr, "ttl", r->in.ttl);
5131 ndr->depth++;
5132 ndr_print_uint32(ndr, "ttl", *r->in.ttl);
5133 ndr->depth--;
5134 ndr->depth--;
5136 if (flags & NDR_OUT) {
5137 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
5138 ndr->depth++;
5139 ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname);
5140 ndr->depth++;
5141 ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname);
5142 ndr->depth++;
5143 if (*r->out.server_fullname) {
5144 ndr_print_string(ndr, "server_fullname", *r->out.server_fullname);
5146 ndr->depth--;
5147 ndr->depth--;
5148 ndr_print_ptr(ndr, "is_root", r->out.is_root);
5149 ndr->depth++;
5150 ndr_print_uint8(ndr, "is_root", *r->out.is_root);
5151 ndr->depth--;
5152 ndr_print_ptr(ndr, "ttl", r->out.ttl);
5153 ndr->depth++;
5154 ndr_print_uint32(ndr, "ttl", *r->out.ttl);
5155 ndr->depth--;
5156 ndr_print_WERROR(ndr, "result", r->out.result);
5157 ndr->depth--;
5159 ndr->depth--;
5162 static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
5164 if (flags & NDR_IN) {
5165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5168 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5172 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));
5173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl));
5176 if (flags & NDR_OUT) {
5177 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5179 return NDR_ERR_SUCCESS;
5182 static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
5184 if (flags & NDR_IN) {
5185 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5186 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5187 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5188 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));
5190 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5191 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5192 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname));
5193 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname));
5194 if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) {
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.server_fullname), ndr_get_array_length(ndr, &r->in.server_fullname));
5197 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t)));
5198 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));
5199 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl));
5202 if (flags & NDR_OUT) {
5203 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5205 return NDR_ERR_SUCCESS;
5208 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
5210 ndr_print_struct(ndr, name, "dfs_SetDcAddress");
5211 ndr->depth++;
5212 if (flags & NDR_SET_VALUES) {
5213 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5215 if (flags & NDR_IN) {
5216 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
5217 ndr->depth++;
5218 ndr_print_string(ndr, "servername", r->in.servername);
5219 ndr_print_string(ndr, "server_fullname", r->in.server_fullname);
5220 ndr_print_uint32(ndr, "flags", r->in.flags);
5221 ndr_print_uint32(ndr, "ttl", r->in.ttl);
5222 ndr->depth--;
5224 if (flags & NDR_OUT) {
5225 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
5226 ndr->depth++;
5227 ndr_print_WERROR(ndr, "result", r->out.result);
5228 ndr->depth--;
5230 ndr->depth--;
5233 static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
5235 if (flags & NDR_IN) {
5236 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5239 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5240 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5241 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5243 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5245 if (flags & NDR_OUT) {
5246 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5248 return NDR_ERR_SUCCESS;
5251 static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
5253 if (flags & NDR_IN) {
5254 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5255 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5256 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5257 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));
5259 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5260 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5261 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5262 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5263 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
5266 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
5267 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
5269 if (flags & NDR_OUT) {
5270 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5272 return NDR_ERR_SUCCESS;
5275 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
5277 ndr_print_struct(ndr, name, "dfs_FlushFtTable");
5278 ndr->depth++;
5279 if (flags & NDR_SET_VALUES) {
5280 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5282 if (flags & NDR_IN) {
5283 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
5284 ndr->depth++;
5285 ndr_print_string(ndr, "servername", r->in.servername);
5286 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5287 ndr->depth--;
5289 if (flags & NDR_OUT) {
5290 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
5291 ndr->depth++;
5292 ndr_print_WERROR(ndr, "result", r->out.result);
5293 ndr->depth--;
5295 ndr->depth--;
5298 static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
5300 if (flags & NDR_IN) {
5302 if (flags & NDR_OUT) {
5303 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5305 return NDR_ERR_SUCCESS;
5308 static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
5310 if (flags & NDR_IN) {
5312 if (flags & NDR_OUT) {
5313 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5315 return NDR_ERR_SUCCESS;
5318 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
5320 ndr_print_struct(ndr, name, "dfs_Add2");
5321 ndr->depth++;
5322 if (flags & NDR_SET_VALUES) {
5323 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5325 if (flags & NDR_IN) {
5326 ndr_print_struct(ndr, "in", "dfs_Add2");
5327 ndr->depth++;
5328 ndr->depth--;
5330 if (flags & NDR_OUT) {
5331 ndr_print_struct(ndr, "out", "dfs_Add2");
5332 ndr->depth++;
5333 ndr_print_WERROR(ndr, "result", r->out.result);
5334 ndr->depth--;
5336 ndr->depth--;
5339 static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
5341 if (flags & NDR_IN) {
5343 if (flags & NDR_OUT) {
5344 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5346 return NDR_ERR_SUCCESS;
5349 static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
5351 if (flags & NDR_IN) {
5353 if (flags & NDR_OUT) {
5354 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5356 return NDR_ERR_SUCCESS;
5359 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
5361 ndr_print_struct(ndr, name, "dfs_Remove2");
5362 ndr->depth++;
5363 if (flags & NDR_SET_VALUES) {
5364 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5366 if (flags & NDR_IN) {
5367 ndr_print_struct(ndr, "in", "dfs_Remove2");
5368 ndr->depth++;
5369 ndr->depth--;
5371 if (flags & NDR_OUT) {
5372 ndr_print_struct(ndr, "out", "dfs_Remove2");
5373 ndr->depth++;
5374 ndr_print_WERROR(ndr, "result", r->out.result);
5375 ndr->depth--;
5377 ndr->depth--;
5380 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
5382 if (flags & NDR_IN) {
5383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5386 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));
5387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
5388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
5389 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5390 if (r->in.info) {
5391 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5393 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
5394 if (r->in.total) {
5395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
5398 if (flags & NDR_OUT) {
5399 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
5400 if (r->out.info) {
5401 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5403 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
5404 if (r->out.total) {
5405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
5407 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5409 return NDR_ERR_SUCCESS;
5412 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
5414 uint32_t _ptr_info;
5415 uint32_t _ptr_total;
5416 TALLOC_CTX *_mem_save_info_0;
5417 TALLOC_CTX *_mem_save_total_0;
5418 if (flags & NDR_IN) {
5419 ZERO_STRUCT(r->out);
5421 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
5422 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
5423 if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) {
5424 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));
5426 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t)));
5427 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));
5428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
5429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
5430 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5431 if (_ptr_info) {
5432 NDR_PULL_ALLOC(ndr, r->in.info);
5433 } else {
5434 r->in.info = NULL;
5436 if (r->in.info) {
5437 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5438 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5439 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5440 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5443 if (_ptr_total) {
5444 NDR_PULL_ALLOC(ndr, r->in.total);
5445 } else {
5446 r->in.total = NULL;
5448 if (r->in.total) {
5449 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5450 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
5451 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
5452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5455 if (flags & NDR_OUT) {
5456 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5457 if (_ptr_info) {
5458 NDR_PULL_ALLOC(ndr, r->out.info);
5459 } else {
5460 r->out.info = NULL;
5462 if (r->out.info) {
5463 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5464 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
5465 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5468 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5469 if (_ptr_total) {
5470 NDR_PULL_ALLOC(ndr, r->out.total);
5471 } else {
5472 r->out.total = NULL;
5474 if (r->out.total) {
5475 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5476 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
5477 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
5478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5480 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5482 return NDR_ERR_SUCCESS;
5485 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
5487 ndr_print_struct(ndr, name, "dfs_EnumEx");
5488 ndr->depth++;
5489 if (flags & NDR_SET_VALUES) {
5490 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5492 if (flags & NDR_IN) {
5493 ndr_print_struct(ndr, "in", "dfs_EnumEx");
5494 ndr->depth++;
5495 ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
5496 ndr_print_uint32(ndr, "level", r->in.level);
5497 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
5498 ndr_print_ptr(ndr, "info", r->in.info);
5499 ndr->depth++;
5500 if (r->in.info) {
5501 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
5503 ndr->depth--;
5504 ndr_print_ptr(ndr, "total", r->in.total);
5505 ndr->depth++;
5506 if (r->in.total) {
5507 ndr_print_uint32(ndr, "total", *r->in.total);
5509 ndr->depth--;
5510 ndr->depth--;
5512 if (flags & NDR_OUT) {
5513 ndr_print_struct(ndr, "out", "dfs_EnumEx");
5514 ndr->depth++;
5515 ndr_print_ptr(ndr, "info", r->out.info);
5516 ndr->depth++;
5517 if (r->out.info) {
5518 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
5520 ndr->depth--;
5521 ndr_print_ptr(ndr, "total", r->out.total);
5522 ndr->depth++;
5523 if (r->out.total) {
5524 ndr_print_uint32(ndr, "total", *r->out.total);
5526 ndr->depth--;
5527 ndr_print_WERROR(ndr, "result", r->out.result);
5528 ndr->depth--;
5530 ndr->depth--;
5533 static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
5535 if (flags & NDR_IN) {
5537 if (flags & NDR_OUT) {
5538 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5540 return NDR_ERR_SUCCESS;
5543 static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
5545 if (flags & NDR_IN) {
5547 if (flags & NDR_OUT) {
5548 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5550 return NDR_ERR_SUCCESS;
5553 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
5555 ndr_print_struct(ndr, name, "dfs_SetInfo2");
5556 ndr->depth++;
5557 if (flags & NDR_SET_VALUES) {
5558 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5560 if (flags & NDR_IN) {
5561 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
5562 ndr->depth++;
5563 ndr->depth--;
5565 if (flags & NDR_OUT) {
5566 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
5567 ndr->depth++;
5568 ndr_print_WERROR(ndr, "result", r->out.result);
5569 ndr->depth--;
5571 ndr->depth--;
5574 static const struct ndr_interface_call netdfs_calls[] = {
5576 "dfs_GetManagerVersion",
5577 sizeof(struct dfs_GetManagerVersion),
5578 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
5579 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
5580 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
5581 false,
5584 "dfs_Add",
5585 sizeof(struct dfs_Add),
5586 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
5587 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
5588 (ndr_print_function_t) ndr_print_dfs_Add,
5589 false,
5592 "dfs_Remove",
5593 sizeof(struct dfs_Remove),
5594 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
5595 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
5596 (ndr_print_function_t) ndr_print_dfs_Remove,
5597 false,
5600 "dfs_SetInfo",
5601 sizeof(struct dfs_SetInfo),
5602 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
5603 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
5604 (ndr_print_function_t) ndr_print_dfs_SetInfo,
5605 false,
5608 "dfs_GetInfo",
5609 sizeof(struct dfs_GetInfo),
5610 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
5611 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
5612 (ndr_print_function_t) ndr_print_dfs_GetInfo,
5613 false,
5616 "dfs_Enum",
5617 sizeof(struct dfs_Enum),
5618 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
5619 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
5620 (ndr_print_function_t) ndr_print_dfs_Enum,
5621 false,
5624 "dfs_Rename",
5625 sizeof(struct dfs_Rename),
5626 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
5627 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
5628 (ndr_print_function_t) ndr_print_dfs_Rename,
5629 false,
5632 "dfs_Move",
5633 sizeof(struct dfs_Move),
5634 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
5635 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
5636 (ndr_print_function_t) ndr_print_dfs_Move,
5637 false,
5640 "dfs_ManagerGetConfigInfo",
5641 sizeof(struct dfs_ManagerGetConfigInfo),
5642 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
5643 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
5644 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
5645 false,
5648 "dfs_ManagerSendSiteInfo",
5649 sizeof(struct dfs_ManagerSendSiteInfo),
5650 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
5651 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
5652 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
5653 false,
5656 "dfs_AddFtRoot",
5657 sizeof(struct dfs_AddFtRoot),
5658 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
5659 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
5660 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
5661 false,
5664 "dfs_RemoveFtRoot",
5665 sizeof(struct dfs_RemoveFtRoot),
5666 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
5667 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
5668 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
5669 false,
5672 "dfs_AddStdRoot",
5673 sizeof(struct dfs_AddStdRoot),
5674 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
5675 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
5676 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
5677 false,
5680 "dfs_RemoveStdRoot",
5681 sizeof(struct dfs_RemoveStdRoot),
5682 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
5683 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
5684 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
5685 false,
5688 "dfs_ManagerInitialize",
5689 sizeof(struct dfs_ManagerInitialize),
5690 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
5691 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
5692 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
5693 false,
5696 "dfs_AddStdRootForced",
5697 sizeof(struct dfs_AddStdRootForced),
5698 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
5699 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
5700 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
5701 false,
5704 "dfs_GetDcAddress",
5705 sizeof(struct dfs_GetDcAddress),
5706 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
5707 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
5708 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
5709 false,
5712 "dfs_SetDcAddress",
5713 sizeof(struct dfs_SetDcAddress),
5714 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
5715 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
5716 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
5717 false,
5720 "dfs_FlushFtTable",
5721 sizeof(struct dfs_FlushFtTable),
5722 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
5723 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
5724 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
5725 false,
5728 "dfs_Add2",
5729 sizeof(struct dfs_Add2),
5730 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
5731 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
5732 (ndr_print_function_t) ndr_print_dfs_Add2,
5733 false,
5736 "dfs_Remove2",
5737 sizeof(struct dfs_Remove2),
5738 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
5739 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
5740 (ndr_print_function_t) ndr_print_dfs_Remove2,
5741 false,
5744 "dfs_EnumEx",
5745 sizeof(struct dfs_EnumEx),
5746 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
5747 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
5748 (ndr_print_function_t) ndr_print_dfs_EnumEx,
5749 false,
5752 "dfs_SetInfo2",
5753 sizeof(struct dfs_SetInfo2),
5754 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
5755 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
5756 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
5757 false,
5759 { NULL, 0, NULL, NULL, NULL, false }
5762 static const char * const netdfs_endpoint_strings[] = {
5763 "ncacn_np:[\\pipe\\netdfs]",
5764 "ncacn_ip_tcp:",
5765 "ncalrpc:",
5768 static const struct ndr_interface_string_array netdfs_endpoints = {
5769 .count = 3,
5770 .names = netdfs_endpoint_strings
5773 static const char * const netdfs_authservice_strings[] = {
5774 "host",
5777 static const struct ndr_interface_string_array netdfs_authservices = {
5778 .count = 1,
5779 .names = netdfs_authservice_strings
5783 const struct ndr_interface_table ndr_table_netdfs = {
5784 .name = "netdfs",
5785 .syntax_id = {
5786 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5787 NDR_NETDFS_VERSION
5789 .helpstring = NDR_NETDFS_HELPSTRING,
5790 .num_calls = 23,
5791 .calls = netdfs_calls,
5792 .endpoints = &netdfs_endpoints,
5793 .authservices = &netdfs_authservices