81ec14694ab4e5025127b08f69f06e89df64fe1e
[jra/samba/.git] / librpc / gen_ndr / cli_dfs.c
1 /*
2  * Unix SMB/CIFS implementation.
3  * client auto-generated by pidl. DO NOT MODIFY!
4  */
5
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_dfs.h"
8
9 NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli,
10                                       TALLOC_CTX *mem_ctx,
11                                       enum dfs_ManagerVersion *version /* [out] [ref] */)
12 {
13         struct dfs_GetManagerVersion r;
14         NTSTATUS status;
15
16         /* In parameters */
17
18         if (DEBUGLEVEL >= 10) {
19                 NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r);
20         }
21
22         status = cli_do_rpc_ndr(cli,
23                                 mem_ctx,
24                                 &ndr_table_netdfs,
25                                 NDR_DFS_GETMANAGERVERSION,
26                                 &r);
27
28         if (!NT_STATUS_IS_OK(status)) {
29                 return status;
30         }
31
32         if (DEBUGLEVEL >= 10) {
33                 NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r);
34         }
35
36         if (NT_STATUS_IS_ERR(status)) {
37                 return status;
38         }
39
40         /* Return variables */
41         *version = *r.out.version;
42
43         /* Return result */
44         return NT_STATUS_OK;
45 }
46
47 NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli,
48                         TALLOC_CTX *mem_ctx,
49                         const char *path /* [in] [ref,charset(UTF16)] */,
50                         const char *server /* [in] [ref,charset(UTF16)] */,
51                         const char *share /* [in] [unique,charset(UTF16)] */,
52                         const char *comment /* [in] [unique,charset(UTF16)] */,
53                         uint32_t flags /* [in]  */,
54                         WERROR *werror)
55 {
56         struct dfs_Add r;
57         NTSTATUS status;
58
59         /* In parameters */
60         r.in.path = path;
61         r.in.server = server;
62         r.in.share = share;
63         r.in.comment = comment;
64         r.in.flags = flags;
65
66         if (DEBUGLEVEL >= 10) {
67                 NDR_PRINT_IN_DEBUG(dfs_Add, &r);
68         }
69
70         status = cli_do_rpc_ndr(cli,
71                                 mem_ctx,
72                                 &ndr_table_netdfs,
73                                 NDR_DFS_ADD,
74                                 &r);
75
76         if (!NT_STATUS_IS_OK(status)) {
77                 return status;
78         }
79
80         if (DEBUGLEVEL >= 10) {
81                 NDR_PRINT_OUT_DEBUG(dfs_Add, &r);
82         }
83
84         if (NT_STATUS_IS_ERR(status)) {
85                 return status;
86         }
87
88         /* Return variables */
89
90         /* Return result */
91         if (werror) {
92                 *werror = r.out.result;
93         }
94
95         return werror_to_ntstatus(r.out.result);
96 }
97
98 NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli,
99                            TALLOC_CTX *mem_ctx,
100                            const char *dfs_entry_path /* [in] [ref,charset(UTF16)] */,
101                            const char *servername /* [in] [unique,charset(UTF16)] */,
102                            const char *sharename /* [in] [unique,charset(UTF16)] */,
103                            WERROR *werror)
104 {
105         struct dfs_Remove r;
106         NTSTATUS status;
107
108         /* In parameters */
109         r.in.dfs_entry_path = dfs_entry_path;
110         r.in.servername = servername;
111         r.in.sharename = sharename;
112
113         if (DEBUGLEVEL >= 10) {
114                 NDR_PRINT_IN_DEBUG(dfs_Remove, &r);
115         }
116
117         status = cli_do_rpc_ndr(cli,
118                                 mem_ctx,
119                                 &ndr_table_netdfs,
120                                 NDR_DFS_REMOVE,
121                                 &r);
122
123         if (!NT_STATUS_IS_OK(status)) {
124                 return status;
125         }
126
127         if (DEBUGLEVEL >= 10) {
128                 NDR_PRINT_OUT_DEBUG(dfs_Remove, &r);
129         }
130
131         if (NT_STATUS_IS_ERR(status)) {
132                 return status;
133         }
134
135         /* Return variables */
136
137         /* Return result */
138         if (werror) {
139                 *werror = r.out.result;
140         }
141
142         return werror_to_ntstatus(r.out.result);
143 }
144
145 NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli,
146                             TALLOC_CTX *mem_ctx,
147                             const char *dfs_entry_path /* [in] [charset(UTF16)] */,
148                             const char *servername /* [in] [unique,charset(UTF16)] */,
149                             const char *sharename /* [in] [unique,charset(UTF16)] */,
150                             uint32_t level /* [in]  */,
151                             union dfs_Info *info /* [in] [ref,switch_is(level)] */,
152                             WERROR *werror)
153 {
154         struct dfs_SetInfo r;
155         NTSTATUS status;
156
157         /* In parameters */
158         r.in.dfs_entry_path = dfs_entry_path;
159         r.in.servername = servername;
160         r.in.sharename = sharename;
161         r.in.level = level;
162         r.in.info = info;
163
164         if (DEBUGLEVEL >= 10) {
165                 NDR_PRINT_IN_DEBUG(dfs_SetInfo, &r);
166         }
167
168         status = cli_do_rpc_ndr(cli,
169                                 mem_ctx,
170                                 &ndr_table_netdfs,
171                                 NDR_DFS_SETINFO,
172                                 &r);
173
174         if (!NT_STATUS_IS_OK(status)) {
175                 return status;
176         }
177
178         if (DEBUGLEVEL >= 10) {
179                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r);
180         }
181
182         if (NT_STATUS_IS_ERR(status)) {
183                 return status;
184         }
185
186         /* Return variables */
187
188         /* Return result */
189         if (werror) {
190                 *werror = r.out.result;
191         }
192
193         return werror_to_ntstatus(r.out.result);
194 }
195
196 NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli,
197                             TALLOC_CTX *mem_ctx,
198                             const char *dfs_entry_path /* [in] [charset(UTF16)] */,
199                             const char *servername /* [in] [unique,charset(UTF16)] */,
200                             const char *sharename /* [in] [unique,charset(UTF16)] */,
201                             uint32_t level /* [in]  */,
202                             union dfs_Info *info /* [out] [ref,switch_is(level)] */,
203                             WERROR *werror)
204 {
205         struct dfs_GetInfo r;
206         NTSTATUS status;
207
208         /* In parameters */
209         r.in.dfs_entry_path = dfs_entry_path;
210         r.in.servername = servername;
211         r.in.sharename = sharename;
212         r.in.level = level;
213
214         if (DEBUGLEVEL >= 10) {
215                 NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r);
216         }
217
218         status = cli_do_rpc_ndr(cli,
219                                 mem_ctx,
220                                 &ndr_table_netdfs,
221                                 NDR_DFS_GETINFO,
222                                 &r);
223
224         if (!NT_STATUS_IS_OK(status)) {
225                 return status;
226         }
227
228         if (DEBUGLEVEL >= 10) {
229                 NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r);
230         }
231
232         if (NT_STATUS_IS_ERR(status)) {
233                 return status;
234         }
235
236         /* Return variables */
237         *info = *r.out.info;
238
239         /* Return result */
240         if (werror) {
241                 *werror = r.out.result;
242         }
243
244         return werror_to_ntstatus(r.out.result);
245 }
246
247 NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli,
248                          TALLOC_CTX *mem_ctx,
249                          uint32_t level /* [in]  */,
250                          uint32_t bufsize /* [in]  */,
251                          struct dfs_EnumStruct *info /* [in,out] [unique] */,
252                          uint32_t *total /* [in,out] [unique] */,
253                          WERROR *werror)
254 {
255         struct dfs_Enum r;
256         NTSTATUS status;
257
258         /* In parameters */
259         r.in.level = level;
260         r.in.bufsize = bufsize;
261         r.in.info = info;
262         r.in.total = total;
263
264         if (DEBUGLEVEL >= 10) {
265                 NDR_PRINT_IN_DEBUG(dfs_Enum, &r);
266         }
267
268         status = cli_do_rpc_ndr(cli,
269                                 mem_ctx,
270                                 &ndr_table_netdfs,
271                                 NDR_DFS_ENUM,
272                                 &r);
273
274         if (!NT_STATUS_IS_OK(status)) {
275                 return status;
276         }
277
278         if (DEBUGLEVEL >= 10) {
279                 NDR_PRINT_OUT_DEBUG(dfs_Enum, &r);
280         }
281
282         if (NT_STATUS_IS_ERR(status)) {
283                 return status;
284         }
285
286         /* Return variables */
287         if (info && r.out.info) {
288                 *info = *r.out.info;
289         }
290         if (total && r.out.total) {
291                 *total = *r.out.total;
292         }
293
294         /* Return result */
295         if (werror) {
296                 *werror = r.out.result;
297         }
298
299         return werror_to_ntstatus(r.out.result);
300 }
301
302 NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli,
303                            TALLOC_CTX *mem_ctx,
304                            WERROR *werror)
305 {
306         struct dfs_Rename r;
307         NTSTATUS status;
308
309         /* In parameters */
310
311         if (DEBUGLEVEL >= 10) {
312                 NDR_PRINT_IN_DEBUG(dfs_Rename, &r);
313         }
314
315         status = cli_do_rpc_ndr(cli,
316                                 mem_ctx,
317                                 &ndr_table_netdfs,
318                                 NDR_DFS_RENAME,
319                                 &r);
320
321         if (!NT_STATUS_IS_OK(status)) {
322                 return status;
323         }
324
325         if (DEBUGLEVEL >= 10) {
326                 NDR_PRINT_OUT_DEBUG(dfs_Rename, &r);
327         }
328
329         if (NT_STATUS_IS_ERR(status)) {
330                 return status;
331         }
332
333         /* Return variables */
334
335         /* Return result */
336         if (werror) {
337                 *werror = r.out.result;
338         }
339
340         return werror_to_ntstatus(r.out.result);
341 }
342
343 NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli,
344                          TALLOC_CTX *mem_ctx,
345                          WERROR *werror)
346 {
347         struct dfs_Move r;
348         NTSTATUS status;
349
350         /* In parameters */
351
352         if (DEBUGLEVEL >= 10) {
353                 NDR_PRINT_IN_DEBUG(dfs_Move, &r);
354         }
355
356         status = cli_do_rpc_ndr(cli,
357                                 mem_ctx,
358                                 &ndr_table_netdfs,
359                                 NDR_DFS_MOVE,
360                                 &r);
361
362         if (!NT_STATUS_IS_OK(status)) {
363                 return status;
364         }
365
366         if (DEBUGLEVEL >= 10) {
367                 NDR_PRINT_OUT_DEBUG(dfs_Move, &r);
368         }
369
370         if (NT_STATUS_IS_ERR(status)) {
371                 return status;
372         }
373
374         /* Return variables */
375
376         /* Return result */
377         if (werror) {
378                 *werror = r.out.result;
379         }
380
381         return werror_to_ntstatus(r.out.result);
382 }
383
384 NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli,
385                                          TALLOC_CTX *mem_ctx,
386                                          WERROR *werror)
387 {
388         struct dfs_ManagerGetConfigInfo r;
389         NTSTATUS status;
390
391         /* In parameters */
392
393         if (DEBUGLEVEL >= 10) {
394                 NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, &r);
395         }
396
397         status = cli_do_rpc_ndr(cli,
398                                 mem_ctx,
399                                 &ndr_table_netdfs,
400                                 NDR_DFS_MANAGERGETCONFIGINFO,
401                                 &r);
402
403         if (!NT_STATUS_IS_OK(status)) {
404                 return status;
405         }
406
407         if (DEBUGLEVEL >= 10) {
408                 NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r);
409         }
410
411         if (NT_STATUS_IS_ERR(status)) {
412                 return status;
413         }
414
415         /* Return variables */
416
417         /* Return result */
418         if (werror) {
419                 *werror = r.out.result;
420         }
421
422         return werror_to_ntstatus(r.out.result);
423 }
424
425 NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli,
426                                         TALLOC_CTX *mem_ctx,
427                                         WERROR *werror)
428 {
429         struct dfs_ManagerSendSiteInfo r;
430         NTSTATUS status;
431
432         /* In parameters */
433
434         if (DEBUGLEVEL >= 10) {
435                 NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, &r);
436         }
437
438         status = cli_do_rpc_ndr(cli,
439                                 mem_ctx,
440                                 &ndr_table_netdfs,
441                                 NDR_DFS_MANAGERSENDSITEINFO,
442                                 &r);
443
444         if (!NT_STATUS_IS_OK(status)) {
445                 return status;
446         }
447
448         if (DEBUGLEVEL >= 10) {
449                 NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r);
450         }
451
452         if (NT_STATUS_IS_ERR(status)) {
453                 return status;
454         }
455
456         /* Return variables */
457
458         /* Return result */
459         if (werror) {
460                 *werror = r.out.result;
461         }
462
463         return werror_to_ntstatus(r.out.result);
464 }
465
466 NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli,
467                               TALLOC_CTX *mem_ctx,
468                               const char *servername /* [in] [charset(UTF16)] */,
469                               const char *dns_servername /* [in] [charset(UTF16)] */,
470                               const char *dfsname /* [in] [charset(UTF16)] */,
471                               const char *rootshare /* [in] [charset(UTF16)] */,
472                               const char *comment /* [in] [charset(UTF16)] */,
473                               const char *dfs_config_dn /* [in] [charset(UTF16)] */,
474                               uint8_t unknown1 /* [in]  */,
475                               uint32_t flags /* [in]  */,
476                               struct dfs_UnknownStruct **unknown2 /* [in,out] [unique] */,
477                               WERROR *werror)
478 {
479         struct dfs_AddFtRoot r;
480         NTSTATUS status;
481
482         /* In parameters */
483         r.in.servername = servername;
484         r.in.dns_servername = dns_servername;
485         r.in.dfsname = dfsname;
486         r.in.rootshare = rootshare;
487         r.in.comment = comment;
488         r.in.dfs_config_dn = dfs_config_dn;
489         r.in.unknown1 = unknown1;
490         r.in.flags = flags;
491         r.in.unknown2 = unknown2;
492
493         if (DEBUGLEVEL >= 10) {
494                 NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &r);
495         }
496
497         status = cli_do_rpc_ndr(cli,
498                                 mem_ctx,
499                                 &ndr_table_netdfs,
500                                 NDR_DFS_ADDFTROOT,
501                                 &r);
502
503         if (!NT_STATUS_IS_OK(status)) {
504                 return status;
505         }
506
507         if (DEBUGLEVEL >= 10) {
508                 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r);
509         }
510
511         if (NT_STATUS_IS_ERR(status)) {
512                 return status;
513         }
514
515         /* Return variables */
516         if (unknown2 && r.out.unknown2) {
517                 *unknown2 = *r.out.unknown2;
518         }
519
520         /* Return result */
521         if (werror) {
522                 *werror = r.out.result;
523         }
524
525         return werror_to_ntstatus(r.out.result);
526 }
527
528 NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli,
529                                  TALLOC_CTX *mem_ctx,
530                                  const char *servername /* [in] [charset(UTF16)] */,
531                                  const char *dns_servername /* [in] [charset(UTF16)] */,
532                                  const char *dfsname /* [in] [charset(UTF16)] */,
533                                  const char *rootshare /* [in] [charset(UTF16)] */,
534                                  uint32_t flags /* [in]  */,
535                                  struct dfs_UnknownStruct **unknown /* [in,out] [unique] */,
536                                  WERROR *werror)
537 {
538         struct dfs_RemoveFtRoot r;
539         NTSTATUS status;
540
541         /* In parameters */
542         r.in.servername = servername;
543         r.in.dns_servername = dns_servername;
544         r.in.dfsname = dfsname;
545         r.in.rootshare = rootshare;
546         r.in.flags = flags;
547         r.in.unknown = unknown;
548
549         if (DEBUGLEVEL >= 10) {
550                 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r);
551         }
552
553         status = cli_do_rpc_ndr(cli,
554                                 mem_ctx,
555                                 &ndr_table_netdfs,
556                                 NDR_DFS_REMOVEFTROOT,
557                                 &r);
558
559         if (!NT_STATUS_IS_OK(status)) {
560                 return status;
561         }
562
563         if (DEBUGLEVEL >= 10) {
564                 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r);
565         }
566
567         if (NT_STATUS_IS_ERR(status)) {
568                 return status;
569         }
570
571         /* Return variables */
572         if (unknown && r.out.unknown) {
573                 *unknown = *r.out.unknown;
574         }
575
576         /* Return result */
577         if (werror) {
578                 *werror = r.out.result;
579         }
580
581         return werror_to_ntstatus(r.out.result);
582 }
583
584 NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli,
585                                TALLOC_CTX *mem_ctx,
586                                const char *servername /* [in] [charset(UTF16)] */,
587                                const char *rootshare /* [in] [charset(UTF16)] */,
588                                const char *comment /* [in] [charset(UTF16)] */,
589                                uint32_t flags /* [in]  */,
590                                WERROR *werror)
591 {
592         struct dfs_AddStdRoot r;
593         NTSTATUS status;
594
595         /* In parameters */
596         r.in.servername = servername;
597         r.in.rootshare = rootshare;
598         r.in.comment = comment;
599         r.in.flags = flags;
600
601         if (DEBUGLEVEL >= 10) {
602                 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r);
603         }
604
605         status = cli_do_rpc_ndr(cli,
606                                 mem_ctx,
607                                 &ndr_table_netdfs,
608                                 NDR_DFS_ADDSTDROOT,
609                                 &r);
610
611         if (!NT_STATUS_IS_OK(status)) {
612                 return status;
613         }
614
615         if (DEBUGLEVEL >= 10) {
616                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r);
617         }
618
619         if (NT_STATUS_IS_ERR(status)) {
620                 return status;
621         }
622
623         /* Return variables */
624
625         /* Return result */
626         if (werror) {
627                 *werror = r.out.result;
628         }
629
630         return werror_to_ntstatus(r.out.result);
631 }
632
633 NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli,
634                                   TALLOC_CTX *mem_ctx,
635                                   const char *servername /* [in] [charset(UTF16)] */,
636                                   const char *rootshare /* [in] [charset(UTF16)] */,
637                                   uint32_t flags /* [in]  */,
638                                   WERROR *werror)
639 {
640         struct dfs_RemoveStdRoot r;
641         NTSTATUS status;
642
643         /* In parameters */
644         r.in.servername = servername;
645         r.in.rootshare = rootshare;
646         r.in.flags = flags;
647
648         if (DEBUGLEVEL >= 10) {
649                 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r);
650         }
651
652         status = cli_do_rpc_ndr(cli,
653                                 mem_ctx,
654                                 &ndr_table_netdfs,
655                                 NDR_DFS_REMOVESTDROOT,
656                                 &r);
657
658         if (!NT_STATUS_IS_OK(status)) {
659                 return status;
660         }
661
662         if (DEBUGLEVEL >= 10) {
663                 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r);
664         }
665
666         if (NT_STATUS_IS_ERR(status)) {
667                 return status;
668         }
669
670         /* Return variables */
671
672         /* Return result */
673         if (werror) {
674                 *werror = r.out.result;
675         }
676
677         return werror_to_ntstatus(r.out.result);
678 }
679
680 NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli,
681                                       TALLOC_CTX *mem_ctx,
682                                       const char *servername /* [in] [ref,charset(UTF16)] */,
683                                       uint32_t flags /* [in]  */,
684                                       WERROR *werror)
685 {
686         struct dfs_ManagerInitialize r;
687         NTSTATUS status;
688
689         /* In parameters */
690         r.in.servername = servername;
691         r.in.flags = flags;
692
693         if (DEBUGLEVEL >= 10) {
694                 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r);
695         }
696
697         status = cli_do_rpc_ndr(cli,
698                                 mem_ctx,
699                                 &ndr_table_netdfs,
700                                 NDR_DFS_MANAGERINITIALIZE,
701                                 &r);
702
703         if (!NT_STATUS_IS_OK(status)) {
704                 return status;
705         }
706
707         if (DEBUGLEVEL >= 10) {
708                 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r);
709         }
710
711         if (NT_STATUS_IS_ERR(status)) {
712                 return status;
713         }
714
715         /* Return variables */
716
717         /* Return result */
718         if (werror) {
719                 *werror = r.out.result;
720         }
721
722         return werror_to_ntstatus(r.out.result);
723 }
724
725 NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli,
726                                      TALLOC_CTX *mem_ctx,
727                                      const char *servername /* [in] [charset(UTF16)] */,
728                                      const char *rootshare /* [in] [charset(UTF16)] */,
729                                      const char *comment /* [in] [charset(UTF16)] */,
730                                      const char *store /* [in] [charset(UTF16)] */,
731                                      WERROR *werror)
732 {
733         struct dfs_AddStdRootForced r;
734         NTSTATUS status;
735
736         /* In parameters */
737         r.in.servername = servername;
738         r.in.rootshare = rootshare;
739         r.in.comment = comment;
740         r.in.store = store;
741
742         if (DEBUGLEVEL >= 10) {
743                 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r);
744         }
745
746         status = cli_do_rpc_ndr(cli,
747                                 mem_ctx,
748                                 &ndr_table_netdfs,
749                                 NDR_DFS_ADDSTDROOTFORCED,
750                                 &r);
751
752         if (!NT_STATUS_IS_OK(status)) {
753                 return status;
754         }
755
756         if (DEBUGLEVEL >= 10) {
757                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r);
758         }
759
760         if (NT_STATUS_IS_ERR(status)) {
761                 return status;
762         }
763
764         /* Return variables */
765
766         /* Return result */
767         if (werror) {
768                 *werror = r.out.result;
769         }
770
771         return werror_to_ntstatus(r.out.result);
772 }
773
774 NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli,
775                                  TALLOC_CTX *mem_ctx,
776                                  const char *servername /* [in] [charset(UTF16)] */,
777                                  const char **server_fullname /* [in,out] [ref,charset(UTF16)] */,
778                                  uint8_t *is_root /* [in,out] [ref] */,
779                                  uint32_t *ttl /* [in,out] [ref] */,
780                                  WERROR *werror)
781 {
782         struct dfs_GetDcAddress r;
783         NTSTATUS status;
784
785         /* In parameters */
786         r.in.servername = servername;
787         r.in.server_fullname = server_fullname;
788         r.in.is_root = is_root;
789         r.in.ttl = ttl;
790
791         if (DEBUGLEVEL >= 10) {
792                 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r);
793         }
794
795         status = cli_do_rpc_ndr(cli,
796                                 mem_ctx,
797                                 &ndr_table_netdfs,
798                                 NDR_DFS_GETDCADDRESS,
799                                 &r);
800
801         if (!NT_STATUS_IS_OK(status)) {
802                 return status;
803         }
804
805         if (DEBUGLEVEL >= 10) {
806                 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r);
807         }
808
809         if (NT_STATUS_IS_ERR(status)) {
810                 return status;
811         }
812
813         /* Return variables */
814         *server_fullname = *r.out.server_fullname;
815         *is_root = *r.out.is_root;
816         *ttl = *r.out.ttl;
817
818         /* Return result */
819         if (werror) {
820                 *werror = r.out.result;
821         }
822
823         return werror_to_ntstatus(r.out.result);
824 }
825
826 NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli,
827                                  TALLOC_CTX *mem_ctx,
828                                  const char *servername /* [in] [charset(UTF16)] */,
829                                  const char *server_fullname /* [in] [charset(UTF16)] */,
830                                  uint32_t flags /* [in]  */,
831                                  uint32_t ttl /* [in]  */,
832                                  WERROR *werror)
833 {
834         struct dfs_SetDcAddress r;
835         NTSTATUS status;
836
837         /* In parameters */
838         r.in.servername = servername;
839         r.in.server_fullname = server_fullname;
840         r.in.flags = flags;
841         r.in.ttl = ttl;
842
843         if (DEBUGLEVEL >= 10) {
844                 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r);
845         }
846
847         status = cli_do_rpc_ndr(cli,
848                                 mem_ctx,
849                                 &ndr_table_netdfs,
850                                 NDR_DFS_SETDCADDRESS,
851                                 &r);
852
853         if (!NT_STATUS_IS_OK(status)) {
854                 return status;
855         }
856
857         if (DEBUGLEVEL >= 10) {
858                 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r);
859         }
860
861         if (NT_STATUS_IS_ERR(status)) {
862                 return status;
863         }
864
865         /* Return variables */
866
867         /* Return result */
868         if (werror) {
869                 *werror = r.out.result;
870         }
871
872         return werror_to_ntstatus(r.out.result);
873 }
874
875 NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli,
876                                  TALLOC_CTX *mem_ctx,
877                                  const char *servername /* [in] [charset(UTF16)] */,
878                                  const char *rootshare /* [in] [charset(UTF16)] */,
879                                  WERROR *werror)
880 {
881         struct dfs_FlushFtTable r;
882         NTSTATUS status;
883
884         /* In parameters */
885         r.in.servername = servername;
886         r.in.rootshare = rootshare;
887
888         if (DEBUGLEVEL >= 10) {
889                 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &r);
890         }
891
892         status = cli_do_rpc_ndr(cli,
893                                 mem_ctx,
894                                 &ndr_table_netdfs,
895                                 NDR_DFS_FLUSHFTTABLE,
896                                 &r);
897
898         if (!NT_STATUS_IS_OK(status)) {
899                 return status;
900         }
901
902         if (DEBUGLEVEL >= 10) {
903                 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r);
904         }
905
906         if (NT_STATUS_IS_ERR(status)) {
907                 return status;
908         }
909
910         /* Return variables */
911
912         /* Return result */
913         if (werror) {
914                 *werror = r.out.result;
915         }
916
917         return werror_to_ntstatus(r.out.result);
918 }
919
920 NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli,
921                          TALLOC_CTX *mem_ctx,
922                          WERROR *werror)
923 {
924         struct dfs_Add2 r;
925         NTSTATUS status;
926
927         /* In parameters */
928
929         if (DEBUGLEVEL >= 10) {
930                 NDR_PRINT_IN_DEBUG(dfs_Add2, &r);
931         }
932
933         status = cli_do_rpc_ndr(cli,
934                                 mem_ctx,
935                                 &ndr_table_netdfs,
936                                 NDR_DFS_ADD2,
937                                 &r);
938
939         if (!NT_STATUS_IS_OK(status)) {
940                 return status;
941         }
942
943         if (DEBUGLEVEL >= 10) {
944                 NDR_PRINT_OUT_DEBUG(dfs_Add2, &r);
945         }
946
947         if (NT_STATUS_IS_ERR(status)) {
948                 return status;
949         }
950
951         /* Return variables */
952
953         /* Return result */
954         if (werror) {
955                 *werror = r.out.result;
956         }
957
958         return werror_to_ntstatus(r.out.result);
959 }
960
961 NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli,
962                             TALLOC_CTX *mem_ctx,
963                             WERROR *werror)
964 {
965         struct dfs_Remove2 r;
966         NTSTATUS status;
967
968         /* In parameters */
969
970         if (DEBUGLEVEL >= 10) {
971                 NDR_PRINT_IN_DEBUG(dfs_Remove2, &r);
972         }
973
974         status = cli_do_rpc_ndr(cli,
975                                 mem_ctx,
976                                 &ndr_table_netdfs,
977                                 NDR_DFS_REMOVE2,
978                                 &r);
979
980         if (!NT_STATUS_IS_OK(status)) {
981                 return status;
982         }
983
984         if (DEBUGLEVEL >= 10) {
985                 NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r);
986         }
987
988         if (NT_STATUS_IS_ERR(status)) {
989                 return status;
990         }
991
992         /* Return variables */
993
994         /* Return result */
995         if (werror) {
996                 *werror = r.out.result;
997         }
998
999         return werror_to_ntstatus(r.out.result);
1000 }
1001
1002 NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli,
1003                            TALLOC_CTX *mem_ctx,
1004                            const char *dfs_name /* [in] [charset(UTF16)] */,
1005                            uint32_t level /* [in]  */,
1006                            uint32_t bufsize /* [in]  */,
1007                            struct dfs_EnumStruct *info /* [in,out] [unique] */,
1008                            uint32_t *total /* [in,out] [unique] */,
1009                            WERROR *werror)
1010 {
1011         struct dfs_EnumEx r;
1012         NTSTATUS status;
1013
1014         /* In parameters */
1015         r.in.dfs_name = dfs_name;
1016         r.in.level = level;
1017         r.in.bufsize = bufsize;
1018         r.in.info = info;
1019         r.in.total = total;
1020
1021         if (DEBUGLEVEL >= 10) {
1022                 NDR_PRINT_IN_DEBUG(dfs_EnumEx, &r);
1023         }
1024
1025         status = cli_do_rpc_ndr(cli,
1026                                 mem_ctx,
1027                                 &ndr_table_netdfs,
1028                                 NDR_DFS_ENUMEX,
1029                                 &r);
1030
1031         if (!NT_STATUS_IS_OK(status)) {
1032                 return status;
1033         }
1034
1035         if (DEBUGLEVEL >= 10) {
1036                 NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r);
1037         }
1038
1039         if (NT_STATUS_IS_ERR(status)) {
1040                 return status;
1041         }
1042
1043         /* Return variables */
1044         if (info && r.out.info) {
1045                 *info = *r.out.info;
1046         }
1047         if (total && r.out.total) {
1048                 *total = *r.out.total;
1049         }
1050
1051         /* Return result */
1052         if (werror) {
1053                 *werror = r.out.result;
1054         }
1055
1056         return werror_to_ntstatus(r.out.result);
1057 }
1058
1059 NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli,
1060                              TALLOC_CTX *mem_ctx,
1061                              WERROR *werror)
1062 {
1063         struct dfs_SetInfo2 r;
1064         NTSTATUS status;
1065
1066         /* In parameters */
1067
1068         if (DEBUGLEVEL >= 10) {
1069                 NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r);
1070         }
1071
1072         status = cli_do_rpc_ndr(cli,
1073                                 mem_ctx,
1074                                 &ndr_table_netdfs,
1075                                 NDR_DFS_SETINFO2,
1076                                 &r);
1077
1078         if (!NT_STATUS_IS_OK(status)) {
1079                 return status;
1080         }
1081
1082         if (DEBUGLEVEL >= 10) {
1083                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r);
1084         }
1085
1086         if (NT_STATUS_IS_ERR(status)) {
1087                 return status;
1088         }
1089
1090         /* Return variables */
1091
1092         /* Return result */
1093         if (werror) {
1094                 *werror = r.out.result;
1095         }
1096
1097         return werror_to_ntstatus(r.out.result);
1098 }
1099