r18275: add auto generated dfs code
[samba.git] / source / 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 NTSTATUS ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
7 {
8         if (ndr_flags & NDR_SCALARS) {
9                 NDR_CHECK(ndr_push_align(ndr, 1));
10         }
11         if (ndr_flags & NDR_BUFFERS) {
12         }
13         return NT_STATUS_OK;
14 }
15
16 NTSTATUS ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
17 {
18         if (ndr_flags & NDR_SCALARS) {
19                 NDR_CHECK(ndr_pull_align(ndr, 1));
20         }
21         if (ndr_flags & NDR_BUFFERS) {
22         }
23         return NT_STATUS_OK;
24 }
25
26 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r)
27 {
28         ndr_print_struct(ndr, name, "dfs_Info0");
29         ndr->depth++;
30         ndr->depth--;
31 }
32
33 NTSTATUS ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
34 {
35         if (ndr_flags & NDR_SCALARS) {
36                 NDR_CHECK(ndr_push_align(ndr, 4));
37                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
38         }
39         if (ndr_flags & NDR_BUFFERS) {
40                 if (r->path) {
41                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
42                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
43                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
44                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
45                 }
46         }
47         return NT_STATUS_OK;
48 }
49
50 NTSTATUS ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
51 {
52         uint32_t _ptr_path;
53         TALLOC_CTX *_mem_save_path_0;
54         if (ndr_flags & NDR_SCALARS) {
55                 NDR_CHECK(ndr_pull_align(ndr, 4));
56                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
57                 if (_ptr_path) {
58                         NDR_PULL_ALLOC(ndr, r->path);
59                 } else {
60                         r->path = NULL;
61                 }
62         }
63         if (ndr_flags & NDR_BUFFERS) {
64                 if (r->path) {
65                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
66                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
67                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
68                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
69                         if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
70                                 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));
71                         }
72                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
73                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
74                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
75                 }
76         }
77         return NT_STATUS_OK;
78 }
79
80 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
81 {
82         ndr_print_struct(ndr, name, "dfs_Info1");
83         ndr->depth++;
84         ndr_print_ptr(ndr, "path", r->path);
85         ndr->depth++;
86         if (r->path) {
87                 ndr_print_string(ndr, "path", r->path);
88         }
89         ndr->depth--;
90         ndr->depth--;
91 }
92
93 NTSTATUS ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
94 {
95         if (ndr_flags & NDR_SCALARS) {
96                 NDR_CHECK(ndr_push_align(ndr, 4));
97                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
98                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
99                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state));
100                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
101         }
102         if (ndr_flags & NDR_BUFFERS) {
103                 if (r->path) {
104                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
105                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
106                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
107                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
108                 }
109                 if (r->comment) {
110                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
111                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
112                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
113                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
114                 }
115         }
116         return NT_STATUS_OK;
117 }
118
119 NTSTATUS ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
120 {
121         uint32_t _ptr_path;
122         TALLOC_CTX *_mem_save_path_0;
123         uint32_t _ptr_comment;
124         TALLOC_CTX *_mem_save_comment_0;
125         if (ndr_flags & NDR_SCALARS) {
126                 NDR_CHECK(ndr_pull_align(ndr, 4));
127                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
128                 if (_ptr_path) {
129                         NDR_PULL_ALLOC(ndr, r->path);
130                 } else {
131                         r->path = NULL;
132                 }
133                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
134                 if (_ptr_comment) {
135                         NDR_PULL_ALLOC(ndr, r->comment);
136                 } else {
137                         r->comment = NULL;
138                 }
139                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state));
140                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
141         }
142         if (ndr_flags & NDR_BUFFERS) {
143                 if (r->path) {
144                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
145                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
146                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
147                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
148                         if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
149                                 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));
150                         }
151                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
152                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
153                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
154                 }
155                 if (r->comment) {
156                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
157                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
158                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
159                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
160                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
161                                 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));
162                         }
163                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
164                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
165                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
166                 }
167         }
168         return NT_STATUS_OK;
169 }
170
171 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
172 {
173         ndr_print_struct(ndr, name, "dfs_Info2");
174         ndr->depth++;
175         ndr_print_ptr(ndr, "path", r->path);
176         ndr->depth++;
177         if (r->path) {
178                 ndr_print_string(ndr, "path", r->path);
179         }
180         ndr->depth--;
181         ndr_print_ptr(ndr, "comment", r->comment);
182         ndr->depth++;
183         if (r->comment) {
184                 ndr_print_string(ndr, "comment", r->comment);
185         }
186         ndr->depth--;
187         ndr_print_uint32(ndr, "state", r->state);
188         ndr_print_uint32(ndr, "num_stores", r->num_stores);
189         ndr->depth--;
190 }
191
192 NTSTATUS ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
193 {
194         if (ndr_flags & NDR_SCALARS) {
195                 NDR_CHECK(ndr_push_align(ndr, 4));
196                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state));
197                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
198                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
199         }
200         if (ndr_flags & NDR_BUFFERS) {
201                 if (r->server) {
202                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
203                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
204                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
205                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
206                 }
207                 if (r->share) {
208                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
209                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
210                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
211                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
212                 }
213         }
214         return NT_STATUS_OK;
215 }
216
217 NTSTATUS ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
218 {
219         uint32_t _ptr_server;
220         TALLOC_CTX *_mem_save_server_0;
221         uint32_t _ptr_share;
222         TALLOC_CTX *_mem_save_share_0;
223         if (ndr_flags & NDR_SCALARS) {
224                 NDR_CHECK(ndr_pull_align(ndr, 4));
225                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state));
226                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
227                 if (_ptr_server) {
228                         NDR_PULL_ALLOC(ndr, r->server);
229                 } else {
230                         r->server = NULL;
231                 }
232                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
233                 if (_ptr_share) {
234                         NDR_PULL_ALLOC(ndr, r->share);
235                 } else {
236                         r->share = NULL;
237                 }
238         }
239         if (ndr_flags & NDR_BUFFERS) {
240                 if (r->server) {
241                         _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
242                         NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
243                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
244                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
245                         if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) {
246                                 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));
247                         }
248                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t)));
249                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16));
250                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
251                 }
252                 if (r->share) {
253                         _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
254                         NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
255                         NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
256                         NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
257                         if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
258                                 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));
259                         }
260                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
261                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
262                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
263                 }
264         }
265         return NT_STATUS_OK;
266 }
267
268 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
269 {
270         ndr_print_struct(ndr, name, "dfs_StorageInfo");
271         ndr->depth++;
272         ndr_print_uint32(ndr, "state", r->state);
273         ndr_print_ptr(ndr, "server", r->server);
274         ndr->depth++;
275         if (r->server) {
276                 ndr_print_string(ndr, "server", r->server);
277         }
278         ndr->depth--;
279         ndr_print_ptr(ndr, "share", r->share);
280         ndr->depth++;
281         if (r->share) {
282                 ndr_print_string(ndr, "share", r->share);
283         }
284         ndr->depth--;
285         ndr->depth--;
286 }
287
288 NTSTATUS ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
289 {
290         uint32_t cntr_stores_1;
291         if (ndr_flags & NDR_SCALARS) {
292                 NDR_CHECK(ndr_push_align(ndr, 4));
293                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
294                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
295                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state));
296                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
297                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
298         }
299         if (ndr_flags & NDR_BUFFERS) {
300                 if (r->path) {
301                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
302                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
303                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
304                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
305                 }
306                 if (r->comment) {
307                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
308                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
309                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
310                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
311                 }
312                 if (r->stores) {
313                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
314                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
315                                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
316                         }
317                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
318                                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
319                         }
320                 }
321         }
322         return NT_STATUS_OK;
323 }
324
325 NTSTATUS ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
326 {
327         uint32_t _ptr_path;
328         TALLOC_CTX *_mem_save_path_0;
329         uint32_t _ptr_comment;
330         TALLOC_CTX *_mem_save_comment_0;
331         uint32_t _ptr_stores;
332         uint32_t cntr_stores_1;
333         TALLOC_CTX *_mem_save_stores_0;
334         TALLOC_CTX *_mem_save_stores_1;
335         if (ndr_flags & NDR_SCALARS) {
336                 NDR_CHECK(ndr_pull_align(ndr, 4));
337                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
338                 if (_ptr_path) {
339                         NDR_PULL_ALLOC(ndr, r->path);
340                 } else {
341                         r->path = NULL;
342                 }
343                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
344                 if (_ptr_comment) {
345                         NDR_PULL_ALLOC(ndr, r->comment);
346                 } else {
347                         r->comment = NULL;
348                 }
349                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state));
350                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
351                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
352                 if (_ptr_stores) {
353                         NDR_PULL_ALLOC(ndr, r->stores);
354                 } else {
355                         r->stores = NULL;
356                 }
357         }
358         if (ndr_flags & NDR_BUFFERS) {
359                 if (r->path) {
360                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
361                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
362                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
363                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
364                         if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
365                                 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));
366                         }
367                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
368                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
369                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
370                 }
371                 if (r->comment) {
372                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
373                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
374                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
375                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
376                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
377                                 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));
378                         }
379                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
380                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
381                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
382                 }
383                 if (r->stores) {
384                         _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
385                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
386                         NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
387                         NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
388                         _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
389                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
390                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
391                                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
392                         }
393                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
394                                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
395                         }
396                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
397                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
398                 }
399                 if (r->stores) {
400                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
401                 }
402         }
403         return NT_STATUS_OK;
404 }
405
406 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
407 {
408         uint32_t cntr_stores_1;
409         ndr_print_struct(ndr, name, "dfs_Info3");
410         ndr->depth++;
411         ndr_print_ptr(ndr, "path", r->path);
412         ndr->depth++;
413         if (r->path) {
414                 ndr_print_string(ndr, "path", r->path);
415         }
416         ndr->depth--;
417         ndr_print_ptr(ndr, "comment", r->comment);
418         ndr->depth++;
419         if (r->comment) {
420                 ndr_print_string(ndr, "comment", r->comment);
421         }
422         ndr->depth--;
423         ndr_print_uint32(ndr, "state", r->state);
424         ndr_print_uint32(ndr, "num_stores", r->num_stores);
425         ndr_print_ptr(ndr, "stores", r->stores);
426         ndr->depth++;
427         if (r->stores) {
428                 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
429                 ndr->depth++;
430                 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
431                         char *idx_1=NULL;
432                         asprintf(&idx_1, "[%d]", cntr_stores_1);
433                         if (idx_1) {
434                                 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
435                                 free(idx_1);
436                         }
437                 }
438                 ndr->depth--;
439         }
440         ndr->depth--;
441         ndr->depth--;
442 }
443
444 NTSTATUS ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
445 {
446         uint32_t cntr_stores_1;
447         if (ndr_flags & NDR_SCALARS) {
448                 NDR_CHECK(ndr_push_align(ndr, 4));
449                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
450                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
451                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state));
452                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
453                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
454                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
455                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
456         }
457         if (ndr_flags & NDR_BUFFERS) {
458                 if (r->path) {
459                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
460                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
461                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
462                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
463                 }
464                 if (r->comment) {
465                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
466                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
467                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
468                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
469                 }
470                 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
471                 if (r->stores) {
472                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
473                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
474                                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
475                         }
476                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
477                                 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
478                         }
479                 }
480         }
481         return NT_STATUS_OK;
482 }
483
484 NTSTATUS ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
485 {
486         uint32_t _ptr_path;
487         TALLOC_CTX *_mem_save_path_0;
488         uint32_t _ptr_comment;
489         TALLOC_CTX *_mem_save_comment_0;
490         uint32_t _ptr_stores;
491         uint32_t cntr_stores_1;
492         TALLOC_CTX *_mem_save_stores_0;
493         TALLOC_CTX *_mem_save_stores_1;
494         if (ndr_flags & NDR_SCALARS) {
495                 NDR_CHECK(ndr_pull_align(ndr, 4));
496                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
497                 if (_ptr_path) {
498                         NDR_PULL_ALLOC(ndr, r->path);
499                 } else {
500                         r->path = NULL;
501                 }
502                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
503                 if (_ptr_comment) {
504                         NDR_PULL_ALLOC(ndr, r->comment);
505                 } else {
506                         r->comment = NULL;
507                 }
508                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state));
509                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
510                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
511                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
512                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
513                 if (_ptr_stores) {
514                         NDR_PULL_ALLOC(ndr, r->stores);
515                 } else {
516                         r->stores = NULL;
517                 }
518         }
519         if (ndr_flags & NDR_BUFFERS) {
520                 if (r->path) {
521                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
522                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
523                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
524                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
525                         if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
526                                 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));
527                         }
528                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
529                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
530                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
531                 }
532                 if (r->comment) {
533                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
534                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
535                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
536                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
537                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
538                                 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));
539                         }
540                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
541                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
542                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
543                 }
544                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
545                 if (r->stores) {
546                         _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
547                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
548                         NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
549                         NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
550                         _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
551                         NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
552                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
553                                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
554                         }
555                         for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
556                                 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
557                         }
558                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
559                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
560                 }
561                 if (r->stores) {
562                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
563                 }
564         }
565         return NT_STATUS_OK;
566 }
567
568 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
569 {
570         uint32_t cntr_stores_1;
571         ndr_print_struct(ndr, name, "dfs_Info4");
572         ndr->depth++;
573         ndr_print_ptr(ndr, "path", r->path);
574         ndr->depth++;
575         if (r->path) {
576                 ndr_print_string(ndr, "path", r->path);
577         }
578         ndr->depth--;
579         ndr_print_ptr(ndr, "comment", r->comment);
580         ndr->depth++;
581         if (r->comment) {
582                 ndr_print_string(ndr, "comment", r->comment);
583         }
584         ndr->depth--;
585         ndr_print_uint32(ndr, "state", r->state);
586         ndr_print_uint32(ndr, "timeout", r->timeout);
587         ndr_print_GUID(ndr, "guid", &r->guid);
588         ndr_print_uint32(ndr, "num_stores", r->num_stores);
589         ndr_print_ptr(ndr, "stores", r->stores);
590         ndr->depth++;
591         if (r->stores) {
592                 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
593                 ndr->depth++;
594                 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
595                         char *idx_1=NULL;
596                         asprintf(&idx_1, "[%d]", cntr_stores_1);
597                         if (idx_1) {
598                                 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
599                                 free(idx_1);
600                         }
601                 }
602                 ndr->depth--;
603         }
604         ndr->depth--;
605         ndr->depth--;
606 }
607
608 NTSTATUS ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
609 {
610         if (ndr_flags & NDR_SCALARS) {
611                 NDR_CHECK(ndr_push_align(ndr, 4));
612                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
613         }
614         if (ndr_flags & NDR_BUFFERS) {
615                 if (r->comment) {
616                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
617                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
618                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
619                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
620                 }
621         }
622         return NT_STATUS_OK;
623 }
624
625 NTSTATUS ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
626 {
627         uint32_t _ptr_comment;
628         TALLOC_CTX *_mem_save_comment_0;
629         if (ndr_flags & NDR_SCALARS) {
630                 NDR_CHECK(ndr_pull_align(ndr, 4));
631                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
632                 if (_ptr_comment) {
633                         NDR_PULL_ALLOC(ndr, r->comment);
634                 } else {
635                         r->comment = NULL;
636                 }
637         }
638         if (ndr_flags & NDR_BUFFERS) {
639                 if (r->comment) {
640                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
641                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
642                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
643                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
644                         if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
645                                 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));
646                         }
647                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
648                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
649                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
650                 }
651         }
652         return NT_STATUS_OK;
653 }
654
655 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
656 {
657         ndr_print_struct(ndr, name, "dfs_Info100");
658         ndr->depth++;
659         ndr_print_ptr(ndr, "comment", r->comment);
660         ndr->depth++;
661         if (r->comment) {
662                 ndr_print_string(ndr, "comment", r->comment);
663         }
664         ndr->depth--;
665         ndr->depth--;
666 }
667
668 NTSTATUS ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
669 {
670         if (ndr_flags & NDR_SCALARS) {
671                 NDR_CHECK(ndr_push_align(ndr, 4));
672                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->state));
673         }
674         if (ndr_flags & NDR_BUFFERS) {
675         }
676         return NT_STATUS_OK;
677 }
678
679 NTSTATUS ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
680 {
681         if (ndr_flags & NDR_SCALARS) {
682                 NDR_CHECK(ndr_pull_align(ndr, 4));
683                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->state));
684         }
685         if (ndr_flags & NDR_BUFFERS) {
686         }
687         return NT_STATUS_OK;
688 }
689
690 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
691 {
692         ndr_print_struct(ndr, name, "dfs_Info101");
693         ndr->depth++;
694         ndr_print_uint32(ndr, "state", r->state);
695         ndr->depth--;
696 }
697
698 NTSTATUS ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
699 {
700         if (ndr_flags & NDR_SCALARS) {
701                 NDR_CHECK(ndr_push_align(ndr, 4));
702                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
703         }
704         if (ndr_flags & NDR_BUFFERS) {
705         }
706         return NT_STATUS_OK;
707 }
708
709 NTSTATUS ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
710 {
711         if (ndr_flags & NDR_SCALARS) {
712                 NDR_CHECK(ndr_pull_align(ndr, 4));
713                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
714         }
715         if (ndr_flags & NDR_BUFFERS) {
716         }
717         return NT_STATUS_OK;
718 }
719
720 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
721 {
722         ndr_print_struct(ndr, name, "dfs_Info102");
723         ndr->depth++;
724         ndr_print_uint32(ndr, "timeout", r->timeout);
725         ndr->depth--;
726 }
727
728 NTSTATUS ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
729 {
730         if (ndr_flags & NDR_SCALARS) {
731                 NDR_CHECK(ndr_push_align(ndr, 4));
732                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
733         }
734         if (ndr_flags & NDR_BUFFERS) {
735                 if (r->dom_root) {
736                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
737                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
738                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
739                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
740                 }
741         }
742         return NT_STATUS_OK;
743 }
744
745 NTSTATUS ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
746 {
747         uint32_t _ptr_dom_root;
748         TALLOC_CTX *_mem_save_dom_root_0;
749         if (ndr_flags & NDR_SCALARS) {
750                 NDR_CHECK(ndr_pull_align(ndr, 4));
751                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
752                 if (_ptr_dom_root) {
753                         NDR_PULL_ALLOC(ndr, r->dom_root);
754                 } else {
755                         r->dom_root = NULL;
756                 }
757         }
758         if (ndr_flags & NDR_BUFFERS) {
759                 if (r->dom_root) {
760                         _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
761                         NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
762                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
763                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
764                         if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
765                                 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));
766                         }
767                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
768                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
769                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
770                 }
771         }
772         return NT_STATUS_OK;
773 }
774
775 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
776 {
777         ndr_print_struct(ndr, name, "dfs_Info200");
778         ndr->depth++;
779         ndr_print_ptr(ndr, "dom_root", r->dom_root);
780         ndr->depth++;
781         if (r->dom_root) {
782                 ndr_print_string(ndr, "dom_root", r->dom_root);
783         }
784         ndr->depth--;
785         ndr->depth--;
786 }
787
788 NTSTATUS ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
789 {
790         if (ndr_flags & NDR_SCALARS) {
791                 NDR_CHECK(ndr_push_align(ndr, 4));
792                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
793                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
794         }
795         if (ndr_flags & NDR_BUFFERS) {
796                 if (r->dom_root) {
797                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
798                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
799                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
800                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
801                 }
802         }
803         return NT_STATUS_OK;
804 }
805
806 NTSTATUS ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
807 {
808         uint32_t _ptr_dom_root;
809         TALLOC_CTX *_mem_save_dom_root_0;
810         if (ndr_flags & NDR_SCALARS) {
811                 NDR_CHECK(ndr_pull_align(ndr, 4));
812                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
813                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
814                 if (_ptr_dom_root) {
815                         NDR_PULL_ALLOC(ndr, r->dom_root);
816                 } else {
817                         r->dom_root = NULL;
818                 }
819         }
820         if (ndr_flags & NDR_BUFFERS) {
821                 if (r->dom_root) {
822                         _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
823                         NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
824                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
825                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
826                         if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
827                                 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));
828                         }
829                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
830                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
831                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
832                 }
833         }
834         return NT_STATUS_OK;
835 }
836
837 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
838 {
839         ndr_print_struct(ndr, name, "dfs_Info300");
840         ndr->depth++;
841         ndr_print_uint32(ndr, "flags", r->flags);
842         ndr_print_ptr(ndr, "dom_root", r->dom_root);
843         ndr->depth++;
844         if (r->dom_root) {
845                 ndr_print_string(ndr, "dom_root", r->dom_root);
846         }
847         ndr->depth--;
848         ndr->depth--;
849 }
850
851 NTSTATUS ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
852 {
853         int level;
854         level = ndr_push_get_switch_value(ndr, r);
855         if (ndr_flags & NDR_SCALARS) {
856                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
857                 switch (level) {
858                         case 0:
859                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
860                         break;
861
862                         case 1:
863                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
864                         break;
865
866                         case 2:
867                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
868                         break;
869
870                         case 3:
871                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
872                         break;
873
874                         case 4:
875                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
876                         break;
877
878                         case 100:
879                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
880                         break;
881
882                         case 101:
883                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
884                         break;
885
886                         case 102:
887                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
888                         break;
889
890                         default:
891                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
892                 }
893         }
894         if (ndr_flags & NDR_BUFFERS) {
895                 switch (level) {
896                         case 0:
897                                 if (r->info0) {
898                                         NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
899                                 }
900                         break;
901
902                         case 1:
903                                 if (r->info1) {
904                                         NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
905                                 }
906                         break;
907
908                         case 2:
909                                 if (r->info2) {
910                                         NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
911                                 }
912                         break;
913
914                         case 3:
915                                 if (r->info3) {
916                                         NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
917                                 }
918                         break;
919
920                         case 4:
921                                 if (r->info4) {
922                                         NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
923                                 }
924                         break;
925
926                         case 100:
927                                 if (r->info100) {
928                                         NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
929                                 }
930                         break;
931
932                         case 101:
933                                 if (r->info101) {
934                                         NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
935                                 }
936                         break;
937
938                         case 102:
939                                 if (r->info102) {
940                                         NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
941                                 }
942                         break;
943
944                         default:
945                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
946                 }
947         }
948         return NT_STATUS_OK;
949 }
950
951 NTSTATUS ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
952 {
953         int level;
954         uint32_t _level;
955         TALLOC_CTX *_mem_save_info0_0;
956         TALLOC_CTX *_mem_save_info1_0;
957         TALLOC_CTX *_mem_save_info2_0;
958         TALLOC_CTX *_mem_save_info3_0;
959         TALLOC_CTX *_mem_save_info4_0;
960         TALLOC_CTX *_mem_save_info100_0;
961         TALLOC_CTX *_mem_save_info101_0;
962         TALLOC_CTX *_mem_save_info102_0;
963         level = ndr_pull_get_switch_value(ndr, r);
964         if (ndr_flags & NDR_SCALARS) {
965                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
966                 if (_level != level) {
967                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for dfs_Info", _level);
968                 }
969                 switch (level) {
970                         case 0: {
971                                 uint32_t _ptr_info0;
972                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
973                                 if (_ptr_info0) {
974                                         NDR_PULL_ALLOC(ndr, r->info0);
975                                 } else {
976                                         r->info0 = NULL;
977                                 }
978                         break; }
979
980                         case 1: {
981                                 uint32_t _ptr_info1;
982                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
983                                 if (_ptr_info1) {
984                                         NDR_PULL_ALLOC(ndr, r->info1);
985                                 } else {
986                                         r->info1 = NULL;
987                                 }
988                         break; }
989
990                         case 2: {
991                                 uint32_t _ptr_info2;
992                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
993                                 if (_ptr_info2) {
994                                         NDR_PULL_ALLOC(ndr, r->info2);
995                                 } else {
996                                         r->info2 = NULL;
997                                 }
998                         break; }
999
1000                         case 3: {
1001                                 uint32_t _ptr_info3;
1002                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1003                                 if (_ptr_info3) {
1004                                         NDR_PULL_ALLOC(ndr, r->info3);
1005                                 } else {
1006                                         r->info3 = NULL;
1007                                 }
1008                         break; }
1009
1010                         case 4: {
1011                                 uint32_t _ptr_info4;
1012                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1013                                 if (_ptr_info4) {
1014                                         NDR_PULL_ALLOC(ndr, r->info4);
1015                                 } else {
1016                                         r->info4 = NULL;
1017                                 }
1018                         break; }
1019
1020                         case 100: {
1021                                 uint32_t _ptr_info100;
1022                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1023                                 if (_ptr_info100) {
1024                                         NDR_PULL_ALLOC(ndr, r->info100);
1025                                 } else {
1026                                         r->info100 = NULL;
1027                                 }
1028                         break; }
1029
1030                         case 101: {
1031                                 uint32_t _ptr_info101;
1032                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1033                                 if (_ptr_info101) {
1034                                         NDR_PULL_ALLOC(ndr, r->info101);
1035                                 } else {
1036                                         r->info101 = NULL;
1037                                 }
1038                         break; }
1039
1040                         case 102: {
1041                                 uint32_t _ptr_info102;
1042                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1043                                 if (_ptr_info102) {
1044                                         NDR_PULL_ALLOC(ndr, r->info102);
1045                                 } else {
1046                                         r->info102 = NULL;
1047                                 }
1048                         break; }
1049
1050                         default:
1051                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1052                 }
1053         }
1054         if (ndr_flags & NDR_BUFFERS) {
1055                 switch (level) {
1056                         case 0:
1057                                 if (r->info0) {
1058                                         _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1059                                         NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1060                                         NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1061                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1062                                 }
1063                         break;
1064
1065                         case 1:
1066                                 if (r->info1) {
1067                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1068                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1069                                         NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1070                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1071                                 }
1072                         break;
1073
1074                         case 2:
1075                                 if (r->info2) {
1076                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1077                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1078                                         NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1079                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
1080                                 }
1081                         break;
1082
1083                         case 3:
1084                                 if (r->info3) {
1085                                         _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1086                                         NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
1087                                         NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1088                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
1089                                 }
1090                         break;
1091
1092                         case 4:
1093                                 if (r->info4) {
1094                                         _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1095                                         NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
1096                                         NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1097                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
1098                                 }
1099                         break;
1100
1101                         case 100:
1102                                 if (r->info100) {
1103                                         _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
1104                                         NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
1105                                         NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1106                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
1107                                 }
1108                         break;
1109
1110                         case 101:
1111                                 if (r->info101) {
1112                                         _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
1113                                         NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
1114                                         NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1115                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
1116                                 }
1117                         break;
1118
1119                         case 102:
1120                                 if (r->info102) {
1121                                         _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
1122                                         NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
1123                                         NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1124                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
1125                                 }
1126                         break;
1127
1128                         default:
1129                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1130                 }
1131         }
1132         return NT_STATUS_OK;
1133 }
1134
1135 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
1136 {
1137         int level;
1138         level = ndr_print_get_switch_value(ndr, r);
1139         ndr_print_union(ndr, name, level, "dfs_Info");
1140         switch (level) {
1141                 case 0:
1142                         ndr_print_ptr(ndr, "info0", r->info0);
1143                         ndr->depth++;
1144                         if (r->info0) {
1145                                 ndr_print_dfs_Info0(ndr, "info0", r->info0);
1146                         }
1147                         ndr->depth--;
1148                 break;
1149
1150                 case 1:
1151                         ndr_print_ptr(ndr, "info1", r->info1);
1152                         ndr->depth++;
1153                         if (r->info1) {
1154                                 ndr_print_dfs_Info1(ndr, "info1", r->info1);
1155                         }
1156                         ndr->depth--;
1157                 break;
1158
1159                 case 2:
1160                         ndr_print_ptr(ndr, "info2", r->info2);
1161                         ndr->depth++;
1162                         if (r->info2) {
1163                                 ndr_print_dfs_Info2(ndr, "info2", r->info2);
1164                         }
1165                         ndr->depth--;
1166                 break;
1167
1168                 case 3:
1169                         ndr_print_ptr(ndr, "info3", r->info3);
1170                         ndr->depth++;
1171                         if (r->info3) {
1172                                 ndr_print_dfs_Info3(ndr, "info3", r->info3);
1173                         }
1174                         ndr->depth--;
1175                 break;
1176
1177                 case 4:
1178                         ndr_print_ptr(ndr, "info4", r->info4);
1179                         ndr->depth++;
1180                         if (r->info4) {
1181                                 ndr_print_dfs_Info4(ndr, "info4", r->info4);
1182                         }
1183                         ndr->depth--;
1184                 break;
1185
1186                 case 100:
1187                         ndr_print_ptr(ndr, "info100", r->info100);
1188                         ndr->depth++;
1189                         if (r->info100) {
1190                                 ndr_print_dfs_Info100(ndr, "info100", r->info100);
1191                         }
1192                         ndr->depth--;
1193                 break;
1194
1195                 case 101:
1196                         ndr_print_ptr(ndr, "info101", r->info101);
1197                         ndr->depth++;
1198                         if (r->info101) {
1199                                 ndr_print_dfs_Info101(ndr, "info101", r->info101);
1200                         }
1201                         ndr->depth--;
1202                 break;
1203
1204                 case 102:
1205                         ndr_print_ptr(ndr, "info102", r->info102);
1206                         ndr->depth++;
1207                         if (r->info102) {
1208                                 ndr_print_dfs_Info102(ndr, "info102", r->info102);
1209                         }
1210                         ndr->depth--;
1211                 break;
1212
1213                 default:
1214                         ndr_print_bad_level(ndr, name, level);
1215         }
1216 }
1217
1218 NTSTATUS ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
1219 {
1220         uint32_t cntr_s_1;
1221         if (ndr_flags & NDR_SCALARS) {
1222                 NDR_CHECK(ndr_push_align(ndr, 4));
1223                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1224                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
1225         }
1226         if (ndr_flags & NDR_BUFFERS) {
1227                 if (r->s) {
1228                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1229                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1230                                 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1231                         }
1232                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1233                                 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1234                         }
1235                 }
1236         }
1237         return NT_STATUS_OK;
1238 }
1239
1240 NTSTATUS ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
1241 {
1242         uint32_t _ptr_s;
1243         uint32_t cntr_s_1;
1244         TALLOC_CTX *_mem_save_s_0;
1245         TALLOC_CTX *_mem_save_s_1;
1246         if (ndr_flags & NDR_SCALARS) {
1247                 NDR_CHECK(ndr_pull_align(ndr, 4));
1248                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1249                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
1250                 if (_ptr_s) {
1251                         NDR_PULL_ALLOC(ndr, r->s);
1252                 } else {
1253                         r->s = NULL;
1254                 }
1255         }
1256         if (ndr_flags & NDR_BUFFERS) {
1257                 if (r->s) {
1258                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
1259                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1260                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
1261                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
1262                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
1263                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1264                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1265                                 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1266                         }
1267                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1268                                 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1269                         }
1270                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
1271                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
1272                 }
1273                 if (r->s) {
1274                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
1275                 }
1276         }
1277         return NT_STATUS_OK;
1278 }
1279
1280 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
1281 {
1282         uint32_t cntr_s_1;
1283         ndr_print_struct(ndr, name, "dfs_EnumArray1");
1284         ndr->depth++;
1285         ndr_print_uint32(ndr, "count", r->count);
1286         ndr_print_ptr(ndr, "s", r->s);
1287         ndr->depth++;
1288         if (r->s) {
1289                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
1290                 ndr->depth++;
1291                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
1292                         char *idx_1=NULL;
1293                         asprintf(&idx_1, "[%d]", cntr_s_1);
1294                         if (idx_1) {
1295                                 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
1296                                 free(idx_1);
1297                         }
1298                 }
1299                 ndr->depth--;
1300         }
1301         ndr->depth--;
1302         ndr->depth--;
1303 }
1304
1305 NTSTATUS ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
1306 {
1307         uint32_t cntr_s_1;
1308         if (ndr_flags & NDR_SCALARS) {
1309                 NDR_CHECK(ndr_push_align(ndr, 4));
1310                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1311                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
1312         }
1313         if (ndr_flags & NDR_BUFFERS) {
1314                 if (r->s) {
1315                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1316                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1317                                 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1318                         }
1319                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1320                                 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1321                         }
1322                 }
1323         }
1324         return NT_STATUS_OK;
1325 }
1326
1327 NTSTATUS ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
1328 {
1329         uint32_t _ptr_s;
1330         uint32_t cntr_s_1;
1331         TALLOC_CTX *_mem_save_s_0;
1332         TALLOC_CTX *_mem_save_s_1;
1333         if (ndr_flags & NDR_SCALARS) {
1334                 NDR_CHECK(ndr_pull_align(ndr, 4));
1335                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1336                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
1337                 if (_ptr_s) {
1338                         NDR_PULL_ALLOC(ndr, r->s);
1339                 } else {
1340                         r->s = NULL;
1341                 }
1342         }
1343         if (ndr_flags & NDR_BUFFERS) {
1344                 if (r->s) {
1345                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
1346                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1347                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
1348                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
1349                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
1350                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1351                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1352                                 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1353                         }
1354                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1355                                 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1356                         }
1357                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
1358                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
1359                 }
1360                 if (r->s) {
1361                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
1362                 }
1363         }
1364         return NT_STATUS_OK;
1365 }
1366
1367 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
1368 {
1369         uint32_t cntr_s_1;
1370         ndr_print_struct(ndr, name, "dfs_EnumArray2");
1371         ndr->depth++;
1372         ndr_print_uint32(ndr, "count", r->count);
1373         ndr_print_ptr(ndr, "s", r->s);
1374         ndr->depth++;
1375         if (r->s) {
1376                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
1377                 ndr->depth++;
1378                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
1379                         char *idx_1=NULL;
1380                         asprintf(&idx_1, "[%d]", cntr_s_1);
1381                         if (idx_1) {
1382                                 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
1383                                 free(idx_1);
1384                         }
1385                 }
1386                 ndr->depth--;
1387         }
1388         ndr->depth--;
1389         ndr->depth--;
1390 }
1391
1392 NTSTATUS ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
1393 {
1394         uint32_t cntr_s_1;
1395         if (ndr_flags & NDR_SCALARS) {
1396                 NDR_CHECK(ndr_push_align(ndr, 4));
1397                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1398                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
1399         }
1400         if (ndr_flags & NDR_BUFFERS) {
1401                 if (r->s) {
1402                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1403                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1404                                 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1405                         }
1406                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1407                                 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1408                         }
1409                 }
1410         }
1411         return NT_STATUS_OK;
1412 }
1413
1414 NTSTATUS ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
1415 {
1416         uint32_t _ptr_s;
1417         uint32_t cntr_s_1;
1418         TALLOC_CTX *_mem_save_s_0;
1419         TALLOC_CTX *_mem_save_s_1;
1420         if (ndr_flags & NDR_SCALARS) {
1421                 NDR_CHECK(ndr_pull_align(ndr, 4));
1422                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1423                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
1424                 if (_ptr_s) {
1425                         NDR_PULL_ALLOC(ndr, r->s);
1426                 } else {
1427                         r->s = NULL;
1428                 }
1429         }
1430         if (ndr_flags & NDR_BUFFERS) {
1431                 if (r->s) {
1432                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
1433                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1434                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
1435                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
1436                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
1437                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1438                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1439                                 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1440                         }
1441                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1442                                 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1443                         }
1444                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
1445                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
1446                 }
1447                 if (r->s) {
1448                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
1449                 }
1450         }
1451         return NT_STATUS_OK;
1452 }
1453
1454 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
1455 {
1456         uint32_t cntr_s_1;
1457         ndr_print_struct(ndr, name, "dfs_EnumArray3");
1458         ndr->depth++;
1459         ndr_print_uint32(ndr, "count", r->count);
1460         ndr_print_ptr(ndr, "s", r->s);
1461         ndr->depth++;
1462         if (r->s) {
1463                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
1464                 ndr->depth++;
1465                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
1466                         char *idx_1=NULL;
1467                         asprintf(&idx_1, "[%d]", cntr_s_1);
1468                         if (idx_1) {
1469                                 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
1470                                 free(idx_1);
1471                         }
1472                 }
1473                 ndr->depth--;
1474         }
1475         ndr->depth--;
1476         ndr->depth--;
1477 }
1478
1479 NTSTATUS ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
1480 {
1481         uint32_t cntr_s_1;
1482         if (ndr_flags & NDR_SCALARS) {
1483                 NDR_CHECK(ndr_push_align(ndr, 4));
1484                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1485                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
1486         }
1487         if (ndr_flags & NDR_BUFFERS) {
1488                 if (r->s) {
1489                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1490                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1491                                 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1492                         }
1493                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1494                                 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1495                         }
1496                 }
1497         }
1498         return NT_STATUS_OK;
1499 }
1500
1501 NTSTATUS ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
1502 {
1503         uint32_t _ptr_s;
1504         uint32_t cntr_s_1;
1505         TALLOC_CTX *_mem_save_s_0;
1506         TALLOC_CTX *_mem_save_s_1;
1507         if (ndr_flags & NDR_SCALARS) {
1508                 NDR_CHECK(ndr_pull_align(ndr, 4));
1509                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1510                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
1511                 if (_ptr_s) {
1512                         NDR_PULL_ALLOC(ndr, r->s);
1513                 } else {
1514                         r->s = NULL;
1515                 }
1516         }
1517         if (ndr_flags & NDR_BUFFERS) {
1518                 if (r->s) {
1519                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
1520                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1521                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
1522                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
1523                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
1524                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1525                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1526                                 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1527                         }
1528                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1529                                 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1530                         }
1531                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
1532                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
1533                 }
1534                 if (r->s) {
1535                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
1536                 }
1537         }
1538         return NT_STATUS_OK;
1539 }
1540
1541 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
1542 {
1543         uint32_t cntr_s_1;
1544         ndr_print_struct(ndr, name, "dfs_EnumArray4");
1545         ndr->depth++;
1546         ndr_print_uint32(ndr, "count", r->count);
1547         ndr_print_ptr(ndr, "s", r->s);
1548         ndr->depth++;
1549         if (r->s) {
1550                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
1551                 ndr->depth++;
1552                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
1553                         char *idx_1=NULL;
1554                         asprintf(&idx_1, "[%d]", cntr_s_1);
1555                         if (idx_1) {
1556                                 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
1557                                 free(idx_1);
1558                         }
1559                 }
1560                 ndr->depth--;
1561         }
1562         ndr->depth--;
1563         ndr->depth--;
1564 }
1565
1566 NTSTATUS ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
1567 {
1568         uint32_t cntr_s_1;
1569         if (ndr_flags & NDR_SCALARS) {
1570                 NDR_CHECK(ndr_push_align(ndr, 4));
1571                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1572                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
1573         }
1574         if (ndr_flags & NDR_BUFFERS) {
1575                 if (r->s) {
1576                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1577                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1578                                 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1579                         }
1580                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1581                                 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1582                         }
1583                 }
1584         }
1585         return NT_STATUS_OK;
1586 }
1587
1588 NTSTATUS ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
1589 {
1590         uint32_t _ptr_s;
1591         uint32_t cntr_s_1;
1592         TALLOC_CTX *_mem_save_s_0;
1593         TALLOC_CTX *_mem_save_s_1;
1594         if (ndr_flags & NDR_SCALARS) {
1595                 NDR_CHECK(ndr_pull_align(ndr, 4));
1596                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1597                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
1598                 if (_ptr_s) {
1599                         NDR_PULL_ALLOC(ndr, r->s);
1600                 } else {
1601                         r->s = NULL;
1602                 }
1603         }
1604         if (ndr_flags & NDR_BUFFERS) {
1605                 if (r->s) {
1606                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
1607                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1608                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
1609                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
1610                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
1611                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1612                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1613                                 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1614                         }
1615                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1616                                 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1617                         }
1618                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
1619                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
1620                 }
1621                 if (r->s) {
1622                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
1623                 }
1624         }
1625         return NT_STATUS_OK;
1626 }
1627
1628 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
1629 {
1630         uint32_t cntr_s_1;
1631         ndr_print_struct(ndr, name, "dfs_EnumArray200");
1632         ndr->depth++;
1633         ndr_print_uint32(ndr, "count", r->count);
1634         ndr_print_ptr(ndr, "s", r->s);
1635         ndr->depth++;
1636         if (r->s) {
1637                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
1638                 ndr->depth++;
1639                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
1640                         char *idx_1=NULL;
1641                         asprintf(&idx_1, "[%d]", cntr_s_1);
1642                         if (idx_1) {
1643                                 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
1644                                 free(idx_1);
1645                         }
1646                 }
1647                 ndr->depth--;
1648         }
1649         ndr->depth--;
1650         ndr->depth--;
1651 }
1652
1653 NTSTATUS ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
1654 {
1655         uint32_t cntr_s_1;
1656         if (ndr_flags & NDR_SCALARS) {
1657                 NDR_CHECK(ndr_push_align(ndr, 4));
1658                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1659                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
1660         }
1661         if (ndr_flags & NDR_BUFFERS) {
1662                 if (r->s) {
1663                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1664                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1665                                 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1666                         }
1667                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1668                                 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1669                         }
1670                 }
1671         }
1672         return NT_STATUS_OK;
1673 }
1674
1675 NTSTATUS ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
1676 {
1677         uint32_t _ptr_s;
1678         uint32_t cntr_s_1;
1679         TALLOC_CTX *_mem_save_s_0;
1680         TALLOC_CTX *_mem_save_s_1;
1681         if (ndr_flags & NDR_SCALARS) {
1682                 NDR_CHECK(ndr_pull_align(ndr, 4));
1683                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1684                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
1685                 if (_ptr_s) {
1686                         NDR_PULL_ALLOC(ndr, r->s);
1687                 } else {
1688                         r->s = NULL;
1689                 }
1690         }
1691         if (ndr_flags & NDR_BUFFERS) {
1692                 if (r->s) {
1693                         _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
1694                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1695                         NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
1696                         NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
1697                         _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
1698                         NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
1699                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1700                                 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
1701                         }
1702                         for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
1703                                 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
1704                         }
1705                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
1706                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
1707                 }
1708                 if (r->s) {
1709                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
1710                 }
1711         }
1712         return NT_STATUS_OK;
1713 }
1714
1715 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
1716 {
1717         uint32_t cntr_s_1;
1718         ndr_print_struct(ndr, name, "dfs_EnumArray300");
1719         ndr->depth++;
1720         ndr_print_uint32(ndr, "count", r->count);
1721         ndr_print_ptr(ndr, "s", r->s);
1722         ndr->depth++;
1723         if (r->s) {
1724                 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
1725                 ndr->depth++;
1726                 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
1727                         char *idx_1=NULL;
1728                         asprintf(&idx_1, "[%d]", cntr_s_1);
1729                         if (idx_1) {
1730                                 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
1731                                 free(idx_1);
1732                         }
1733                 }
1734                 ndr->depth--;
1735         }
1736         ndr->depth--;
1737         ndr->depth--;
1738 }
1739
1740 NTSTATUS ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
1741 {
1742         int level;
1743         level = ndr_push_get_switch_value(ndr, r);
1744         if (ndr_flags & NDR_SCALARS) {
1745                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1746                 switch (level) {
1747                         case 1:
1748                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1749                         break;
1750
1751                         case 2:
1752                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1753                         break;
1754
1755                         case 3:
1756                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1757                         break;
1758
1759                         case 4:
1760                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1761                         break;
1762
1763                         case 200:
1764                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
1765                         break;
1766
1767                         case 300:
1768                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
1769                         break;
1770
1771                         default:
1772                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1773                 }
1774         }
1775         if (ndr_flags & NDR_BUFFERS) {
1776                 switch (level) {
1777                         case 1:
1778                                 if (r->info1) {
1779                                         NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1780                                 }
1781                         break;
1782
1783                         case 2:
1784                                 if (r->info2) {
1785                                         NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1786                                 }
1787                         break;
1788
1789                         case 3:
1790                                 if (r->info3) {
1791                                         NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1792                                 }
1793                         break;
1794
1795                         case 4:
1796                                 if (r->info4) {
1797                                         NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1798                                 }
1799                         break;
1800
1801                         case 200:
1802                                 if (r->info200) {
1803                                         NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
1804                                 }
1805                         break;
1806
1807                         case 300:
1808                                 if (r->info300) {
1809                                         NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
1810                                 }
1811                         break;
1812
1813                         default:
1814                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1815                 }
1816         }
1817         return NT_STATUS_OK;
1818 }
1819
1820 NTSTATUS ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
1821 {
1822         int level;
1823         uint32_t _level;
1824         TALLOC_CTX *_mem_save_info1_0;
1825         TALLOC_CTX *_mem_save_info2_0;
1826         TALLOC_CTX *_mem_save_info3_0;
1827         TALLOC_CTX *_mem_save_info4_0;
1828         TALLOC_CTX *_mem_save_info200_0;
1829         TALLOC_CTX *_mem_save_info300_0;
1830         level = ndr_pull_get_switch_value(ndr, r);
1831         if (ndr_flags & NDR_SCALARS) {
1832                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1833                 if (_level != level) {
1834                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for dfs_EnumInfo", _level);
1835                 }
1836                 switch (level) {
1837                         case 1: {
1838                                 uint32_t _ptr_info1;
1839                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1840                                 if (_ptr_info1) {
1841                                         NDR_PULL_ALLOC(ndr, r->info1);
1842                                 } else {
1843                                         r->info1 = NULL;
1844                                 }
1845                         break; }
1846
1847                         case 2: {
1848                                 uint32_t _ptr_info2;
1849                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1850                                 if (_ptr_info2) {
1851                                         NDR_PULL_ALLOC(ndr, r->info2);
1852                                 } else {
1853                                         r->info2 = NULL;
1854                                 }
1855                         break; }
1856
1857                         case 3: {
1858                                 uint32_t _ptr_info3;
1859                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1860                                 if (_ptr_info3) {
1861                                         NDR_PULL_ALLOC(ndr, r->info3);
1862                                 } else {
1863                                         r->info3 = NULL;
1864                                 }
1865                         break; }
1866
1867                         case 4: {
1868                                 uint32_t _ptr_info4;
1869                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1870                                 if (_ptr_info4) {
1871                                         NDR_PULL_ALLOC(ndr, r->info4);
1872                                 } else {
1873                                         r->info4 = NULL;
1874                                 }
1875                         break; }
1876
1877                         case 200: {
1878                                 uint32_t _ptr_info200;
1879                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
1880                                 if (_ptr_info200) {
1881                                         NDR_PULL_ALLOC(ndr, r->info200);
1882                                 } else {
1883                                         r->info200 = NULL;
1884                                 }
1885                         break; }
1886
1887                         case 300: {
1888                                 uint32_t _ptr_info300;
1889                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
1890                                 if (_ptr_info300) {
1891                                         NDR_PULL_ALLOC(ndr, r->info300);
1892                                 } else {
1893                                         r->info300 = NULL;
1894                                 }
1895                         break; }
1896
1897                         default:
1898                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1899                 }
1900         }
1901         if (ndr_flags & NDR_BUFFERS) {
1902                 switch (level) {
1903                         case 1:
1904                                 if (r->info1) {
1905                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1906                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1907                                         NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1908                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1909                                 }
1910                         break;
1911
1912                         case 2:
1913                                 if (r->info2) {
1914                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1915                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1916                                         NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1917                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
1918                                 }
1919                         break;
1920
1921                         case 3:
1922                                 if (r->info3) {
1923                                         _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1924                                         NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
1925                                         NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1926                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
1927                                 }
1928                         break;
1929
1930                         case 4:
1931                                 if (r->info4) {
1932                                         _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1933                                         NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
1934                                         NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1935                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
1936                                 }
1937                         break;
1938
1939                         case 200:
1940                                 if (r->info200) {
1941                                         _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
1942                                         NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
1943                                         NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
1944                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
1945                                 }
1946                         break;
1947
1948                         case 300:
1949                                 if (r->info300) {
1950                                         _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
1951                                         NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
1952                                         NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
1953                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
1954                                 }
1955                         break;
1956
1957                         default:
1958                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1959                 }
1960         }
1961         return NT_STATUS_OK;
1962 }
1963
1964 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
1965 {
1966         int level;
1967         level = ndr_print_get_switch_value(ndr, r);
1968         ndr_print_union(ndr, name, level, "dfs_EnumInfo");
1969         switch (level) {
1970                 case 1:
1971                         ndr_print_ptr(ndr, "info1", r->info1);
1972                         ndr->depth++;
1973                         if (r->info1) {
1974                                 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
1975                         }
1976                         ndr->depth--;
1977                 break;
1978
1979                 case 2:
1980                         ndr_print_ptr(ndr, "info2", r->info2);
1981                         ndr->depth++;
1982                         if (r->info2) {
1983                                 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
1984                         }
1985                         ndr->depth--;
1986                 break;
1987
1988                 case 3:
1989                         ndr_print_ptr(ndr, "info3", r->info3);
1990                         ndr->depth++;
1991                         if (r->info3) {
1992                                 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
1993                         }
1994                         ndr->depth--;
1995                 break;
1996
1997                 case 4:
1998                         ndr_print_ptr(ndr, "info4", r->info4);
1999                         ndr->depth++;
2000                         if (r->info4) {
2001                                 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
2002                         }
2003                         ndr->depth--;
2004                 break;
2005
2006                 case 200:
2007                         ndr_print_ptr(ndr, "info200", r->info200);
2008                         ndr->depth++;
2009                         if (r->info200) {
2010                                 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
2011                         }
2012                         ndr->depth--;
2013                 break;
2014
2015                 case 300:
2016                         ndr_print_ptr(ndr, "info300", r->info300);
2017                         ndr->depth++;
2018                         if (r->info300) {
2019                                 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
2020                         }
2021                         ndr->depth--;
2022                 break;
2023
2024                 default:
2025                         ndr_print_bad_level(ndr, name, level);
2026         }
2027 }
2028
2029 NTSTATUS ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
2030 {
2031         if (ndr_flags & NDR_SCALARS) {
2032                 NDR_CHECK(ndr_push_align(ndr, 4));
2033                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
2034                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
2035                 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
2036         }
2037         if (ndr_flags & NDR_BUFFERS) {
2038                 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
2039         }
2040         return NT_STATUS_OK;
2041 }
2042
2043 NTSTATUS ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
2044 {
2045         if (ndr_flags & NDR_SCALARS) {
2046                 NDR_CHECK(ndr_pull_align(ndr, 4));
2047                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
2048                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
2049                 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
2050         }
2051         if (ndr_flags & NDR_BUFFERS) {
2052                 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
2053         }
2054         return NT_STATUS_OK;
2055 }
2056
2057 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
2058 {
2059         ndr_print_struct(ndr, name, "dfs_EnumStruct");
2060         ndr->depth++;
2061         ndr_print_uint32(ndr, "level", r->level);
2062         ndr_print_set_switch_value(ndr, &r->e, r->level);
2063         ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
2064         ndr->depth--;
2065 }
2066
2067 NTSTATUS ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
2068 {
2069         if (flags & NDR_IN) {
2070         }
2071         if (flags & NDR_OUT) {
2072                 if (r->out.exist_flag == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
2073                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.exist_flag));
2074         }
2075         return NT_STATUS_OK;
2076 }
2077
2078 NTSTATUS ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
2079 {
2080         TALLOC_CTX *_mem_save_exist_flag_0;
2081         if (flags & NDR_IN) {
2082                 ZERO_STRUCT(r->out);
2083
2084                 NDR_PULL_ALLOC(ndr, r->out.exist_flag);
2085                 ZERO_STRUCTP(r->out.exist_flag);
2086         }
2087         if (flags & NDR_OUT) {
2088                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2089                         NDR_PULL_ALLOC(ndr, r->out.exist_flag);
2090                 }
2091                 _mem_save_exist_flag_0 = NDR_PULL_GET_MEM_CTX(ndr);
2092                 NDR_PULL_SET_MEM_CTX(ndr, r->out.exist_flag, LIBNDR_FLAG_REF_ALLOC);
2093                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.exist_flag));
2094                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_exist_flag_0, LIBNDR_FLAG_REF_ALLOC);
2095         }
2096         return NT_STATUS_OK;
2097 }
2098
2099 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
2100 {
2101         ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
2102         ndr->depth++;
2103         if (flags & NDR_SET_VALUES) {
2104                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2105         }
2106         if (flags & NDR_IN) {
2107                 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
2108                 ndr->depth++;
2109                 ndr->depth--;
2110         }
2111         if (flags & NDR_OUT) {
2112                 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
2113                 ndr->depth++;
2114                 ndr_print_ptr(ndr, "exist_flag", r->out.exist_flag);
2115                 ndr->depth++;
2116                 ndr_print_uint32(ndr, "exist_flag", *r->out.exist_flag);
2117                 ndr->depth--;
2118                 ndr->depth--;
2119         }
2120         ndr->depth--;
2121 }
2122
2123 NTSTATUS ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
2124 {
2125         if (flags & NDR_IN) {
2126                 if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
2127                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
2128                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2129                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
2130                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2131                 if (r->in.server == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
2132                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
2133                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2134                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
2135                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2136                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
2137                 if (r->in.share) {
2138                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
2139                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2140                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
2141                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2142                 }
2143                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
2144                 if (r->in.comment) {
2145                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
2146                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2147                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
2148                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2149                 }
2150                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
2151         }
2152         if (flags & NDR_OUT) {
2153                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2154         }
2155         return NT_STATUS_OK;
2156 }
2157
2158 NTSTATUS ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
2159 {
2160         uint32_t _ptr_share;
2161         uint32_t _ptr_comment;
2162         TALLOC_CTX *_mem_save_share_0;
2163         TALLOC_CTX *_mem_save_comment_0;
2164         if (flags & NDR_IN) {
2165                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
2166                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
2167                 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
2168                         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));
2169                 }
2170                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
2171                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
2172                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
2173                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
2174                 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
2175                         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));
2176                 }
2177                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
2178                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
2179                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
2180                 if (_ptr_share) {
2181                         NDR_PULL_ALLOC(ndr, r->in.share);
2182                 } else {
2183                         r->in.share = NULL;
2184                 }
2185                 if (r->in.share) {
2186                         _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
2187                         NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
2188                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
2189                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
2190                         if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
2191                                 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));
2192                         }
2193                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
2194                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
2195                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
2196                 }
2197                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
2198                 if (_ptr_comment) {
2199                         NDR_PULL_ALLOC(ndr, r->in.comment);
2200                 } else {
2201                         r->in.comment = NULL;
2202                 }
2203                 if (r->in.comment) {
2204                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
2205                         NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
2206                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
2207                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
2208                         if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
2209                                 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));
2210                         }
2211                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
2212                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
2213                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
2214                 }
2215                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2216         }
2217         if (flags & NDR_OUT) {
2218                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2219         }
2220         return NT_STATUS_OK;
2221 }
2222
2223 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
2224 {
2225         ndr_print_struct(ndr, name, "dfs_Add");
2226         ndr->depth++;
2227         if (flags & NDR_SET_VALUES) {
2228                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2229         }
2230         if (flags & NDR_IN) {
2231                 ndr_print_struct(ndr, "in", "dfs_Add");
2232                 ndr->depth++;
2233                 ndr_print_ptr(ndr, "path", r->in.path);
2234                 ndr->depth++;
2235                 ndr_print_string(ndr, "path", r->in.path);
2236                 ndr->depth--;
2237                 ndr_print_ptr(ndr, "server", r->in.server);
2238                 ndr->depth++;
2239                 ndr_print_string(ndr, "server", r->in.server);
2240                 ndr->depth--;
2241                 ndr_print_ptr(ndr, "share", r->in.share);
2242                 ndr->depth++;
2243                 if (r->in.share) {
2244                         ndr_print_string(ndr, "share", r->in.share);
2245                 }
2246                 ndr->depth--;
2247                 ndr_print_ptr(ndr, "comment", r->in.comment);
2248                 ndr->depth++;
2249                 if (r->in.comment) {
2250                         ndr_print_string(ndr, "comment", r->in.comment);
2251                 }
2252                 ndr->depth--;
2253                 ndr_print_uint32(ndr, "flags", r->in.flags);
2254                 ndr->depth--;
2255         }
2256         if (flags & NDR_OUT) {
2257                 ndr_print_struct(ndr, "out", "dfs_Add");
2258                 ndr->depth++;
2259                 ndr_print_WERROR(ndr, "result", r->out.result);
2260                 ndr->depth--;
2261         }
2262         ndr->depth--;
2263 }
2264
2265 NTSTATUS ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
2266 {
2267         if (flags & NDR_IN) {
2268                 if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
2269                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
2270                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2271                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
2272                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2273                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
2274                 if (r->in.server) {
2275                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
2276                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2277                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
2278                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2279                 }
2280                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
2281                 if (r->in.share) {
2282                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
2283                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2284                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
2285                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2286                 }
2287         }
2288         if (flags & NDR_OUT) {
2289                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2290         }
2291         return NT_STATUS_OK;
2292 }
2293
2294 NTSTATUS ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
2295 {
2296         uint32_t _ptr_server;
2297         uint32_t _ptr_share;
2298         TALLOC_CTX *_mem_save_server_0;
2299         TALLOC_CTX *_mem_save_share_0;
2300         if (flags & NDR_IN) {
2301                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
2302                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
2303                 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
2304                         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));
2305                 }
2306                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
2307                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
2308                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
2309                 if (_ptr_server) {
2310                         NDR_PULL_ALLOC(ndr, r->in.server);
2311                 } else {
2312                         r->in.server = NULL;
2313                 }
2314                 if (r->in.server) {
2315                         _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
2316                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
2317                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
2318                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
2319                         if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
2320                                 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));
2321                         }
2322                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
2323                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
2324                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
2325                 }
2326                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
2327                 if (_ptr_share) {
2328                         NDR_PULL_ALLOC(ndr, r->in.share);
2329                 } else {
2330                         r->in.share = NULL;
2331                 }
2332                 if (r->in.share) {
2333                         _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
2334                         NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
2335                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
2336                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
2337                         if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
2338                                 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));
2339                         }
2340                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
2341                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
2342                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
2343                 }
2344         }
2345         if (flags & NDR_OUT) {
2346                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2347         }
2348         return NT_STATUS_OK;
2349 }
2350
2351 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
2352 {
2353         ndr_print_struct(ndr, name, "dfs_Remove");
2354         ndr->depth++;
2355         if (flags & NDR_SET_VALUES) {
2356                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2357         }
2358         if (flags & NDR_IN) {
2359                 ndr_print_struct(ndr, "in", "dfs_Remove");
2360                 ndr->depth++;
2361                 ndr_print_ptr(ndr, "path", r->in.path);
2362                 ndr->depth++;
2363                 ndr_print_string(ndr, "path", r->in.path);
2364                 ndr->depth--;
2365                 ndr_print_ptr(ndr, "server", r->in.server);
2366                 ndr->depth++;
2367                 if (r->in.server) {
2368                         ndr_print_string(ndr, "server", r->in.server);
2369                 }
2370                 ndr->depth--;
2371                 ndr_print_ptr(ndr, "share", r->in.share);
2372                 ndr->depth++;
2373                 if (r->in.share) {
2374                         ndr_print_string(ndr, "share", r->in.share);
2375                 }
2376                 ndr->depth--;
2377                 ndr->depth--;
2378         }
2379         if (flags & NDR_OUT) {
2380                 ndr_print_struct(ndr, "out", "dfs_Remove");
2381                 ndr->depth++;
2382                 ndr_print_WERROR(ndr, "result", r->out.result);
2383                 ndr->depth--;
2384         }
2385         ndr->depth--;
2386 }
2387
2388 NTSTATUS ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
2389 {
2390         if (flags & NDR_IN) {
2391         }
2392         if (flags & NDR_OUT) {
2393                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2394         }
2395         return NT_STATUS_OK;
2396 }
2397
2398 NTSTATUS ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
2399 {
2400         if (flags & NDR_IN) {
2401         }
2402         if (flags & NDR_OUT) {
2403                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2404         }
2405         return NT_STATUS_OK;
2406 }
2407
2408 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
2409 {
2410         ndr_print_struct(ndr, name, "dfs_SetInfo");
2411         ndr->depth++;
2412         if (flags & NDR_SET_VALUES) {
2413                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2414         }
2415         if (flags & NDR_IN) {
2416                 ndr_print_struct(ndr, "in", "dfs_SetInfo");
2417                 ndr->depth++;
2418                 ndr->depth--;
2419         }
2420         if (flags & NDR_OUT) {
2421                 ndr_print_struct(ndr, "out", "dfs_SetInfo");
2422                 ndr->depth++;
2423                 ndr_print_WERROR(ndr, "result", r->out.result);
2424                 ndr->depth--;
2425         }
2426         ndr->depth--;
2427 }
2428
2429 NTSTATUS ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
2430 {
2431         if (flags & NDR_IN) {
2432                 if (r->in.path == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
2433                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
2434                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2435                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
2436                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2437                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
2438                 if (r->in.server) {
2439                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
2440                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2441                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
2442                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2443                 }
2444                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
2445                 if (r->in.share) {
2446                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
2447                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2448                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
2449                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2450                 }
2451                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
2452         }
2453         if (flags & NDR_OUT) {
2454                 if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
2455                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
2456                 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
2457                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2458         }
2459         return NT_STATUS_OK;
2460 }
2461
2462 NTSTATUS ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
2463 {
2464         uint32_t _ptr_server;
2465         uint32_t _ptr_share;
2466         TALLOC_CTX *_mem_save_server_0;
2467         TALLOC_CTX *_mem_save_share_0;
2468         TALLOC_CTX *_mem_save_info_0;
2469         if (flags & NDR_IN) {
2470                 ZERO_STRUCT(r->out);
2471
2472                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
2473                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
2474                 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
2475                         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));
2476                 }
2477                 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
2478                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
2479                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
2480                 if (_ptr_server) {
2481                         NDR_PULL_ALLOC(ndr, r->in.server);
2482                 } else {
2483                         r->in.server = NULL;
2484                 }
2485                 if (r->in.server) {
2486                         _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
2487                         NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
2488                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
2489                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
2490                         if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
2491                                 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));
2492                         }
2493                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
2494                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
2495                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
2496                 }
2497                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
2498                 if (_ptr_share) {
2499                         NDR_PULL_ALLOC(ndr, r->in.share);
2500                 } else {
2501                         r->in.share = NULL;
2502                 }
2503                 if (r->in.share) {
2504                         _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
2505                         NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
2506                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
2507                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
2508                         if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
2509                                 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));
2510                         }
2511                         NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
2512                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
2513                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
2514                 }
2515                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
2516                 NDR_PULL_ALLOC(ndr, r->out.info);
2517                 ZERO_STRUCTP(r->out.info);
2518         }
2519         if (flags & NDR_OUT) {
2520                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2521                         NDR_PULL_ALLOC(ndr, r->out.info);
2522                 }
2523                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
2524                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
2525                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
2526                 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
2527                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
2528                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2529         }
2530         return NT_STATUS_OK;
2531 }
2532
2533 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
2534 {
2535         ndr_print_struct(ndr, name, "dfs_GetInfo");
2536         ndr->depth++;
2537         if (flags & NDR_SET_VALUES) {
2538                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2539         }
2540         if (flags & NDR_IN) {
2541                 ndr_print_struct(ndr, "in", "dfs_GetInfo");
2542                 ndr->depth++;
2543                 ndr_print_ptr(ndr, "path", r->in.path);
2544                 ndr->depth++;
2545                 ndr_print_string(ndr, "path", r->in.path);
2546                 ndr->depth--;
2547                 ndr_print_ptr(ndr, "server", r->in.server);
2548                 ndr->depth++;
2549                 if (r->in.server) {
2550                         ndr_print_string(ndr, "server", r->in.server);
2551                 }
2552                 ndr->depth--;
2553                 ndr_print_ptr(ndr, "share", r->in.share);
2554                 ndr->depth++;
2555                 if (r->in.share) {
2556                         ndr_print_string(ndr, "share", r->in.share);
2557                 }
2558                 ndr->depth--;
2559                 ndr_print_uint32(ndr, "level", r->in.level);
2560                 ndr->depth--;
2561         }
2562         if (flags & NDR_OUT) {
2563                 ndr_print_struct(ndr, "out", "dfs_GetInfo");
2564                 ndr->depth++;
2565                 ndr_print_ptr(ndr, "info", r->out.info);
2566                 ndr->depth++;
2567                 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
2568                 ndr_print_dfs_Info(ndr, "info", r->out.info);
2569                 ndr->depth--;
2570                 ndr_print_WERROR(ndr, "result", r->out.result);
2571                 ndr->depth--;
2572         }
2573         ndr->depth--;
2574 }
2575
2576 NTSTATUS ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
2577 {
2578         if (flags & NDR_IN) {
2579                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
2580                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
2581                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
2582                 if (r->in.info) {
2583                         NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
2584                 }
2585                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
2586                 if (r->in.unknown) {
2587                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown));
2588                 }
2589                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
2590                 if (r->in.total) {
2591                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
2592                 }
2593         }
2594         if (flags & NDR_OUT) {
2595                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
2596                 if (r->out.info) {
2597                         NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
2598                 }
2599                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
2600                 if (r->out.total) {
2601                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
2602                 }
2603                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2604         }
2605         return NT_STATUS_OK;
2606 }
2607
2608 NTSTATUS ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
2609 {
2610         uint32_t _ptr_info;
2611         uint32_t _ptr_unknown;
2612         uint32_t _ptr_total;
2613         TALLOC_CTX *_mem_save_info_0;
2614         TALLOC_CTX *_mem_save_unknown_0;
2615         TALLOC_CTX *_mem_save_total_0;
2616         if (flags & NDR_IN) {
2617                 ZERO_STRUCT(r->out);
2618
2619                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
2620                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
2621                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
2622                 if (_ptr_info) {
2623                         NDR_PULL_ALLOC(ndr, r->in.info);
2624                 } else {
2625                         r->in.info = NULL;
2626                 }
2627                 if (r->in.info) {
2628                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
2629                         NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
2630                         NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
2631                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
2632                 }
2633                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
2634                 if (_ptr_unknown) {
2635                         NDR_PULL_ALLOC(ndr, r->in.unknown);
2636                 } else {
2637                         r->in.unknown = NULL;
2638                 }
2639                 if (r->in.unknown) {
2640                         _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
2641                         NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
2642                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown));
2643                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
2644                 }
2645                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
2646                 if (_ptr_total) {
2647                         NDR_PULL_ALLOC(ndr, r->in.total);
2648                 } else {
2649                         r->in.total = NULL;
2650                 }
2651                 if (r->in.total) {
2652                         _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
2653                         NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
2654                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
2655                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
2656                 }
2657         }
2658         if (flags & NDR_OUT) {
2659                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
2660                 if (_ptr_info) {
2661                         NDR_PULL_ALLOC(ndr, r->out.info);
2662                 } else {
2663                         r->out.info = NULL;
2664                 }
2665                 if (r->out.info) {
2666                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
2667                         NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
2668                         NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
2669                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
2670                 }
2671                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
2672                 if (_ptr_total) {
2673                         NDR_PULL_ALLOC(ndr, r->out.total);
2674                 } else {
2675                         r->out.total = NULL;
2676                 }
2677                 if (r->out.total) {
2678                         _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
2679                         NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
2680                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
2681                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
2682                 }
2683                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2684         }
2685         return NT_STATUS_OK;
2686 }
2687
2688 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
2689 {
2690         ndr_print_struct(ndr, name, "dfs_Enum");
2691         ndr->depth++;
2692         if (flags & NDR_SET_VALUES) {
2693                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2694         }
2695         if (flags & NDR_IN) {
2696                 ndr_print_struct(ndr, "in", "dfs_Enum");
2697                 ndr->depth++;
2698                 ndr_print_uint32(ndr, "level", r->in.level);
2699                 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
2700                 ndr_print_ptr(ndr, "info", r->in.info);
2701                 ndr->depth++;
2702                 if (r->in.info) {
2703                         ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
2704                 }
2705                 ndr->depth--;
2706                 ndr_print_ptr(ndr, "unknown", r->in.unknown);
2707                 ndr->depth++;
2708                 if (r->in.unknown) {
2709                         ndr_print_uint32(ndr, "unknown", *r->in.unknown);
2710                 }
2711                 ndr->depth--;
2712                 ndr_print_ptr(ndr, "total", r->in.total);
2713                 ndr->depth++;
2714                 if (r->in.total) {
2715                         ndr_print_uint32(ndr, "total", *r->in.total);
2716                 }
2717                 ndr->depth--;
2718                 ndr->depth--;
2719         }
2720         if (flags & NDR_OUT) {
2721                 ndr_print_struct(ndr, "out", "dfs_Enum");
2722                 ndr->depth++;
2723                 ndr_print_ptr(ndr, "info", r->out.info);
2724                 ndr->depth++;
2725                 if (r->out.info) {
2726                         ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
2727                 }
2728                 ndr->depth--;
2729                 ndr_print_ptr(ndr, "total", r->out.total);
2730                 ndr->depth++;
2731                 if (r->out.total) {
2732                         ndr_print_uint32(ndr, "total", *r->out.total);
2733                 }
2734                 ndr->depth--;
2735                 ndr_print_WERROR(ndr, "result", r->out.result);
2736                 ndr->depth--;
2737         }
2738         ndr->depth--;
2739 }
2740
2741 NTSTATUS ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
2742 {
2743         if (flags & NDR_IN) {
2744         }
2745         if (flags & NDR_OUT) {
2746                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2747         }
2748         return NT_STATUS_OK;
2749 }
2750
2751 NTSTATUS ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
2752 {
2753         if (flags & NDR_IN) {
2754         }
2755         if (flags & NDR_OUT) {
2756                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2757         }
2758         return NT_STATUS_OK;
2759 }
2760
2761 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
2762 {
2763         ndr_print_struct(ndr, name, "dfs_Rename");
2764         ndr->depth++;
2765         if (flags & NDR_SET_VALUES) {
2766                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2767         }
2768         if (flags & NDR_IN) {
2769                 ndr_print_struct(ndr, "in", "dfs_Rename");
2770                 ndr->depth++;
2771                 ndr->depth--;
2772         }
2773         if (flags & NDR_OUT) {
2774                 ndr_print_struct(ndr, "out", "dfs_Rename");
2775                 ndr->depth++;
2776                 ndr_print_WERROR(ndr, "result", r->out.result);
2777                 ndr->depth--;
2778         }
2779         ndr->depth--;
2780 }
2781
2782 NTSTATUS ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
2783 {
2784         if (flags & NDR_IN) {
2785         }
2786         if (flags & NDR_OUT) {
2787                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2788         }
2789         return NT_STATUS_OK;
2790 }
2791
2792 NTSTATUS ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
2793 {
2794         if (flags & NDR_IN) {
2795         }
2796         if (flags & NDR_OUT) {
2797                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2798         }
2799         return NT_STATUS_OK;
2800 }
2801
2802 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
2803 {
2804         ndr_print_struct(ndr, name, "dfs_Move");
2805         ndr->depth++;
2806         if (flags & NDR_SET_VALUES) {
2807                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2808         }
2809         if (flags & NDR_IN) {
2810                 ndr_print_struct(ndr, "in", "dfs_Move");
2811                 ndr->depth++;
2812                 ndr->depth--;
2813         }
2814         if (flags & NDR_OUT) {
2815                 ndr_print_struct(ndr, "out", "dfs_Move");
2816                 ndr->depth++;
2817                 ndr_print_WERROR(ndr, "result", r->out.result);
2818                 ndr->depth--;
2819         }
2820         ndr->depth--;
2821 }
2822
2823 NTSTATUS ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
2824 {
2825         if (flags & NDR_IN) {
2826         }
2827         if (flags & NDR_OUT) {
2828                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2829         }
2830         return NT_STATUS_OK;
2831 }
2832
2833 NTSTATUS ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
2834 {
2835         if (flags & NDR_IN) {
2836         }
2837         if (flags & NDR_OUT) {
2838                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2839         }
2840         return NT_STATUS_OK;
2841 }
2842
2843 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
2844 {
2845         ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
2846         ndr->depth++;
2847         if (flags & NDR_SET_VALUES) {
2848                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2849         }
2850         if (flags & NDR_IN) {
2851                 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
2852                 ndr->depth++;
2853                 ndr->depth--;
2854         }
2855         if (flags & NDR_OUT) {
2856                 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
2857                 ndr->depth++;
2858                 ndr_print_WERROR(ndr, "result", r->out.result);
2859                 ndr->depth--;
2860         }
2861         ndr->depth--;
2862 }
2863
2864 NTSTATUS ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
2865 {
2866         if (flags & NDR_IN) {
2867         }
2868         if (flags & NDR_OUT) {
2869                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2870         }
2871         return NT_STATUS_OK;
2872 }
2873
2874 NTSTATUS ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
2875 {
2876         if (flags & NDR_IN) {
2877         }
2878         if (flags & NDR_OUT) {
2879                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2880         }
2881         return NT_STATUS_OK;
2882 }
2883
2884 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
2885 {
2886         ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
2887         ndr->depth++;
2888         if (flags & NDR_SET_VALUES) {
2889                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2890         }
2891         if (flags & NDR_IN) {
2892                 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
2893                 ndr->depth++;
2894                 ndr->depth--;
2895         }
2896         if (flags & NDR_OUT) {
2897                 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
2898                 ndr->depth++;
2899                 ndr_print_WERROR(ndr, "result", r->out.result);
2900                 ndr->depth--;
2901         }
2902         ndr->depth--;
2903 }
2904
2905 NTSTATUS ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
2906 {
2907         if (flags & NDR_IN) {
2908         }
2909         if (flags & NDR_OUT) {
2910                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2911         }
2912         return NT_STATUS_OK;
2913 }
2914
2915 NTSTATUS ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
2916 {
2917         if (flags & NDR_IN) {
2918         }
2919         if (flags & NDR_OUT) {
2920                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2921         }
2922         return NT_STATUS_OK;
2923 }
2924
2925 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
2926 {
2927         ndr_print_struct(ndr, name, "dfs_AddFtRoot");
2928         ndr->depth++;
2929         if (flags & NDR_SET_VALUES) {
2930                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2931         }
2932         if (flags & NDR_IN) {
2933                 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
2934                 ndr->depth++;
2935                 ndr->depth--;
2936         }
2937         if (flags & NDR_OUT) {
2938                 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
2939                 ndr->depth++;
2940                 ndr_print_WERROR(ndr, "result", r->out.result);
2941                 ndr->depth--;
2942         }
2943         ndr->depth--;
2944 }
2945
2946 NTSTATUS ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
2947 {
2948         if (flags & NDR_IN) {
2949         }
2950         if (flags & NDR_OUT) {
2951                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2952         }
2953         return NT_STATUS_OK;
2954 }
2955
2956 NTSTATUS ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
2957 {
2958         if (flags & NDR_IN) {
2959         }
2960         if (flags & NDR_OUT) {
2961                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2962         }
2963         return NT_STATUS_OK;
2964 }
2965
2966 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
2967 {
2968         ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
2969         ndr->depth++;
2970         if (flags & NDR_SET_VALUES) {
2971                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2972         }
2973         if (flags & NDR_IN) {
2974                 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
2975                 ndr->depth++;
2976                 ndr->depth--;
2977         }
2978         if (flags & NDR_OUT) {
2979                 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
2980                 ndr->depth++;
2981                 ndr_print_WERROR(ndr, "result", r->out.result);
2982                 ndr->depth--;
2983         }
2984         ndr->depth--;
2985 }
2986
2987 NTSTATUS ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
2988 {
2989         if (flags & NDR_IN) {
2990         }
2991         if (flags & NDR_OUT) {
2992                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2993         }
2994         return NT_STATUS_OK;
2995 }
2996
2997 NTSTATUS ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
2998 {
2999         if (flags & NDR_IN) {
3000         }
3001         if (flags & NDR_OUT) {
3002                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3003         }
3004         return NT_STATUS_OK;
3005 }
3006
3007 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
3008 {
3009         ndr_print_struct(ndr, name, "dfs_AddStdRoot");
3010         ndr->depth++;
3011         if (flags & NDR_SET_VALUES) {
3012                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3013         }
3014         if (flags & NDR_IN) {
3015                 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
3016                 ndr->depth++;
3017                 ndr->depth--;
3018         }
3019         if (flags & NDR_OUT) {
3020                 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
3021                 ndr->depth++;
3022                 ndr_print_WERROR(ndr, "result", r->out.result);
3023                 ndr->depth--;
3024         }
3025         ndr->depth--;
3026 }
3027
3028 NTSTATUS ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
3029 {
3030         if (flags & NDR_IN) {
3031         }
3032         if (flags & NDR_OUT) {
3033                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3034         }
3035         return NT_STATUS_OK;
3036 }
3037
3038 NTSTATUS ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
3039 {
3040         if (flags & NDR_IN) {
3041         }
3042         if (flags & NDR_OUT) {
3043                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3044         }
3045         return NT_STATUS_OK;
3046 }
3047
3048 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
3049 {
3050         ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
3051         ndr->depth++;
3052         if (flags & NDR_SET_VALUES) {
3053                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3054         }
3055         if (flags & NDR_IN) {
3056                 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
3057                 ndr->depth++;
3058                 ndr->depth--;
3059         }
3060         if (flags & NDR_OUT) {
3061                 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
3062                 ndr->depth++;
3063                 ndr_print_WERROR(ndr, "result", r->out.result);
3064                 ndr->depth--;
3065         }
3066         ndr->depth--;
3067 }
3068
3069 NTSTATUS ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
3070 {
3071         if (flags & NDR_IN) {
3072         }
3073         if (flags & NDR_OUT) {
3074                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3075         }
3076         return NT_STATUS_OK;
3077 }
3078
3079 NTSTATUS ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
3080 {
3081         if (flags & NDR_IN) {
3082         }
3083         if (flags & NDR_OUT) {
3084                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3085         }
3086         return NT_STATUS_OK;
3087 }
3088
3089 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
3090 {
3091         ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
3092         ndr->depth++;
3093         if (flags & NDR_SET_VALUES) {
3094                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3095         }
3096         if (flags & NDR_IN) {
3097                 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
3098                 ndr->depth++;
3099                 ndr->depth--;
3100         }
3101         if (flags & NDR_OUT) {
3102                 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
3103                 ndr->depth++;
3104                 ndr_print_WERROR(ndr, "result", r->out.result);
3105                 ndr->depth--;
3106         }
3107         ndr->depth--;
3108 }
3109
3110 NTSTATUS ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
3111 {
3112         if (flags & NDR_IN) {
3113         }
3114         if (flags & NDR_OUT) {
3115                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3116         }
3117         return NT_STATUS_OK;
3118 }
3119
3120 NTSTATUS ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
3121 {
3122         if (flags & NDR_IN) {
3123         }
3124         if (flags & NDR_OUT) {
3125                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3126         }
3127         return NT_STATUS_OK;
3128 }
3129
3130 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
3131 {
3132         ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
3133         ndr->depth++;
3134         if (flags & NDR_SET_VALUES) {
3135                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3136         }
3137         if (flags & NDR_IN) {
3138                 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
3139                 ndr->depth++;
3140                 ndr->depth--;
3141         }
3142         if (flags & NDR_OUT) {
3143                 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
3144                 ndr->depth++;
3145                 ndr_print_WERROR(ndr, "result", r->out.result);
3146                 ndr->depth--;
3147         }
3148         ndr->depth--;
3149 }
3150
3151 NTSTATUS ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
3152 {
3153         if (flags & NDR_IN) {
3154         }
3155         if (flags & NDR_OUT) {
3156                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3157         }
3158         return NT_STATUS_OK;
3159 }
3160
3161 NTSTATUS ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
3162 {
3163         if (flags & NDR_IN) {
3164         }
3165         if (flags & NDR_OUT) {
3166                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3167         }
3168         return NT_STATUS_OK;
3169 }
3170
3171 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
3172 {
3173         ndr_print_struct(ndr, name, "dfs_GetDcAddress");
3174         ndr->depth++;
3175         if (flags & NDR_SET_VALUES) {
3176                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3177         }
3178         if (flags & NDR_IN) {
3179                 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
3180                 ndr->depth++;
3181                 ndr->depth--;
3182         }
3183         if (flags & NDR_OUT) {
3184                 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
3185                 ndr->depth++;
3186                 ndr_print_WERROR(ndr, "result", r->out.result);
3187                 ndr->depth--;
3188         }
3189         ndr->depth--;
3190 }
3191
3192 NTSTATUS ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
3193 {
3194         if (flags & NDR_IN) {
3195         }
3196         if (flags & NDR_OUT) {
3197                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3198         }
3199         return NT_STATUS_OK;
3200 }
3201
3202 NTSTATUS ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
3203 {
3204         if (flags & NDR_IN) {
3205         }
3206         if (flags & NDR_OUT) {
3207                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3208         }
3209         return NT_STATUS_OK;
3210 }
3211
3212 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
3213 {
3214         ndr_print_struct(ndr, name, "dfs_SetDcAddress");
3215         ndr->depth++;
3216         if (flags & NDR_SET_VALUES) {
3217                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3218         }
3219         if (flags & NDR_IN) {
3220                 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
3221                 ndr->depth++;
3222                 ndr->depth--;
3223         }
3224         if (flags & NDR_OUT) {
3225                 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
3226                 ndr->depth++;
3227                 ndr_print_WERROR(ndr, "result", r->out.result);
3228                 ndr->depth--;
3229         }
3230         ndr->depth--;
3231 }
3232
3233 NTSTATUS ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
3234 {
3235         if (flags & NDR_IN) {
3236         }
3237         if (flags & NDR_OUT) {
3238                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3239         }
3240         return NT_STATUS_OK;
3241 }
3242
3243 NTSTATUS ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
3244 {
3245         if (flags & NDR_IN) {
3246         }
3247         if (flags & NDR_OUT) {
3248                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3249         }
3250         return NT_STATUS_OK;
3251 }
3252
3253 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
3254 {
3255         ndr_print_struct(ndr, name, "dfs_FlushFtTable");
3256         ndr->depth++;
3257         if (flags & NDR_SET_VALUES) {
3258                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3259         }
3260         if (flags & NDR_IN) {
3261                 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
3262                 ndr->depth++;
3263                 ndr->depth--;
3264         }
3265         if (flags & NDR_OUT) {
3266                 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
3267                 ndr->depth++;
3268                 ndr_print_WERROR(ndr, "result", r->out.result);
3269                 ndr->depth--;
3270         }
3271         ndr->depth--;
3272 }
3273
3274 NTSTATUS ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
3275 {
3276         if (flags & NDR_IN) {
3277         }
3278         if (flags & NDR_OUT) {
3279                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3280         }
3281         return NT_STATUS_OK;
3282 }
3283
3284 NTSTATUS ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
3285 {
3286         if (flags & NDR_IN) {
3287         }
3288         if (flags & NDR_OUT) {
3289                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3290         }
3291         return NT_STATUS_OK;
3292 }
3293
3294 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
3295 {
3296         ndr_print_struct(ndr, name, "dfs_Add2");
3297         ndr->depth++;
3298         if (flags & NDR_SET_VALUES) {
3299                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3300         }
3301         if (flags & NDR_IN) {
3302                 ndr_print_struct(ndr, "in", "dfs_Add2");
3303                 ndr->depth++;
3304                 ndr->depth--;
3305         }
3306         if (flags & NDR_OUT) {
3307                 ndr_print_struct(ndr, "out", "dfs_Add2");
3308                 ndr->depth++;
3309                 ndr_print_WERROR(ndr, "result", r->out.result);
3310                 ndr->depth--;
3311         }
3312         ndr->depth--;
3313 }
3314
3315 NTSTATUS ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
3316 {
3317         if (flags & NDR_IN) {
3318         }
3319         if (flags & NDR_OUT) {
3320                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3321         }
3322         return NT_STATUS_OK;
3323 }
3324
3325 NTSTATUS ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
3326 {
3327         if (flags & NDR_IN) {
3328         }
3329         if (flags & NDR_OUT) {
3330                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3331         }
3332         return NT_STATUS_OK;
3333 }
3334
3335 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
3336 {
3337         ndr_print_struct(ndr, name, "dfs_Remove2");
3338         ndr->depth++;
3339         if (flags & NDR_SET_VALUES) {
3340                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3341         }
3342         if (flags & NDR_IN) {
3343                 ndr_print_struct(ndr, "in", "dfs_Remove2");
3344                 ndr->depth++;
3345                 ndr->depth--;
3346         }
3347         if (flags & NDR_OUT) {
3348                 ndr_print_struct(ndr, "out", "dfs_Remove2");
3349                 ndr->depth++;
3350                 ndr_print_WERROR(ndr, "result", r->out.result);
3351                 ndr->depth--;
3352         }
3353         ndr->depth--;
3354 }
3355
3356 NTSTATUS ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
3357 {
3358         if (flags & NDR_IN) {
3359         }
3360         if (flags & NDR_OUT) {
3361                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3362         }
3363         return NT_STATUS_OK;
3364 }
3365
3366 NTSTATUS ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
3367 {
3368         if (flags & NDR_IN) {
3369         }
3370         if (flags & NDR_OUT) {
3371                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3372         }
3373         return NT_STATUS_OK;
3374 }
3375
3376 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
3377 {
3378         ndr_print_struct(ndr, name, "dfs_EnumEx");
3379         ndr->depth++;
3380         if (flags & NDR_SET_VALUES) {
3381                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3382         }
3383         if (flags & NDR_IN) {
3384                 ndr_print_struct(ndr, "in", "dfs_EnumEx");
3385                 ndr->depth++;
3386                 ndr->depth--;
3387         }
3388         if (flags & NDR_OUT) {
3389                 ndr_print_struct(ndr, "out", "dfs_EnumEx");
3390                 ndr->depth++;
3391                 ndr_print_WERROR(ndr, "result", r->out.result);
3392                 ndr->depth--;
3393         }
3394         ndr->depth--;
3395 }
3396
3397 NTSTATUS ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
3398 {
3399         if (flags & NDR_IN) {
3400         }
3401         if (flags & NDR_OUT) {
3402                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3403         }
3404         return NT_STATUS_OK;
3405 }
3406
3407 NTSTATUS ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
3408 {
3409         if (flags & NDR_IN) {
3410         }
3411         if (flags & NDR_OUT) {
3412                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3413         }
3414         return NT_STATUS_OK;
3415 }
3416
3417 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
3418 {
3419         ndr_print_struct(ndr, name, "dfs_SetInfo2");
3420         ndr->depth++;
3421         if (flags & NDR_SET_VALUES) {
3422                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3423         }
3424         if (flags & NDR_IN) {
3425                 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
3426                 ndr->depth++;
3427                 ndr->depth--;
3428         }
3429         if (flags & NDR_OUT) {
3430                 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
3431                 ndr->depth++;
3432                 ndr_print_WERROR(ndr, "result", r->out.result);
3433                 ndr->depth--;
3434         }
3435         ndr->depth--;
3436 }
3437
3438 const struct dcerpc_interface_call netdfs_calls[] = {
3439         {
3440                 "dfs_GetManagerVersion",
3441                 sizeof(struct dfs_GetManagerVersion),
3442                 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
3443                 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
3444                 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
3445                 False,
3446         },
3447         {
3448                 "dfs_Add",
3449                 sizeof(struct dfs_Add),
3450                 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
3451                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
3452                 (ndr_print_function_t) ndr_print_dfs_Add,
3453                 False,
3454         },
3455         {
3456                 "dfs_Remove",
3457                 sizeof(struct dfs_Remove),
3458                 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
3459                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
3460                 (ndr_print_function_t) ndr_print_dfs_Remove,
3461                 False,
3462         },
3463         {
3464                 "dfs_SetInfo",
3465                 sizeof(struct dfs_SetInfo),
3466                 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
3467                 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
3468                 (ndr_print_function_t) ndr_print_dfs_SetInfo,
3469                 False,
3470         },
3471         {
3472                 "dfs_GetInfo",
3473                 sizeof(struct dfs_GetInfo),
3474                 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
3475                 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
3476                 (ndr_print_function_t) ndr_print_dfs_GetInfo,
3477                 False,
3478         },
3479         {
3480                 "dfs_Enum",
3481                 sizeof(struct dfs_Enum),
3482                 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
3483                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
3484                 (ndr_print_function_t) ndr_print_dfs_Enum,
3485                 False,
3486         },
3487         {
3488                 "dfs_Rename",
3489                 sizeof(struct dfs_Rename),
3490                 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
3491                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
3492                 (ndr_print_function_t) ndr_print_dfs_Rename,
3493                 False,
3494         },
3495         {
3496                 "dfs_Move",
3497                 sizeof(struct dfs_Move),
3498                 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
3499                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
3500                 (ndr_print_function_t) ndr_print_dfs_Move,
3501                 False,
3502         },
3503         {
3504                 "dfs_ManagerGetConfigInfo",
3505                 sizeof(struct dfs_ManagerGetConfigInfo),
3506                 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
3507                 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
3508                 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
3509                 False,
3510         },
3511         {
3512                 "dfs_ManagerSendSiteInfo",
3513                 sizeof(struct dfs_ManagerSendSiteInfo),
3514                 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
3515                 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
3516                 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
3517                 False,
3518         },
3519         {
3520                 "dfs_AddFtRoot",
3521                 sizeof(struct dfs_AddFtRoot),
3522                 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
3523                 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
3524                 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
3525                 False,
3526         },
3527         {
3528                 "dfs_RemoveFtRoot",
3529                 sizeof(struct dfs_RemoveFtRoot),
3530                 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
3531                 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
3532                 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
3533                 False,
3534         },
3535         {
3536                 "dfs_AddStdRoot",
3537                 sizeof(struct dfs_AddStdRoot),
3538                 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
3539                 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
3540                 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
3541                 False,
3542         },
3543         {
3544                 "dfs_RemoveStdRoot",
3545                 sizeof(struct dfs_RemoveStdRoot),
3546                 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
3547                 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
3548                 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
3549                 False,
3550         },
3551         {
3552                 "dfs_ManagerInitialize",
3553                 sizeof(struct dfs_ManagerInitialize),
3554                 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
3555                 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
3556                 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
3557                 False,
3558         },
3559         {
3560                 "dfs_AddStdRootForced",
3561                 sizeof(struct dfs_AddStdRootForced),
3562                 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
3563                 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
3564                 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
3565                 False,
3566         },
3567         {
3568                 "dfs_GetDcAddress",
3569                 sizeof(struct dfs_GetDcAddress),
3570                 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
3571                 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
3572                 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
3573                 False,
3574         },
3575         {
3576                 "dfs_SetDcAddress",
3577                 sizeof(struct dfs_SetDcAddress),
3578                 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
3579                 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
3580                 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
3581                 False,
3582         },
3583         {
3584                 "dfs_FlushFtTable",
3585                 sizeof(struct dfs_FlushFtTable),
3586                 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
3587                 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
3588                 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
3589                 False,
3590         },
3591         {
3592                 "dfs_Add2",
3593                 sizeof(struct dfs_Add2),
3594                 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
3595                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
3596                 (ndr_print_function_t) ndr_print_dfs_Add2,
3597                 False,
3598         },
3599         {
3600                 "dfs_Remove2",
3601                 sizeof(struct dfs_Remove2),
3602                 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
3603                 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
3604                 (ndr_print_function_t) ndr_print_dfs_Remove2,
3605                 False,
3606         },
3607         {
3608                 "dfs_EnumEx",
3609                 sizeof(struct dfs_EnumEx),
3610                 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
3611                 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
3612                 (ndr_print_function_t) ndr_print_dfs_EnumEx,
3613                 False,
3614         },
3615         {
3616                 "dfs_SetInfo2",
3617                 sizeof(struct dfs_SetInfo2),
3618                 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
3619                 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
3620                 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
3621                 False,
3622         },
3623         { NULL, 0, NULL, NULL, NULL, False }
3624 };
3625
3626 const char * const netdfs_endpoint_strings[] = {
3627         "ncacn_np:[\\pipe\\netdfs]", 
3628 };
3629
3630 const struct dcerpc_endpoint_list netdfs_endpoints = {
3631         .count  = 1,
3632         .names  = netdfs_endpoint_strings
3633 };
3634
3635 const char * const netdfs_authservice_strings[] = {
3636         "host", 
3637 };
3638
3639 const struct dcerpc_authservice_list netdfs_authservices = {
3640         .count  = 1,
3641         .names  = netdfs_authservice_strings
3642 };
3643
3644
3645 const struct dcerpc_interface_table dcerpc_table_netdfs = {
3646         .name           = "netdfs",
3647         .syntax_id      = {
3648                 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
3649                 DCERPC_NETDFS_VERSION
3650         },
3651         .helpstring     = DCERPC_NETDFS_HELPSTRING,
3652         .num_calls      = 23,
3653         .calls          = netdfs_calls,
3654         .endpoints      = &netdfs_endpoints,
3655         .authservices   = &netdfs_authservices
3656 };
3657