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