2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/srv_dfs.h"
9 static BOOL
api_dfs_GetManagerVersion(pipes_struct
*p
)
11 struct ndr_pull
*pull
;
12 struct ndr_push
*push
;
15 struct dfs_GetManagerVersion r
;
16 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_GetManagerVersion");
18 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
23 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
27 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
28 status
= ndr_pull_dfs_GetManagerVersion(pull
, NDR_IN
, &r
);
29 if (NT_STATUS_IS_ERR(status
)) {
34 r
.out
.exist_flag
= talloc_size(mem_ctx
, sizeof(*r
.out
.exist_flag
));
35 if (r
.out
.exist_flag
== NULL
) {
40 _dfs_GetManagerVersion(p
, r
.out
.exist_flag
);
42 push
= ndr_push_init_ctx(mem_ctx
);
48 status
= ndr_push_dfs_GetManagerVersion(push
, NDR_OUT
, &r
);
49 if (NT_STATUS_IS_ERR(status
)) {
54 blob
= ndr_push_blob(push
);
55 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
65 static BOOL
api_dfs_Add(pipes_struct
*p
)
67 struct ndr_pull
*pull
;
68 struct ndr_push
*push
;
72 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_Add");
74 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
79 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
83 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
84 status
= ndr_pull_dfs_Add(pull
, NDR_IN
, &r
);
85 if (NT_STATUS_IS_ERR(status
)) {
90 r
.out
.result
= _dfs_Add(p
, r
.in
.path
, r
.in
.server
, r
.in
.share
, r
.in
.comment
, r
.in
.flags
);
92 push
= ndr_push_init_ctx(mem_ctx
);
98 status
= ndr_push_dfs_Add(push
, NDR_OUT
, &r
);
99 if (NT_STATUS_IS_ERR(status
)) {
100 talloc_free(mem_ctx
);
104 blob
= ndr_push_blob(push
);
105 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
106 talloc_free(mem_ctx
);
110 talloc_free(mem_ctx
);
115 static BOOL
api_dfs_Remove(pipes_struct
*p
)
117 struct ndr_pull
*pull
;
118 struct ndr_push
*push
;
122 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_Remove");
124 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
125 talloc_free(mem_ctx
);
129 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
133 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
134 status
= ndr_pull_dfs_Remove(pull
, NDR_IN
, &r
);
135 if (NT_STATUS_IS_ERR(status
)) {
136 talloc_free(mem_ctx
);
140 r
.out
.result
= _dfs_Remove(p
, r
.in
.path
, r
.in
.server
, r
.in
.share
);
142 push
= ndr_push_init_ctx(mem_ctx
);
144 talloc_free(mem_ctx
);
148 status
= ndr_push_dfs_Remove(push
, NDR_OUT
, &r
);
149 if (NT_STATUS_IS_ERR(status
)) {
150 talloc_free(mem_ctx
);
154 blob
= ndr_push_blob(push
);
155 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
156 talloc_free(mem_ctx
);
160 talloc_free(mem_ctx
);
165 static BOOL
api_dfs_SetInfo(pipes_struct
*p
)
167 struct ndr_pull
*pull
;
168 struct ndr_push
*push
;
171 struct dfs_SetInfo r
;
172 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_SetInfo");
174 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
175 talloc_free(mem_ctx
);
179 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
183 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
184 status
= ndr_pull_dfs_SetInfo(pull
, NDR_IN
, &r
);
185 if (NT_STATUS_IS_ERR(status
)) {
186 talloc_free(mem_ctx
);
190 r
.out
.result
= _dfs_SetInfo(p
);
192 push
= ndr_push_init_ctx(mem_ctx
);
194 talloc_free(mem_ctx
);
198 status
= ndr_push_dfs_SetInfo(push
, NDR_OUT
, &r
);
199 if (NT_STATUS_IS_ERR(status
)) {
200 talloc_free(mem_ctx
);
204 blob
= ndr_push_blob(push
);
205 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
206 talloc_free(mem_ctx
);
210 talloc_free(mem_ctx
);
215 static BOOL
api_dfs_GetInfo(pipes_struct
*p
)
217 struct ndr_pull
*pull
;
218 struct ndr_push
*push
;
221 struct dfs_GetInfo r
;
222 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_GetInfo");
224 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
225 talloc_free(mem_ctx
);
229 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
233 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
234 status
= ndr_pull_dfs_GetInfo(pull
, NDR_IN
, &r
);
235 if (NT_STATUS_IS_ERR(status
)) {
236 talloc_free(mem_ctx
);
240 r
.out
.info
= talloc_size(mem_ctx
, sizeof(*r
.out
.info
));
241 if (r
.out
.info
== NULL
) {
242 talloc_free(mem_ctx
);
246 r
.out
.result
= _dfs_GetInfo(p
, r
.in
.path
, r
.in
.server
, r
.in
.share
, r
.in
.level
, r
.out
.info
);
248 push
= ndr_push_init_ctx(mem_ctx
);
250 talloc_free(mem_ctx
);
254 status
= ndr_push_dfs_GetInfo(push
, NDR_OUT
, &r
);
255 if (NT_STATUS_IS_ERR(status
)) {
256 talloc_free(mem_ctx
);
260 blob
= ndr_push_blob(push
);
261 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
262 talloc_free(mem_ctx
);
266 talloc_free(mem_ctx
);
271 static BOOL
api_dfs_Enum(pipes_struct
*p
)
273 struct ndr_pull
*pull
;
274 struct ndr_push
*push
;
278 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_Enum");
280 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
281 talloc_free(mem_ctx
);
285 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
289 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
290 status
= ndr_pull_dfs_Enum(pull
, NDR_IN
, &r
);
291 if (NT_STATUS_IS_ERR(status
)) {
292 talloc_free(mem_ctx
);
296 r
.out
.info
= r
.in
.info
;
297 r
.out
.total
= r
.in
.total
;
298 r
.out
.result
= _dfs_Enum(p
, r
.in
.level
, r
.in
.bufsize
, r
.in
.info
, r
.in
.unknown
, r
.in
.total
);
300 push
= ndr_push_init_ctx(mem_ctx
);
302 talloc_free(mem_ctx
);
306 status
= ndr_push_dfs_Enum(push
, NDR_OUT
, &r
);
307 if (NT_STATUS_IS_ERR(status
)) {
308 talloc_free(mem_ctx
);
312 blob
= ndr_push_blob(push
);
313 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
314 talloc_free(mem_ctx
);
318 talloc_free(mem_ctx
);
323 static BOOL
api_dfs_Rename(pipes_struct
*p
)
325 struct ndr_pull
*pull
;
326 struct ndr_push
*push
;
330 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_Rename");
332 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
333 talloc_free(mem_ctx
);
337 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
341 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
342 status
= ndr_pull_dfs_Rename(pull
, NDR_IN
, &r
);
343 if (NT_STATUS_IS_ERR(status
)) {
344 talloc_free(mem_ctx
);
348 r
.out
.result
= _dfs_Rename(p
);
350 push
= ndr_push_init_ctx(mem_ctx
);
352 talloc_free(mem_ctx
);
356 status
= ndr_push_dfs_Rename(push
, NDR_OUT
, &r
);
357 if (NT_STATUS_IS_ERR(status
)) {
358 talloc_free(mem_ctx
);
362 blob
= ndr_push_blob(push
);
363 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
364 talloc_free(mem_ctx
);
368 talloc_free(mem_ctx
);
373 static BOOL
api_dfs_Move(pipes_struct
*p
)
375 struct ndr_pull
*pull
;
376 struct ndr_push
*push
;
380 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_Move");
382 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
383 talloc_free(mem_ctx
);
387 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
391 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
392 status
= ndr_pull_dfs_Move(pull
, NDR_IN
, &r
);
393 if (NT_STATUS_IS_ERR(status
)) {
394 talloc_free(mem_ctx
);
398 r
.out
.result
= _dfs_Move(p
);
400 push
= ndr_push_init_ctx(mem_ctx
);
402 talloc_free(mem_ctx
);
406 status
= ndr_push_dfs_Move(push
, NDR_OUT
, &r
);
407 if (NT_STATUS_IS_ERR(status
)) {
408 talloc_free(mem_ctx
);
412 blob
= ndr_push_blob(push
);
413 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
414 talloc_free(mem_ctx
);
418 talloc_free(mem_ctx
);
423 static BOOL
api_dfs_ManagerGetConfigInfo(pipes_struct
*p
)
425 struct ndr_pull
*pull
;
426 struct ndr_push
*push
;
429 struct dfs_ManagerGetConfigInfo r
;
430 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_ManagerGetConfigInfo");
432 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
433 talloc_free(mem_ctx
);
437 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
441 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
442 status
= ndr_pull_dfs_ManagerGetConfigInfo(pull
, NDR_IN
, &r
);
443 if (NT_STATUS_IS_ERR(status
)) {
444 talloc_free(mem_ctx
);
448 r
.out
.result
= _dfs_ManagerGetConfigInfo(p
);
450 push
= ndr_push_init_ctx(mem_ctx
);
452 talloc_free(mem_ctx
);
456 status
= ndr_push_dfs_ManagerGetConfigInfo(push
, NDR_OUT
, &r
);
457 if (NT_STATUS_IS_ERR(status
)) {
458 talloc_free(mem_ctx
);
462 blob
= ndr_push_blob(push
);
463 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
464 talloc_free(mem_ctx
);
468 talloc_free(mem_ctx
);
473 static BOOL
api_dfs_ManagerSendSiteInfo(pipes_struct
*p
)
475 struct ndr_pull
*pull
;
476 struct ndr_push
*push
;
479 struct dfs_ManagerSendSiteInfo r
;
480 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_ManagerSendSiteInfo");
482 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
483 talloc_free(mem_ctx
);
487 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
491 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
492 status
= ndr_pull_dfs_ManagerSendSiteInfo(pull
, NDR_IN
, &r
);
493 if (NT_STATUS_IS_ERR(status
)) {
494 talloc_free(mem_ctx
);
498 r
.out
.result
= _dfs_ManagerSendSiteInfo(p
);
500 push
= ndr_push_init_ctx(mem_ctx
);
502 talloc_free(mem_ctx
);
506 status
= ndr_push_dfs_ManagerSendSiteInfo(push
, NDR_OUT
, &r
);
507 if (NT_STATUS_IS_ERR(status
)) {
508 talloc_free(mem_ctx
);
512 blob
= ndr_push_blob(push
);
513 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
514 talloc_free(mem_ctx
);
518 talloc_free(mem_ctx
);
523 static BOOL
api_dfs_AddFtRoot(pipes_struct
*p
)
525 struct ndr_pull
*pull
;
526 struct ndr_push
*push
;
529 struct dfs_AddFtRoot r
;
530 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_AddFtRoot");
532 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
533 talloc_free(mem_ctx
);
537 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
541 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
542 status
= ndr_pull_dfs_AddFtRoot(pull
, NDR_IN
, &r
);
543 if (NT_STATUS_IS_ERR(status
)) {
544 talloc_free(mem_ctx
);
548 r
.out
.result
= _dfs_AddFtRoot(p
);
550 push
= ndr_push_init_ctx(mem_ctx
);
552 talloc_free(mem_ctx
);
556 status
= ndr_push_dfs_AddFtRoot(push
, NDR_OUT
, &r
);
557 if (NT_STATUS_IS_ERR(status
)) {
558 talloc_free(mem_ctx
);
562 blob
= ndr_push_blob(push
);
563 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
564 talloc_free(mem_ctx
);
568 talloc_free(mem_ctx
);
573 static BOOL
api_dfs_RemoveFtRoot(pipes_struct
*p
)
575 struct ndr_pull
*pull
;
576 struct ndr_push
*push
;
579 struct dfs_RemoveFtRoot r
;
580 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_RemoveFtRoot");
582 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
583 talloc_free(mem_ctx
);
587 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
591 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
592 status
= ndr_pull_dfs_RemoveFtRoot(pull
, NDR_IN
, &r
);
593 if (NT_STATUS_IS_ERR(status
)) {
594 talloc_free(mem_ctx
);
598 r
.out
.result
= _dfs_RemoveFtRoot(p
);
600 push
= ndr_push_init_ctx(mem_ctx
);
602 talloc_free(mem_ctx
);
606 status
= ndr_push_dfs_RemoveFtRoot(push
, NDR_OUT
, &r
);
607 if (NT_STATUS_IS_ERR(status
)) {
608 talloc_free(mem_ctx
);
612 blob
= ndr_push_blob(push
);
613 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
614 talloc_free(mem_ctx
);
618 talloc_free(mem_ctx
);
623 static BOOL
api_dfs_AddStdRoot(pipes_struct
*p
)
625 struct ndr_pull
*pull
;
626 struct ndr_push
*push
;
629 struct dfs_AddStdRoot r
;
630 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_AddStdRoot");
632 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
633 talloc_free(mem_ctx
);
637 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
641 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
642 status
= ndr_pull_dfs_AddStdRoot(pull
, NDR_IN
, &r
);
643 if (NT_STATUS_IS_ERR(status
)) {
644 talloc_free(mem_ctx
);
648 r
.out
.result
= _dfs_AddStdRoot(p
);
650 push
= ndr_push_init_ctx(mem_ctx
);
652 talloc_free(mem_ctx
);
656 status
= ndr_push_dfs_AddStdRoot(push
, NDR_OUT
, &r
);
657 if (NT_STATUS_IS_ERR(status
)) {
658 talloc_free(mem_ctx
);
662 blob
= ndr_push_blob(push
);
663 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
664 talloc_free(mem_ctx
);
668 talloc_free(mem_ctx
);
673 static BOOL
api_dfs_RemoveStdRoot(pipes_struct
*p
)
675 struct ndr_pull
*pull
;
676 struct ndr_push
*push
;
679 struct dfs_RemoveStdRoot r
;
680 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_RemoveStdRoot");
682 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
683 talloc_free(mem_ctx
);
687 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
691 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
692 status
= ndr_pull_dfs_RemoveStdRoot(pull
, NDR_IN
, &r
);
693 if (NT_STATUS_IS_ERR(status
)) {
694 talloc_free(mem_ctx
);
698 r
.out
.result
= _dfs_RemoveStdRoot(p
);
700 push
= ndr_push_init_ctx(mem_ctx
);
702 talloc_free(mem_ctx
);
706 status
= ndr_push_dfs_RemoveStdRoot(push
, NDR_OUT
, &r
);
707 if (NT_STATUS_IS_ERR(status
)) {
708 talloc_free(mem_ctx
);
712 blob
= ndr_push_blob(push
);
713 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
714 talloc_free(mem_ctx
);
718 talloc_free(mem_ctx
);
723 static BOOL
api_dfs_ManagerInitialize(pipes_struct
*p
)
725 struct ndr_pull
*pull
;
726 struct ndr_push
*push
;
729 struct dfs_ManagerInitialize r
;
730 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_ManagerInitialize");
732 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
733 talloc_free(mem_ctx
);
737 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
741 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
742 status
= ndr_pull_dfs_ManagerInitialize(pull
, NDR_IN
, &r
);
743 if (NT_STATUS_IS_ERR(status
)) {
744 talloc_free(mem_ctx
);
748 r
.out
.result
= _dfs_ManagerInitialize(p
);
750 push
= ndr_push_init_ctx(mem_ctx
);
752 talloc_free(mem_ctx
);
756 status
= ndr_push_dfs_ManagerInitialize(push
, NDR_OUT
, &r
);
757 if (NT_STATUS_IS_ERR(status
)) {
758 talloc_free(mem_ctx
);
762 blob
= ndr_push_blob(push
);
763 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
764 talloc_free(mem_ctx
);
768 talloc_free(mem_ctx
);
773 static BOOL
api_dfs_AddStdRootForced(pipes_struct
*p
)
775 struct ndr_pull
*pull
;
776 struct ndr_push
*push
;
779 struct dfs_AddStdRootForced r
;
780 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_AddStdRootForced");
782 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
783 talloc_free(mem_ctx
);
787 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
791 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
792 status
= ndr_pull_dfs_AddStdRootForced(pull
, NDR_IN
, &r
);
793 if (NT_STATUS_IS_ERR(status
)) {
794 talloc_free(mem_ctx
);
798 r
.out
.result
= _dfs_AddStdRootForced(p
);
800 push
= ndr_push_init_ctx(mem_ctx
);
802 talloc_free(mem_ctx
);
806 status
= ndr_push_dfs_AddStdRootForced(push
, NDR_OUT
, &r
);
807 if (NT_STATUS_IS_ERR(status
)) {
808 talloc_free(mem_ctx
);
812 blob
= ndr_push_blob(push
);
813 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
814 talloc_free(mem_ctx
);
818 talloc_free(mem_ctx
);
823 static BOOL
api_dfs_GetDcAddress(pipes_struct
*p
)
825 struct ndr_pull
*pull
;
826 struct ndr_push
*push
;
829 struct dfs_GetDcAddress r
;
830 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_GetDcAddress");
832 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
833 talloc_free(mem_ctx
);
837 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
841 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
842 status
= ndr_pull_dfs_GetDcAddress(pull
, NDR_IN
, &r
);
843 if (NT_STATUS_IS_ERR(status
)) {
844 talloc_free(mem_ctx
);
848 r
.out
.result
= _dfs_GetDcAddress(p
);
850 push
= ndr_push_init_ctx(mem_ctx
);
852 talloc_free(mem_ctx
);
856 status
= ndr_push_dfs_GetDcAddress(push
, NDR_OUT
, &r
);
857 if (NT_STATUS_IS_ERR(status
)) {
858 talloc_free(mem_ctx
);
862 blob
= ndr_push_blob(push
);
863 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
864 talloc_free(mem_ctx
);
868 talloc_free(mem_ctx
);
873 static BOOL
api_dfs_SetDcAddress(pipes_struct
*p
)
875 struct ndr_pull
*pull
;
876 struct ndr_push
*push
;
879 struct dfs_SetDcAddress r
;
880 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_SetDcAddress");
882 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
883 talloc_free(mem_ctx
);
887 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
891 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
892 status
= ndr_pull_dfs_SetDcAddress(pull
, NDR_IN
, &r
);
893 if (NT_STATUS_IS_ERR(status
)) {
894 talloc_free(mem_ctx
);
898 r
.out
.result
= _dfs_SetDcAddress(p
);
900 push
= ndr_push_init_ctx(mem_ctx
);
902 talloc_free(mem_ctx
);
906 status
= ndr_push_dfs_SetDcAddress(push
, NDR_OUT
, &r
);
907 if (NT_STATUS_IS_ERR(status
)) {
908 talloc_free(mem_ctx
);
912 blob
= ndr_push_blob(push
);
913 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
914 talloc_free(mem_ctx
);
918 talloc_free(mem_ctx
);
923 static BOOL
api_dfs_FlushFtTable(pipes_struct
*p
)
925 struct ndr_pull
*pull
;
926 struct ndr_push
*push
;
929 struct dfs_FlushFtTable r
;
930 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_FlushFtTable");
932 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
933 talloc_free(mem_ctx
);
937 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
941 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
942 status
= ndr_pull_dfs_FlushFtTable(pull
, NDR_IN
, &r
);
943 if (NT_STATUS_IS_ERR(status
)) {
944 talloc_free(mem_ctx
);
948 r
.out
.result
= _dfs_FlushFtTable(p
);
950 push
= ndr_push_init_ctx(mem_ctx
);
952 talloc_free(mem_ctx
);
956 status
= ndr_push_dfs_FlushFtTable(push
, NDR_OUT
, &r
);
957 if (NT_STATUS_IS_ERR(status
)) {
958 talloc_free(mem_ctx
);
962 blob
= ndr_push_blob(push
);
963 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
964 talloc_free(mem_ctx
);
968 talloc_free(mem_ctx
);
973 static BOOL
api_dfs_Add2(pipes_struct
*p
)
975 struct ndr_pull
*pull
;
976 struct ndr_push
*push
;
980 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_Add2");
982 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
983 talloc_free(mem_ctx
);
987 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
991 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
992 status
= ndr_pull_dfs_Add2(pull
, NDR_IN
, &r
);
993 if (NT_STATUS_IS_ERR(status
)) {
994 talloc_free(mem_ctx
);
998 r
.out
.result
= _dfs_Add2(p
);
1000 push
= ndr_push_init_ctx(mem_ctx
);
1002 talloc_free(mem_ctx
);
1006 status
= ndr_push_dfs_Add2(push
, NDR_OUT
, &r
);
1007 if (NT_STATUS_IS_ERR(status
)) {
1008 talloc_free(mem_ctx
);
1012 blob
= ndr_push_blob(push
);
1013 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1014 talloc_free(mem_ctx
);
1018 talloc_free(mem_ctx
);
1023 static BOOL
api_dfs_Remove2(pipes_struct
*p
)
1025 struct ndr_pull
*pull
;
1026 struct ndr_push
*push
;
1029 struct dfs_Remove2 r
;
1030 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_Remove2");
1032 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1033 talloc_free(mem_ctx
);
1037 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1041 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1042 status
= ndr_pull_dfs_Remove2(pull
, NDR_IN
, &r
);
1043 if (NT_STATUS_IS_ERR(status
)) {
1044 talloc_free(mem_ctx
);
1048 r
.out
.result
= _dfs_Remove2(p
);
1050 push
= ndr_push_init_ctx(mem_ctx
);
1052 talloc_free(mem_ctx
);
1056 status
= ndr_push_dfs_Remove2(push
, NDR_OUT
, &r
);
1057 if (NT_STATUS_IS_ERR(status
)) {
1058 talloc_free(mem_ctx
);
1062 blob
= ndr_push_blob(push
);
1063 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1064 talloc_free(mem_ctx
);
1068 talloc_free(mem_ctx
);
1073 static BOOL
api_dfs_EnumEx(pipes_struct
*p
)
1075 struct ndr_pull
*pull
;
1076 struct ndr_push
*push
;
1079 struct dfs_EnumEx r
;
1080 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_EnumEx");
1082 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1083 talloc_free(mem_ctx
);
1087 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1091 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1092 status
= ndr_pull_dfs_EnumEx(pull
, NDR_IN
, &r
);
1093 if (NT_STATUS_IS_ERR(status
)) {
1094 talloc_free(mem_ctx
);
1098 r
.out
.info
= r
.in
.info
;
1099 r
.out
.total
= r
.in
.total
;
1100 r
.out
.result
= _dfs_EnumEx(p
, r
.in
.name
, r
.in
.level
, r
.in
.bufsize
, r
.in
.info
, r
.in
.total
);
1102 push
= ndr_push_init_ctx(mem_ctx
);
1104 talloc_free(mem_ctx
);
1108 status
= ndr_push_dfs_EnumEx(push
, NDR_OUT
, &r
);
1109 if (NT_STATUS_IS_ERR(status
)) {
1110 talloc_free(mem_ctx
);
1114 blob
= ndr_push_blob(push
);
1115 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1116 talloc_free(mem_ctx
);
1120 talloc_free(mem_ctx
);
1125 static BOOL
api_dfs_SetInfo2(pipes_struct
*p
)
1127 struct ndr_pull
*pull
;
1128 struct ndr_push
*push
;
1131 struct dfs_SetInfo2 r
;
1132 TALLOC_CTX
*mem_ctx
= talloc_init("api_dfs_SetInfo2");
1134 if (!prs_data_blob(&p
->in_data
.data
, &blob
, mem_ctx
)) {
1135 talloc_free(mem_ctx
);
1139 pull
= ndr_pull_init_blob(&blob
, mem_ctx
);
1143 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1144 status
= ndr_pull_dfs_SetInfo2(pull
, NDR_IN
, &r
);
1145 if (NT_STATUS_IS_ERR(status
)) {
1146 talloc_free(mem_ctx
);
1150 r
.out
.result
= _dfs_SetInfo2(p
);
1152 push
= ndr_push_init_ctx(mem_ctx
);
1154 talloc_free(mem_ctx
);
1158 status
= ndr_push_dfs_SetInfo2(push
, NDR_OUT
, &r
);
1159 if (NT_STATUS_IS_ERR(status
)) {
1160 talloc_free(mem_ctx
);
1164 blob
= ndr_push_blob(push
);
1165 if (!prs_init_data_blob(&p
->out_data
.rdata
, &blob
, p
->mem_ctx
)) {
1166 talloc_free(mem_ctx
);
1170 talloc_free(mem_ctx
);
1177 static struct api_struct api_netdfs_cmds
[] =
1179 {"DFS_GETMANAGERVERSION", DCERPC_DFS_GETMANAGERVERSION
, api_dfs_GetManagerVersion
},
1180 {"DFS_ADD", DCERPC_DFS_ADD
, api_dfs_Add
},
1181 {"DFS_REMOVE", DCERPC_DFS_REMOVE
, api_dfs_Remove
},
1182 {"DFS_SETINFO", DCERPC_DFS_SETINFO
, api_dfs_SetInfo
},
1183 {"DFS_GETINFO", DCERPC_DFS_GETINFO
, api_dfs_GetInfo
},
1184 {"DFS_ENUM", DCERPC_DFS_ENUM
, api_dfs_Enum
},
1185 {"DFS_RENAME", DCERPC_DFS_RENAME
, api_dfs_Rename
},
1186 {"DFS_MOVE", DCERPC_DFS_MOVE
, api_dfs_Move
},
1187 {"DFS_MANAGERGETCONFIGINFO", DCERPC_DFS_MANAGERGETCONFIGINFO
, api_dfs_ManagerGetConfigInfo
},
1188 {"DFS_MANAGERSENDSITEINFO", DCERPC_DFS_MANAGERSENDSITEINFO
, api_dfs_ManagerSendSiteInfo
},
1189 {"DFS_ADDFTROOT", DCERPC_DFS_ADDFTROOT
, api_dfs_AddFtRoot
},
1190 {"DFS_REMOVEFTROOT", DCERPC_DFS_REMOVEFTROOT
, api_dfs_RemoveFtRoot
},
1191 {"DFS_ADDSTDROOT", DCERPC_DFS_ADDSTDROOT
, api_dfs_AddStdRoot
},
1192 {"DFS_REMOVESTDROOT", DCERPC_DFS_REMOVESTDROOT
, api_dfs_RemoveStdRoot
},
1193 {"DFS_MANAGERINITIALIZE", DCERPC_DFS_MANAGERINITIALIZE
, api_dfs_ManagerInitialize
},
1194 {"DFS_ADDSTDROOTFORCED", DCERPC_DFS_ADDSTDROOTFORCED
, api_dfs_AddStdRootForced
},
1195 {"DFS_GETDCADDRESS", DCERPC_DFS_GETDCADDRESS
, api_dfs_GetDcAddress
},
1196 {"DFS_SETDCADDRESS", DCERPC_DFS_SETDCADDRESS
, api_dfs_SetDcAddress
},
1197 {"DFS_FLUSHFTTABLE", DCERPC_DFS_FLUSHFTTABLE
, api_dfs_FlushFtTable
},
1198 {"DFS_ADD2", DCERPC_DFS_ADD2
, api_dfs_Add2
},
1199 {"DFS_REMOVE2", DCERPC_DFS_REMOVE2
, api_dfs_Remove2
},
1200 {"DFS_ENUMEX", DCERPC_DFS_ENUMEX
, api_dfs_EnumEx
},
1201 {"DFS_SETINFO2", DCERPC_DFS_SETINFO2
, api_dfs_SetInfo2
},
1204 void netdfs_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
1206 *fns
= api_netdfs_cmds
;
1207 *n_fns
= sizeof(api_netdfs_cmds
) / sizeof(struct api_struct
);
1210 NTSTATUS
rpc_netdfs_init(void)
1212 return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION
, "netdfs", "netdfs", api_netdfs_cmds
, sizeof(api_netdfs_cmds
) / sizeof(struct api_struct
));