rerun make idl
[abartlet/samba.git/.git] / source3 / librpc / gen_ndr / ndr_dfs.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_dfs.h"
5
6 static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r)
7 {
8         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
9         return NDR_ERR_SUCCESS;
10 }
11
12 static enum ndr_err_code ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r)
13 {
14         uint32_t v;
15         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
16         *r = v;
17         return NDR_ERR_SUCCESS;
18 }
19
20 _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r)
21 {
22         const char *val = NULL;
23
24         switch (r) {
25                 case DFS_MANAGER_VERSION_NT4: val = "DFS_MANAGER_VERSION_NT4"; break;
26                 case DFS_MANAGER_VERSION_W2K: val = "DFS_MANAGER_VERSION_W2K"; break;
27                 case DFS_MANAGER_VERSION_W2K3: val = "DFS_MANAGER_VERSION_W2K3"; break;
28         }
29         ndr_print_enum(ndr, name, "ENUM", val, r);
30 }
31
32 static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
33 {
34         if (ndr_flags & NDR_SCALARS) {
35                 NDR_CHECK(ndr_push_align(ndr, 1));
36         }
37         if (ndr_flags & NDR_BUFFERS) {
38         }
39         return NDR_ERR_SUCCESS;
40 }
41
42 static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
43 {
44         if (ndr_flags & NDR_SCALARS) {
45                 NDR_CHECK(ndr_pull_align(ndr, 1));
46         }
47         if (ndr_flags & NDR_BUFFERS) {
48         }
49         return NDR_ERR_SUCCESS;
50 }
51
52 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r)
53 {
54         ndr_print_struct(ndr, name, "dfs_Info0");
55         ndr->depth++;
56         ndr->depth--;
57 }
58
59 static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
60 {
61         if (ndr_flags & NDR_SCALARS) {
62                 NDR_CHECK(ndr_push_align(ndr, 4));
63                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
64         }
65         if (ndr_flags & NDR_BUFFERS) {
66                 if (r->path) {
67                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
68                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
69                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
70                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
71                 }
72         }
73         return NDR_ERR_SUCCESS;
74 }
75
76 static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
77 {
78         uint32_t _ptr_path;
79         TALLOC_CTX *_mem_save_path_0;
80         if (ndr_flags & NDR_SCALARS) {
81                 NDR_CHECK(ndr_pull_align(ndr, 4));
82                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
83                 if (_ptr_path) {
84                         NDR_PULL_ALLOC(ndr, r->path);
85                 } else {
86                         r->path = NULL;
87                 }
88         }
89         if (ndr_flags & NDR_BUFFERS) {
90                 if (r->path) {
91                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
92                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
93                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
94                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
95                         if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
96                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
97                         }
98                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
99                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
100                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
101                 }
102         }
103         return NDR_ERR_SUCCESS;
104 }
105
106 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
107 {
108         ndr_print_struct(ndr, name, "dfs_Info1");
109         ndr->depth++;
110         ndr_print_ptr(ndr, "path", r->path);
111         ndr->depth++;
112         if (r->path) {
113                 ndr_print_string(ndr, "path", r->path);
114         }
115         ndr->depth--;
116         ndr->depth--;
117 }
118
119 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
120 {
121         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
122         return NDR_ERR_SUCCESS;
123 }
124
125 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
126 {
127         uint32_t v;
128         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
129         *r = v;
130         return NDR_ERR_SUCCESS;
131 }
132
133 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r)
134 {
135         ndr_print_uint32(ndr, name, r);
136         ndr->depth++;
137         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r);
138         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r);
139         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r);
140         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r);
141         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r);
142         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r);
143         ndr->depth--;
144 }
145
146 static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
147 {
148         if (ndr_flags & NDR_SCALARS) {
149                 NDR_CHECK(ndr_push_align(ndr, 4));
150                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
151                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
152                 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
153                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
154         }
155         if (ndr_flags & NDR_BUFFERS) {
156                 if (r->path) {
157                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
158                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
159                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
160                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
161                 }
162                 if (r->comment) {
163                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
164                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
165                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
166                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
167                 }
168         }
169         return NDR_ERR_SUCCESS;
170 }
171
172 static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
173 {
174         uint32_t _ptr_path;
175         TALLOC_CTX *_mem_save_path_0;
176         uint32_t _ptr_comment;
177         TALLOC_CTX *_mem_save_comment_0;
178         if (ndr_flags & NDR_SCALARS) {
179                 NDR_CHECK(ndr_pull_align(ndr, 4));
180                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
181                 if (_ptr_path) {
182                         NDR_PULL_ALLOC(ndr, r->path);
183                 } else {
184                         r->path = NULL;
185                 }
186                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
187                 if (_ptr_comment) {
188                         NDR_PULL_ALLOC(ndr, r->comment);
189                 } else {
190                         r->comment = NULL;
191                 }
192                 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
193                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
194         }
195         if (ndr_flags & NDR_BUFFERS) {
196                 if (r->path) {
197                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
198                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
199                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
200                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
201                         if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
202                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
203                         }
204                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
205                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
206                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
207                 }
208                 if (r->comment) {
209                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
210                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
211                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
212                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
213                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
214                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
215                         }
216                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
217                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
218                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
219                 }
220         }
221         return NDR_ERR_SUCCESS;
222 }
223
224 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
225 {
226         ndr_print_struct(ndr, name, "dfs_Info2");
227         ndr->depth++;
228         ndr_print_ptr(ndr, "path", r->path);
229         ndr->depth++;
230         if (r->path) {
231                 ndr_print_string(ndr, "path", r->path);
232         }
233         ndr->depth--;
234         ndr_print_ptr(ndr, "comment", r->comment);
235         ndr->depth++;
236         if (r->comment) {
237                 ndr_print_string(ndr, "comment", r->comment);
238         }
239         ndr->depth--;
240         ndr_print_dfs_VolumeState(ndr, "state", r->state);
241         ndr_print_uint32(ndr, "num_stores", r->num_stores);
242         ndr->depth--;
243 }
244
245 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
246 {
247         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
248         return NDR_ERR_SUCCESS;
249 }
250
251 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
252 {
253         uint32_t v;
254         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
255         *r = v;
256         return NDR_ERR_SUCCESS;
257 }
258
259 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r)
260 {
261         ndr_print_uint32(ndr, name, r);
262         ndr->depth++;
263         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r);
264         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r);
265         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r);
266         ndr->depth--;
267 }
268
269 static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
270 {
271         if (ndr_flags & NDR_SCALARS) {
272                 NDR_CHECK(ndr_push_align(ndr, 4));
273                 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
274                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
275                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
276         }
277         if (ndr_flags & NDR_BUFFERS) {
278                 if (r->server) {
279                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
280                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
281                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
282                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
283                 }
284                 if (r->share) {
285                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
286                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
287                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
288                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
289                 }
290         }
291         return NDR_ERR_SUCCESS;
292 }
293
294 static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
295 {
296         uint32_t _ptr_server;
297         TALLOC_CTX *_mem_save_server_0;
298         uint32_t _ptr_share;
299         TALLOC_CTX *_mem_save_share_0;
300         if (ndr_flags & NDR_SCALARS) {
301                 NDR_CHECK(ndr_pull_align(ndr, 4));
302                 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
303                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
304                 if (_ptr_server) {
305                         NDR_PULL_ALLOC(ndr, r->server);
306                 } else {
307                         r->server = NULL;
308                 }
309                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
310                 if (_ptr_share) {
311                         NDR_PULL_ALLOC(ndr, r->share);
312                 } else {
313                         r->share = NULL;
314                 }
315         }
316         if (ndr_flags & NDR_BUFFERS) {
317                 if (r->server) {
318                         _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
319                         NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
320                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
321                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
322                         if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) {
323                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server), ndr_get_array_length(ndr, &r->server));
324                         }
325                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t)));
326                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16));
327                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
328                 }
329                 if (r->share) {
330                         _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
331                         NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
332                         NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
333                         NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
334                         if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
335                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->share), ndr_get_array_length(ndr, &r->share));
336                         }
337                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
338                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
339                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
340                 }
341         }
342         return NDR_ERR_SUCCESS;
343 }
344
345 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
346 {
347         ndr_print_struct(ndr, name, "dfs_StorageInfo");
348         ndr->depth++;
349         ndr_print_dfs_StorageState(ndr, "state", r->state);
350         ndr_print_ptr(ndr, "server", r->server);
351         ndr->depth++;
352         if (r->server) {
353                 ndr_print_string(ndr, "server", r->server);
354         }
355         ndr->depth--;
356         ndr_print_ptr(ndr, "share", r->share);
357         ndr->depth++;
358         if (r->share) {
359                 ndr_print_string(ndr, "share", r->share);
360         }
361         ndr->depth--;
362         ndr->depth--;
363 }
364
365 static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
366 {
367         uint32_t cntr_stores_1;
368         if (ndr_flags & NDR_SCALARS) {
369                 NDR_CHECK(ndr_push_align(ndr, 4));
370                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
371                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
372                 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
373                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
374                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
375         }
376         if (ndr_flags & NDR_BUFFERS) {
377                 if (r->path) {
378                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
379                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
380                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
381                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
382                 }
383                 if (r->comment) {
384                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
385                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
386                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
387                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
388                 }
389                 if (r->stores) {
390                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
391                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
392                                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
393                         }
394                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
395                                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
396                         }
397                 }
398         }
399         return NDR_ERR_SUCCESS;
400 }
401
402 static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
403 {
404         uint32_t _ptr_path;
405         TALLOC_CTX *_mem_save_path_0;
406         uint32_t _ptr_comment;
407         TALLOC_CTX *_mem_save_comment_0;
408         uint32_t _ptr_stores;
409         uint32_t cntr_stores_1;
410         TALLOC_CTX *_mem_save_stores_0;
411         TALLOC_CTX *_mem_save_stores_1;
412         if (ndr_flags & NDR_SCALARS) {
413                 NDR_CHECK(ndr_pull_align(ndr, 4));
414                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
415                 if (_ptr_path) {
416                         NDR_PULL_ALLOC(ndr, r->path);
417                 } else {
418                         r->path = NULL;
419                 }
420                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
421                 if (_ptr_comment) {
422                         NDR_PULL_ALLOC(ndr, r->comment);
423                 } else {
424                         r->comment = NULL;
425                 }
426                 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
427                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
428                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
429                 if (_ptr_stores) {
430                         NDR_PULL_ALLOC(ndr, r->stores);
431                 } else {
432                         r->stores = NULL;
433                 }
434         }
435         if (ndr_flags & NDR_BUFFERS) {
436                 if (r->path) {
437                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
438                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
439                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
440                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
441                         if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
442                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
443                         }
444                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
445                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
446                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
447                 }
448                 if (r->comment) {
449                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
450                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
451                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
452                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
453                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
454                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
455                         }
456                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
457                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
458                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
459                 }
460                 if (r->stores) {
461                         _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
462                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
463                         NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
464                         NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
465                         _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
466                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
467                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
468                                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
469                         }
470                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
471                                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
472                         }
473                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
474                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
475                 }
476                 if (r->stores) {
477                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
478                 }
479         }
480         return NDR_ERR_SUCCESS;
481 }
482
483 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
484 {
485         uint32_t cntr_stores_1;
486         ndr_print_struct(ndr, name, "dfs_Info3");
487         ndr->depth++;
488         ndr_print_ptr(ndr, "path", r->path);
489         ndr->depth++;
490         if (r->path) {
491                 ndr_print_string(ndr, "path", r->path);
492         }
493         ndr->depth--;
494         ndr_print_ptr(ndr, "comment", r->comment);
495         ndr->depth++;
496         if (r->comment) {
497                 ndr_print_string(ndr, "comment", r->comment);
498         }
499         ndr->depth--;
500         ndr_print_dfs_VolumeState(ndr, "state", r->state);
501         ndr_print_uint32(ndr, "num_stores", r->num_stores);
502         ndr_print_ptr(ndr, "stores", r->stores);
503         ndr->depth++;
504         if (r->stores) {
505                 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
506                 ndr->depth++;
507                 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
508                         char *idx_1=NULL;
509                         asprintf(&idx_1, "[%d]", cntr_stores_1);
510                         if (idx_1) {
511                                 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
512                                 free(idx_1);
513                         }
514                 }
515                 ndr->depth--;
516         }
517         ndr->depth--;
518         ndr->depth--;
519 }
520
521 static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
522 {
523         uint32_t cntr_stores_1;
524         if (ndr_flags & NDR_SCALARS) {
525                 NDR_CHECK(ndr_push_align(ndr, 4));
526                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
527                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
528                 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
529                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
530                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
531                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
532                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
533         }
534         if (ndr_flags & NDR_BUFFERS) {
535                 if (r->path) {
536                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
537                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
538                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
539                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
540                 }
541                 if (r->comment) {
542                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
543                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
544                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
545                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
546                 }
547                 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
548                 if (r->stores) {
549                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
550                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
551                                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
552                         }
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]));
555                         }
556                 }
557         }
558         return NDR_ERR_SUCCESS;
559 }
560
561 static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
562 {
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;
578                 }
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;
584                 }
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;
594                 }
595         }
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));
604                         }
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);
608                 }
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));
616                         }
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);
620                 }
621                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
622                 if (r->stores) {
623                         _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
624                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
625                         NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
626                         NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
627                         _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
628                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
629                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
630                                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
631                         }
632                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
633                                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
634                         }
635                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
636                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
637                 }
638                 if (r->stores) {
639                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
640                 }
641         }
642         return NDR_ERR_SUCCESS;
643 }
644
645 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
646 {
647         uint32_t cntr_stores_1;
648         ndr_print_struct(ndr, name, "dfs_Info4");
649         ndr->depth++;
650         ndr_print_ptr(ndr, "path", r->path);
651         ndr->depth++;
652         if (r->path) {
653                 ndr_print_string(ndr, "path", r->path);
654         }
655         ndr->depth--;
656         ndr_print_ptr(ndr, "comment", r->comment);
657         ndr->depth++;
658         if (r->comment) {
659                 ndr_print_string(ndr, "comment", r->comment);
660         }
661         ndr->depth--;
662         ndr_print_dfs_VolumeState(ndr, "state", r->state);
663         ndr_print_uint32(ndr, "timeout", r->timeout);
664         ndr_print_GUID(ndr, "guid", &r->guid);
665         ndr_print_uint32(ndr, "num_stores", r->num_stores);
666         ndr_print_ptr(ndr, "stores", r->stores);
667         ndr->depth++;
668         if (r->stores) {
669                 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
670                 ndr->depth++;
671                 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
672                         char *idx_1=NULL;
673                         asprintf(&idx_1, "[%d]", cntr_stores_1);
674                         if (idx_1) {
675                                 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
676                                 free(idx_1);
677                         }
678                 }
679                 ndr->depth--;
680         }
681         ndr->depth--;
682         ndr->depth--;
683 }
684
685 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
686 {
687         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
688         return NDR_ERR_SUCCESS;
689 }
690
691 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
692 {
693         uint32_t v;
694         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
695         *r = v;
696         return NDR_ERR_SUCCESS;
697 }
698
699 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
700 {
701         ndr_print_uint32(ndr, name, r);
702         ndr->depth++;
703         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
704         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
705         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
706         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
707         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
708         ndr->depth--;
709 }
710
711 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
712 {
713         if (ndr_flags & NDR_SCALARS) {
714                 NDR_CHECK(ndr_push_align(ndr, 4));
715                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
716                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
717                 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
718                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
719                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
720                 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
721                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
722                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
723         }
724         if (ndr_flags & NDR_BUFFERS) {
725                 if (r->path) {
726                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
727                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
728                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
729                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
730                 }
731                 if (r->comment) {
732                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
733                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
734                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
735                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
736                 }
737                 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
738         }
739         return NDR_ERR_SUCCESS;
740 }
741
742 static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
743 {
744         uint32_t _ptr_path;
745         TALLOC_CTX *_mem_save_path_0;
746         uint32_t _ptr_comment;
747         TALLOC_CTX *_mem_save_comment_0;
748         if (ndr_flags & NDR_SCALARS) {
749                 NDR_CHECK(ndr_pull_align(ndr, 4));
750                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
751                 if (_ptr_path) {
752                         NDR_PULL_ALLOC(ndr, r->path);
753                 } else {
754                         r->path = NULL;
755                 }
756                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
757                 if (_ptr_comment) {
758                         NDR_PULL_ALLOC(ndr, r->comment);
759                 } else {
760                         r->comment = NULL;
761                 }
762                 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
763                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
764                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
765                 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
766                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
767                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
768         }
769         if (ndr_flags & NDR_BUFFERS) {
770                 if (r->path) {
771                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
772                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
773                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
774                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
775                         if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
776                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
777                         }
778                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
779                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
780                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
781                 }
782                 if (r->comment) {
783                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
784                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
785                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
786                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
787                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
788                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
789                         }
790                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
791                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
792                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
793                 }
794                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
795         }
796         return NDR_ERR_SUCCESS;
797 }
798
799 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
800 {
801         ndr_print_struct(ndr, name, "dfs_Info5");
802         ndr->depth++;
803         ndr_print_ptr(ndr, "path", r->path);
804         ndr->depth++;
805         if (r->path) {
806                 ndr_print_string(ndr, "path", r->path);
807         }
808         ndr->depth--;
809         ndr_print_ptr(ndr, "comment", r->comment);
810         ndr->depth++;
811         if (r->comment) {
812                 ndr_print_string(ndr, "comment", r->comment);
813         }
814         ndr->depth--;
815         ndr_print_dfs_VolumeState(ndr, "state", r->state);
816         ndr_print_uint32(ndr, "timeout", r->timeout);
817         ndr_print_GUID(ndr, "guid", &r->guid);
818         ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
819         ndr_print_uint32(ndr, "pktsize", r->pktsize);
820         ndr_print_uint32(ndr, "num_stores", r->num_stores);
821         ndr->depth--;
822 }
823
824 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
825 {
826         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
827         return NDR_ERR_SUCCESS;
828 }
829
830 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
831 {
832         uint32_t v;
833         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
834         *r = v;
835         return NDR_ERR_SUCCESS;
836 }
837
838 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
839 {
840         const char *val = NULL;
841
842         switch (r) {
843                 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
844                 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
845                 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
846                 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
847                 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
848                 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
849         }
850         ndr_print_enum(ndr, name, "ENUM", val, r);
851 }
852
853 static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
854 {
855         if (ndr_flags & NDR_SCALARS) {
856                 NDR_CHECK(ndr_push_align(ndr, 4));
857                 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
858                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
859                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
860         }
861         if (ndr_flags & NDR_BUFFERS) {
862         }
863         return NDR_ERR_SUCCESS;
864 }
865
866 static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
867 {
868         if (ndr_flags & NDR_SCALARS) {
869                 NDR_CHECK(ndr_pull_align(ndr, 4));
870                 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
871                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
872                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
873         }
874         if (ndr_flags & NDR_BUFFERS) {
875         }
876         return NDR_ERR_SUCCESS;
877 }
878
879 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
880 {
881         ndr_print_struct(ndr, name, "dfs_Target_Priority");
882         ndr->depth++;
883         ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
884         ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
885         ndr_print_uint16(ndr, "reserved", r->reserved);
886         ndr->depth--;
887 }
888
889 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
890 {
891         if (ndr_flags & NDR_SCALARS) {
892                 NDR_CHECK(ndr_push_align(ndr, 4));
893                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
894                 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
895         }
896         if (ndr_flags & NDR_BUFFERS) {
897                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
898         }
899         return NDR_ERR_SUCCESS;
900 }
901
902 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
903 {
904         if (ndr_flags & NDR_SCALARS) {
905                 NDR_CHECK(ndr_pull_align(ndr, 4));
906                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
907                 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
908         }
909         if (ndr_flags & NDR_BUFFERS) {
910                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
911         }
912         return NDR_ERR_SUCCESS;
913 }
914
915 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
916 {
917         ndr_print_struct(ndr, name, "dfs_StorageInfo2");
918         ndr->depth++;
919         ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
920         ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
921         ndr->depth--;
922 }
923
924 static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
925 {
926         uint32_t cntr_stores_1;
927         if (ndr_flags & NDR_SCALARS) {
928                 NDR_CHECK(ndr_push_align(ndr, 4));
929                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
930                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
931                 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
932                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
933                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
934                 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
935                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
936                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
937                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
938         }
939         if (ndr_flags & NDR_BUFFERS) {
940                 if (r->entry_path) {
941                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
942                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
943                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
944                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
945                 }
946                 if (r->comment) {
947                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
948                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
949                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
950                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
951                 }
952                 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
953                 if (r->stores) {
954                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
955                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
956                                 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
957                         }
958                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
959                                 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
960                         }
961                 }
962         }
963         return NDR_ERR_SUCCESS;
964 }
965
966 static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
967 {
968         uint32_t _ptr_entry_path;
969         TALLOC_CTX *_mem_save_entry_path_0;
970         uint32_t _ptr_comment;
971         TALLOC_CTX *_mem_save_comment_0;
972         uint32_t _ptr_stores;
973         uint32_t cntr_stores_1;
974         TALLOC_CTX *_mem_save_stores_0;
975         TALLOC_CTX *_mem_save_stores_1;
976         if (ndr_flags & NDR_SCALARS) {
977                 NDR_CHECK(ndr_pull_align(ndr, 4));
978                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
979                 if (_ptr_entry_path) {
980                         NDR_PULL_ALLOC(ndr, r->entry_path);
981                 } else {
982                         r->entry_path = NULL;
983                 }
984                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
985                 if (_ptr_comment) {
986                         NDR_PULL_ALLOC(ndr, r->comment);
987                 } else {
988                         r->comment = NULL;
989                 }
990                 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
991                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
992                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
993                 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
994                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
995                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
996                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
997                 if (_ptr_stores) {
998                         NDR_PULL_ALLOC(ndr, r->stores);
999                 } else {
1000                         r->stores = NULL;
1001                 }
1002         }
1003         if (ndr_flags & NDR_BUFFERS) {
1004                 if (r->entry_path) {
1005                         _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1006                         NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
1007                         NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
1008                         NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
1009                         if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) {
1010                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->entry_path), ndr_get_array_length(ndr, &r->entry_path));
1011                         }
1012                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t)));
1013                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16));
1014                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
1015                 }
1016                 if (r->comment) {
1017                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1018                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1019                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1020                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1021                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1022                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
1023                         }
1024                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1025                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1026                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1027                 }
1028                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
1029                 if (r->stores) {
1030                         _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
1031                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1032                         NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
1033                         NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
1034                         _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
1035                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1036                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1037                                 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1038                         }
1039                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1040                                 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1041                         }
1042                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
1043                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
1044                 }
1045                 if (r->stores) {
1046                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
1047                 }
1048         }
1049         return NDR_ERR_SUCCESS;
1050 }
1051
1052 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
1053 {
1054         uint32_t cntr_stores_1;
1055         ndr_print_struct(ndr, name, "dfs_Info6");
1056         ndr->depth++;
1057         ndr_print_ptr(ndr, "entry_path", r->entry_path);
1058         ndr->depth++;
1059         if (r->entry_path) {
1060                 ndr_print_string(ndr, "entry_path", r->entry_path);
1061         }
1062         ndr->depth--;
1063         ndr_print_ptr(ndr, "comment", r->comment);
1064         ndr->depth++;
1065         if (r->comment) {
1066                 ndr_print_string(ndr, "comment", r->comment);
1067         }
1068         ndr->depth--;
1069         ndr_print_dfs_VolumeState(ndr, "state", r->state);
1070         ndr_print_uint32(ndr, "timeout", r->timeout);
1071         ndr_print_GUID(ndr, "guid", &r->guid);
1072         ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1073         ndr_print_uint32(ndr, "pktsize", r->pktsize);
1074         ndr_print_uint16(ndr, "num_stores", r->num_stores);
1075         ndr_print_ptr(ndr, "stores", r->stores);
1076         ndr->depth++;
1077         if (r->stores) {
1078                 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
1079                 ndr->depth++;
1080                 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
1081                         char *idx_1=NULL;
1082                         asprintf(&idx_1, "[%d]", cntr_stores_1);
1083                         if (idx_1) {
1084                                 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
1085                                 free(idx_1);
1086                         }
1087                 }
1088                 ndr->depth--;
1089         }
1090         ndr->depth--;
1091         ndr->depth--;
1092 }
1093
1094 static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
1095 {
1096         if (ndr_flags & NDR_SCALARS) {
1097                 NDR_CHECK(ndr_push_align(ndr, 4));
1098                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1099         }
1100         if (ndr_flags & NDR_BUFFERS) {
1101                 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->generation_guid));
1102         }
1103         return NDR_ERR_SUCCESS;
1104 }
1105
1106 static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
1107 {
1108         if (ndr_flags & NDR_SCALARS) {
1109                 NDR_CHECK(ndr_pull_align(ndr, 4));
1110                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1111         }
1112         if (ndr_flags & NDR_BUFFERS) {
1113                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->generation_guid));
1114         }
1115         return NDR_ERR_SUCCESS;
1116 }
1117
1118 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
1119 {
1120         ndr_print_struct(ndr, name, "dfs_Info7");
1121         ndr->depth++;
1122         ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
1123         ndr->depth--;
1124 }
1125
1126 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
1127 {
1128         if (ndr_flags & NDR_SCALARS) {
1129                 NDR_CHECK(ndr_push_align(ndr, 4));
1130                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1131         }
1132         if (ndr_flags & NDR_BUFFERS) {
1133                 if (r->comment) {
1134                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1135                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1136                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1137                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1138                 }
1139         }
1140         return NDR_ERR_SUCCESS;
1141 }
1142
1143 static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
1144 {
1145         uint32_t _ptr_comment;
1146         TALLOC_CTX *_mem_save_comment_0;
1147         if (ndr_flags & NDR_SCALARS) {
1148                 NDR_CHECK(ndr_pull_align(ndr, 4));
1149                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1150                 if (_ptr_comment) {
1151                         NDR_PULL_ALLOC(ndr, r->comment);
1152                 } else {
1153                         r->comment = NULL;
1154                 }
1155         }
1156         if (ndr_flags & NDR_BUFFERS) {
1157                 if (r->comment) {
1158                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1159                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1160                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1161                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1162                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1163                                 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));
1164                         }
1165                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1166                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1167                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1168                 }
1169         }
1170         return NDR_ERR_SUCCESS;
1171 }
1172
1173 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
1174 {
1175         ndr_print_struct(ndr, name, "dfs_Info100");
1176         ndr->depth++;
1177         ndr_print_ptr(ndr, "comment", r->comment);
1178         ndr->depth++;
1179         if (r->comment) {
1180                 ndr_print_string(ndr, "comment", r->comment);
1181         }
1182         ndr->depth--;
1183         ndr->depth--;
1184 }
1185
1186 static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
1187 {
1188         if (ndr_flags & NDR_SCALARS) {
1189                 NDR_CHECK(ndr_push_align(ndr, 4));
1190                 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1191         }
1192         if (ndr_flags & NDR_BUFFERS) {
1193         }
1194         return NDR_ERR_SUCCESS;
1195 }
1196
1197 static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
1198 {
1199         if (ndr_flags & NDR_SCALARS) {
1200                 NDR_CHECK(ndr_pull_align(ndr, 4));
1201                 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1202         }
1203         if (ndr_flags & NDR_BUFFERS) {
1204         }
1205         return NDR_ERR_SUCCESS;
1206 }
1207
1208 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
1209 {
1210         ndr_print_struct(ndr, name, "dfs_Info101");
1211         ndr->depth++;
1212         ndr_print_dfs_StorageState(ndr, "state", r->state);
1213         ndr->depth--;
1214 }
1215
1216 static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
1217 {
1218         if (ndr_flags & NDR_SCALARS) {
1219                 NDR_CHECK(ndr_push_align(ndr, 4));
1220                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1221         }
1222         if (ndr_flags & NDR_BUFFERS) {
1223         }
1224         return NDR_ERR_SUCCESS;
1225 }
1226
1227 static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
1228 {
1229         if (ndr_flags & NDR_SCALARS) {
1230                 NDR_CHECK(ndr_pull_align(ndr, 4));
1231                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1232         }
1233         if (ndr_flags & NDR_BUFFERS) {
1234         }
1235         return NDR_ERR_SUCCESS;
1236 }
1237
1238 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
1239 {
1240         ndr_print_struct(ndr, name, "dfs_Info102");
1241         ndr->depth++;
1242         ndr_print_uint32(ndr, "timeout", r->timeout);
1243         ndr->depth--;
1244 }
1245
1246 static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
1247 {
1248         if (ndr_flags & NDR_SCALARS) {
1249                 NDR_CHECK(ndr_push_align(ndr, 4));
1250                 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
1251         }
1252         if (ndr_flags & NDR_BUFFERS) {
1253         }
1254         return NDR_ERR_SUCCESS;
1255 }
1256
1257 static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
1258 {
1259         if (ndr_flags & NDR_SCALARS) {
1260                 NDR_CHECK(ndr_pull_align(ndr, 4));
1261                 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1262         }
1263         if (ndr_flags & NDR_BUFFERS) {
1264         }
1265         return NDR_ERR_SUCCESS;
1266 }
1267
1268 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
1269 {
1270         ndr_print_struct(ndr, name, "dfs_Info103");
1271         ndr->depth++;
1272         ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1273         ndr->depth--;
1274 }
1275
1276 static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
1277 {
1278         if (ndr_flags & NDR_SCALARS) {
1279                 NDR_CHECK(ndr_push_align(ndr, 4));
1280                 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1281         }
1282         if (ndr_flags & NDR_BUFFERS) {
1283         }
1284         return NDR_ERR_SUCCESS;
1285 }
1286
1287 static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
1288 {
1289         if (ndr_flags & NDR_SCALARS) {
1290                 NDR_CHECK(ndr_pull_align(ndr, 4));
1291                 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1292         }
1293         if (ndr_flags & NDR_BUFFERS) {
1294         }
1295         return NDR_ERR_SUCCESS;
1296 }
1297
1298 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
1299 {
1300         ndr_print_struct(ndr, name, "dfs_Info104");
1301         ndr->depth++;
1302         ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1303         ndr->depth--;
1304 }
1305
1306 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
1307 {
1308         if (ndr_flags & NDR_SCALARS) {
1309                 NDR_CHECK(ndr_push_align(ndr, 4));
1310                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1311                 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
1312                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1313                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
1314                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
1315         }
1316         if (ndr_flags & NDR_BUFFERS) {
1317                 if (r->comment) {
1318                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1319                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1320                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1321                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1322                 }
1323         }
1324         return NDR_ERR_SUCCESS;
1325 }
1326
1327 static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
1328 {
1329         uint32_t _ptr_comment;
1330         TALLOC_CTX *_mem_save_comment_0;
1331         if (ndr_flags & NDR_SCALARS) {
1332                 NDR_CHECK(ndr_pull_align(ndr, 4));
1333                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1334                 if (_ptr_comment) {
1335                         NDR_PULL_ALLOC(ndr, r->comment);
1336                 } else {
1337                         r->comment = NULL;
1338                 }
1339                 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1340                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1341                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
1342                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
1343         }
1344         if (ndr_flags & NDR_BUFFERS) {
1345                 if (r->comment) {
1346                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1347                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1348                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1349                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1350                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1351                                 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));
1352                         }
1353                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1354                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1355                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1356                 }
1357         }
1358         return NDR_ERR_SUCCESS;
1359 }
1360
1361 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
1362 {
1363         ndr_print_struct(ndr, name, "dfs_Info105");
1364         ndr->depth++;
1365         ndr_print_ptr(ndr, "comment", r->comment);
1366         ndr->depth++;
1367         if (r->comment) {
1368                 ndr_print_string(ndr, "comment", r->comment);
1369         }
1370         ndr->depth--;
1371         ndr_print_dfs_VolumeState(ndr, "state", r->state);
1372         ndr_print_uint32(ndr, "timeout", r->timeout);
1373         ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
1374         ndr_print_uint32(ndr, "property_flags", r->property_flags);
1375         ndr->depth--;
1376 }
1377
1378 static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
1379 {
1380         if (ndr_flags & NDR_SCALARS) {
1381                 NDR_CHECK(ndr_push_align(ndr, 4));
1382                 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1383                 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1384         }
1385         if (ndr_flags & NDR_BUFFERS) {
1386         }
1387         return NDR_ERR_SUCCESS;
1388 }
1389
1390 static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
1391 {
1392         if (ndr_flags & NDR_SCALARS) {
1393                 NDR_CHECK(ndr_pull_align(ndr, 4));
1394                 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1395                 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1396         }
1397         if (ndr_flags & NDR_BUFFERS) {
1398         }
1399         return NDR_ERR_SUCCESS;
1400 }
1401
1402 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
1403 {
1404         ndr_print_struct(ndr, name, "dfs_Info106");
1405         ndr->depth++;
1406         ndr_print_dfs_StorageState(ndr, "state", r->state);
1407         ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1408         ndr->depth--;
1409 }
1410
1411 static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
1412 {
1413         if (ndr_flags & NDR_SCALARS) {
1414                 NDR_CHECK(ndr_push_align(ndr, 4));
1415                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1416         }
1417         if (ndr_flags & NDR_BUFFERS) {
1418                 if (r->dom_root) {
1419                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1420                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1421                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1422                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1423                 }
1424         }
1425         return NDR_ERR_SUCCESS;
1426 }
1427
1428 static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
1429 {
1430         uint32_t _ptr_dom_root;
1431         TALLOC_CTX *_mem_save_dom_root_0;
1432         if (ndr_flags & NDR_SCALARS) {
1433                 NDR_CHECK(ndr_pull_align(ndr, 4));
1434                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1435                 if (_ptr_dom_root) {
1436                         NDR_PULL_ALLOC(ndr, r->dom_root);
1437                 } else {
1438                         r->dom_root = NULL;
1439                 }
1440         }
1441         if (ndr_flags & NDR_BUFFERS) {
1442                 if (r->dom_root) {
1443                         _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1444                         NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1445                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1446                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1447                         if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1448                                 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));
1449                         }
1450                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1451                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1452                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1453                 }
1454         }
1455         return NDR_ERR_SUCCESS;
1456 }
1457
1458 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
1459 {
1460         ndr_print_struct(ndr, name, "dfs_Info200");
1461         ndr->depth++;
1462         ndr_print_ptr(ndr, "dom_root", r->dom_root);
1463         ndr->depth++;
1464         if (r->dom_root) {
1465                 ndr_print_string(ndr, "dom_root", r->dom_root);
1466         }
1467         ndr->depth--;
1468         ndr->depth--;
1469 }
1470
1471 static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
1472 {
1473         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1474         return NDR_ERR_SUCCESS;
1475 }
1476
1477 static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
1478 {
1479         uint16_t v;
1480         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1481         *r = v;
1482         return NDR_ERR_SUCCESS;
1483 }
1484
1485 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
1486 {
1487         const char *val = NULL;
1488
1489         switch (r) {
1490                 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1491                 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1492         }
1493         ndr_print_enum(ndr, name, "ENUM", val, r);
1494 }
1495
1496 static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
1497 {
1498         if (ndr_flags & NDR_SCALARS) {
1499                 NDR_CHECK(ndr_push_align(ndr, 4));
1500                 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
1501                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1502         }
1503         if (ndr_flags & NDR_BUFFERS) {
1504                 if (r->dom_root) {
1505                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1506                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1507                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1508                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1509                 }
1510         }
1511         return NDR_ERR_SUCCESS;
1512 }
1513
1514 static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
1515 {
1516         uint32_t _ptr_dom_root;
1517         TALLOC_CTX *_mem_save_dom_root_0;
1518         if (ndr_flags & NDR_SCALARS) {
1519                 NDR_CHECK(ndr_pull_align(ndr, 4));
1520                 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
1521                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1522                 if (_ptr_dom_root) {
1523                         NDR_PULL_ALLOC(ndr, r->dom_root);
1524                 } else {
1525                         r->dom_root = NULL;
1526                 }
1527         }
1528         if (ndr_flags & NDR_BUFFERS) {
1529                 if (r->dom_root) {
1530                         _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1531                         NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1532                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1533                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1534                         if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1535                                 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));
1536                         }
1537                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1538                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1539                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1540                 }
1541         }
1542         return NDR_ERR_SUCCESS;
1543 }
1544
1545 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
1546 {
1547         ndr_print_struct(ndr, name, "dfs_Info300");
1548         ndr->depth++;
1549         ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
1550         ndr_print_ptr(ndr, "dom_root", r->dom_root);
1551         ndr->depth++;
1552         if (r->dom_root) {
1553                 ndr_print_string(ndr, "dom_root", r->dom_root);
1554         }
1555         ndr->depth--;
1556         ndr->depth--;
1557 }
1558
1559 static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
1560 {
1561         if (ndr_flags & NDR_SCALARS) {
1562                 int level = ndr_push_get_switch_value(ndr, r);
1563                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1564                 switch (level) {
1565                         case 0:
1566                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1567                         break;
1568
1569                         case 1:
1570                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1571                         break;
1572
1573                         case 2:
1574                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1575                         break;
1576
1577                         case 3:
1578                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1579                         break;
1580
1581                         case 4:
1582                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1583                         break;
1584
1585                         case 5:
1586                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
1587                         break;
1588
1589                         case 6:
1590                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
1591                         break;
1592
1593                         case 7:
1594                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
1595                         break;
1596
1597                         case 100:
1598                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1599                         break;
1600
1601                         case 101:
1602                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1603                         break;
1604
1605                         case 102:
1606                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1607                         break;
1608
1609                         case 103:
1610                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
1611                         break;
1612
1613                         case 104:
1614                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
1615                         break;
1616
1617                         case 105:
1618                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
1619                         break;
1620
1621                         case 106:
1622                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
1623                         break;
1624
1625                         default:
1626                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1627                 }
1628         }
1629         if (ndr_flags & NDR_BUFFERS) {
1630                 int level = ndr_push_get_switch_value(ndr, r);
1631                 switch (level) {
1632                         case 0:
1633                                 if (r->info0) {
1634                                         NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1635                                 }
1636                         break;
1637
1638                         case 1:
1639                                 if (r->info1) {
1640                                         NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1641                                 }
1642                         break;
1643
1644                         case 2:
1645                                 if (r->info2) {
1646                                         NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1647                                 }
1648                         break;
1649
1650                         case 3:
1651                                 if (r->info3) {
1652                                         NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1653                                 }
1654                         break;
1655
1656                         case 4:
1657                                 if (r->info4) {
1658                                         NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1659                                 }
1660                         break;
1661
1662                         case 5:
1663                                 if (r->info5) {
1664                                         NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1665                                 }
1666                         break;
1667
1668                         case 6:
1669                                 if (r->info6) {
1670                                         NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1671                                 }
1672                         break;
1673
1674                         case 7:
1675                                 if (r->info7) {
1676                                         NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
1677                                 }
1678                         break;
1679
1680                         case 100:
1681                                 if (r->info100) {
1682                                         NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1683                                 }
1684                         break;
1685
1686                         case 101:
1687                                 if (r->info101) {
1688                                         NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1689                                 }
1690                         break;
1691
1692                         case 102:
1693                                 if (r->info102) {
1694                                         NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1695                                 }
1696                         break;
1697
1698                         case 103:
1699                                 if (r->info103) {
1700                                         NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
1701                                 }
1702                         break;
1703
1704                         case 104:
1705                                 if (r->info104) {
1706                                         NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
1707                                 }
1708                         break;
1709
1710                         case 105:
1711                                 if (r->info105) {
1712                                         NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
1713                                 }
1714                         break;
1715
1716                         case 106:
1717                                 if (r->info106) {
1718                                         NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
1719                                 }
1720                         break;
1721
1722                         default:
1723                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1724                 }
1725         }
1726         return NDR_ERR_SUCCESS;
1727 }
1728
1729 static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
1730 {
1731         int level;
1732         uint32_t _level;
1733         TALLOC_CTX *_mem_save_info0_0;
1734         TALLOC_CTX *_mem_save_info1_0;
1735         TALLOC_CTX *_mem_save_info2_0;
1736         TALLOC_CTX *_mem_save_info3_0;
1737         TALLOC_CTX *_mem_save_info4_0;
1738         TALLOC_CTX *_mem_save_info5_0;
1739         TALLOC_CTX *_mem_save_info6_0;
1740         TALLOC_CTX *_mem_save_info7_0;
1741         TALLOC_CTX *_mem_save_info100_0;
1742         TALLOC_CTX *_mem_save_info101_0;
1743         TALLOC_CTX *_mem_save_info102_0;
1744         TALLOC_CTX *_mem_save_info103_0;
1745         TALLOC_CTX *_mem_save_info104_0;
1746         TALLOC_CTX *_mem_save_info105_0;
1747         TALLOC_CTX *_mem_save_info106_0;
1748         level = ndr_pull_get_switch_value(ndr, r);
1749         if (ndr_flags & NDR_SCALARS) {
1750                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1751                 if (_level != level) {
1752                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1753                 }
1754                 switch (level) {
1755                         case 0: {
1756                                 uint32_t _ptr_info0;
1757                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1758                                 if (_ptr_info0) {
1759                                         NDR_PULL_ALLOC(ndr, r->info0);
1760                                 } else {
1761                                         r->info0 = NULL;
1762                                 }
1763                         break; }
1764
1765                         case 1: {
1766                                 uint32_t _ptr_info1;
1767                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1768                                 if (_ptr_info1) {
1769                                         NDR_PULL_ALLOC(ndr, r->info1);
1770                                 } else {
1771                                         r->info1 = NULL;
1772                                 }
1773                         break; }
1774
1775                         case 2: {
1776                                 uint32_t _ptr_info2;
1777                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1778                                 if (_ptr_info2) {
1779                                         NDR_PULL_ALLOC(ndr, r->info2);
1780                                 } else {
1781                                         r->info2 = NULL;
1782                                 }
1783                         break; }
1784
1785                         case 3: {
1786                                 uint32_t _ptr_info3;
1787                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1788                                 if (_ptr_info3) {
1789                                         NDR_PULL_ALLOC(ndr, r->info3);
1790                                 } else {
1791                                         r->info3 = NULL;
1792                                 }
1793                         break; }
1794
1795                         case 4: {
1796                                 uint32_t _ptr_info4;
1797                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1798                                 if (_ptr_info4) {
1799                                         NDR_PULL_ALLOC(ndr, r->info4);
1800                                 } else {
1801                                         r->info4 = NULL;
1802                                 }
1803                         break; }
1804
1805                         case 5: {
1806                                 uint32_t _ptr_info5;
1807                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
1808                                 if (_ptr_info5) {
1809                                         NDR_PULL_ALLOC(ndr, r->info5);
1810                                 } else {
1811                                         r->info5 = NULL;
1812                                 }
1813                         break; }
1814
1815                         case 6: {
1816                                 uint32_t _ptr_info6;
1817                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
1818                                 if (_ptr_info6) {
1819                                         NDR_PULL_ALLOC(ndr, r->info6);
1820                                 } else {
1821                                         r->info6 = NULL;
1822                                 }
1823                         break; }
1824
1825                         case 7: {
1826                                 uint32_t _ptr_info7;
1827                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
1828                                 if (_ptr_info7) {
1829                                         NDR_PULL_ALLOC(ndr, r->info7);
1830                                 } else {
1831                                         r->info7 = NULL;
1832                                 }
1833                         break; }
1834
1835                         case 100: {
1836                                 uint32_t _ptr_info100;
1837                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1838                                 if (_ptr_info100) {
1839                                         NDR_PULL_ALLOC(ndr, r->info100);
1840                                 } else {
1841                                         r->info100 = NULL;
1842                                 }
1843                         break; }
1844
1845                         case 101: {
1846                                 uint32_t _ptr_info101;
1847                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1848                                 if (_ptr_info101) {
1849                                         NDR_PULL_ALLOC(ndr, r->info101);
1850                                 } else {
1851                                         r->info101 = NULL;
1852                                 }
1853                         break; }
1854
1855                         case 102: {
1856                                 uint32_t _ptr_info102;
1857                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1858                                 if (_ptr_info102) {
1859                                         NDR_PULL_ALLOC(ndr, r->info102);
1860                                 } else {
1861                                         r->info102 = NULL;
1862                                 }
1863                         break; }
1864
1865                         case 103: {
1866                                 uint32_t _ptr_info103;
1867                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
1868                                 if (_ptr_info103) {
1869                                         NDR_PULL_ALLOC(ndr, r->info103);
1870                                 } else {
1871                                         r->info103 = NULL;
1872                                 }
1873                         break; }
1874
1875                         case 104: {
1876                                 uint32_t _ptr_info104;
1877                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
1878                                 if (_ptr_info104) {
1879                                         NDR_PULL_ALLOC(ndr, r->info104);
1880                                 } else {
1881                                         r->info104 = NULL;
1882                                 }
1883                         break; }
1884
1885                         case 105: {
1886                                 uint32_t _ptr_info105;
1887                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
1888                                 if (_ptr_info105) {
1889                                         NDR_PULL_ALLOC(ndr, r->info105);
1890                                 } else {
1891                                         r->info105 = NULL;
1892                                 }
1893                         break; }
1894
1895                         case 106: {
1896                                 uint32_t _ptr_info106;
1897                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
1898                                 if (_ptr_info106) {
1899                                         NDR_PULL_ALLOC(ndr, r->info106);
1900                                 } else {
1901                                         r->info106 = NULL;
1902                                 }
1903                         break; }
1904
1905                         default:
1906                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1907                 }
1908         }
1909         if (ndr_flags & NDR_BUFFERS) {
1910                 switch (level) {
1911                         case 0:
1912                                 if (r->info0) {
1913                                         _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1914                                         NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1915                                         NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1916                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1917                                 }
1918                         break;
1919
1920                         case 1:
1921                                 if (r->info1) {
1922                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1923                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1924                                         NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1925                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1926                                 }
1927                         break;
1928
1929                         case 2:
1930                                 if (r->info2) {
1931                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1932                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1933                                         NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1934                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
1935                                 }
1936                         break;
1937
1938                         case 3:
1939                                 if (r->info3) {
1940                                         _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1941                                         NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
1942                                         NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1943                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
1944                                 }
1945                         break;
1946
1947                         case 4:
1948                                 if (r->info4) {
1949                                         _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1950                                         NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
1951                                         NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1952                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
1953                                 }
1954                         break;
1955
1956                         case 5:
1957                                 if (r->info5) {
1958                                         _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
1959                                         NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
1960                                         NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1961                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
1962                                 }
1963                         break;
1964
1965                         case 6:
1966                                 if (r->info6) {
1967                                         _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
1968                                         NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
1969                                         NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1970                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
1971                                 }
1972                         break;
1973
1974                         case 7:
1975                                 if (r->info7) {
1976                                         _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
1977                                         NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
1978                                         NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
1979                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
1980                                 }
1981                         break;
1982
1983                         case 100:
1984                                 if (r->info100) {
1985                                         _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
1986                                         NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
1987                                         NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1988                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
1989                                 }
1990                         break;
1991
1992                         case 101:
1993                                 if (r->info101) {
1994                                         _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
1995                                         NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
1996                                         NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1997                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
1998                                 }
1999                         break;
2000
2001                         case 102:
2002                                 if (r->info102) {
2003                                         _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
2004                                         NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
2005                                         NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
2006                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
2007                                 }
2008                         break;
2009
2010                         case 103:
2011                                 if (r->info103) {
2012                                         _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
2013                                         NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
2014                                         NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
2015                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
2016                                 }
2017                         break;
2018
2019                         case 104:
2020                                 if (r->info104) {
2021                                         _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
2022                                         NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
2023                                         NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
2024                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
2025                                 }
2026                         break;
2027
2028                         case 105:
2029                                 if (r->info105) {
2030                                         _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
2031                                         NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
2032                                         NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
2033                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
2034                                 }
2035                         break;
2036
2037                         case 106:
2038                                 if (r->info106) {
2039                                         _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
2040                                         NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
2041                                         NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
2042                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
2043                                 }
2044                         break;
2045
2046                         default:
2047                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2048                 }
2049         }
2050         return NDR_ERR_SUCCESS;
2051 }
2052
2053 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
2054 {
2055         int level;
2056         level = ndr_print_get_switch_value(ndr, r);
2057         ndr_print_union(ndr, name, level, "dfs_Info");
2058         switch (level) {
2059                 case 0:
2060                         ndr_print_ptr(ndr, "info0", r->info0);
2061                         ndr->depth++;
2062                         if (r->info0) {
2063                                 ndr_print_dfs_Info0(ndr, "info0", r->info0);
2064                         }
2065                         ndr->depth--;
2066                 break;
2067
2068                 case 1:
2069                         ndr_print_ptr(ndr, "info1", r->info1);
2070                         ndr->depth++;
2071                         if (r->info1) {
2072                                 ndr_print_dfs_Info1(ndr, "info1", r->info1);
2073                         }
2074                         ndr->depth--;
2075                 break;
2076
2077                 case 2:
2078                         ndr_print_ptr(ndr, "info2", r->info2);
2079                         ndr->depth++;
2080                         if (r->info2) {
2081                                 ndr_print_dfs_Info2(ndr, "info2", r->info2);
2082                         }
2083                         ndr->depth--;
2084                 break;
2085
2086                 case 3:
2087                         ndr_print_ptr(ndr, "info3", r->info3);
2088                         ndr->depth++;
2089                         if (r->info3) {
2090                                 ndr_print_dfs_Info3(ndr, "info3", r->info3);
2091                         }
2092                         ndr->depth--;
2093                 break;
2094
2095                 case 4:
2096                         ndr_print_ptr(ndr, "info4", r->info4);
2097                         ndr->depth++;
2098                         if (r->info4) {
2099                                 ndr_print_dfs_Info4(ndr, "info4", r->info4);
2100                         }
2101                         ndr->depth--;
2102                 break;
2103
2104                 case 5:
2105                         ndr_print_ptr(ndr, "info5", r->info5);
2106                         ndr->depth++;
2107                         if (r->info5) {
2108                                 ndr_print_dfs_Info5(ndr, "info5", r->info5);
2109                         }
2110                         ndr->depth--;
2111                 break;
2112
2113                 case 6:
2114                         ndr_print_ptr(ndr, "info6", r->info6);
2115                         ndr->depth++;
2116                         if (r->info6) {
2117                                 ndr_print_dfs_Info6(ndr, "info6", r->info6);
2118                         }
2119                         ndr->depth--;
2120                 break;
2121
2122                 case 7:
2123                         ndr_print_ptr(ndr, "info7", r->info7);
2124                         ndr->depth++;
2125                         if (r->info7) {
2126                                 ndr_print_dfs_Info7(ndr, "info7", r->info7);
2127                         }
2128                         ndr->depth--;
2129                 break;
2130
2131                 case 100:
2132                         ndr_print_ptr(ndr, "info100", r->info100);
2133                         ndr->depth++;
2134                         if (r->info100) {
2135                                 ndr_print_dfs_Info100(ndr, "info100", r->info100);
2136                         }
2137                         ndr->depth--;
2138                 break;
2139
2140                 case 101:
2141                         ndr_print_ptr(ndr, "info101", r->info101);
2142                         ndr->depth++;
2143                         if (r->info101) {
2144                                 ndr_print_dfs_Info101(ndr, "info101", r->info101);
2145                         }
2146                         ndr->depth--;
2147                 break;
2148
2149                 case 102:
2150                         ndr_print_ptr(ndr, "info102", r->info102);
2151                         ndr->depth++;
2152                         if (r->info102) {
2153                                 ndr_print_dfs_Info102(ndr, "info102", r->info102);
2154                         }
2155                         ndr->depth--;
2156                 break;
2157
2158                 case 103:
2159                         ndr_print_ptr(ndr, "info103", r->info103);
2160                         ndr->depth++;
2161                         if (r->info103) {
2162                                 ndr_print_dfs_Info103(ndr, "info103", r->info103);
2163                         }
2164                         ndr->depth--;
2165                 break;
2166
2167                 case 104:
2168                         ndr_print_ptr(ndr, "info104", r->info104);
2169                         ndr->depth++;
2170                         if (r->info104) {
2171                                 ndr_print_dfs_Info104(ndr, "info104", r->info104);
2172                         }
2173                         ndr->depth--;
2174                 break;
2175
2176                 case 105:
2177                         ndr_print_ptr(ndr, "info105", r->info105);
2178                         ndr->depth++;
2179                         if (r->info105) {
2180                                 ndr_print_dfs_Info105(ndr, "info105", r->info105);
2181                         }
2182                         ndr->depth--;
2183                 break;
2184
2185                 case 106:
2186                         ndr_print_ptr(ndr, "info106", r->info106);
2187                         ndr->depth++;
2188                         if (r->info106) {
2189                                 ndr_print_dfs_Info106(ndr, "info106", r->info106);
2190                         }
2191                         ndr->depth--;
2192                 break;
2193
2194                 default:
2195                         ndr_print_bad_level(ndr, name, level);
2196         }
2197 }
2198
2199 static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
2200 {
2201         uint32_t cntr_s_1;
2202         if (ndr_flags & NDR_SCALARS) {
2203                 NDR_CHECK(ndr_push_align(ndr, 4));
2204                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2205                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2206         }
2207         if (ndr_flags & NDR_BUFFERS) {
2208                 if (r->s) {
2209                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2210                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2211                                 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2212                         }
2213                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2214                                 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2215                         }
2216                 }
2217         }
2218         return NDR_ERR_SUCCESS;
2219 }
2220
2221 static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
2222 {
2223         uint32_t _ptr_s;
2224         uint32_t cntr_s_1;
2225         TALLOC_CTX *_mem_save_s_0;
2226         TALLOC_CTX *_mem_save_s_1;
2227         if (ndr_flags & NDR_SCALARS) {
2228                 NDR_CHECK(ndr_pull_align(ndr, 4));
2229                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2230                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2231                 if (_ptr_s) {
2232                         NDR_PULL_ALLOC(ndr, r->s);
2233                 } else {
2234                         r->s = NULL;
2235                 }
2236         }
2237         if (ndr_flags & NDR_BUFFERS) {
2238                 if (r->s) {
2239                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2240                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2241                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2242                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2243                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2244                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2245                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2246                                 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2247                         }
2248                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2249                                 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2250                         }
2251                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2252                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2253                 }
2254                 if (r->s) {
2255                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2256                 }
2257         }
2258         return NDR_ERR_SUCCESS;
2259 }
2260
2261 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
2262 {
2263         uint32_t cntr_s_1;
2264         ndr_print_struct(ndr, name, "dfs_EnumArray1");
2265         ndr->depth++;
2266         ndr_print_uint32(ndr, "count", r->count);
2267         ndr_print_ptr(ndr, "s", r->s);
2268         ndr->depth++;
2269         if (r->s) {
2270                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2271                 ndr->depth++;
2272                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2273                         char *idx_1=NULL;
2274                         asprintf(&idx_1, "[%d]", cntr_s_1);
2275                         if (idx_1) {
2276                                 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
2277                                 free(idx_1);
2278                         }
2279                 }
2280                 ndr->depth--;
2281         }
2282         ndr->depth--;
2283         ndr->depth--;
2284 }
2285
2286 static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
2287 {
2288         uint32_t cntr_s_1;
2289         if (ndr_flags & NDR_SCALARS) {
2290                 NDR_CHECK(ndr_push_align(ndr, 4));
2291                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2292                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2293         }
2294         if (ndr_flags & NDR_BUFFERS) {
2295                 if (r->s) {
2296                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2297                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2298                                 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2299                         }
2300                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2301                                 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2302                         }
2303                 }
2304         }
2305         return NDR_ERR_SUCCESS;
2306 }
2307
2308 static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
2309 {
2310         uint32_t _ptr_s;
2311         uint32_t cntr_s_1;
2312         TALLOC_CTX *_mem_save_s_0;
2313         TALLOC_CTX *_mem_save_s_1;
2314         if (ndr_flags & NDR_SCALARS) {
2315                 NDR_CHECK(ndr_pull_align(ndr, 4));
2316                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2317                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2318                 if (_ptr_s) {
2319                         NDR_PULL_ALLOC(ndr, r->s);
2320                 } else {
2321                         r->s = NULL;
2322                 }
2323         }
2324         if (ndr_flags & NDR_BUFFERS) {
2325                 if (r->s) {
2326                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2327                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2328                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2329                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2330                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2331                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2332                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2333                                 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2334                         }
2335                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2336                                 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2337                         }
2338                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2339                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2340                 }
2341                 if (r->s) {
2342                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2343                 }
2344         }
2345         return NDR_ERR_SUCCESS;
2346 }
2347
2348 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
2349 {
2350         uint32_t cntr_s_1;
2351         ndr_print_struct(ndr, name, "dfs_EnumArray2");
2352         ndr->depth++;
2353         ndr_print_uint32(ndr, "count", r->count);
2354         ndr_print_ptr(ndr, "s", r->s);
2355         ndr->depth++;
2356         if (r->s) {
2357                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2358                 ndr->depth++;
2359                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2360                         char *idx_1=NULL;
2361                         asprintf(&idx_1, "[%d]", cntr_s_1);
2362                         if (idx_1) {
2363                                 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
2364                                 free(idx_1);
2365                         }
2366                 }
2367                 ndr->depth--;
2368         }
2369         ndr->depth--;
2370         ndr->depth--;
2371 }
2372
2373 static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
2374 {
2375         uint32_t cntr_s_1;
2376         if (ndr_flags & NDR_SCALARS) {
2377                 NDR_CHECK(ndr_push_align(ndr, 4));
2378                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2379                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2380         }
2381         if (ndr_flags & NDR_BUFFERS) {
2382                 if (r->s) {
2383                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2384                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2385                                 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2386                         }
2387                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2388                                 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2389                         }
2390                 }
2391         }
2392         return NDR_ERR_SUCCESS;
2393 }
2394
2395 static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
2396 {
2397         uint32_t _ptr_s;
2398         uint32_t cntr_s_1;
2399         TALLOC_CTX *_mem_save_s_0;
2400         TALLOC_CTX *_mem_save_s_1;
2401         if (ndr_flags & NDR_SCALARS) {
2402                 NDR_CHECK(ndr_pull_align(ndr, 4));
2403                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2404                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2405                 if (_ptr_s) {
2406                         NDR_PULL_ALLOC(ndr, r->s);
2407                 } else {
2408                         r->s = NULL;
2409                 }
2410         }
2411         if (ndr_flags & NDR_BUFFERS) {
2412                 if (r->s) {
2413                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2414                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2415                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2416                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2417                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2418                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2419                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2420                                 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2421                         }
2422                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2423                                 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2424                         }
2425                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2426                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2427                 }
2428                 if (r->s) {
2429                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2430                 }
2431         }
2432         return NDR_ERR_SUCCESS;
2433 }
2434
2435 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
2436 {
2437         uint32_t cntr_s_1;
2438         ndr_print_struct(ndr, name, "dfs_EnumArray3");
2439         ndr->depth++;
2440         ndr_print_uint32(ndr, "count", r->count);
2441         ndr_print_ptr(ndr, "s", r->s);
2442         ndr->depth++;
2443         if (r->s) {
2444                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2445                 ndr->depth++;
2446                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2447                         char *idx_1=NULL;
2448                         asprintf(&idx_1, "[%d]", cntr_s_1);
2449                         if (idx_1) {
2450                                 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
2451                                 free(idx_1);
2452                         }
2453                 }
2454                 ndr->depth--;
2455         }
2456         ndr->depth--;
2457         ndr->depth--;
2458 }
2459
2460 static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
2461 {
2462         uint32_t cntr_s_1;
2463         if (ndr_flags & NDR_SCALARS) {
2464                 NDR_CHECK(ndr_push_align(ndr, 4));
2465                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2466                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2467         }
2468         if (ndr_flags & NDR_BUFFERS) {
2469                 if (r->s) {
2470                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2471                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2472                                 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2473                         }
2474                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2475                                 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2476                         }
2477                 }
2478         }
2479         return NDR_ERR_SUCCESS;
2480 }
2481
2482 static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
2483 {
2484         uint32_t _ptr_s;
2485         uint32_t cntr_s_1;
2486         TALLOC_CTX *_mem_save_s_0;
2487         TALLOC_CTX *_mem_save_s_1;
2488         if (ndr_flags & NDR_SCALARS) {
2489                 NDR_CHECK(ndr_pull_align(ndr, 4));
2490                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2491                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2492                 if (_ptr_s) {
2493                         NDR_PULL_ALLOC(ndr, r->s);
2494                 } else {
2495                         r->s = NULL;
2496                 }
2497         }
2498         if (ndr_flags & NDR_BUFFERS) {
2499                 if (r->s) {
2500                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2501                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2502                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2503                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2504                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2505                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2506                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2507                                 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2508                         }
2509                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2510                                 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2511                         }
2512                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2513                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2514                 }
2515                 if (r->s) {
2516                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2517                 }
2518         }
2519         return NDR_ERR_SUCCESS;
2520 }
2521
2522 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
2523 {
2524         uint32_t cntr_s_1;
2525         ndr_print_struct(ndr, name, "dfs_EnumArray4");
2526         ndr->depth++;
2527         ndr_print_uint32(ndr, "count", r->count);
2528         ndr_print_ptr(ndr, "s", r->s);
2529         ndr->depth++;
2530         if (r->s) {
2531                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2532                 ndr->depth++;
2533                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2534                         char *idx_1=NULL;
2535                         asprintf(&idx_1, "[%d]", cntr_s_1);
2536                         if (idx_1) {
2537                                 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
2538                                 free(idx_1);
2539                         }
2540                 }
2541                 ndr->depth--;
2542         }
2543         ndr->depth--;
2544         ndr->depth--;
2545 }
2546
2547 static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
2548 {
2549         uint32_t cntr_s_1;
2550         if (ndr_flags & NDR_SCALARS) {
2551                 NDR_CHECK(ndr_push_align(ndr, 4));
2552                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2553                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2554         }
2555         if (ndr_flags & NDR_BUFFERS) {
2556                 if (r->s) {
2557                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2558                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2559                                 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2560                         }
2561                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2562                                 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2563                         }
2564                 }
2565         }
2566         return NDR_ERR_SUCCESS;
2567 }
2568
2569 static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
2570 {
2571         uint32_t _ptr_s;
2572         uint32_t cntr_s_1;
2573         TALLOC_CTX *_mem_save_s_0;
2574         TALLOC_CTX *_mem_save_s_1;
2575         if (ndr_flags & NDR_SCALARS) {
2576                 NDR_CHECK(ndr_pull_align(ndr, 4));
2577                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2578                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2579                 if (_ptr_s) {
2580                         NDR_PULL_ALLOC(ndr, r->s);
2581                 } else {
2582                         r->s = NULL;
2583                 }
2584         }
2585         if (ndr_flags & NDR_BUFFERS) {
2586                 if (r->s) {
2587                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2588                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2589                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2590                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2591                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2592                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2593                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2594                                 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2595                         }
2596                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2597                                 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2598                         }
2599                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2600                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2601                 }
2602                 if (r->s) {
2603                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2604                 }
2605         }
2606         return NDR_ERR_SUCCESS;
2607 }
2608
2609 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
2610 {
2611         uint32_t cntr_s_1;
2612         ndr_print_struct(ndr, name, "dfs_EnumArray200");
2613         ndr->depth++;
2614         ndr_print_uint32(ndr, "count", r->count);
2615         ndr_print_ptr(ndr, "s", r->s);
2616         ndr->depth++;
2617         if (r->s) {
2618                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2619                 ndr->depth++;
2620                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2621                         char *idx_1=NULL;
2622                         asprintf(&idx_1, "[%d]", cntr_s_1);
2623                         if (idx_1) {
2624                                 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
2625                                 free(idx_1);
2626                         }
2627                 }
2628                 ndr->depth--;
2629         }
2630         ndr->depth--;
2631         ndr->depth--;
2632 }
2633
2634 static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
2635 {
2636         uint32_t cntr_s_1;
2637         if (ndr_flags & NDR_SCALARS) {
2638                 NDR_CHECK(ndr_push_align(ndr, 4));
2639                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2640                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2641         }
2642         if (ndr_flags & NDR_BUFFERS) {
2643                 if (r->s) {
2644                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2645                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2646                                 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2647                         }
2648                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2649                                 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2650                         }
2651                 }
2652         }
2653         return NDR_ERR_SUCCESS;
2654 }
2655
2656 static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
2657 {
2658         uint32_t _ptr_s;
2659         uint32_t cntr_s_1;
2660         TALLOC_CTX *_mem_save_s_0;
2661         TALLOC_CTX *_mem_save_s_1;
2662         if (ndr_flags & NDR_SCALARS) {
2663                 NDR_CHECK(ndr_pull_align(ndr, 4));
2664                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2665                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2666                 if (_ptr_s) {
2667                         NDR_PULL_ALLOC(ndr, r->s);
2668                 } else {
2669                         r->s = NULL;
2670                 }
2671         }
2672         if (ndr_flags & NDR_BUFFERS) {
2673                 if (r->s) {
2674                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2675                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2676                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2677                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2678                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2679                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2680                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2681                                 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2682                         }
2683                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2684                                 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2685                         }
2686                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2687                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2688                 }
2689                 if (r->s) {
2690                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2691                 }
2692         }
2693         return NDR_ERR_SUCCESS;
2694 }
2695
2696 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
2697 {
2698         uint32_t cntr_s_1;
2699         ndr_print_struct(ndr, name, "dfs_EnumArray300");
2700         ndr->depth++;
2701         ndr_print_uint32(ndr, "count", r->count);
2702         ndr_print_ptr(ndr, "s", r->s);
2703         ndr->depth++;
2704         if (r->s) {
2705                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2706                 ndr->depth++;
2707                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2708                         char *idx_1=NULL;
2709                         asprintf(&idx_1, "[%d]", cntr_s_1);
2710                         if (idx_1) {
2711                                 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
2712                                 free(idx_1);
2713                         }
2714                 }
2715                 ndr->depth--;
2716         }
2717         ndr->depth--;
2718         ndr->depth--;
2719 }
2720
2721 static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
2722 {
2723         if (ndr_flags & NDR_SCALARS) {
2724                 int level = ndr_push_get_switch_value(ndr, r);
2725                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2726                 switch (level) {
2727                         case 1:
2728                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
2729                         break;
2730
2731                         case 2:
2732                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2733                         break;
2734
2735                         case 3:
2736                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2737                         break;
2738
2739                         case 4:
2740                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
2741                         break;
2742
2743                         case 200:
2744                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
2745                         break;
2746
2747                         case 300:
2748                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
2749                         break;
2750
2751                         default:
2752                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2753                 }
2754         }
2755         if (ndr_flags & NDR_BUFFERS) {
2756                 int level = ndr_push_get_switch_value(ndr, r);
2757                 switch (level) {
2758                         case 1:
2759                                 if (r->info1) {
2760                                         NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
2761                                 }
2762                         break;
2763
2764                         case 2:
2765                                 if (r->info2) {
2766                                         NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
2767                                 }
2768                         break;
2769
2770                         case 3:
2771                                 if (r->info3) {
2772                                         NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2773                                 }
2774                         break;
2775
2776                         case 4:
2777                                 if (r->info4) {
2778                                         NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
2779                                 }
2780                         break;
2781
2782                         case 200:
2783                                 if (r->info200) {
2784                                         NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
2785                                 }
2786                         break;
2787
2788                         case 300:
2789                                 if (r->info300) {
2790                                         NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
2791                                 }
2792                         break;
2793
2794                         default:
2795                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2796                 }
2797         }
2798         return NDR_ERR_SUCCESS;
2799 }
2800
2801 static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
2802 {
2803         int level;
2804         uint32_t _level;
2805         TALLOC_CTX *_mem_save_info1_0;
2806         TALLOC_CTX *_mem_save_info2_0;
2807         TALLOC_CTX *_mem_save_info3_0;
2808         TALLOC_CTX *_mem_save_info4_0;
2809         TALLOC_CTX *_mem_save_info200_0;
2810         TALLOC_CTX *_mem_save_info300_0;
2811         level = ndr_pull_get_switch_value(ndr, r);
2812         if (ndr_flags & NDR_SCALARS) {
2813                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2814                 if (_level != level) {
2815                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2816                 }
2817                 switch (level) {
2818                         case 1: {
2819                                 uint32_t _ptr_info1;
2820                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
2821                                 if (_ptr_info1) {
2822                                         NDR_PULL_ALLOC(ndr, r->info1);
2823                                 } else {
2824                                         r->info1 = NULL;
2825                                 }
2826                         break; }
2827
2828                         case 2: {
2829                                 uint32_t _ptr_info2;
2830                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
2831                                 if (_ptr_info2) {
2832                                         NDR_PULL_ALLOC(ndr, r->info2);
2833                                 } else {
2834                                         r->info2 = NULL;
2835                                 }
2836                         break; }
2837
2838                         case 3: {
2839                                 uint32_t _ptr_info3;
2840                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
2841                                 if (_ptr_info3) {
2842                                         NDR_PULL_ALLOC(ndr, r->info3);
2843                                 } else {
2844                                         r->info3 = NULL;
2845                                 }
2846                         break; }
2847
2848                         case 4: {
2849                                 uint32_t _ptr_info4;
2850                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
2851                                 if (_ptr_info4) {
2852                                         NDR_PULL_ALLOC(ndr, r->info4);
2853                                 } else {
2854                                         r->info4 = NULL;
2855                                 }
2856                         break; }
2857
2858                         case 200: {
2859                                 uint32_t _ptr_info200;
2860                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
2861                                 if (_ptr_info200) {
2862                                         NDR_PULL_ALLOC(ndr, r->info200);
2863                                 } else {
2864                                         r->info200 = NULL;
2865                                 }
2866                         break; }
2867
2868                         case 300: {
2869                                 uint32_t _ptr_info300;
2870                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
2871                                 if (_ptr_info300) {
2872                                         NDR_PULL_ALLOC(ndr, r->info300);
2873                                 } else {
2874                                         r->info300 = NULL;
2875                                 }
2876                         break; }
2877
2878                         default:
2879                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2880                 }
2881         }
2882         if (ndr_flags & NDR_BUFFERS) {
2883                 switch (level) {
2884                         case 1:
2885                                 if (r->info1) {
2886                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
2887                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
2888                                         NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
2889                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
2890                                 }
2891                         break;
2892
2893                         case 2:
2894                                 if (r->info2) {
2895                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2896                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
2897                                         NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
2898                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
2899                                 }
2900                         break;
2901
2902                         case 3:
2903                                 if (r->info3) {
2904                                         _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2905                                         NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
2906                                         NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2907                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
2908                                 }
2909                         break;
2910
2911                         case 4:
2912                                 if (r->info4) {
2913                                         _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
2914                                         NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
2915                                         NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
2916                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
2917                                 }
2918                         break;
2919
2920                         case 200:
2921                                 if (r->info200) {
2922                                         _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
2923                                         NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
2924                                         NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
2925                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
2926                                 }
2927                         break;
2928
2929                         case 300:
2930                                 if (r->info300) {
2931                                         _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
2932                                         NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
2933                                         NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
2934                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
2935                                 }
2936                         break;
2937
2938                         default:
2939                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2940                 }
2941         }
2942         return NDR_ERR_SUCCESS;
2943 }
2944
2945 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
2946 {
2947         int level;
2948         level = ndr_print_get_switch_value(ndr, r);
2949         ndr_print_union(ndr, name, level, "dfs_EnumInfo");
2950         switch (level) {
2951                 case 1:
2952                         ndr_print_ptr(ndr, "info1", r->info1);
2953                         ndr->depth++;
2954                         if (r->info1) {
2955                                 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
2956                         }
2957                         ndr->depth--;
2958                 break;
2959
2960                 case 2:
2961                         ndr_print_ptr(ndr, "info2", r->info2);
2962                         ndr->depth++;
2963                         if (r->info2) {
2964                                 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
2965                         }
2966                         ndr->depth--;
2967                 break;
2968
2969                 case 3:
2970                         ndr_print_ptr(ndr, "info3", r->info3);
2971                         ndr->depth++;
2972                         if (r->info3) {
2973                                 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
2974                         }
2975                         ndr->depth--;
2976                 break;
2977
2978                 case 4:
2979                         ndr_print_ptr(ndr, "info4", r->info4);
2980                         ndr->depth++;
2981                         if (r->info4) {
2982                                 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
2983                         }
2984                         ndr->depth--;
2985                 break;
2986
2987                 case 200:
2988                         ndr_print_ptr(ndr, "info200", r->info200);
2989                         ndr->depth++;
2990                         if (r->info200) {
2991                                 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
2992                         }
2993                         ndr->depth--;
2994                 break;
2995
2996                 case 300:
2997                         ndr_print_ptr(ndr, "info300", r->info300);
2998                         ndr->depth++;
2999                         if (r->info300) {
3000                                 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
3001                         }
3002                         ndr->depth--;
3003                 break;
3004
3005                 default:
3006                         ndr_print_bad_level(ndr, name, level);
3007         }
3008 }
3009
3010 static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
3011 {
3012         if (ndr_flags & NDR_SCALARS) {
3013                 NDR_CHECK(ndr_push_align(ndr, 4));
3014                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3015                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
3016                 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3017         }
3018         if (ndr_flags & NDR_BUFFERS) {
3019                 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3020         }
3021         return NDR_ERR_SUCCESS;
3022 }
3023
3024 static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
3025 {
3026         if (ndr_flags & NDR_SCALARS) {
3027                 NDR_CHECK(ndr_pull_align(ndr, 4));
3028                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3029                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
3030                 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3031         }
3032         if (ndr_flags & NDR_BUFFERS) {
3033                 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3034         }
3035         return NDR_ERR_SUCCESS;
3036 }
3037
3038 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
3039 {
3040         ndr_print_struct(ndr, name, "dfs_EnumStruct");
3041         ndr->depth++;
3042         ndr_print_uint32(ndr, "level", r->level);
3043         ndr_print_set_switch_value(ndr, &r->e, r->level);
3044         ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
3045         ndr->depth--;
3046 }
3047
3048 static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
3049 {
3050         if (ndr_flags & NDR_SCALARS) {
3051                 NDR_CHECK(ndr_push_align(ndr, 4));
3052                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3053                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
3054         }
3055         if (ndr_flags & NDR_BUFFERS) {
3056                 if (r->unknown2) {
3057                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3058                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3059                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3060                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3061                 }
3062         }
3063         return NDR_ERR_SUCCESS;
3064 }
3065
3066 static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
3067 {
3068         uint32_t _ptr_unknown2;
3069         TALLOC_CTX *_mem_save_unknown2_0;
3070         if (ndr_flags & NDR_SCALARS) {
3071                 NDR_CHECK(ndr_pull_align(ndr, 4));
3072                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3073                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
3074                 if (_ptr_unknown2) {
3075                         NDR_PULL_ALLOC(ndr, r->unknown2);
3076                 } else {
3077                         r->unknown2 = NULL;
3078                 }
3079         }
3080         if (ndr_flags & NDR_BUFFERS) {
3081                 if (r->unknown2) {
3082                         _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3083                         NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
3084                         NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
3085                         NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
3086                         if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) {
3087                                 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));
3088                         }
3089                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t)));
3090                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16));
3091                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
3092                 }
3093         }
3094         return NDR_ERR_SUCCESS;
3095 }
3096
3097 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
3098 {
3099         ndr_print_struct(ndr, name, "dfs_UnknownStruct");
3100         ndr->depth++;
3101         ndr_print_uint32(ndr, "unknown1", r->unknown1);
3102         ndr_print_ptr(ndr, "unknown2", r->unknown2);
3103         ndr->depth++;
3104         if (r->unknown2) {
3105                 ndr_print_string(ndr, "unknown2", r->unknown2);
3106         }
3107         ndr->depth--;
3108         ndr->depth--;
3109 }
3110
3111 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
3112 {
3113         if (flags & NDR_IN) {
3114         }
3115         if (flags & NDR_OUT) {
3116                 if (r->out.version == NULL) {
3117                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3118                 }
3119                 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
3120         }
3121         return NDR_ERR_SUCCESS;
3122 }
3123
3124 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
3125 {
3126         TALLOC_CTX *_mem_save_version_0;
3127         if (flags & NDR_IN) {
3128                 ZERO_STRUCT(r->out);
3129
3130                 NDR_PULL_ALLOC(ndr, r->out.version);
3131                 ZERO_STRUCTP(r->out.version);
3132         }
3133         if (flags & NDR_OUT) {
3134                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3135                         NDR_PULL_ALLOC(ndr, r->out.version);
3136                 }
3137                 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3138                 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3139                 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
3140                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3141         }
3142         return NDR_ERR_SUCCESS;
3143 }
3144
3145 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
3146 {
3147         ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
3148         ndr->depth++;
3149         if (flags & NDR_SET_VALUES) {
3150                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3151         }
3152         if (flags & NDR_IN) {
3153                 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
3154                 ndr->depth++;
3155                 ndr->depth--;
3156         }
3157         if (flags & NDR_OUT) {
3158                 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
3159                 ndr->depth++;
3160                 ndr_print_ptr(ndr, "version", r->out.version);
3161                 ndr->depth++;
3162                 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
3163                 ndr->depth--;
3164                 ndr->depth--;
3165         }
3166         ndr->depth--;
3167 }
3168
3169 static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
3170 {
3171         if (flags & NDR_IN) {
3172                 if (r->in.path == NULL) {
3173                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3174                 }
3175                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3176                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3177                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3178                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3179                 if (r->in.server == NULL) {
3180                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3181                 }
3182                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3183                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3184                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3185                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3186                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
3187                 if (r->in.share) {
3188                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3189                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3190                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3191                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3192                 }
3193                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
3194                 if (r->in.comment) {
3195                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3196                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3197                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3198                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3199                 }
3200                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3201         }
3202         if (flags & NDR_OUT) {
3203                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3204         }
3205         return NDR_ERR_SUCCESS;
3206 }
3207
3208 static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
3209 {
3210         uint32_t _ptr_share;
3211         uint32_t _ptr_comment;
3212         TALLOC_CTX *_mem_save_share_0;
3213         TALLOC_CTX *_mem_save_comment_0;
3214         if (flags & NDR_IN) {
3215                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3216                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3217                 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
3218                         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));
3219                 }
3220                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
3221                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
3222                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
3223                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
3224                 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
3225                         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));
3226                 }
3227                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
3228                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
3229                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
3230                 if (_ptr_share) {
3231                         NDR_PULL_ALLOC(ndr, r->in.share);
3232                 } else {
3233                         r->in.share = NULL;
3234                 }
3235                 if (r->in.share) {
3236                         _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
3237                         NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
3238                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
3239                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
3240                         if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
3241                                 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));
3242                         }
3243                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
3244                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
3245                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
3246                 }
3247                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3248                 if (_ptr_comment) {
3249                         NDR_PULL_ALLOC(ndr, r->in.comment);
3250                 } else {
3251                         r->in.comment = NULL;
3252                 }
3253                 if (r->in.comment) {
3254                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3255                         NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
3256                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
3257                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
3258                         if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
3259                                 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));
3260                         }
3261                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
3262                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
3263                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3264                 }
3265                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3266         }
3267         if (flags & NDR_OUT) {
3268                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3269         }
3270         return NDR_ERR_SUCCESS;
3271 }
3272
3273 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
3274 {
3275         ndr_print_struct(ndr, name, "dfs_Add");
3276         ndr->depth++;
3277         if (flags & NDR_SET_VALUES) {
3278                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3279         }
3280         if (flags & NDR_IN) {
3281                 ndr_print_struct(ndr, "in", "dfs_Add");
3282                 ndr->depth++;
3283                 ndr_print_ptr(ndr, "path", r->in.path);
3284                 ndr->depth++;
3285                 ndr_print_string(ndr, "path", r->in.path);
3286                 ndr->depth--;
3287                 ndr_print_ptr(ndr, "server", r->in.server);
3288                 ndr->depth++;
3289                 ndr_print_string(ndr, "server", r->in.server);
3290                 ndr->depth--;
3291                 ndr_print_ptr(ndr, "share", r->in.share);
3292                 ndr->depth++;
3293                 if (r->in.share) {
3294                         ndr_print_string(ndr, "share", r->in.share);
3295                 }
3296                 ndr->depth--;
3297                 ndr_print_ptr(ndr, "comment", r->in.comment);
3298                 ndr->depth++;
3299                 if (r->in.comment) {
3300                         ndr_print_string(ndr, "comment", r->in.comment);
3301                 }
3302                 ndr->depth--;
3303                 ndr_print_uint32(ndr, "flags", r->in.flags);
3304                 ndr->depth--;
3305         }
3306         if (flags & NDR_OUT) {
3307                 ndr_print_struct(ndr, "out", "dfs_Add");
3308                 ndr->depth++;
3309                 ndr_print_WERROR(ndr, "result", r->out.result);
3310                 ndr->depth--;
3311         }
3312         ndr->depth--;
3313 }
3314
3315 static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
3316 {
3317         if (flags & NDR_IN) {
3318                 if (r->in.dfs_entry_path == NULL) {
3319                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3320                 }
3321                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3322                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3323                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3324                 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));
3325                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3326                 if (r->in.servername) {
3327                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3328                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3329                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3330                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3331                 }
3332                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3333                 if (r->in.sharename) {
3334                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3335                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3336                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3337                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3338                 }
3339         }
3340         if (flags & NDR_OUT) {
3341                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3342         }
3343         return NDR_ERR_SUCCESS;
3344 }
3345
3346 static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
3347 {
3348         uint32_t _ptr_servername;
3349         uint32_t _ptr_sharename;
3350         TALLOC_CTX *_mem_save_servername_0;
3351         TALLOC_CTX *_mem_save_sharename_0;
3352         if (flags & NDR_IN) {
3353                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3354                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3355                 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3356                         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));
3357                 }
3358                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3359                 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));
3360                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3361                 if (_ptr_servername) {
3362                         NDR_PULL_ALLOC(ndr, r->in.servername);
3363                 } else {
3364                         r->in.servername = NULL;
3365                 }
3366                 if (r->in.servername) {
3367                         _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3368                         NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3369                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3370                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3371                         if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3372                                 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));
3373                         }
3374                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3375                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3376                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3377                 }
3378                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3379                 if (_ptr_sharename) {
3380                         NDR_PULL_ALLOC(ndr, r->in.sharename);
3381                 } else {
3382                         r->in.sharename = NULL;
3383                 }
3384                 if (r->in.sharename) {
3385                         _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3386                         NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3387                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3388                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3389                         if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3390                                 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));
3391                         }
3392                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3393                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3394                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3395                 }
3396         }
3397         if (flags & NDR_OUT) {
3398                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3399         }
3400         return NDR_ERR_SUCCESS;
3401 }
3402
3403 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
3404 {
3405         ndr_print_struct(ndr, name, "dfs_Remove");
3406         ndr->depth++;
3407         if (flags & NDR_SET_VALUES) {
3408                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3409         }
3410         if (flags & NDR_IN) {
3411                 ndr_print_struct(ndr, "in", "dfs_Remove");
3412                 ndr->depth++;
3413                 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3414                 ndr->depth++;
3415                 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3416                 ndr->depth--;
3417                 ndr_print_ptr(ndr, "servername", r->in.servername);
3418                 ndr->depth++;
3419                 if (r->in.servername) {
3420                         ndr_print_string(ndr, "servername", r->in.servername);
3421                 }
3422                 ndr->depth--;
3423                 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3424                 ndr->depth++;
3425                 if (r->in.sharename) {
3426                         ndr_print_string(ndr, "sharename", r->in.sharename);
3427                 }
3428                 ndr->depth--;
3429                 ndr->depth--;
3430         }
3431         if (flags & NDR_OUT) {
3432                 ndr_print_struct(ndr, "out", "dfs_Remove");
3433                 ndr->depth++;
3434                 ndr_print_WERROR(ndr, "result", r->out.result);
3435                 ndr->depth--;
3436         }
3437         ndr->depth--;
3438 }
3439
3440 static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
3441 {
3442         if (flags & NDR_IN) {
3443                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3444                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3445                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3446                 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));
3447                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3448                 if (r->in.servername) {
3449                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3450                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3451                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3452                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3453                 }
3454                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3455                 if (r->in.sharename) {
3456                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3457                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3458                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3459                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3460                 }
3461                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3462                 if (r->in.info == NULL) {
3463                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3464                 }
3465                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
3466                 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3467         }
3468         if (flags & NDR_OUT) {
3469                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3470         }
3471         return NDR_ERR_SUCCESS;
3472 }
3473
3474 static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
3475 {
3476         uint32_t _ptr_servername;
3477         uint32_t _ptr_sharename;
3478         TALLOC_CTX *_mem_save_servername_0;
3479         TALLOC_CTX *_mem_save_sharename_0;
3480         TALLOC_CTX *_mem_save_info_0;
3481         if (flags & NDR_IN) {
3482                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3483                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3484                 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3485                         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));
3486                 }
3487                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3488                 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));
3489                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3490                 if (_ptr_servername) {
3491                         NDR_PULL_ALLOC(ndr, r->in.servername);
3492                 } else {
3493                         r->in.servername = NULL;
3494                 }
3495                 if (r->in.servername) {
3496                         _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3497                         NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3498                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3499                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3500                         if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3501                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
3502                         }
3503                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3504                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3505                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3506                 }
3507                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3508                 if (_ptr_sharename) {
3509                         NDR_PULL_ALLOC(ndr, r->in.sharename);
3510                 } else {
3511                         r->in.sharename = NULL;
3512                 }
3513                 if (r->in.sharename) {
3514                         _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3515                         NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3516                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3517                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3518                         if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3519                                 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));
3520                         }
3521                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3522                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3523                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3524                 }
3525                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3526                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3527                         NDR_PULL_ALLOC(ndr, r->in.info);
3528                 }
3529                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3530                 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
3531                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
3532                 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3533                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3534         }
3535         if (flags & NDR_OUT) {
3536                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3537         }
3538         return NDR_ERR_SUCCESS;
3539 }
3540
3541 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
3542 {
3543         ndr_print_struct(ndr, name, "dfs_SetInfo");
3544         ndr->depth++;
3545         if (flags & NDR_SET_VALUES) {
3546                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3547         }
3548         if (flags & NDR_IN) {
3549                 ndr_print_struct(ndr, "in", "dfs_SetInfo");
3550                 ndr->depth++;
3551                 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3552                 ndr_print_ptr(ndr, "servername", r->in.servername);
3553                 ndr->depth++;
3554                 if (r->in.servername) {
3555                         ndr_print_string(ndr, "servername", r->in.servername);
3556                 }
3557                 ndr->depth--;
3558                 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3559                 ndr->depth++;
3560                 if (r->in.sharename) {
3561                         ndr_print_string(ndr, "sharename", r->in.sharename);
3562                 }
3563                 ndr->depth--;
3564                 ndr_print_uint32(ndr, "level", r->in.level);
3565                 ndr_print_ptr(ndr, "info", r->in.info);
3566                 ndr->depth++;
3567                 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
3568                 ndr_print_dfs_Info(ndr, "info", r->in.info);
3569                 ndr->depth--;
3570                 ndr->depth--;
3571         }
3572         if (flags & NDR_OUT) {
3573                 ndr_print_struct(ndr, "out", "dfs_SetInfo");
3574                 ndr->depth++;
3575                 ndr_print_WERROR(ndr, "result", r->out.result);
3576                 ndr->depth--;
3577         }
3578         ndr->depth--;
3579 }
3580
3581 static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
3582 {
3583         if (flags & NDR_IN) {
3584                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3585                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3586                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3587                 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));
3588                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3589                 if (r->in.servername) {
3590                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3591                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3592                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3593                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3594                 }
3595                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3596                 if (r->in.sharename) {
3597                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3598                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3599                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3600                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3601                 }
3602                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3603         }
3604         if (flags & NDR_OUT) {
3605                 if (r->out.info == NULL) {
3606                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3607                 }
3608                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
3609                 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3610                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3611         }
3612         return NDR_ERR_SUCCESS;
3613 }
3614
3615 static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
3616 {
3617         uint32_t _ptr_servername;
3618         uint32_t _ptr_sharename;
3619         TALLOC_CTX *_mem_save_servername_0;
3620         TALLOC_CTX *_mem_save_sharename_0;
3621         TALLOC_CTX *_mem_save_info_0;
3622         if (flags & NDR_IN) {
3623                 ZERO_STRUCT(r->out);
3624
3625                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3626                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3627                 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3628                         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));
3629                 }
3630                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3631                 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));
3632                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3633                 if (_ptr_servername) {
3634                         NDR_PULL_ALLOC(ndr, r->in.servername);
3635                 } else {
3636                         r->in.servername = NULL;
3637                 }
3638                 if (r->in.servername) {
3639                         _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3640                         NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3641                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3642                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3643                         if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3644                                 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));
3645                         }
3646                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3647                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3648                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3649                 }
3650                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3651                 if (_ptr_sharename) {
3652                         NDR_PULL_ALLOC(ndr, r->in.sharename);
3653                 } else {
3654                         r->in.sharename = NULL;
3655                 }
3656                 if (r->in.sharename) {
3657                         _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3658                         NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3659                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3660                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3661                         if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3662                                 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));
3663                         }
3664                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3665                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3666                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3667                 }
3668                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3669                 NDR_PULL_ALLOC(ndr, r->out.info);
3670                 ZERO_STRUCTP(r->out.info);
3671         }
3672         if (flags & NDR_OUT) {
3673                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3674                         NDR_PULL_ALLOC(ndr, r->out.info);
3675                 }
3676                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3677                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
3678                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
3679                 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3680                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3681                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3682         }
3683         return NDR_ERR_SUCCESS;
3684 }
3685
3686 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
3687 {
3688         ndr_print_struct(ndr, name, "dfs_GetInfo");
3689         ndr->depth++;
3690         if (flags & NDR_SET_VALUES) {
3691                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3692         }
3693         if (flags & NDR_IN) {
3694                 ndr_print_struct(ndr, "in", "dfs_GetInfo");
3695                 ndr->depth++;
3696                 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3697                 ndr_print_ptr(ndr, "servername", r->in.servername);
3698                 ndr->depth++;
3699                 if (r->in.servername) {
3700                         ndr_print_string(ndr, "servername", r->in.servername);
3701                 }
3702                 ndr->depth--;
3703                 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3704                 ndr->depth++;
3705                 if (r->in.sharename) {
3706                         ndr_print_string(ndr, "sharename", r->in.sharename);
3707                 }
3708                 ndr->depth--;
3709                 ndr_print_uint32(ndr, "level", r->in.level);
3710                 ndr->depth--;
3711         }
3712         if (flags & NDR_OUT) {
3713                 ndr_print_struct(ndr, "out", "dfs_GetInfo");
3714                 ndr->depth++;
3715                 ndr_print_ptr(ndr, "info", r->out.info);
3716                 ndr->depth++;
3717                 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
3718                 ndr_print_dfs_Info(ndr, "info", r->out.info);
3719                 ndr->depth--;
3720                 ndr_print_WERROR(ndr, "result", r->out.result);
3721                 ndr->depth--;
3722         }
3723         ndr->depth--;
3724 }
3725
3726 static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
3727 {
3728         if (flags & NDR_IN) {
3729                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3730                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
3731                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
3732                 if (r->in.info) {
3733                         NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3734                 }
3735                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
3736                 if (r->in.total) {
3737                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
3738                 }
3739         }
3740         if (flags & NDR_OUT) {
3741                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
3742                 if (r->out.info) {
3743                         NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3744                 }
3745                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
3746                 if (r->out.total) {
3747                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
3748                 }
3749                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3750         }
3751         return NDR_ERR_SUCCESS;
3752 }
3753
3754 static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
3755 {
3756         uint32_t _ptr_info;
3757         uint32_t _ptr_total;
3758         TALLOC_CTX *_mem_save_info_0;
3759         TALLOC_CTX *_mem_save_total_0;
3760         if (flags & NDR_IN) {
3761                 ZERO_STRUCT(r->out);
3762
3763                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3764                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
3765                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
3766                 if (_ptr_info) {
3767                         NDR_PULL_ALLOC(ndr, r->in.info);
3768                 } else {
3769                         r->in.info = NULL;
3770                 }
3771                 if (r->in.info) {
3772                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3773                         NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
3774                         NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3775                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
3776                 }
3777                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
3778                 if (_ptr_total) {
3779                         NDR_PULL_ALLOC(ndr, r->in.total);
3780                 } else {
3781                         r->in.total = NULL;
3782                 }
3783                 if (r->in.total) {
3784                         _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
3785                         NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
3786                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
3787                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
3788                 }
3789         }
3790         if (flags & NDR_OUT) {
3791                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
3792                 if (_ptr_info) {
3793                         NDR_PULL_ALLOC(ndr, r->out.info);
3794                 } else {
3795                         r->out.info = NULL;
3796                 }
3797                 if (r->out.info) {
3798                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3799                         NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
3800                         NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3801                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
3802                 }
3803                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
3804                 if (_ptr_total) {
3805                         NDR_PULL_ALLOC(ndr, r->out.total);
3806                 } else {
3807                         r->out.total = NULL;
3808                 }
3809                 if (r->out.total) {
3810                         _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
3811                         NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
3812                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
3813                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
3814                 }
3815                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3816         }
3817         return NDR_ERR_SUCCESS;
3818 }
3819
3820 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
3821 {
3822         ndr_print_struct(ndr, name, "dfs_Enum");
3823         ndr->depth++;
3824         if (flags & NDR_SET_VALUES) {
3825                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3826         }
3827         if (flags & NDR_IN) {
3828                 ndr_print_struct(ndr, "in", "dfs_Enum");
3829                 ndr->depth++;
3830                 ndr_print_uint32(ndr, "level", r->in.level);
3831                 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
3832                 ndr_print_ptr(ndr, "info", r->in.info);
3833                 ndr->depth++;
3834                 if (r->in.info) {
3835                         ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
3836                 }
3837                 ndr->depth--;
3838                 ndr_print_ptr(ndr, "total", r->in.total);
3839                 ndr->depth++;
3840                 if (r->in.total) {
3841                         ndr_print_uint32(ndr, "total", *r->in.total);
3842                 }
3843                 ndr->depth--;
3844                 ndr->depth--;
3845         }
3846         if (flags & NDR_OUT) {
3847                 ndr_print_struct(ndr, "out", "dfs_Enum");
3848                 ndr->depth++;
3849                 ndr_print_ptr(ndr, "info", r->out.info);
3850                 ndr->depth++;
3851                 if (r->out.info) {
3852                         ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
3853                 }
3854                 ndr->depth--;
3855                 ndr_print_ptr(ndr, "total", r->out.total);
3856                 ndr->depth++;
3857                 if (r->out.total) {
3858                         ndr_print_uint32(ndr, "total", *r->out.total);
3859                 }
3860                 ndr->depth--;
3861                 ndr_print_WERROR(ndr, "result", r->out.result);
3862                 ndr->depth--;
3863         }
3864         ndr->depth--;
3865 }
3866
3867 static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
3868 {
3869         if (flags & NDR_IN) {
3870         }
3871         if (flags & NDR_OUT) {
3872                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3873         }
3874         return NDR_ERR_SUCCESS;
3875 }
3876
3877 static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
3878 {
3879         if (flags & NDR_IN) {
3880         }
3881         if (flags & NDR_OUT) {
3882                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3883         }
3884         return NDR_ERR_SUCCESS;
3885 }
3886
3887 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
3888 {
3889         ndr_print_struct(ndr, name, "dfs_Rename");
3890         ndr->depth++;
3891         if (flags & NDR_SET_VALUES) {
3892                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3893         }
3894         if (flags & NDR_IN) {
3895                 ndr_print_struct(ndr, "in", "dfs_Rename");
3896                 ndr->depth++;
3897                 ndr->depth--;
3898         }
3899         if (flags & NDR_OUT) {
3900                 ndr_print_struct(ndr, "out", "dfs_Rename");
3901                 ndr->depth++;
3902                 ndr_print_WERROR(ndr, "result", r->out.result);
3903                 ndr->depth--;
3904         }
3905         ndr->depth--;
3906 }
3907
3908 static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
3909 {
3910         if (flags & NDR_IN) {
3911         }
3912         if (flags & NDR_OUT) {
3913                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3914         }
3915         return NDR_ERR_SUCCESS;
3916 }
3917
3918 static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
3919 {
3920         if (flags & NDR_IN) {
3921         }
3922         if (flags & NDR_OUT) {
3923                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3924         }
3925         return NDR_ERR_SUCCESS;
3926 }
3927
3928 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
3929 {
3930         ndr_print_struct(ndr, name, "dfs_Move");
3931         ndr->depth++;
3932         if (flags & NDR_SET_VALUES) {
3933                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3934         }
3935         if (flags & NDR_IN) {
3936                 ndr_print_struct(ndr, "in", "dfs_Move");
3937                 ndr->depth++;
3938                 ndr->depth--;
3939         }
3940         if (flags & NDR_OUT) {
3941                 ndr_print_struct(ndr, "out", "dfs_Move");
3942                 ndr->depth++;
3943                 ndr_print_WERROR(ndr, "result", r->out.result);
3944                 ndr->depth--;
3945         }
3946         ndr->depth--;
3947 }
3948
3949 static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
3950 {
3951         if (flags & NDR_IN) {
3952         }
3953         if (flags & NDR_OUT) {
3954                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3955         }
3956         return NDR_ERR_SUCCESS;
3957 }
3958
3959 static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
3960 {
3961         if (flags & NDR_IN) {
3962         }
3963         if (flags & NDR_OUT) {
3964                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3965         }
3966         return NDR_ERR_SUCCESS;
3967 }
3968
3969 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
3970 {
3971         ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
3972         ndr->depth++;
3973         if (flags & NDR_SET_VALUES) {
3974                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3975         }
3976         if (flags & NDR_IN) {
3977                 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
3978                 ndr->depth++;
3979                 ndr->depth--;
3980         }
3981         if (flags & NDR_OUT) {
3982                 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
3983                 ndr->depth++;
3984                 ndr_print_WERROR(ndr, "result", r->out.result);
3985                 ndr->depth--;
3986         }
3987         ndr->depth--;
3988 }
3989
3990 static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
3991 {
3992         if (flags & NDR_IN) {
3993         }
3994         if (flags & NDR_OUT) {
3995                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3996         }
3997         return NDR_ERR_SUCCESS;
3998 }
3999
4000 static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
4001 {
4002         if (flags & NDR_IN) {
4003         }
4004         if (flags & NDR_OUT) {
4005                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4006         }
4007         return NDR_ERR_SUCCESS;
4008 }
4009
4010 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
4011 {
4012         ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
4013         ndr->depth++;
4014         if (flags & NDR_SET_VALUES) {
4015                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4016         }
4017         if (flags & NDR_IN) {
4018                 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
4019                 ndr->depth++;
4020                 ndr->depth--;
4021         }
4022         if (flags & NDR_OUT) {
4023                 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
4024                 ndr->depth++;
4025                 ndr_print_WERROR(ndr, "result", r->out.result);
4026                 ndr->depth--;
4027         }
4028         ndr->depth--;
4029 }
4030
4031 static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
4032 {
4033         if (flags & NDR_IN) {
4034                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4035                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4036                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4037                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4038                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4039                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4040                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4041                 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));
4042                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4043                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4044                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4045                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4046                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4047                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4048                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4049                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4050                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4051                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4052                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4053                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4054                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4055                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4056                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4057                 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));
4058                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
4059                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4060                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
4061                 if (r->in.unknown2) {
4062                         NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
4063                         if (*r->in.unknown2) {
4064                                 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4065                         }
4066                 }
4067         }
4068         if (flags & NDR_OUT) {
4069                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
4070                 if (r->out.unknown2) {
4071                         NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
4072                         if (*r->out.unknown2) {
4073                                 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4074                         }
4075                 }
4076                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4077         }
4078         return NDR_ERR_SUCCESS;
4079 }
4080
4081 static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
4082 {
4083         uint32_t _ptr_unknown2;
4084         TALLOC_CTX *_mem_save_unknown2_0;
4085         TALLOC_CTX *_mem_save_unknown2_1;
4086         if (flags & NDR_IN) {
4087                 ZERO_STRUCT(r->out);
4088
4089                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4090                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4091                 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4092                         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));
4093                 }
4094                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4095                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4096                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4097                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4098                 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
4099                         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));
4100                 }
4101                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4102                 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));
4103                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4104                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4105                 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
4106                         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));
4107                 }
4108                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4109                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4110                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4111                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4112                 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4113                         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));
4114                 }
4115                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4116                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4117                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4118                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4119                 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4120                         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));
4121                 }
4122                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4123                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4124                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
4125                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
4126                 if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) {
4127                         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));
4128                 }
4129                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t)));
4130                 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));
4131                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
4132                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4133                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4134                 if (_ptr_unknown2) {
4135                         NDR_PULL_ALLOC(ndr, r->in.unknown2);
4136                 } else {
4137                         r->in.unknown2 = NULL;
4138                 }
4139                 if (r->in.unknown2) {
4140                         _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4141                         NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
4142                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4143                         if (_ptr_unknown2) {
4144                                 NDR_PULL_ALLOC(ndr, *r->in.unknown2);
4145                         } else {
4146                                 *r->in.unknown2 = NULL;
4147                         }
4148                         if (*r->in.unknown2) {
4149                                 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4150                                 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
4151                                 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4152                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4153                         }
4154                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4155                 }
4156         }
4157         if (flags & NDR_OUT) {
4158                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4159                 if (_ptr_unknown2) {
4160                         NDR_PULL_ALLOC(ndr, r->out.unknown2);
4161                 } else {
4162                         r->out.unknown2 = NULL;
4163                 }
4164                 if (r->out.unknown2) {
4165                         _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4166                         NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
4167                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4168                         if (_ptr_unknown2) {
4169                                 NDR_PULL_ALLOC(ndr, *r->out.unknown2);
4170                         } else {
4171                                 *r->out.unknown2 = NULL;
4172                         }
4173                         if (*r->out.unknown2) {
4174                                 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4175                                 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
4176                                 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4177                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4178                         }
4179                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4180                 }
4181                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4182         }
4183         return NDR_ERR_SUCCESS;
4184 }
4185
4186 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
4187 {
4188         ndr_print_struct(ndr, name, "dfs_AddFtRoot");
4189         ndr->depth++;
4190         if (flags & NDR_SET_VALUES) {
4191                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4192         }
4193         if (flags & NDR_IN) {
4194                 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
4195                 ndr->depth++;
4196                 ndr_print_string(ndr, "servername", r->in.servername);
4197                 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4198                 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4199                 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4200                 ndr_print_string(ndr, "comment", r->in.comment);
4201                 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
4202                 ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
4203                 ndr_print_uint32(ndr, "flags", r->in.flags);
4204                 ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
4205                 ndr->depth++;
4206                 if (r->in.unknown2) {
4207                         ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
4208                         ndr->depth++;
4209                         if (*r->in.unknown2) {
4210                                 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
4211                         }
4212                         ndr->depth--;
4213                 }
4214                 ndr->depth--;
4215                 ndr->depth--;
4216         }
4217         if (flags & NDR_OUT) {
4218                 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
4219                 ndr->depth++;
4220                 ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
4221                 ndr->depth++;
4222                 if (r->out.unknown2) {
4223                         ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
4224                         ndr->depth++;
4225                         if (*r->out.unknown2) {
4226                                 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
4227                         }
4228                         ndr->depth--;
4229                 }
4230                 ndr->depth--;
4231                 ndr_print_WERROR(ndr, "result", r->out.result);
4232                 ndr->depth--;
4233         }
4234         ndr->depth--;
4235 }
4236
4237 static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
4238 {
4239         if (flags & NDR_IN) {
4240                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4241                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4242                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4243                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4244                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4245                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4246                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4247                 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));
4248                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4249                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4250                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4251                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4252                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4253                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4254                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4255                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4256                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4257                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
4258                 if (r->in.unknown) {
4259                         NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
4260                         if (*r->in.unknown) {
4261                                 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4262                         }
4263                 }
4264         }
4265         if (flags & NDR_OUT) {
4266                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
4267                 if (r->out.unknown) {
4268                         NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
4269                         if (*r->out.unknown) {
4270                                 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4271                         }
4272                 }
4273                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4274         }
4275         return NDR_ERR_SUCCESS;
4276 }
4277
4278 static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
4279 {
4280         uint32_t _ptr_unknown;
4281         TALLOC_CTX *_mem_save_unknown_0;
4282         TALLOC_CTX *_mem_save_unknown_1;
4283         if (flags & NDR_IN) {
4284                 ZERO_STRUCT(r->out);
4285
4286                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4287                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4288                 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4289                         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));
4290                 }
4291                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4292                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4293                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4294                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4295                 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
4296                         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));
4297                 }
4298                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4299                 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));
4300                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4301                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4302                 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
4303                         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));
4304                 }
4305                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4306                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4307                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4308                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4309                 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4310                         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));
4311                 }
4312                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4313                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4314                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4315                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4316                 if (_ptr_unknown) {
4317                         NDR_PULL_ALLOC(ndr, r->in.unknown);
4318                 } else {
4319                         r->in.unknown = NULL;
4320                 }
4321                 if (r->in.unknown) {
4322                         _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4323                         NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
4324                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4325                         if (_ptr_unknown) {
4326                                 NDR_PULL_ALLOC(ndr, *r->in.unknown);
4327                         } else {
4328                                 *r->in.unknown = NULL;
4329                         }
4330                         if (*r->in.unknown) {
4331                                 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4332                                 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
4333                                 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4334                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4335                         }
4336                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4337                 }
4338         }
4339         if (flags & NDR_OUT) {
4340                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4341                 if (_ptr_unknown) {
4342                         NDR_PULL_ALLOC(ndr, r->out.unknown);
4343                 } else {
4344                         r->out.unknown = NULL;
4345                 }
4346                 if (r->out.unknown) {
4347                         _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4348                         NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
4349                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4350                         if (_ptr_unknown) {
4351                                 NDR_PULL_ALLOC(ndr, *r->out.unknown);
4352                         } else {
4353                                 *r->out.unknown = NULL;
4354                         }
4355                         if (*r->out.unknown) {
4356                                 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4357                                 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
4358                                 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4359                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4360                         }
4361                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4362                 }
4363                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4364         }
4365         return NDR_ERR_SUCCESS;
4366 }
4367
4368 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
4369 {
4370         ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
4371         ndr->depth++;
4372         if (flags & NDR_SET_VALUES) {
4373                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4374         }
4375         if (flags & NDR_IN) {
4376                 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
4377                 ndr->depth++;
4378                 ndr_print_string(ndr, "servername", r->in.servername);
4379                 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4380                 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4381                 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4382                 ndr_print_uint32(ndr, "flags", r->in.flags);
4383                 ndr_print_ptr(ndr, "unknown", r->in.unknown);
4384                 ndr->depth++;
4385                 if (r->in.unknown) {
4386                         ndr_print_ptr(ndr, "unknown", *r->in.unknown);
4387                         ndr->depth++;
4388                         if (*r->in.unknown) {
4389                                 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
4390                         }
4391                         ndr->depth--;
4392                 }
4393                 ndr->depth--;
4394                 ndr->depth--;
4395         }
4396         if (flags & NDR_OUT) {
4397                 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
4398                 ndr->depth++;
4399                 ndr_print_ptr(ndr, "unknown", r->out.unknown);
4400                 ndr->depth++;
4401                 if (r->out.unknown) {
4402                         ndr_print_ptr(ndr, "unknown", *r->out.unknown);
4403                         ndr->depth++;
4404                         if (*r->out.unknown) {
4405                                 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
4406                         }
4407                         ndr->depth--;
4408                 }
4409                 ndr->depth--;
4410                 ndr_print_WERROR(ndr, "result", r->out.result);
4411                 ndr->depth--;
4412         }
4413         ndr->depth--;
4414 }
4415
4416 static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
4417 {
4418         if (flags & NDR_IN) {
4419                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4420                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4421                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4422                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4423                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4424                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4425                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4426                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4427                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4428                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4429                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4430                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4431                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4432         }
4433         if (flags & NDR_OUT) {
4434                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4435         }
4436         return NDR_ERR_SUCCESS;
4437 }
4438
4439 static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
4440 {
4441         if (flags & NDR_IN) {
4442                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4443                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4444                 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4445                         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));
4446                 }
4447                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4448                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4449                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4450                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4451                 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4452                         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));
4453                 }
4454                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4455                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4456                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4457                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4458                 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4459                         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));
4460                 }
4461                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4462                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4463                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4464         }
4465         if (flags & NDR_OUT) {
4466                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4467         }
4468         return NDR_ERR_SUCCESS;
4469 }
4470
4471 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
4472 {
4473         ndr_print_struct(ndr, name, "dfs_AddStdRoot");
4474         ndr->depth++;
4475         if (flags & NDR_SET_VALUES) {
4476                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4477         }
4478         if (flags & NDR_IN) {
4479                 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
4480                 ndr->depth++;
4481                 ndr_print_string(ndr, "servername", r->in.servername);
4482                 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4483                 ndr_print_string(ndr, "comment", r->in.comment);
4484                 ndr_print_uint32(ndr, "flags", r->in.flags);
4485                 ndr->depth--;
4486         }
4487         if (flags & NDR_OUT) {
4488                 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
4489                 ndr->depth++;
4490                 ndr_print_WERROR(ndr, "result", r->out.result);
4491                 ndr->depth--;
4492         }
4493         ndr->depth--;
4494 }
4495
4496 static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
4497 {
4498         if (flags & NDR_IN) {
4499                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4500                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4501                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4502                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4503                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4504                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4505                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4506                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4507                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4508         }
4509         if (flags & NDR_OUT) {
4510                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4511         }
4512         return NDR_ERR_SUCCESS;
4513 }
4514
4515 static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
4516 {
4517         if (flags & NDR_IN) {
4518                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4519                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4520                 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4521                         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));
4522                 }
4523                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4524                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4525                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4526                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4527                 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4528                         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));
4529                 }
4530                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4531                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4532                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4533         }
4534         if (flags & NDR_OUT) {
4535                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4536         }
4537         return NDR_ERR_SUCCESS;
4538 }
4539
4540 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
4541 {
4542         ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
4543         ndr->depth++;
4544         if (flags & NDR_SET_VALUES) {
4545                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4546         }
4547         if (flags & NDR_IN) {
4548                 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
4549                 ndr->depth++;
4550                 ndr_print_string(ndr, "servername", r->in.servername);
4551                 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4552                 ndr_print_uint32(ndr, "flags", r->in.flags);
4553                 ndr->depth--;
4554         }
4555         if (flags & NDR_OUT) {
4556                 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
4557                 ndr->depth++;
4558                 ndr_print_WERROR(ndr, "result", r->out.result);
4559                 ndr->depth--;
4560         }
4561         ndr->depth--;
4562 }
4563
4564 static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
4565 {
4566         if (flags & NDR_IN) {
4567                 if (r->in.servername == NULL) {
4568                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4569                 }
4570                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4571                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4572                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4573                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4574                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4575         }
4576         if (flags & NDR_OUT) {
4577                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4578         }
4579         return NDR_ERR_SUCCESS;
4580 }
4581
4582 static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
4583 {
4584         if (flags & NDR_IN) {
4585                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4586                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4587                 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4588                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
4589                 }
4590                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4591                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4592                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4593         }
4594         if (flags & NDR_OUT) {
4595                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4596         }
4597         return NDR_ERR_SUCCESS;
4598 }
4599
4600 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
4601 {
4602         ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
4603         ndr->depth++;
4604         if (flags & NDR_SET_VALUES) {
4605                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4606         }
4607         if (flags & NDR_IN) {
4608                 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
4609                 ndr->depth++;
4610                 ndr_print_ptr(ndr, "servername", r->in.servername);
4611                 ndr->depth++;
4612                 ndr_print_string(ndr, "servername", r->in.servername);
4613                 ndr->depth--;
4614                 ndr_print_uint32(ndr, "flags", r->in.flags);
4615                 ndr->depth--;
4616         }
4617         if (flags & NDR_OUT) {
4618                 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
4619                 ndr->depth++;
4620                 ndr_print_WERROR(ndr, "result", r->out.result);
4621                 ndr->depth--;
4622         }
4623         ndr->depth--;
4624 }
4625
4626 static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
4627 {
4628         if (flags & NDR_IN) {
4629                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4630                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4631                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4632                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4633                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4634                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4635                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4636                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4637                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4638                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4639                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4640                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4641                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4642                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4643                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4644                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4645         }
4646         if (flags & NDR_OUT) {
4647                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4648         }
4649         return NDR_ERR_SUCCESS;
4650 }
4651
4652 static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
4653 {
4654         if (flags & NDR_IN) {
4655                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4656                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4657                 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4658                         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));
4659                 }
4660                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4661                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4662                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4663                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4664                 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4665                         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));
4666                 }
4667                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4668                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4669                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4670                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4671                 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4672                         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));
4673                 }
4674                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4675                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4676                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
4677                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
4678                 if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) {
4679                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.store), ndr_get_array_length(ndr, &r->in.store));
4680                 }
4681                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t)));
4682                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16));
4683         }
4684         if (flags & NDR_OUT) {
4685                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4686         }
4687         return NDR_ERR_SUCCESS;
4688 }
4689
4690 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
4691 {
4692         ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
4693         ndr->depth++;
4694         if (flags & NDR_SET_VALUES) {
4695                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4696         }
4697         if (flags & NDR_IN) {
4698                 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
4699                 ndr->depth++;
4700                 ndr_print_string(ndr, "servername", r->in.servername);
4701                 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4702                 ndr_print_string(ndr, "comment", r->in.comment);
4703                 ndr_print_string(ndr, "store", r->in.store);
4704                 ndr->depth--;
4705         }
4706         if (flags & NDR_OUT) {
4707                 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
4708                 ndr->depth++;
4709                 ndr_print_WERROR(ndr, "result", r->out.result);
4710                 ndr->depth--;
4711         }
4712         ndr->depth--;
4713 }
4714
4715 static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
4716 {
4717         if (flags & NDR_IN) {
4718         }
4719         if (flags & NDR_OUT) {
4720                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4721         }
4722         return NDR_ERR_SUCCESS;
4723 }
4724
4725 static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
4726 {
4727         if (flags & NDR_IN) {
4728         }
4729         if (flags & NDR_OUT) {
4730                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4731         }
4732         return NDR_ERR_SUCCESS;
4733 }
4734
4735 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
4736 {
4737         ndr_print_struct(ndr, name, "dfs_GetDcAddress");
4738         ndr->depth++;
4739         if (flags & NDR_SET_VALUES) {
4740                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4741         }
4742         if (flags & NDR_IN) {
4743                 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
4744                 ndr->depth++;
4745                 ndr->depth--;
4746         }
4747         if (flags & NDR_OUT) {
4748                 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
4749                 ndr->depth++;
4750                 ndr_print_WERROR(ndr, "result", r->out.result);
4751                 ndr->depth--;
4752         }
4753         ndr->depth--;
4754 }
4755
4756 static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
4757 {
4758         if (flags & NDR_IN) {
4759         }
4760         if (flags & NDR_OUT) {
4761                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4762         }
4763         return NDR_ERR_SUCCESS;
4764 }
4765
4766 static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
4767 {
4768         if (flags & NDR_IN) {
4769         }
4770         if (flags & NDR_OUT) {
4771                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4772         }
4773         return NDR_ERR_SUCCESS;
4774 }
4775
4776 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
4777 {
4778         ndr_print_struct(ndr, name, "dfs_SetDcAddress");
4779         ndr->depth++;
4780         if (flags & NDR_SET_VALUES) {
4781                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4782         }
4783         if (flags & NDR_IN) {
4784                 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
4785                 ndr->depth++;
4786                 ndr->depth--;
4787         }
4788         if (flags & NDR_OUT) {
4789                 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
4790                 ndr->depth++;
4791                 ndr_print_WERROR(ndr, "result", r->out.result);
4792                 ndr->depth--;
4793         }
4794         ndr->depth--;
4795 }
4796
4797 static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
4798 {
4799         if (flags & NDR_IN) {
4800                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4801                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4802                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4803                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4804                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4805                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4806                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4807                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4808         }
4809         if (flags & NDR_OUT) {
4810                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4811         }
4812         return NDR_ERR_SUCCESS;
4813 }
4814
4815 static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
4816 {
4817         if (flags & NDR_IN) {
4818                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4819                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4820                 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4821                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
4822                 }
4823                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4824                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4825                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4826                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4827                 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4828                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4829                 }
4830                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4831                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4832         }
4833         if (flags & NDR_OUT) {
4834                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4835         }
4836         return NDR_ERR_SUCCESS;
4837 }
4838
4839 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
4840 {
4841         ndr_print_struct(ndr, name, "dfs_FlushFtTable");
4842         ndr->depth++;
4843         if (flags & NDR_SET_VALUES) {
4844                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4845         }
4846         if (flags & NDR_IN) {
4847                 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
4848                 ndr->depth++;
4849                 ndr_print_string(ndr, "servername", r->in.servername);
4850                 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4851                 ndr->depth--;
4852         }
4853         if (flags & NDR_OUT) {
4854                 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
4855                 ndr->depth++;
4856                 ndr_print_WERROR(ndr, "result", r->out.result);
4857                 ndr->depth--;
4858         }
4859         ndr->depth--;
4860 }
4861
4862 static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
4863 {
4864         if (flags & NDR_IN) {
4865         }
4866         if (flags & NDR_OUT) {
4867                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4868         }
4869         return NDR_ERR_SUCCESS;
4870 }
4871
4872 static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
4873 {
4874         if (flags & NDR_IN) {
4875         }
4876         if (flags & NDR_OUT) {
4877                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4878         }
4879         return NDR_ERR_SUCCESS;
4880 }
4881
4882 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
4883 {
4884         ndr_print_struct(ndr, name, "dfs_Add2");
4885         ndr->depth++;
4886         if (flags & NDR_SET_VALUES) {
4887                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4888         }
4889         if (flags & NDR_IN) {
4890                 ndr_print_struct(ndr, "in", "dfs_Add2");
4891                 ndr->depth++;
4892                 ndr->depth--;
4893         }
4894         if (flags & NDR_OUT) {
4895                 ndr_print_struct(ndr, "out", "dfs_Add2");
4896                 ndr->depth++;
4897                 ndr_print_WERROR(ndr, "result", r->out.result);
4898                 ndr->depth--;
4899         }
4900         ndr->depth--;
4901 }
4902
4903 static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
4904 {
4905         if (flags & NDR_IN) {
4906         }
4907         if (flags & NDR_OUT) {
4908                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4909         }
4910         return NDR_ERR_SUCCESS;
4911 }
4912
4913 static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
4914 {
4915         if (flags & NDR_IN) {
4916         }
4917         if (flags & NDR_OUT) {
4918                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4919         }
4920         return NDR_ERR_SUCCESS;
4921 }
4922
4923 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
4924 {
4925         ndr_print_struct(ndr, name, "dfs_Remove2");
4926         ndr->depth++;
4927         if (flags & NDR_SET_VALUES) {
4928                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4929         }
4930         if (flags & NDR_IN) {
4931                 ndr_print_struct(ndr, "in", "dfs_Remove2");
4932                 ndr->depth++;
4933                 ndr->depth--;
4934         }
4935         if (flags & NDR_OUT) {
4936                 ndr_print_struct(ndr, "out", "dfs_Remove2");
4937                 ndr->depth++;
4938                 ndr_print_WERROR(ndr, "result", r->out.result);
4939                 ndr->depth--;
4940         }
4941         ndr->depth--;
4942 }
4943
4944 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
4945 {
4946         if (flags & NDR_IN) {
4947                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
4948                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4949                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
4950                 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));
4951                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
4952                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
4953                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
4954                 if (r->in.info) {
4955                         NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4956                 }
4957                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
4958                 if (r->in.total) {
4959                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
4960                 }
4961         }
4962         if (flags & NDR_OUT) {
4963                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
4964                 if (r->out.info) {
4965                         NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4966                 }
4967                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
4968                 if (r->out.total) {
4969                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
4970                 }
4971                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4972         }
4973         return NDR_ERR_SUCCESS;
4974 }
4975
4976 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
4977 {
4978         uint32_t _ptr_info;
4979         uint32_t _ptr_total;
4980         TALLOC_CTX *_mem_save_info_0;
4981         TALLOC_CTX *_mem_save_total_0;
4982         if (flags & NDR_IN) {
4983                 ZERO_STRUCT(r->out);
4984
4985                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
4986                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
4987                 if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) {
4988                         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));
4989                 }
4990                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t)));
4991                 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));
4992                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
4993                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
4994                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4995                 if (_ptr_info) {
4996                         NDR_PULL_ALLOC(ndr, r->in.info);
4997                 } else {
4998                         r->in.info = NULL;
4999                 }
5000                 if (r->in.info) {
5001                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5002                         NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5003                         NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5004                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5005                 }
5006                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5007                 if (_ptr_total) {
5008                         NDR_PULL_ALLOC(ndr, r->in.total);
5009                 } else {
5010                         r->in.total = NULL;
5011                 }
5012                 if (r->in.total) {
5013                         _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5014                         NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
5015                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
5016                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5017                 }
5018         }
5019         if (flags & NDR_OUT) {
5020                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5021                 if (_ptr_info) {
5022                         NDR_PULL_ALLOC(ndr, r->out.info);
5023                 } else {
5024                         r->out.info = NULL;
5025                 }
5026                 if (r->out.info) {
5027                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5028                         NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
5029                         NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5030                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5031                 }
5032                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5033                 if (_ptr_total) {
5034                         NDR_PULL_ALLOC(ndr, r->out.total);
5035                 } else {
5036                         r->out.total = NULL;
5037                 }
5038                 if (r->out.total) {
5039                         _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5040                         NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
5041                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
5042                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5043                 }
5044                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5045         }
5046         return NDR_ERR_SUCCESS;
5047 }
5048
5049 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
5050 {
5051         ndr_print_struct(ndr, name, "dfs_EnumEx");
5052         ndr->depth++;
5053         if (flags & NDR_SET_VALUES) {
5054                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5055         }
5056         if (flags & NDR_IN) {
5057                 ndr_print_struct(ndr, "in", "dfs_EnumEx");
5058                 ndr->depth++;
5059                 ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
5060                 ndr_print_uint32(ndr, "level", r->in.level);
5061                 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
5062                 ndr_print_ptr(ndr, "info", r->in.info);
5063                 ndr->depth++;
5064                 if (r->in.info) {
5065                         ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
5066                 }
5067                 ndr->depth--;
5068                 ndr_print_ptr(ndr, "total", r->in.total);
5069                 ndr->depth++;
5070                 if (r->in.total) {
5071                         ndr_print_uint32(ndr, "total", *r->in.total);
5072                 }
5073                 ndr->depth--;
5074                 ndr->depth--;
5075         }
5076         if (flags & NDR_OUT) {
5077                 ndr_print_struct(ndr, "out", "dfs_EnumEx");
5078                 ndr->depth++;
5079                 ndr_print_ptr(ndr, "info", r->out.info);
5080                 ndr->depth++;
5081                 if (r->out.info) {
5082                         ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
5083                 }
5084                 ndr->depth--;
5085                 ndr_print_ptr(ndr, "total", r->out.total);
5086                 ndr->depth++;
5087                 if (r->out.total) {
5088                         ndr_print_uint32(ndr, "total", *r->out.total);
5089                 }
5090                 ndr->depth--;
5091                 ndr_print_WERROR(ndr, "result", r->out.result);
5092                 ndr->depth--;
5093         }
5094         ndr->depth--;
5095 }
5096
5097 static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
5098 {
5099         if (flags & NDR_IN) {
5100         }
5101         if (flags & NDR_OUT) {
5102                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5103         }
5104         return NDR_ERR_SUCCESS;
5105 }
5106
5107 static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
5108 {
5109         if (flags & NDR_IN) {
5110         }
5111         if (flags & NDR_OUT) {
5112                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5113         }
5114         return NDR_ERR_SUCCESS;
5115 }
5116
5117 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
5118 {
5119         ndr_print_struct(ndr, name, "dfs_SetInfo2");
5120         ndr->depth++;
5121         if (flags & NDR_SET_VALUES) {
5122                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5123         }
5124         if (flags & NDR_IN) {
5125                 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
5126                 ndr->depth++;
5127                 ndr->depth--;
5128         }
5129         if (flags & NDR_OUT) {
5130                 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
5131                 ndr->depth++;
5132                 ndr_print_WERROR(ndr, "result", r->out.result);
5133                 ndr->depth--;
5134         }
5135         ndr->depth--;
5136 }
5137
5138 static const struct ndr_interface_call netdfs_calls[] = {
5139         {
5140                 "dfs_GetManagerVersion",
5141                 sizeof(struct dfs_GetManagerVersion),
5142                 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
5143                 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
5144                 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
5145                 false,
5146         },
5147         {
5148                 "dfs_Add",
5149                 sizeof(struct dfs_Add),
5150                 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
5151                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
5152                 (ndr_print_function_t) ndr_print_dfs_Add,
5153                 false,
5154         },
5155         {
5156                 "dfs_Remove",
5157                 sizeof(struct dfs_Remove),
5158                 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
5159                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
5160                 (ndr_print_function_t) ndr_print_dfs_Remove,
5161                 false,
5162         },
5163         {
5164                 "dfs_SetInfo",
5165                 sizeof(struct dfs_SetInfo),
5166                 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
5167                 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
5168                 (ndr_print_function_t) ndr_print_dfs_SetInfo,
5169                 false,
5170         },
5171         {
5172                 "dfs_GetInfo",
5173                 sizeof(struct dfs_GetInfo),
5174                 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
5175                 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
5176                 (ndr_print_function_t) ndr_print_dfs_GetInfo,
5177                 false,
5178         },
5179         {
5180                 "dfs_Enum",
5181                 sizeof(struct dfs_Enum),
5182                 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
5183                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
5184                 (ndr_print_function_t) ndr_print_dfs_Enum,
5185                 false,
5186         },
5187         {
5188                 "dfs_Rename",
5189                 sizeof(struct dfs_Rename),
5190                 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
5191                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
5192                 (ndr_print_function_t) ndr_print_dfs_Rename,
5193                 false,
5194         },
5195         {
5196                 "dfs_Move",
5197                 sizeof(struct dfs_Move),
5198                 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
5199                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
5200                 (ndr_print_function_t) ndr_print_dfs_Move,
5201                 false,
5202         },
5203         {
5204                 "dfs_ManagerGetConfigInfo",
5205                 sizeof(struct dfs_ManagerGetConfigInfo),
5206                 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
5207                 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
5208                 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
5209                 false,
5210         },
5211         {
5212                 "dfs_ManagerSendSiteInfo",
5213                 sizeof(struct dfs_ManagerSendSiteInfo),
5214                 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
5215                 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
5216                 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
5217                 false,
5218         },
5219         {
5220                 "dfs_AddFtRoot",
5221                 sizeof(struct dfs_AddFtRoot),
5222                 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
5223                 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
5224                 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
5225                 false,
5226         },
5227         {
5228                 "dfs_RemoveFtRoot",
5229                 sizeof(struct dfs_RemoveFtRoot),
5230                 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
5231                 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
5232                 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
5233                 false,
5234         },
5235         {
5236                 "dfs_AddStdRoot",
5237                 sizeof(struct dfs_AddStdRoot),
5238                 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
5239                 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
5240                 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
5241                 false,
5242         },
5243         {
5244                 "dfs_RemoveStdRoot",
5245                 sizeof(struct dfs_RemoveStdRoot),
5246                 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
5247                 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
5248                 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
5249                 false,
5250         },
5251         {
5252                 "dfs_ManagerInitialize",
5253                 sizeof(struct dfs_ManagerInitialize),
5254                 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
5255                 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
5256                 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
5257                 false,
5258         },
5259         {
5260                 "dfs_AddStdRootForced",
5261                 sizeof(struct dfs_AddStdRootForced),
5262                 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
5263                 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
5264                 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
5265                 false,
5266         },
5267         {
5268                 "dfs_GetDcAddress",
5269                 sizeof(struct dfs_GetDcAddress),
5270                 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
5271                 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
5272                 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
5273                 false,
5274         },
5275         {
5276                 "dfs_SetDcAddress",
5277                 sizeof(struct dfs_SetDcAddress),
5278                 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
5279                 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
5280                 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
5281                 false,
5282         },
5283         {
5284                 "dfs_FlushFtTable",
5285                 sizeof(struct dfs_FlushFtTable),
5286                 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
5287                 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
5288                 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
5289                 false,
5290         },
5291         {
5292                 "dfs_Add2",
5293                 sizeof(struct dfs_Add2),
5294                 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
5295                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
5296                 (ndr_print_function_t) ndr_print_dfs_Add2,
5297                 false,
5298         },
5299         {
5300                 "dfs_Remove2",
5301                 sizeof(struct dfs_Remove2),
5302                 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
5303                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
5304                 (ndr_print_function_t) ndr_print_dfs_Remove2,
5305                 false,
5306         },
5307         {
5308                 "dfs_EnumEx",
5309                 sizeof(struct dfs_EnumEx),
5310                 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
5311                 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
5312                 (ndr_print_function_t) ndr_print_dfs_EnumEx,
5313                 false,
5314         },
5315         {
5316                 "dfs_SetInfo2",
5317                 sizeof(struct dfs_SetInfo2),
5318                 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
5319                 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
5320                 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
5321                 false,
5322         },
5323         { NULL, 0, NULL, NULL, NULL, false }
5324 };
5325
5326 static const char * const netdfs_endpoint_strings[] = {
5327         "ncacn_np:[\\pipe\\netdfs]", 
5328 };
5329
5330 static const struct ndr_interface_string_array netdfs_endpoints = {
5331         .count  = 1,
5332         .names  = netdfs_endpoint_strings
5333 };
5334
5335 static const char * const netdfs_authservice_strings[] = {
5336         "host", 
5337 };
5338
5339 static const struct ndr_interface_string_array netdfs_authservices = {
5340         .count  = 1,
5341         .names  = netdfs_authservice_strings
5342 };
5343
5344
5345 const struct ndr_interface_table ndr_table_netdfs = {
5346         .name           = "netdfs",
5347         .syntax_id      = {
5348                 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5349                 NDR_NETDFS_VERSION
5350         },
5351         .helpstring     = NDR_NETDFS_HELPSTRING,
5352         .num_calls      = 23,
5353         .calls          = netdfs_calls,
5354         .endpoints      = &netdfs_endpoints,
5355         .authservices   = &netdfs_authservices
5356 };
5357