2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_dfs.h"
9 struct rpccli_dfs_GetManagerVersion_state
{
10 struct dfs_GetManagerVersion orig
;
11 struct dfs_GetManagerVersion tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_dfs_GetManagerVersion_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_dfs_GetManagerVersion_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 enum dfs_ManagerVersion
*_version
/* [out] [ref] */)
23 struct tevent_req
*req
;
24 struct rpccli_dfs_GetManagerVersion_state
*state
;
25 struct tevent_req
*subreq
;
27 req
= tevent_req_create(mem_ctx
, &state
,
28 struct rpccli_dfs_GetManagerVersion_state
);
32 state
->out_mem_ctx
= NULL
;
33 state
->dispatch_recv
= cli
->dispatch_recv
;
38 state
->orig
.out
.version
= _version
;
40 if (DEBUGLEVEL
>= 10) {
41 NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion
, &state
->orig
);
44 state
->out_mem_ctx
= talloc_named_const(state
, 0,
45 "rpccli_dfs_GetManagerVersion_out_memory");
46 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
47 return tevent_req_post(req
, ev
);
50 /* make a temporary copy, that we pass to the dispatch function */
51 state
->tmp
= state
->orig
;
53 subreq
= cli
->dispatch_send(state
, ev
, cli
,
55 NDR_DFS_GETMANAGERVERSION
,
57 if (tevent_req_nomem(subreq
, req
)) {
58 return tevent_req_post(req
, ev
);
60 tevent_req_set_callback(subreq
, rpccli_dfs_GetManagerVersion_done
, req
);
64 static void rpccli_dfs_GetManagerVersion_done(struct tevent_req
*subreq
)
66 struct tevent_req
*req
= tevent_req_callback_data(
67 subreq
, struct tevent_req
);
68 struct rpccli_dfs_GetManagerVersion_state
*state
= tevent_req_data(
69 req
, struct rpccli_dfs_GetManagerVersion_state
);
73 if (state
->out_mem_ctx
) {
74 mem_ctx
= state
->out_mem_ctx
;
79 status
= state
->dispatch_recv(subreq
, mem_ctx
);
81 if (!NT_STATUS_IS_OK(status
)) {
82 tevent_req_nterror(req
, status
);
86 /* Copy out parameters */
87 *state
->orig
.out
.version
= *state
->tmp
.out
.version
;
89 /* Reset temporary structure */
90 ZERO_STRUCT(state
->tmp
);
92 if (DEBUGLEVEL
>= 10) {
93 NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion
, &state
->orig
);
99 NTSTATUS
rpccli_dfs_GetManagerVersion_recv(struct tevent_req
*req
,
102 struct rpccli_dfs_GetManagerVersion_state
*state
= tevent_req_data(
103 req
, struct rpccli_dfs_GetManagerVersion_state
);
106 if (tevent_req_is_nterror(req
, &status
)) {
107 tevent_req_received(req
);
111 /* Steal possbile out parameters to the callers context */
112 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
114 tevent_req_received(req
);
118 NTSTATUS
rpccli_dfs_GetManagerVersion(struct rpc_pipe_client
*cli
,
120 enum dfs_ManagerVersion
*version
/* [out] [ref] */)
122 struct dfs_GetManagerVersion r
;
127 if (DEBUGLEVEL
>= 10) {
128 NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion
, &r
);
131 status
= cli
->dispatch(cli
,
134 NDR_DFS_GETMANAGERVERSION
,
137 if (!NT_STATUS_IS_OK(status
)) {
141 if (DEBUGLEVEL
>= 10) {
142 NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion
, &r
);
145 if (NT_STATUS_IS_ERR(status
)) {
149 /* Return variables */
150 *version
= *r
.out
.version
;
156 struct rpccli_dfs_Add_state
{
159 TALLOC_CTX
*out_mem_ctx
;
160 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
163 static void rpccli_dfs_Add_done(struct tevent_req
*subreq
);
165 struct tevent_req
*rpccli_dfs_Add_send(TALLOC_CTX
*mem_ctx
,
166 struct tevent_context
*ev
,
167 struct rpc_pipe_client
*cli
,
168 const char *_path
/* [in] [ref,charset(UTF16)] */,
169 const char *_server
/* [in] [ref,charset(UTF16)] */,
170 const char *_share
/* [in] [unique,charset(UTF16)] */,
171 const char *_comment
/* [in] [unique,charset(UTF16)] */,
172 uint32_t _flags
/* [in] */)
174 struct tevent_req
*req
;
175 struct rpccli_dfs_Add_state
*state
;
176 struct tevent_req
*subreq
;
178 req
= tevent_req_create(mem_ctx
, &state
,
179 struct rpccli_dfs_Add_state
);
183 state
->out_mem_ctx
= NULL
;
184 state
->dispatch_recv
= cli
->dispatch_recv
;
187 state
->orig
.in
.path
= _path
;
188 state
->orig
.in
.server
= _server
;
189 state
->orig
.in
.share
= _share
;
190 state
->orig
.in
.comment
= _comment
;
191 state
->orig
.in
.flags
= _flags
;
196 ZERO_STRUCT(state
->orig
.out
.result
);
198 if (DEBUGLEVEL
>= 10) {
199 NDR_PRINT_IN_DEBUG(dfs_Add
, &state
->orig
);
202 /* make a temporary copy, that we pass to the dispatch function */
203 state
->tmp
= state
->orig
;
205 subreq
= cli
->dispatch_send(state
, ev
, cli
,
209 if (tevent_req_nomem(subreq
, req
)) {
210 return tevent_req_post(req
, ev
);
212 tevent_req_set_callback(subreq
, rpccli_dfs_Add_done
, req
);
216 static void rpccli_dfs_Add_done(struct tevent_req
*subreq
)
218 struct tevent_req
*req
= tevent_req_callback_data(
219 subreq
, struct tevent_req
);
220 struct rpccli_dfs_Add_state
*state
= tevent_req_data(
221 req
, struct rpccli_dfs_Add_state
);
225 if (state
->out_mem_ctx
) {
226 mem_ctx
= state
->out_mem_ctx
;
231 status
= state
->dispatch_recv(subreq
, mem_ctx
);
233 if (!NT_STATUS_IS_OK(status
)) {
234 tevent_req_nterror(req
, status
);
238 /* Copy out parameters */
241 state
->orig
.out
.result
= state
->tmp
.out
.result
;
243 /* Reset temporary structure */
244 ZERO_STRUCT(state
->tmp
);
246 if (DEBUGLEVEL
>= 10) {
247 NDR_PRINT_OUT_DEBUG(dfs_Add
, &state
->orig
);
250 tevent_req_done(req
);
253 NTSTATUS
rpccli_dfs_Add_recv(struct tevent_req
*req
,
257 struct rpccli_dfs_Add_state
*state
= tevent_req_data(
258 req
, struct rpccli_dfs_Add_state
);
261 if (tevent_req_is_nterror(req
, &status
)) {
262 tevent_req_received(req
);
266 /* Steal possbile out parameters to the callers context */
267 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
270 *result
= state
->orig
.out
.result
;
272 tevent_req_received(req
);
276 NTSTATUS
rpccli_dfs_Add(struct rpc_pipe_client
*cli
,
278 const char *path
/* [in] [ref,charset(UTF16)] */,
279 const char *server
/* [in] [ref,charset(UTF16)] */,
280 const char *share
/* [in] [unique,charset(UTF16)] */,
281 const char *comment
/* [in] [unique,charset(UTF16)] */,
282 uint32_t flags
/* [in] */,
290 r
.in
.server
= server
;
292 r
.in
.comment
= comment
;
295 if (DEBUGLEVEL
>= 10) {
296 NDR_PRINT_IN_DEBUG(dfs_Add
, &r
);
299 status
= cli
->dispatch(cli
,
305 if (!NT_STATUS_IS_OK(status
)) {
309 if (DEBUGLEVEL
>= 10) {
310 NDR_PRINT_OUT_DEBUG(dfs_Add
, &r
);
313 if (NT_STATUS_IS_ERR(status
)) {
317 /* Return variables */
321 *werror
= r
.out
.result
;
324 return werror_to_ntstatus(r
.out
.result
);
327 struct rpccli_dfs_Remove_state
{
328 struct dfs_Remove orig
;
329 struct dfs_Remove tmp
;
330 TALLOC_CTX
*out_mem_ctx
;
331 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
334 static void rpccli_dfs_Remove_done(struct tevent_req
*subreq
);
336 struct tevent_req
*rpccli_dfs_Remove_send(TALLOC_CTX
*mem_ctx
,
337 struct tevent_context
*ev
,
338 struct rpc_pipe_client
*cli
,
339 const char *_dfs_entry_path
/* [in] [ref,charset(UTF16)] */,
340 const char *_servername
/* [in] [unique,charset(UTF16)] */,
341 const char *_sharename
/* [in] [unique,charset(UTF16)] */)
343 struct tevent_req
*req
;
344 struct rpccli_dfs_Remove_state
*state
;
345 struct tevent_req
*subreq
;
347 req
= tevent_req_create(mem_ctx
, &state
,
348 struct rpccli_dfs_Remove_state
);
352 state
->out_mem_ctx
= NULL
;
353 state
->dispatch_recv
= cli
->dispatch_recv
;
356 state
->orig
.in
.dfs_entry_path
= _dfs_entry_path
;
357 state
->orig
.in
.servername
= _servername
;
358 state
->orig
.in
.sharename
= _sharename
;
363 ZERO_STRUCT(state
->orig
.out
.result
);
365 if (DEBUGLEVEL
>= 10) {
366 NDR_PRINT_IN_DEBUG(dfs_Remove
, &state
->orig
);
369 /* make a temporary copy, that we pass to the dispatch function */
370 state
->tmp
= state
->orig
;
372 subreq
= cli
->dispatch_send(state
, ev
, cli
,
376 if (tevent_req_nomem(subreq
, req
)) {
377 return tevent_req_post(req
, ev
);
379 tevent_req_set_callback(subreq
, rpccli_dfs_Remove_done
, req
);
383 static void rpccli_dfs_Remove_done(struct tevent_req
*subreq
)
385 struct tevent_req
*req
= tevent_req_callback_data(
386 subreq
, struct tevent_req
);
387 struct rpccli_dfs_Remove_state
*state
= tevent_req_data(
388 req
, struct rpccli_dfs_Remove_state
);
392 if (state
->out_mem_ctx
) {
393 mem_ctx
= state
->out_mem_ctx
;
398 status
= state
->dispatch_recv(subreq
, mem_ctx
);
400 if (!NT_STATUS_IS_OK(status
)) {
401 tevent_req_nterror(req
, status
);
405 /* Copy out parameters */
408 state
->orig
.out
.result
= state
->tmp
.out
.result
;
410 /* Reset temporary structure */
411 ZERO_STRUCT(state
->tmp
);
413 if (DEBUGLEVEL
>= 10) {
414 NDR_PRINT_OUT_DEBUG(dfs_Remove
, &state
->orig
);
417 tevent_req_done(req
);
420 NTSTATUS
rpccli_dfs_Remove_recv(struct tevent_req
*req
,
424 struct rpccli_dfs_Remove_state
*state
= tevent_req_data(
425 req
, struct rpccli_dfs_Remove_state
);
428 if (tevent_req_is_nterror(req
, &status
)) {
429 tevent_req_received(req
);
433 /* Steal possbile out parameters to the callers context */
434 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
437 *result
= state
->orig
.out
.result
;
439 tevent_req_received(req
);
443 NTSTATUS
rpccli_dfs_Remove(struct rpc_pipe_client
*cli
,
445 const char *dfs_entry_path
/* [in] [ref,charset(UTF16)] */,
446 const char *servername
/* [in] [unique,charset(UTF16)] */,
447 const char *sharename
/* [in] [unique,charset(UTF16)] */,
454 r
.in
.dfs_entry_path
= dfs_entry_path
;
455 r
.in
.servername
= servername
;
456 r
.in
.sharename
= sharename
;
458 if (DEBUGLEVEL
>= 10) {
459 NDR_PRINT_IN_DEBUG(dfs_Remove
, &r
);
462 status
= cli
->dispatch(cli
,
468 if (!NT_STATUS_IS_OK(status
)) {
472 if (DEBUGLEVEL
>= 10) {
473 NDR_PRINT_OUT_DEBUG(dfs_Remove
, &r
);
476 if (NT_STATUS_IS_ERR(status
)) {
480 /* Return variables */
484 *werror
= r
.out
.result
;
487 return werror_to_ntstatus(r
.out
.result
);
490 struct rpccli_dfs_SetInfo_state
{
491 struct dfs_SetInfo orig
;
492 struct dfs_SetInfo tmp
;
493 TALLOC_CTX
*out_mem_ctx
;
494 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
497 static void rpccli_dfs_SetInfo_done(struct tevent_req
*subreq
);
499 struct tevent_req
*rpccli_dfs_SetInfo_send(TALLOC_CTX
*mem_ctx
,
500 struct tevent_context
*ev
,
501 struct rpc_pipe_client
*cli
,
502 const char *_dfs_entry_path
/* [in] [charset(UTF16)] */,
503 const char *_servername
/* [in] [unique,charset(UTF16)] */,
504 const char *_sharename
/* [in] [unique,charset(UTF16)] */,
505 uint32_t _level
/* [in] */,
506 union dfs_Info
*_info
/* [in] [ref,switch_is(level)] */)
508 struct tevent_req
*req
;
509 struct rpccli_dfs_SetInfo_state
*state
;
510 struct tevent_req
*subreq
;
512 req
= tevent_req_create(mem_ctx
, &state
,
513 struct rpccli_dfs_SetInfo_state
);
517 state
->out_mem_ctx
= NULL
;
518 state
->dispatch_recv
= cli
->dispatch_recv
;
521 state
->orig
.in
.dfs_entry_path
= _dfs_entry_path
;
522 state
->orig
.in
.servername
= _servername
;
523 state
->orig
.in
.sharename
= _sharename
;
524 state
->orig
.in
.level
= _level
;
525 state
->orig
.in
.info
= _info
;
530 ZERO_STRUCT(state
->orig
.out
.result
);
532 if (DEBUGLEVEL
>= 10) {
533 NDR_PRINT_IN_DEBUG(dfs_SetInfo
, &state
->orig
);
536 /* make a temporary copy, that we pass to the dispatch function */
537 state
->tmp
= state
->orig
;
539 subreq
= cli
->dispatch_send(state
, ev
, cli
,
543 if (tevent_req_nomem(subreq
, req
)) {
544 return tevent_req_post(req
, ev
);
546 tevent_req_set_callback(subreq
, rpccli_dfs_SetInfo_done
, req
);
550 static void rpccli_dfs_SetInfo_done(struct tevent_req
*subreq
)
552 struct tevent_req
*req
= tevent_req_callback_data(
553 subreq
, struct tevent_req
);
554 struct rpccli_dfs_SetInfo_state
*state
= tevent_req_data(
555 req
, struct rpccli_dfs_SetInfo_state
);
559 if (state
->out_mem_ctx
) {
560 mem_ctx
= state
->out_mem_ctx
;
565 status
= state
->dispatch_recv(subreq
, mem_ctx
);
567 if (!NT_STATUS_IS_OK(status
)) {
568 tevent_req_nterror(req
, status
);
572 /* Copy out parameters */
575 state
->orig
.out
.result
= state
->tmp
.out
.result
;
577 /* Reset temporary structure */
578 ZERO_STRUCT(state
->tmp
);
580 if (DEBUGLEVEL
>= 10) {
581 NDR_PRINT_OUT_DEBUG(dfs_SetInfo
, &state
->orig
);
584 tevent_req_done(req
);
587 NTSTATUS
rpccli_dfs_SetInfo_recv(struct tevent_req
*req
,
591 struct rpccli_dfs_SetInfo_state
*state
= tevent_req_data(
592 req
, struct rpccli_dfs_SetInfo_state
);
595 if (tevent_req_is_nterror(req
, &status
)) {
596 tevent_req_received(req
);
600 /* Steal possbile out parameters to the callers context */
601 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
604 *result
= state
->orig
.out
.result
;
606 tevent_req_received(req
);
610 NTSTATUS
rpccli_dfs_SetInfo(struct rpc_pipe_client
*cli
,
612 const char *dfs_entry_path
/* [in] [charset(UTF16)] */,
613 const char *servername
/* [in] [unique,charset(UTF16)] */,
614 const char *sharename
/* [in] [unique,charset(UTF16)] */,
615 uint32_t level
/* [in] */,
616 union dfs_Info
*info
/* [in] [ref,switch_is(level)] */,
619 struct dfs_SetInfo r
;
623 r
.in
.dfs_entry_path
= dfs_entry_path
;
624 r
.in
.servername
= servername
;
625 r
.in
.sharename
= sharename
;
629 if (DEBUGLEVEL
>= 10) {
630 NDR_PRINT_IN_DEBUG(dfs_SetInfo
, &r
);
633 status
= cli
->dispatch(cli
,
639 if (!NT_STATUS_IS_OK(status
)) {
643 if (DEBUGLEVEL
>= 10) {
644 NDR_PRINT_OUT_DEBUG(dfs_SetInfo
, &r
);
647 if (NT_STATUS_IS_ERR(status
)) {
651 /* Return variables */
655 *werror
= r
.out
.result
;
658 return werror_to_ntstatus(r
.out
.result
);
661 struct rpccli_dfs_GetInfo_state
{
662 struct dfs_GetInfo orig
;
663 struct dfs_GetInfo tmp
;
664 TALLOC_CTX
*out_mem_ctx
;
665 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
668 static void rpccli_dfs_GetInfo_done(struct tevent_req
*subreq
);
670 struct tevent_req
*rpccli_dfs_GetInfo_send(TALLOC_CTX
*mem_ctx
,
671 struct tevent_context
*ev
,
672 struct rpc_pipe_client
*cli
,
673 const char *_dfs_entry_path
/* [in] [charset(UTF16)] */,
674 const char *_servername
/* [in] [unique,charset(UTF16)] */,
675 const char *_sharename
/* [in] [unique,charset(UTF16)] */,
676 uint32_t _level
/* [in] */,
677 union dfs_Info
*_info
/* [out] [ref,switch_is(level)] */)
679 struct tevent_req
*req
;
680 struct rpccli_dfs_GetInfo_state
*state
;
681 struct tevent_req
*subreq
;
683 req
= tevent_req_create(mem_ctx
, &state
,
684 struct rpccli_dfs_GetInfo_state
);
688 state
->out_mem_ctx
= NULL
;
689 state
->dispatch_recv
= cli
->dispatch_recv
;
692 state
->orig
.in
.dfs_entry_path
= _dfs_entry_path
;
693 state
->orig
.in
.servername
= _servername
;
694 state
->orig
.in
.sharename
= _sharename
;
695 state
->orig
.in
.level
= _level
;
698 state
->orig
.out
.info
= _info
;
701 ZERO_STRUCT(state
->orig
.out
.result
);
703 if (DEBUGLEVEL
>= 10) {
704 NDR_PRINT_IN_DEBUG(dfs_GetInfo
, &state
->orig
);
707 state
->out_mem_ctx
= talloc_named_const(state
, 0,
708 "rpccli_dfs_GetInfo_out_memory");
709 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
710 return tevent_req_post(req
, ev
);
713 /* make a temporary copy, that we pass to the dispatch function */
714 state
->tmp
= state
->orig
;
716 subreq
= cli
->dispatch_send(state
, ev
, cli
,
720 if (tevent_req_nomem(subreq
, req
)) {
721 return tevent_req_post(req
, ev
);
723 tevent_req_set_callback(subreq
, rpccli_dfs_GetInfo_done
, req
);
727 static void rpccli_dfs_GetInfo_done(struct tevent_req
*subreq
)
729 struct tevent_req
*req
= tevent_req_callback_data(
730 subreq
, struct tevent_req
);
731 struct rpccli_dfs_GetInfo_state
*state
= tevent_req_data(
732 req
, struct rpccli_dfs_GetInfo_state
);
736 if (state
->out_mem_ctx
) {
737 mem_ctx
= state
->out_mem_ctx
;
742 status
= state
->dispatch_recv(subreq
, mem_ctx
);
744 if (!NT_STATUS_IS_OK(status
)) {
745 tevent_req_nterror(req
, status
);
749 /* Copy out parameters */
750 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
753 state
->orig
.out
.result
= state
->tmp
.out
.result
;
755 /* Reset temporary structure */
756 ZERO_STRUCT(state
->tmp
);
758 if (DEBUGLEVEL
>= 10) {
759 NDR_PRINT_OUT_DEBUG(dfs_GetInfo
, &state
->orig
);
762 tevent_req_done(req
);
765 NTSTATUS
rpccli_dfs_GetInfo_recv(struct tevent_req
*req
,
769 struct rpccli_dfs_GetInfo_state
*state
= tevent_req_data(
770 req
, struct rpccli_dfs_GetInfo_state
);
773 if (tevent_req_is_nterror(req
, &status
)) {
774 tevent_req_received(req
);
778 /* Steal possbile out parameters to the callers context */
779 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
782 *result
= state
->orig
.out
.result
;
784 tevent_req_received(req
);
788 NTSTATUS
rpccli_dfs_GetInfo(struct rpc_pipe_client
*cli
,
790 const char *dfs_entry_path
/* [in] [charset(UTF16)] */,
791 const char *servername
/* [in] [unique,charset(UTF16)] */,
792 const char *sharename
/* [in] [unique,charset(UTF16)] */,
793 uint32_t level
/* [in] */,
794 union dfs_Info
*info
/* [out] [ref,switch_is(level)] */,
797 struct dfs_GetInfo r
;
801 r
.in
.dfs_entry_path
= dfs_entry_path
;
802 r
.in
.servername
= servername
;
803 r
.in
.sharename
= sharename
;
806 if (DEBUGLEVEL
>= 10) {
807 NDR_PRINT_IN_DEBUG(dfs_GetInfo
, &r
);
810 status
= cli
->dispatch(cli
,
816 if (!NT_STATUS_IS_OK(status
)) {
820 if (DEBUGLEVEL
>= 10) {
821 NDR_PRINT_OUT_DEBUG(dfs_GetInfo
, &r
);
824 if (NT_STATUS_IS_ERR(status
)) {
828 /* Return variables */
833 *werror
= r
.out
.result
;
836 return werror_to_ntstatus(r
.out
.result
);
839 struct rpccli_dfs_Enum_state
{
840 struct dfs_Enum orig
;
842 TALLOC_CTX
*out_mem_ctx
;
843 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
846 static void rpccli_dfs_Enum_done(struct tevent_req
*subreq
);
848 struct tevent_req
*rpccli_dfs_Enum_send(TALLOC_CTX
*mem_ctx
,
849 struct tevent_context
*ev
,
850 struct rpc_pipe_client
*cli
,
851 uint32_t _level
/* [in] */,
852 uint32_t _bufsize
/* [in] */,
853 struct dfs_EnumStruct
*_info
/* [in,out] [unique] */,
854 uint32_t *_total
/* [in,out] [unique] */)
856 struct tevent_req
*req
;
857 struct rpccli_dfs_Enum_state
*state
;
858 struct tevent_req
*subreq
;
860 req
= tevent_req_create(mem_ctx
, &state
,
861 struct rpccli_dfs_Enum_state
);
865 state
->out_mem_ctx
= NULL
;
866 state
->dispatch_recv
= cli
->dispatch_recv
;
869 state
->orig
.in
.level
= _level
;
870 state
->orig
.in
.bufsize
= _bufsize
;
871 state
->orig
.in
.info
= _info
;
872 state
->orig
.in
.total
= _total
;
875 state
->orig
.out
.info
= _info
;
876 state
->orig
.out
.total
= _total
;
879 ZERO_STRUCT(state
->orig
.out
.result
);
881 if (DEBUGLEVEL
>= 10) {
882 NDR_PRINT_IN_DEBUG(dfs_Enum
, &state
->orig
);
885 state
->out_mem_ctx
= talloc_named_const(state
, 0,
886 "rpccli_dfs_Enum_out_memory");
887 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
888 return tevent_req_post(req
, ev
);
891 /* make a temporary copy, that we pass to the dispatch function */
892 state
->tmp
= state
->orig
;
894 subreq
= cli
->dispatch_send(state
, ev
, cli
,
898 if (tevent_req_nomem(subreq
, req
)) {
899 return tevent_req_post(req
, ev
);
901 tevent_req_set_callback(subreq
, rpccli_dfs_Enum_done
, req
);
905 static void rpccli_dfs_Enum_done(struct tevent_req
*subreq
)
907 struct tevent_req
*req
= tevent_req_callback_data(
908 subreq
, struct tevent_req
);
909 struct rpccli_dfs_Enum_state
*state
= tevent_req_data(
910 req
, struct rpccli_dfs_Enum_state
);
914 if (state
->out_mem_ctx
) {
915 mem_ctx
= state
->out_mem_ctx
;
920 status
= state
->dispatch_recv(subreq
, mem_ctx
);
922 if (!NT_STATUS_IS_OK(status
)) {
923 tevent_req_nterror(req
, status
);
927 /* Copy out parameters */
928 if (state
->orig
.out
.info
&& state
->tmp
.out
.info
) {
929 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
931 if (state
->orig
.out
.total
&& state
->tmp
.out
.total
) {
932 *state
->orig
.out
.total
= *state
->tmp
.out
.total
;
936 state
->orig
.out
.result
= state
->tmp
.out
.result
;
938 /* Reset temporary structure */
939 ZERO_STRUCT(state
->tmp
);
941 if (DEBUGLEVEL
>= 10) {
942 NDR_PRINT_OUT_DEBUG(dfs_Enum
, &state
->orig
);
945 tevent_req_done(req
);
948 NTSTATUS
rpccli_dfs_Enum_recv(struct tevent_req
*req
,
952 struct rpccli_dfs_Enum_state
*state
= tevent_req_data(
953 req
, struct rpccli_dfs_Enum_state
);
956 if (tevent_req_is_nterror(req
, &status
)) {
957 tevent_req_received(req
);
961 /* Steal possbile out parameters to the callers context */
962 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
965 *result
= state
->orig
.out
.result
;
967 tevent_req_received(req
);
971 NTSTATUS
rpccli_dfs_Enum(struct rpc_pipe_client
*cli
,
973 uint32_t level
/* [in] */,
974 uint32_t bufsize
/* [in] */,
975 struct dfs_EnumStruct
*info
/* [in,out] [unique] */,
976 uint32_t *total
/* [in,out] [unique] */,
984 r
.in
.bufsize
= bufsize
;
988 if (DEBUGLEVEL
>= 10) {
989 NDR_PRINT_IN_DEBUG(dfs_Enum
, &r
);
992 status
= cli
->dispatch(cli
,
998 if (!NT_STATUS_IS_OK(status
)) {
1002 if (DEBUGLEVEL
>= 10) {
1003 NDR_PRINT_OUT_DEBUG(dfs_Enum
, &r
);
1006 if (NT_STATUS_IS_ERR(status
)) {
1010 /* Return variables */
1011 if (info
&& r
.out
.info
) {
1012 *info
= *r
.out
.info
;
1014 if (total
&& r
.out
.total
) {
1015 *total
= *r
.out
.total
;
1020 *werror
= r
.out
.result
;
1023 return werror_to_ntstatus(r
.out
.result
);
1026 struct rpccli_dfs_Rename_state
{
1027 struct dfs_Rename orig
;
1028 struct dfs_Rename tmp
;
1029 TALLOC_CTX
*out_mem_ctx
;
1030 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1033 static void rpccli_dfs_Rename_done(struct tevent_req
*subreq
);
1035 struct tevent_req
*rpccli_dfs_Rename_send(TALLOC_CTX
*mem_ctx
,
1036 struct tevent_context
*ev
,
1037 struct rpc_pipe_client
*cli
)
1039 struct tevent_req
*req
;
1040 struct rpccli_dfs_Rename_state
*state
;
1041 struct tevent_req
*subreq
;
1043 req
= tevent_req_create(mem_ctx
, &state
,
1044 struct rpccli_dfs_Rename_state
);
1048 state
->out_mem_ctx
= NULL
;
1049 state
->dispatch_recv
= cli
->dispatch_recv
;
1053 /* Out parameters */
1056 ZERO_STRUCT(state
->orig
.out
.result
);
1058 if (DEBUGLEVEL
>= 10) {
1059 NDR_PRINT_IN_DEBUG(dfs_Rename
, &state
->orig
);
1062 /* make a temporary copy, that we pass to the dispatch function */
1063 state
->tmp
= state
->orig
;
1065 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1069 if (tevent_req_nomem(subreq
, req
)) {
1070 return tevent_req_post(req
, ev
);
1072 tevent_req_set_callback(subreq
, rpccli_dfs_Rename_done
, req
);
1076 static void rpccli_dfs_Rename_done(struct tevent_req
*subreq
)
1078 struct tevent_req
*req
= tevent_req_callback_data(
1079 subreq
, struct tevent_req
);
1080 struct rpccli_dfs_Rename_state
*state
= tevent_req_data(
1081 req
, struct rpccli_dfs_Rename_state
);
1083 TALLOC_CTX
*mem_ctx
;
1085 if (state
->out_mem_ctx
) {
1086 mem_ctx
= state
->out_mem_ctx
;
1091 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1092 TALLOC_FREE(subreq
);
1093 if (!NT_STATUS_IS_OK(status
)) {
1094 tevent_req_nterror(req
, status
);
1098 /* Copy out parameters */
1101 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1103 /* Reset temporary structure */
1104 ZERO_STRUCT(state
->tmp
);
1106 if (DEBUGLEVEL
>= 10) {
1107 NDR_PRINT_OUT_DEBUG(dfs_Rename
, &state
->orig
);
1110 tevent_req_done(req
);
1113 NTSTATUS
rpccli_dfs_Rename_recv(struct tevent_req
*req
,
1114 TALLOC_CTX
*mem_ctx
,
1117 struct rpccli_dfs_Rename_state
*state
= tevent_req_data(
1118 req
, struct rpccli_dfs_Rename_state
);
1121 if (tevent_req_is_nterror(req
, &status
)) {
1122 tevent_req_received(req
);
1126 /* Steal possbile out parameters to the callers context */
1127 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1130 *result
= state
->orig
.out
.result
;
1132 tevent_req_received(req
);
1133 return NT_STATUS_OK
;
1136 NTSTATUS
rpccli_dfs_Rename(struct rpc_pipe_client
*cli
,
1137 TALLOC_CTX
*mem_ctx
,
1140 struct dfs_Rename r
;
1145 if (DEBUGLEVEL
>= 10) {
1146 NDR_PRINT_IN_DEBUG(dfs_Rename
, &r
);
1149 status
= cli
->dispatch(cli
,
1155 if (!NT_STATUS_IS_OK(status
)) {
1159 if (DEBUGLEVEL
>= 10) {
1160 NDR_PRINT_OUT_DEBUG(dfs_Rename
, &r
);
1163 if (NT_STATUS_IS_ERR(status
)) {
1167 /* Return variables */
1171 *werror
= r
.out
.result
;
1174 return werror_to_ntstatus(r
.out
.result
);
1177 struct rpccli_dfs_Move_state
{
1178 struct dfs_Move orig
;
1179 struct dfs_Move tmp
;
1180 TALLOC_CTX
*out_mem_ctx
;
1181 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1184 static void rpccli_dfs_Move_done(struct tevent_req
*subreq
);
1186 struct tevent_req
*rpccli_dfs_Move_send(TALLOC_CTX
*mem_ctx
,
1187 struct tevent_context
*ev
,
1188 struct rpc_pipe_client
*cli
)
1190 struct tevent_req
*req
;
1191 struct rpccli_dfs_Move_state
*state
;
1192 struct tevent_req
*subreq
;
1194 req
= tevent_req_create(mem_ctx
, &state
,
1195 struct rpccli_dfs_Move_state
);
1199 state
->out_mem_ctx
= NULL
;
1200 state
->dispatch_recv
= cli
->dispatch_recv
;
1204 /* Out parameters */
1207 ZERO_STRUCT(state
->orig
.out
.result
);
1209 if (DEBUGLEVEL
>= 10) {
1210 NDR_PRINT_IN_DEBUG(dfs_Move
, &state
->orig
);
1213 /* make a temporary copy, that we pass to the dispatch function */
1214 state
->tmp
= state
->orig
;
1216 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1220 if (tevent_req_nomem(subreq
, req
)) {
1221 return tevent_req_post(req
, ev
);
1223 tevent_req_set_callback(subreq
, rpccli_dfs_Move_done
, req
);
1227 static void rpccli_dfs_Move_done(struct tevent_req
*subreq
)
1229 struct tevent_req
*req
= tevent_req_callback_data(
1230 subreq
, struct tevent_req
);
1231 struct rpccli_dfs_Move_state
*state
= tevent_req_data(
1232 req
, struct rpccli_dfs_Move_state
);
1234 TALLOC_CTX
*mem_ctx
;
1236 if (state
->out_mem_ctx
) {
1237 mem_ctx
= state
->out_mem_ctx
;
1242 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1243 TALLOC_FREE(subreq
);
1244 if (!NT_STATUS_IS_OK(status
)) {
1245 tevent_req_nterror(req
, status
);
1249 /* Copy out parameters */
1252 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1254 /* Reset temporary structure */
1255 ZERO_STRUCT(state
->tmp
);
1257 if (DEBUGLEVEL
>= 10) {
1258 NDR_PRINT_OUT_DEBUG(dfs_Move
, &state
->orig
);
1261 tevent_req_done(req
);
1264 NTSTATUS
rpccli_dfs_Move_recv(struct tevent_req
*req
,
1265 TALLOC_CTX
*mem_ctx
,
1268 struct rpccli_dfs_Move_state
*state
= tevent_req_data(
1269 req
, struct rpccli_dfs_Move_state
);
1272 if (tevent_req_is_nterror(req
, &status
)) {
1273 tevent_req_received(req
);
1277 /* Steal possbile out parameters to the callers context */
1278 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1281 *result
= state
->orig
.out
.result
;
1283 tevent_req_received(req
);
1284 return NT_STATUS_OK
;
1287 NTSTATUS
rpccli_dfs_Move(struct rpc_pipe_client
*cli
,
1288 TALLOC_CTX
*mem_ctx
,
1296 if (DEBUGLEVEL
>= 10) {
1297 NDR_PRINT_IN_DEBUG(dfs_Move
, &r
);
1300 status
= cli
->dispatch(cli
,
1306 if (!NT_STATUS_IS_OK(status
)) {
1310 if (DEBUGLEVEL
>= 10) {
1311 NDR_PRINT_OUT_DEBUG(dfs_Move
, &r
);
1314 if (NT_STATUS_IS_ERR(status
)) {
1318 /* Return variables */
1322 *werror
= r
.out
.result
;
1325 return werror_to_ntstatus(r
.out
.result
);
1328 struct rpccli_dfs_ManagerGetConfigInfo_state
{
1329 struct dfs_ManagerGetConfigInfo orig
;
1330 struct dfs_ManagerGetConfigInfo tmp
;
1331 TALLOC_CTX
*out_mem_ctx
;
1332 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1335 static void rpccli_dfs_ManagerGetConfigInfo_done(struct tevent_req
*subreq
);
1337 struct tevent_req
*rpccli_dfs_ManagerGetConfigInfo_send(TALLOC_CTX
*mem_ctx
,
1338 struct tevent_context
*ev
,
1339 struct rpc_pipe_client
*cli
)
1341 struct tevent_req
*req
;
1342 struct rpccli_dfs_ManagerGetConfigInfo_state
*state
;
1343 struct tevent_req
*subreq
;
1345 req
= tevent_req_create(mem_ctx
, &state
,
1346 struct rpccli_dfs_ManagerGetConfigInfo_state
);
1350 state
->out_mem_ctx
= NULL
;
1351 state
->dispatch_recv
= cli
->dispatch_recv
;
1355 /* Out parameters */
1358 ZERO_STRUCT(state
->orig
.out
.result
);
1360 if (DEBUGLEVEL
>= 10) {
1361 NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo
, &state
->orig
);
1364 /* make a temporary copy, that we pass to the dispatch function */
1365 state
->tmp
= state
->orig
;
1367 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1369 NDR_DFS_MANAGERGETCONFIGINFO
,
1371 if (tevent_req_nomem(subreq
, req
)) {
1372 return tevent_req_post(req
, ev
);
1374 tevent_req_set_callback(subreq
, rpccli_dfs_ManagerGetConfigInfo_done
, req
);
1378 static void rpccli_dfs_ManagerGetConfigInfo_done(struct tevent_req
*subreq
)
1380 struct tevent_req
*req
= tevent_req_callback_data(
1381 subreq
, struct tevent_req
);
1382 struct rpccli_dfs_ManagerGetConfigInfo_state
*state
= tevent_req_data(
1383 req
, struct rpccli_dfs_ManagerGetConfigInfo_state
);
1385 TALLOC_CTX
*mem_ctx
;
1387 if (state
->out_mem_ctx
) {
1388 mem_ctx
= state
->out_mem_ctx
;
1393 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1394 TALLOC_FREE(subreq
);
1395 if (!NT_STATUS_IS_OK(status
)) {
1396 tevent_req_nterror(req
, status
);
1400 /* Copy out parameters */
1403 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1405 /* Reset temporary structure */
1406 ZERO_STRUCT(state
->tmp
);
1408 if (DEBUGLEVEL
>= 10) {
1409 NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo
, &state
->orig
);
1412 tevent_req_done(req
);
1415 NTSTATUS
rpccli_dfs_ManagerGetConfigInfo_recv(struct tevent_req
*req
,
1416 TALLOC_CTX
*mem_ctx
,
1419 struct rpccli_dfs_ManagerGetConfigInfo_state
*state
= tevent_req_data(
1420 req
, struct rpccli_dfs_ManagerGetConfigInfo_state
);
1423 if (tevent_req_is_nterror(req
, &status
)) {
1424 tevent_req_received(req
);
1428 /* Steal possbile out parameters to the callers context */
1429 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1432 *result
= state
->orig
.out
.result
;
1434 tevent_req_received(req
);
1435 return NT_STATUS_OK
;
1438 NTSTATUS
rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client
*cli
,
1439 TALLOC_CTX
*mem_ctx
,
1442 struct dfs_ManagerGetConfigInfo r
;
1447 if (DEBUGLEVEL
>= 10) {
1448 NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo
, &r
);
1451 status
= cli
->dispatch(cli
,
1454 NDR_DFS_MANAGERGETCONFIGINFO
,
1457 if (!NT_STATUS_IS_OK(status
)) {
1461 if (DEBUGLEVEL
>= 10) {
1462 NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo
, &r
);
1465 if (NT_STATUS_IS_ERR(status
)) {
1469 /* Return variables */
1473 *werror
= r
.out
.result
;
1476 return werror_to_ntstatus(r
.out
.result
);
1479 struct rpccli_dfs_ManagerSendSiteInfo_state
{
1480 struct dfs_ManagerSendSiteInfo orig
;
1481 struct dfs_ManagerSendSiteInfo tmp
;
1482 TALLOC_CTX
*out_mem_ctx
;
1483 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1486 static void rpccli_dfs_ManagerSendSiteInfo_done(struct tevent_req
*subreq
);
1488 struct tevent_req
*rpccli_dfs_ManagerSendSiteInfo_send(TALLOC_CTX
*mem_ctx
,
1489 struct tevent_context
*ev
,
1490 struct rpc_pipe_client
*cli
)
1492 struct tevent_req
*req
;
1493 struct rpccli_dfs_ManagerSendSiteInfo_state
*state
;
1494 struct tevent_req
*subreq
;
1496 req
= tevent_req_create(mem_ctx
, &state
,
1497 struct rpccli_dfs_ManagerSendSiteInfo_state
);
1501 state
->out_mem_ctx
= NULL
;
1502 state
->dispatch_recv
= cli
->dispatch_recv
;
1506 /* Out parameters */
1509 ZERO_STRUCT(state
->orig
.out
.result
);
1511 if (DEBUGLEVEL
>= 10) {
1512 NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo
, &state
->orig
);
1515 /* make a temporary copy, that we pass to the dispatch function */
1516 state
->tmp
= state
->orig
;
1518 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1520 NDR_DFS_MANAGERSENDSITEINFO
,
1522 if (tevent_req_nomem(subreq
, req
)) {
1523 return tevent_req_post(req
, ev
);
1525 tevent_req_set_callback(subreq
, rpccli_dfs_ManagerSendSiteInfo_done
, req
);
1529 static void rpccli_dfs_ManagerSendSiteInfo_done(struct tevent_req
*subreq
)
1531 struct tevent_req
*req
= tevent_req_callback_data(
1532 subreq
, struct tevent_req
);
1533 struct rpccli_dfs_ManagerSendSiteInfo_state
*state
= tevent_req_data(
1534 req
, struct rpccli_dfs_ManagerSendSiteInfo_state
);
1536 TALLOC_CTX
*mem_ctx
;
1538 if (state
->out_mem_ctx
) {
1539 mem_ctx
= state
->out_mem_ctx
;
1544 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1545 TALLOC_FREE(subreq
);
1546 if (!NT_STATUS_IS_OK(status
)) {
1547 tevent_req_nterror(req
, status
);
1551 /* Copy out parameters */
1554 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1556 /* Reset temporary structure */
1557 ZERO_STRUCT(state
->tmp
);
1559 if (DEBUGLEVEL
>= 10) {
1560 NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo
, &state
->orig
);
1563 tevent_req_done(req
);
1566 NTSTATUS
rpccli_dfs_ManagerSendSiteInfo_recv(struct tevent_req
*req
,
1567 TALLOC_CTX
*mem_ctx
,
1570 struct rpccli_dfs_ManagerSendSiteInfo_state
*state
= tevent_req_data(
1571 req
, struct rpccli_dfs_ManagerSendSiteInfo_state
);
1574 if (tevent_req_is_nterror(req
, &status
)) {
1575 tevent_req_received(req
);
1579 /* Steal possbile out parameters to the callers context */
1580 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1583 *result
= state
->orig
.out
.result
;
1585 tevent_req_received(req
);
1586 return NT_STATUS_OK
;
1589 NTSTATUS
rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client
*cli
,
1590 TALLOC_CTX
*mem_ctx
,
1593 struct dfs_ManagerSendSiteInfo r
;
1598 if (DEBUGLEVEL
>= 10) {
1599 NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo
, &r
);
1602 status
= cli
->dispatch(cli
,
1605 NDR_DFS_MANAGERSENDSITEINFO
,
1608 if (!NT_STATUS_IS_OK(status
)) {
1612 if (DEBUGLEVEL
>= 10) {
1613 NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo
, &r
);
1616 if (NT_STATUS_IS_ERR(status
)) {
1620 /* Return variables */
1624 *werror
= r
.out
.result
;
1627 return werror_to_ntstatus(r
.out
.result
);
1630 struct rpccli_dfs_AddFtRoot_state
{
1631 struct dfs_AddFtRoot orig
;
1632 struct dfs_AddFtRoot tmp
;
1633 TALLOC_CTX
*out_mem_ctx
;
1634 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1637 static void rpccli_dfs_AddFtRoot_done(struct tevent_req
*subreq
);
1639 struct tevent_req
*rpccli_dfs_AddFtRoot_send(TALLOC_CTX
*mem_ctx
,
1640 struct tevent_context
*ev
,
1641 struct rpc_pipe_client
*cli
,
1642 const char *_servername
/* [in] [charset(UTF16)] */,
1643 const char *_dns_servername
/* [in] [charset(UTF16)] */,
1644 const char *_dfsname
/* [in] [charset(UTF16)] */,
1645 const char *_rootshare
/* [in] [charset(UTF16)] */,
1646 const char *_comment
/* [in] [charset(UTF16)] */,
1647 const char *_dfs_config_dn
/* [in] [charset(UTF16)] */,
1648 uint8_t _unknown1
/* [in] */,
1649 uint32_t _flags
/* [in] */,
1650 struct dfs_UnknownStruct
**_unknown2
/* [in,out] [unique] */)
1652 struct tevent_req
*req
;
1653 struct rpccli_dfs_AddFtRoot_state
*state
;
1654 struct tevent_req
*subreq
;
1656 req
= tevent_req_create(mem_ctx
, &state
,
1657 struct rpccli_dfs_AddFtRoot_state
);
1661 state
->out_mem_ctx
= NULL
;
1662 state
->dispatch_recv
= cli
->dispatch_recv
;
1665 state
->orig
.in
.servername
= _servername
;
1666 state
->orig
.in
.dns_servername
= _dns_servername
;
1667 state
->orig
.in
.dfsname
= _dfsname
;
1668 state
->orig
.in
.rootshare
= _rootshare
;
1669 state
->orig
.in
.comment
= _comment
;
1670 state
->orig
.in
.dfs_config_dn
= _dfs_config_dn
;
1671 state
->orig
.in
.unknown1
= _unknown1
;
1672 state
->orig
.in
.flags
= _flags
;
1673 state
->orig
.in
.unknown2
= _unknown2
;
1675 /* Out parameters */
1676 state
->orig
.out
.unknown2
= _unknown2
;
1679 ZERO_STRUCT(state
->orig
.out
.result
);
1681 if (DEBUGLEVEL
>= 10) {
1682 NDR_PRINT_IN_DEBUG(dfs_AddFtRoot
, &state
->orig
);
1685 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1686 "rpccli_dfs_AddFtRoot_out_memory");
1687 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1688 return tevent_req_post(req
, ev
);
1691 /* make a temporary copy, that we pass to the dispatch function */
1692 state
->tmp
= state
->orig
;
1694 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1698 if (tevent_req_nomem(subreq
, req
)) {
1699 return tevent_req_post(req
, ev
);
1701 tevent_req_set_callback(subreq
, rpccli_dfs_AddFtRoot_done
, req
);
1705 static void rpccli_dfs_AddFtRoot_done(struct tevent_req
*subreq
)
1707 struct tevent_req
*req
= tevent_req_callback_data(
1708 subreq
, struct tevent_req
);
1709 struct rpccli_dfs_AddFtRoot_state
*state
= tevent_req_data(
1710 req
, struct rpccli_dfs_AddFtRoot_state
);
1712 TALLOC_CTX
*mem_ctx
;
1714 if (state
->out_mem_ctx
) {
1715 mem_ctx
= state
->out_mem_ctx
;
1720 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1721 TALLOC_FREE(subreq
);
1722 if (!NT_STATUS_IS_OK(status
)) {
1723 tevent_req_nterror(req
, status
);
1727 /* Copy out parameters */
1728 if (state
->orig
.out
.unknown2
&& state
->tmp
.out
.unknown2
) {
1729 *state
->orig
.out
.unknown2
= *state
->tmp
.out
.unknown2
;
1733 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1735 /* Reset temporary structure */
1736 ZERO_STRUCT(state
->tmp
);
1738 if (DEBUGLEVEL
>= 10) {
1739 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot
, &state
->orig
);
1742 tevent_req_done(req
);
1745 NTSTATUS
rpccli_dfs_AddFtRoot_recv(struct tevent_req
*req
,
1746 TALLOC_CTX
*mem_ctx
,
1749 struct rpccli_dfs_AddFtRoot_state
*state
= tevent_req_data(
1750 req
, struct rpccli_dfs_AddFtRoot_state
);
1753 if (tevent_req_is_nterror(req
, &status
)) {
1754 tevent_req_received(req
);
1758 /* Steal possbile out parameters to the callers context */
1759 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1762 *result
= state
->orig
.out
.result
;
1764 tevent_req_received(req
);
1765 return NT_STATUS_OK
;
1768 NTSTATUS
rpccli_dfs_AddFtRoot(struct rpc_pipe_client
*cli
,
1769 TALLOC_CTX
*mem_ctx
,
1770 const char *servername
/* [in] [charset(UTF16)] */,
1771 const char *dns_servername
/* [in] [charset(UTF16)] */,
1772 const char *dfsname
/* [in] [charset(UTF16)] */,
1773 const char *rootshare
/* [in] [charset(UTF16)] */,
1774 const char *comment
/* [in] [charset(UTF16)] */,
1775 const char *dfs_config_dn
/* [in] [charset(UTF16)] */,
1776 uint8_t unknown1
/* [in] */,
1777 uint32_t flags
/* [in] */,
1778 struct dfs_UnknownStruct
**unknown2
/* [in,out] [unique] */,
1781 struct dfs_AddFtRoot r
;
1785 r
.in
.servername
= servername
;
1786 r
.in
.dns_servername
= dns_servername
;
1787 r
.in
.dfsname
= dfsname
;
1788 r
.in
.rootshare
= rootshare
;
1789 r
.in
.comment
= comment
;
1790 r
.in
.dfs_config_dn
= dfs_config_dn
;
1791 r
.in
.unknown1
= unknown1
;
1793 r
.in
.unknown2
= unknown2
;
1795 if (DEBUGLEVEL
>= 10) {
1796 NDR_PRINT_IN_DEBUG(dfs_AddFtRoot
, &r
);
1799 status
= cli
->dispatch(cli
,
1805 if (!NT_STATUS_IS_OK(status
)) {
1809 if (DEBUGLEVEL
>= 10) {
1810 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot
, &r
);
1813 if (NT_STATUS_IS_ERR(status
)) {
1817 /* Return variables */
1818 if (unknown2
&& r
.out
.unknown2
) {
1819 *unknown2
= *r
.out
.unknown2
;
1824 *werror
= r
.out
.result
;
1827 return werror_to_ntstatus(r
.out
.result
);
1830 struct rpccli_dfs_RemoveFtRoot_state
{
1831 struct dfs_RemoveFtRoot orig
;
1832 struct dfs_RemoveFtRoot tmp
;
1833 TALLOC_CTX
*out_mem_ctx
;
1834 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1837 static void rpccli_dfs_RemoveFtRoot_done(struct tevent_req
*subreq
);
1839 struct tevent_req
*rpccli_dfs_RemoveFtRoot_send(TALLOC_CTX
*mem_ctx
,
1840 struct tevent_context
*ev
,
1841 struct rpc_pipe_client
*cli
,
1842 const char *_servername
/* [in] [charset(UTF16)] */,
1843 const char *_dns_servername
/* [in] [charset(UTF16)] */,
1844 const char *_dfsname
/* [in] [charset(UTF16)] */,
1845 const char *_rootshare
/* [in] [charset(UTF16)] */,
1846 uint32_t _flags
/* [in] */,
1847 struct dfs_UnknownStruct
**_unknown
/* [in,out] [unique] */)
1849 struct tevent_req
*req
;
1850 struct rpccli_dfs_RemoveFtRoot_state
*state
;
1851 struct tevent_req
*subreq
;
1853 req
= tevent_req_create(mem_ctx
, &state
,
1854 struct rpccli_dfs_RemoveFtRoot_state
);
1858 state
->out_mem_ctx
= NULL
;
1859 state
->dispatch_recv
= cli
->dispatch_recv
;
1862 state
->orig
.in
.servername
= _servername
;
1863 state
->orig
.in
.dns_servername
= _dns_servername
;
1864 state
->orig
.in
.dfsname
= _dfsname
;
1865 state
->orig
.in
.rootshare
= _rootshare
;
1866 state
->orig
.in
.flags
= _flags
;
1867 state
->orig
.in
.unknown
= _unknown
;
1869 /* Out parameters */
1870 state
->orig
.out
.unknown
= _unknown
;
1873 ZERO_STRUCT(state
->orig
.out
.result
);
1875 if (DEBUGLEVEL
>= 10) {
1876 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot
, &state
->orig
);
1879 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1880 "rpccli_dfs_RemoveFtRoot_out_memory");
1881 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1882 return tevent_req_post(req
, ev
);
1885 /* make a temporary copy, that we pass to the dispatch function */
1886 state
->tmp
= state
->orig
;
1888 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1890 NDR_DFS_REMOVEFTROOT
,
1892 if (tevent_req_nomem(subreq
, req
)) {
1893 return tevent_req_post(req
, ev
);
1895 tevent_req_set_callback(subreq
, rpccli_dfs_RemoveFtRoot_done
, req
);
1899 static void rpccli_dfs_RemoveFtRoot_done(struct tevent_req
*subreq
)
1901 struct tevent_req
*req
= tevent_req_callback_data(
1902 subreq
, struct tevent_req
);
1903 struct rpccli_dfs_RemoveFtRoot_state
*state
= tevent_req_data(
1904 req
, struct rpccli_dfs_RemoveFtRoot_state
);
1906 TALLOC_CTX
*mem_ctx
;
1908 if (state
->out_mem_ctx
) {
1909 mem_ctx
= state
->out_mem_ctx
;
1914 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1915 TALLOC_FREE(subreq
);
1916 if (!NT_STATUS_IS_OK(status
)) {
1917 tevent_req_nterror(req
, status
);
1921 /* Copy out parameters */
1922 if (state
->orig
.out
.unknown
&& state
->tmp
.out
.unknown
) {
1923 *state
->orig
.out
.unknown
= *state
->tmp
.out
.unknown
;
1927 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1929 /* Reset temporary structure */
1930 ZERO_STRUCT(state
->tmp
);
1932 if (DEBUGLEVEL
>= 10) {
1933 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot
, &state
->orig
);
1936 tevent_req_done(req
);
1939 NTSTATUS
rpccli_dfs_RemoveFtRoot_recv(struct tevent_req
*req
,
1940 TALLOC_CTX
*mem_ctx
,
1943 struct rpccli_dfs_RemoveFtRoot_state
*state
= tevent_req_data(
1944 req
, struct rpccli_dfs_RemoveFtRoot_state
);
1947 if (tevent_req_is_nterror(req
, &status
)) {
1948 tevent_req_received(req
);
1952 /* Steal possbile out parameters to the callers context */
1953 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1956 *result
= state
->orig
.out
.result
;
1958 tevent_req_received(req
);
1959 return NT_STATUS_OK
;
1962 NTSTATUS
rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client
*cli
,
1963 TALLOC_CTX
*mem_ctx
,
1964 const char *servername
/* [in] [charset(UTF16)] */,
1965 const char *dns_servername
/* [in] [charset(UTF16)] */,
1966 const char *dfsname
/* [in] [charset(UTF16)] */,
1967 const char *rootshare
/* [in] [charset(UTF16)] */,
1968 uint32_t flags
/* [in] */,
1969 struct dfs_UnknownStruct
**unknown
/* [in,out] [unique] */,
1972 struct dfs_RemoveFtRoot r
;
1976 r
.in
.servername
= servername
;
1977 r
.in
.dns_servername
= dns_servername
;
1978 r
.in
.dfsname
= dfsname
;
1979 r
.in
.rootshare
= rootshare
;
1981 r
.in
.unknown
= unknown
;
1983 if (DEBUGLEVEL
>= 10) {
1984 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot
, &r
);
1987 status
= cli
->dispatch(cli
,
1990 NDR_DFS_REMOVEFTROOT
,
1993 if (!NT_STATUS_IS_OK(status
)) {
1997 if (DEBUGLEVEL
>= 10) {
1998 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot
, &r
);
2001 if (NT_STATUS_IS_ERR(status
)) {
2005 /* Return variables */
2006 if (unknown
&& r
.out
.unknown
) {
2007 *unknown
= *r
.out
.unknown
;
2012 *werror
= r
.out
.result
;
2015 return werror_to_ntstatus(r
.out
.result
);
2018 struct rpccli_dfs_AddStdRoot_state
{
2019 struct dfs_AddStdRoot orig
;
2020 struct dfs_AddStdRoot tmp
;
2021 TALLOC_CTX
*out_mem_ctx
;
2022 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2025 static void rpccli_dfs_AddStdRoot_done(struct tevent_req
*subreq
);
2027 struct tevent_req
*rpccli_dfs_AddStdRoot_send(TALLOC_CTX
*mem_ctx
,
2028 struct tevent_context
*ev
,
2029 struct rpc_pipe_client
*cli
,
2030 const char *_servername
/* [in] [charset(UTF16)] */,
2031 const char *_rootshare
/* [in] [charset(UTF16)] */,
2032 const char *_comment
/* [in] [charset(UTF16)] */,
2033 uint32_t _flags
/* [in] */)
2035 struct tevent_req
*req
;
2036 struct rpccli_dfs_AddStdRoot_state
*state
;
2037 struct tevent_req
*subreq
;
2039 req
= tevent_req_create(mem_ctx
, &state
,
2040 struct rpccli_dfs_AddStdRoot_state
);
2044 state
->out_mem_ctx
= NULL
;
2045 state
->dispatch_recv
= cli
->dispatch_recv
;
2048 state
->orig
.in
.servername
= _servername
;
2049 state
->orig
.in
.rootshare
= _rootshare
;
2050 state
->orig
.in
.comment
= _comment
;
2051 state
->orig
.in
.flags
= _flags
;
2053 /* Out parameters */
2056 ZERO_STRUCT(state
->orig
.out
.result
);
2058 if (DEBUGLEVEL
>= 10) {
2059 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot
, &state
->orig
);
2062 /* make a temporary copy, that we pass to the dispatch function */
2063 state
->tmp
= state
->orig
;
2065 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2069 if (tevent_req_nomem(subreq
, req
)) {
2070 return tevent_req_post(req
, ev
);
2072 tevent_req_set_callback(subreq
, rpccli_dfs_AddStdRoot_done
, req
);
2076 static void rpccli_dfs_AddStdRoot_done(struct tevent_req
*subreq
)
2078 struct tevent_req
*req
= tevent_req_callback_data(
2079 subreq
, struct tevent_req
);
2080 struct rpccli_dfs_AddStdRoot_state
*state
= tevent_req_data(
2081 req
, struct rpccli_dfs_AddStdRoot_state
);
2083 TALLOC_CTX
*mem_ctx
;
2085 if (state
->out_mem_ctx
) {
2086 mem_ctx
= state
->out_mem_ctx
;
2091 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2092 TALLOC_FREE(subreq
);
2093 if (!NT_STATUS_IS_OK(status
)) {
2094 tevent_req_nterror(req
, status
);
2098 /* Copy out parameters */
2101 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2103 /* Reset temporary structure */
2104 ZERO_STRUCT(state
->tmp
);
2106 if (DEBUGLEVEL
>= 10) {
2107 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot
, &state
->orig
);
2110 tevent_req_done(req
);
2113 NTSTATUS
rpccli_dfs_AddStdRoot_recv(struct tevent_req
*req
,
2114 TALLOC_CTX
*mem_ctx
,
2117 struct rpccli_dfs_AddStdRoot_state
*state
= tevent_req_data(
2118 req
, struct rpccli_dfs_AddStdRoot_state
);
2121 if (tevent_req_is_nterror(req
, &status
)) {
2122 tevent_req_received(req
);
2126 /* Steal possbile out parameters to the callers context */
2127 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2130 *result
= state
->orig
.out
.result
;
2132 tevent_req_received(req
);
2133 return NT_STATUS_OK
;
2136 NTSTATUS
rpccli_dfs_AddStdRoot(struct rpc_pipe_client
*cli
,
2137 TALLOC_CTX
*mem_ctx
,
2138 const char *servername
/* [in] [charset(UTF16)] */,
2139 const char *rootshare
/* [in] [charset(UTF16)] */,
2140 const char *comment
/* [in] [charset(UTF16)] */,
2141 uint32_t flags
/* [in] */,
2144 struct dfs_AddStdRoot r
;
2148 r
.in
.servername
= servername
;
2149 r
.in
.rootshare
= rootshare
;
2150 r
.in
.comment
= comment
;
2153 if (DEBUGLEVEL
>= 10) {
2154 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot
, &r
);
2157 status
= cli
->dispatch(cli
,
2163 if (!NT_STATUS_IS_OK(status
)) {
2167 if (DEBUGLEVEL
>= 10) {
2168 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot
, &r
);
2171 if (NT_STATUS_IS_ERR(status
)) {
2175 /* Return variables */
2179 *werror
= r
.out
.result
;
2182 return werror_to_ntstatus(r
.out
.result
);
2185 struct rpccli_dfs_RemoveStdRoot_state
{
2186 struct dfs_RemoveStdRoot orig
;
2187 struct dfs_RemoveStdRoot tmp
;
2188 TALLOC_CTX
*out_mem_ctx
;
2189 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2192 static void rpccli_dfs_RemoveStdRoot_done(struct tevent_req
*subreq
);
2194 struct tevent_req
*rpccli_dfs_RemoveStdRoot_send(TALLOC_CTX
*mem_ctx
,
2195 struct tevent_context
*ev
,
2196 struct rpc_pipe_client
*cli
,
2197 const char *_servername
/* [in] [charset(UTF16)] */,
2198 const char *_rootshare
/* [in] [charset(UTF16)] */,
2199 uint32_t _flags
/* [in] */)
2201 struct tevent_req
*req
;
2202 struct rpccli_dfs_RemoveStdRoot_state
*state
;
2203 struct tevent_req
*subreq
;
2205 req
= tevent_req_create(mem_ctx
, &state
,
2206 struct rpccli_dfs_RemoveStdRoot_state
);
2210 state
->out_mem_ctx
= NULL
;
2211 state
->dispatch_recv
= cli
->dispatch_recv
;
2214 state
->orig
.in
.servername
= _servername
;
2215 state
->orig
.in
.rootshare
= _rootshare
;
2216 state
->orig
.in
.flags
= _flags
;
2218 /* Out parameters */
2221 ZERO_STRUCT(state
->orig
.out
.result
);
2223 if (DEBUGLEVEL
>= 10) {
2224 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot
, &state
->orig
);
2227 /* make a temporary copy, that we pass to the dispatch function */
2228 state
->tmp
= state
->orig
;
2230 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2232 NDR_DFS_REMOVESTDROOT
,
2234 if (tevent_req_nomem(subreq
, req
)) {
2235 return tevent_req_post(req
, ev
);
2237 tevent_req_set_callback(subreq
, rpccli_dfs_RemoveStdRoot_done
, req
);
2241 static void rpccli_dfs_RemoveStdRoot_done(struct tevent_req
*subreq
)
2243 struct tevent_req
*req
= tevent_req_callback_data(
2244 subreq
, struct tevent_req
);
2245 struct rpccli_dfs_RemoveStdRoot_state
*state
= tevent_req_data(
2246 req
, struct rpccli_dfs_RemoveStdRoot_state
);
2248 TALLOC_CTX
*mem_ctx
;
2250 if (state
->out_mem_ctx
) {
2251 mem_ctx
= state
->out_mem_ctx
;
2256 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2257 TALLOC_FREE(subreq
);
2258 if (!NT_STATUS_IS_OK(status
)) {
2259 tevent_req_nterror(req
, status
);
2263 /* Copy out parameters */
2266 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2268 /* Reset temporary structure */
2269 ZERO_STRUCT(state
->tmp
);
2271 if (DEBUGLEVEL
>= 10) {
2272 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot
, &state
->orig
);
2275 tevent_req_done(req
);
2278 NTSTATUS
rpccli_dfs_RemoveStdRoot_recv(struct tevent_req
*req
,
2279 TALLOC_CTX
*mem_ctx
,
2282 struct rpccli_dfs_RemoveStdRoot_state
*state
= tevent_req_data(
2283 req
, struct rpccli_dfs_RemoveStdRoot_state
);
2286 if (tevent_req_is_nterror(req
, &status
)) {
2287 tevent_req_received(req
);
2291 /* Steal possbile out parameters to the callers context */
2292 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2295 *result
= state
->orig
.out
.result
;
2297 tevent_req_received(req
);
2298 return NT_STATUS_OK
;
2301 NTSTATUS
rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client
*cli
,
2302 TALLOC_CTX
*mem_ctx
,
2303 const char *servername
/* [in] [charset(UTF16)] */,
2304 const char *rootshare
/* [in] [charset(UTF16)] */,
2305 uint32_t flags
/* [in] */,
2308 struct dfs_RemoveStdRoot r
;
2312 r
.in
.servername
= servername
;
2313 r
.in
.rootshare
= rootshare
;
2316 if (DEBUGLEVEL
>= 10) {
2317 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot
, &r
);
2320 status
= cli
->dispatch(cli
,
2323 NDR_DFS_REMOVESTDROOT
,
2326 if (!NT_STATUS_IS_OK(status
)) {
2330 if (DEBUGLEVEL
>= 10) {
2331 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot
, &r
);
2334 if (NT_STATUS_IS_ERR(status
)) {
2338 /* Return variables */
2342 *werror
= r
.out
.result
;
2345 return werror_to_ntstatus(r
.out
.result
);
2348 struct rpccli_dfs_ManagerInitialize_state
{
2349 struct dfs_ManagerInitialize orig
;
2350 struct dfs_ManagerInitialize tmp
;
2351 TALLOC_CTX
*out_mem_ctx
;
2352 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2355 static void rpccli_dfs_ManagerInitialize_done(struct tevent_req
*subreq
);
2357 struct tevent_req
*rpccli_dfs_ManagerInitialize_send(TALLOC_CTX
*mem_ctx
,
2358 struct tevent_context
*ev
,
2359 struct rpc_pipe_client
*cli
,
2360 const char *_servername
/* [in] [ref,charset(UTF16)] */,
2361 uint32_t _flags
/* [in] */)
2363 struct tevent_req
*req
;
2364 struct rpccli_dfs_ManagerInitialize_state
*state
;
2365 struct tevent_req
*subreq
;
2367 req
= tevent_req_create(mem_ctx
, &state
,
2368 struct rpccli_dfs_ManagerInitialize_state
);
2372 state
->out_mem_ctx
= NULL
;
2373 state
->dispatch_recv
= cli
->dispatch_recv
;
2376 state
->orig
.in
.servername
= _servername
;
2377 state
->orig
.in
.flags
= _flags
;
2379 /* Out parameters */
2382 ZERO_STRUCT(state
->orig
.out
.result
);
2384 if (DEBUGLEVEL
>= 10) {
2385 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize
, &state
->orig
);
2388 /* make a temporary copy, that we pass to the dispatch function */
2389 state
->tmp
= state
->orig
;
2391 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2393 NDR_DFS_MANAGERINITIALIZE
,
2395 if (tevent_req_nomem(subreq
, req
)) {
2396 return tevent_req_post(req
, ev
);
2398 tevent_req_set_callback(subreq
, rpccli_dfs_ManagerInitialize_done
, req
);
2402 static void rpccli_dfs_ManagerInitialize_done(struct tevent_req
*subreq
)
2404 struct tevent_req
*req
= tevent_req_callback_data(
2405 subreq
, struct tevent_req
);
2406 struct rpccli_dfs_ManagerInitialize_state
*state
= tevent_req_data(
2407 req
, struct rpccli_dfs_ManagerInitialize_state
);
2409 TALLOC_CTX
*mem_ctx
;
2411 if (state
->out_mem_ctx
) {
2412 mem_ctx
= state
->out_mem_ctx
;
2417 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2418 TALLOC_FREE(subreq
);
2419 if (!NT_STATUS_IS_OK(status
)) {
2420 tevent_req_nterror(req
, status
);
2424 /* Copy out parameters */
2427 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2429 /* Reset temporary structure */
2430 ZERO_STRUCT(state
->tmp
);
2432 if (DEBUGLEVEL
>= 10) {
2433 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize
, &state
->orig
);
2436 tevent_req_done(req
);
2439 NTSTATUS
rpccli_dfs_ManagerInitialize_recv(struct tevent_req
*req
,
2440 TALLOC_CTX
*mem_ctx
,
2443 struct rpccli_dfs_ManagerInitialize_state
*state
= tevent_req_data(
2444 req
, struct rpccli_dfs_ManagerInitialize_state
);
2447 if (tevent_req_is_nterror(req
, &status
)) {
2448 tevent_req_received(req
);
2452 /* Steal possbile out parameters to the callers context */
2453 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2456 *result
= state
->orig
.out
.result
;
2458 tevent_req_received(req
);
2459 return NT_STATUS_OK
;
2462 NTSTATUS
rpccli_dfs_ManagerInitialize(struct rpc_pipe_client
*cli
,
2463 TALLOC_CTX
*mem_ctx
,
2464 const char *servername
/* [in] [ref,charset(UTF16)] */,
2465 uint32_t flags
/* [in] */,
2468 struct dfs_ManagerInitialize r
;
2472 r
.in
.servername
= servername
;
2475 if (DEBUGLEVEL
>= 10) {
2476 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize
, &r
);
2479 status
= cli
->dispatch(cli
,
2482 NDR_DFS_MANAGERINITIALIZE
,
2485 if (!NT_STATUS_IS_OK(status
)) {
2489 if (DEBUGLEVEL
>= 10) {
2490 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize
, &r
);
2493 if (NT_STATUS_IS_ERR(status
)) {
2497 /* Return variables */
2501 *werror
= r
.out
.result
;
2504 return werror_to_ntstatus(r
.out
.result
);
2507 struct rpccli_dfs_AddStdRootForced_state
{
2508 struct dfs_AddStdRootForced orig
;
2509 struct dfs_AddStdRootForced tmp
;
2510 TALLOC_CTX
*out_mem_ctx
;
2511 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2514 static void rpccli_dfs_AddStdRootForced_done(struct tevent_req
*subreq
);
2516 struct tevent_req
*rpccli_dfs_AddStdRootForced_send(TALLOC_CTX
*mem_ctx
,
2517 struct tevent_context
*ev
,
2518 struct rpc_pipe_client
*cli
,
2519 const char *_servername
/* [in] [charset(UTF16)] */,
2520 const char *_rootshare
/* [in] [charset(UTF16)] */,
2521 const char *_comment
/* [in] [charset(UTF16)] */,
2522 const char *_store
/* [in] [charset(UTF16)] */)
2524 struct tevent_req
*req
;
2525 struct rpccli_dfs_AddStdRootForced_state
*state
;
2526 struct tevent_req
*subreq
;
2528 req
= tevent_req_create(mem_ctx
, &state
,
2529 struct rpccli_dfs_AddStdRootForced_state
);
2533 state
->out_mem_ctx
= NULL
;
2534 state
->dispatch_recv
= cli
->dispatch_recv
;
2537 state
->orig
.in
.servername
= _servername
;
2538 state
->orig
.in
.rootshare
= _rootshare
;
2539 state
->orig
.in
.comment
= _comment
;
2540 state
->orig
.in
.store
= _store
;
2542 /* Out parameters */
2545 ZERO_STRUCT(state
->orig
.out
.result
);
2547 if (DEBUGLEVEL
>= 10) {
2548 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced
, &state
->orig
);
2551 /* make a temporary copy, that we pass to the dispatch function */
2552 state
->tmp
= state
->orig
;
2554 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2556 NDR_DFS_ADDSTDROOTFORCED
,
2558 if (tevent_req_nomem(subreq
, req
)) {
2559 return tevent_req_post(req
, ev
);
2561 tevent_req_set_callback(subreq
, rpccli_dfs_AddStdRootForced_done
, req
);
2565 static void rpccli_dfs_AddStdRootForced_done(struct tevent_req
*subreq
)
2567 struct tevent_req
*req
= tevent_req_callback_data(
2568 subreq
, struct tevent_req
);
2569 struct rpccli_dfs_AddStdRootForced_state
*state
= tevent_req_data(
2570 req
, struct rpccli_dfs_AddStdRootForced_state
);
2572 TALLOC_CTX
*mem_ctx
;
2574 if (state
->out_mem_ctx
) {
2575 mem_ctx
= state
->out_mem_ctx
;
2580 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2581 TALLOC_FREE(subreq
);
2582 if (!NT_STATUS_IS_OK(status
)) {
2583 tevent_req_nterror(req
, status
);
2587 /* Copy out parameters */
2590 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2592 /* Reset temporary structure */
2593 ZERO_STRUCT(state
->tmp
);
2595 if (DEBUGLEVEL
>= 10) {
2596 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced
, &state
->orig
);
2599 tevent_req_done(req
);
2602 NTSTATUS
rpccli_dfs_AddStdRootForced_recv(struct tevent_req
*req
,
2603 TALLOC_CTX
*mem_ctx
,
2606 struct rpccli_dfs_AddStdRootForced_state
*state
= tevent_req_data(
2607 req
, struct rpccli_dfs_AddStdRootForced_state
);
2610 if (tevent_req_is_nterror(req
, &status
)) {
2611 tevent_req_received(req
);
2615 /* Steal possbile out parameters to the callers context */
2616 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2619 *result
= state
->orig
.out
.result
;
2621 tevent_req_received(req
);
2622 return NT_STATUS_OK
;
2625 NTSTATUS
rpccli_dfs_AddStdRootForced(struct rpc_pipe_client
*cli
,
2626 TALLOC_CTX
*mem_ctx
,
2627 const char *servername
/* [in] [charset(UTF16)] */,
2628 const char *rootshare
/* [in] [charset(UTF16)] */,
2629 const char *comment
/* [in] [charset(UTF16)] */,
2630 const char *store
/* [in] [charset(UTF16)] */,
2633 struct dfs_AddStdRootForced r
;
2637 r
.in
.servername
= servername
;
2638 r
.in
.rootshare
= rootshare
;
2639 r
.in
.comment
= comment
;
2642 if (DEBUGLEVEL
>= 10) {
2643 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced
, &r
);
2646 status
= cli
->dispatch(cli
,
2649 NDR_DFS_ADDSTDROOTFORCED
,
2652 if (!NT_STATUS_IS_OK(status
)) {
2656 if (DEBUGLEVEL
>= 10) {
2657 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced
, &r
);
2660 if (NT_STATUS_IS_ERR(status
)) {
2664 /* Return variables */
2668 *werror
= r
.out
.result
;
2671 return werror_to_ntstatus(r
.out
.result
);
2674 struct rpccli_dfs_GetDcAddress_state
{
2675 struct dfs_GetDcAddress orig
;
2676 struct dfs_GetDcAddress tmp
;
2677 TALLOC_CTX
*out_mem_ctx
;
2678 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2681 static void rpccli_dfs_GetDcAddress_done(struct tevent_req
*subreq
);
2683 struct tevent_req
*rpccli_dfs_GetDcAddress_send(TALLOC_CTX
*mem_ctx
,
2684 struct tevent_context
*ev
,
2685 struct rpc_pipe_client
*cli
,
2686 const char *_servername
/* [in] [charset(UTF16)] */,
2687 const char **_server_fullname
/* [in,out] [ref,charset(UTF16)] */,
2688 uint8_t *_is_root
/* [in,out] [ref] */,
2689 uint32_t *_ttl
/* [in,out] [ref] */)
2691 struct tevent_req
*req
;
2692 struct rpccli_dfs_GetDcAddress_state
*state
;
2693 struct tevent_req
*subreq
;
2695 req
= tevent_req_create(mem_ctx
, &state
,
2696 struct rpccli_dfs_GetDcAddress_state
);
2700 state
->out_mem_ctx
= NULL
;
2701 state
->dispatch_recv
= cli
->dispatch_recv
;
2704 state
->orig
.in
.servername
= _servername
;
2705 state
->orig
.in
.server_fullname
= _server_fullname
;
2706 state
->orig
.in
.is_root
= _is_root
;
2707 state
->orig
.in
.ttl
= _ttl
;
2709 /* Out parameters */
2710 state
->orig
.out
.server_fullname
= _server_fullname
;
2711 state
->orig
.out
.is_root
= _is_root
;
2712 state
->orig
.out
.ttl
= _ttl
;
2715 ZERO_STRUCT(state
->orig
.out
.result
);
2717 if (DEBUGLEVEL
>= 10) {
2718 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress
, &state
->orig
);
2721 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2722 "rpccli_dfs_GetDcAddress_out_memory");
2723 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2724 return tevent_req_post(req
, ev
);
2727 /* make a temporary copy, that we pass to the dispatch function */
2728 state
->tmp
= state
->orig
;
2730 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2732 NDR_DFS_GETDCADDRESS
,
2734 if (tevent_req_nomem(subreq
, req
)) {
2735 return tevent_req_post(req
, ev
);
2737 tevent_req_set_callback(subreq
, rpccli_dfs_GetDcAddress_done
, req
);
2741 static void rpccli_dfs_GetDcAddress_done(struct tevent_req
*subreq
)
2743 struct tevent_req
*req
= tevent_req_callback_data(
2744 subreq
, struct tevent_req
);
2745 struct rpccli_dfs_GetDcAddress_state
*state
= tevent_req_data(
2746 req
, struct rpccli_dfs_GetDcAddress_state
);
2748 TALLOC_CTX
*mem_ctx
;
2750 if (state
->out_mem_ctx
) {
2751 mem_ctx
= state
->out_mem_ctx
;
2756 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2757 TALLOC_FREE(subreq
);
2758 if (!NT_STATUS_IS_OK(status
)) {
2759 tevent_req_nterror(req
, status
);
2763 /* Copy out parameters */
2764 *state
->orig
.out
.server_fullname
= *state
->tmp
.out
.server_fullname
;
2765 *state
->orig
.out
.is_root
= *state
->tmp
.out
.is_root
;
2766 *state
->orig
.out
.ttl
= *state
->tmp
.out
.ttl
;
2769 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2771 /* Reset temporary structure */
2772 ZERO_STRUCT(state
->tmp
);
2774 if (DEBUGLEVEL
>= 10) {
2775 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress
, &state
->orig
);
2778 tevent_req_done(req
);
2781 NTSTATUS
rpccli_dfs_GetDcAddress_recv(struct tevent_req
*req
,
2782 TALLOC_CTX
*mem_ctx
,
2785 struct rpccli_dfs_GetDcAddress_state
*state
= tevent_req_data(
2786 req
, struct rpccli_dfs_GetDcAddress_state
);
2789 if (tevent_req_is_nterror(req
, &status
)) {
2790 tevent_req_received(req
);
2794 /* Steal possbile out parameters to the callers context */
2795 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2798 *result
= state
->orig
.out
.result
;
2800 tevent_req_received(req
);
2801 return NT_STATUS_OK
;
2804 NTSTATUS
rpccli_dfs_GetDcAddress(struct rpc_pipe_client
*cli
,
2805 TALLOC_CTX
*mem_ctx
,
2806 const char *servername
/* [in] [charset(UTF16)] */,
2807 const char **server_fullname
/* [in,out] [ref,charset(UTF16)] */,
2808 uint8_t *is_root
/* [in,out] [ref] */,
2809 uint32_t *ttl
/* [in,out] [ref] */,
2812 struct dfs_GetDcAddress r
;
2816 r
.in
.servername
= servername
;
2817 r
.in
.server_fullname
= server_fullname
;
2818 r
.in
.is_root
= is_root
;
2821 if (DEBUGLEVEL
>= 10) {
2822 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress
, &r
);
2825 status
= cli
->dispatch(cli
,
2828 NDR_DFS_GETDCADDRESS
,
2831 if (!NT_STATUS_IS_OK(status
)) {
2835 if (DEBUGLEVEL
>= 10) {
2836 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress
, &r
);
2839 if (NT_STATUS_IS_ERR(status
)) {
2843 /* Return variables */
2844 *server_fullname
= *r
.out
.server_fullname
;
2845 *is_root
= *r
.out
.is_root
;
2850 *werror
= r
.out
.result
;
2853 return werror_to_ntstatus(r
.out
.result
);
2856 struct rpccli_dfs_SetDcAddress_state
{
2857 struct dfs_SetDcAddress orig
;
2858 struct dfs_SetDcAddress tmp
;
2859 TALLOC_CTX
*out_mem_ctx
;
2860 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2863 static void rpccli_dfs_SetDcAddress_done(struct tevent_req
*subreq
);
2865 struct tevent_req
*rpccli_dfs_SetDcAddress_send(TALLOC_CTX
*mem_ctx
,
2866 struct tevent_context
*ev
,
2867 struct rpc_pipe_client
*cli
,
2868 const char *_servername
/* [in] [charset(UTF16)] */,
2869 const char *_server_fullname
/* [in] [charset(UTF16)] */,
2870 uint32_t _flags
/* [in] */,
2871 uint32_t _ttl
/* [in] */)
2873 struct tevent_req
*req
;
2874 struct rpccli_dfs_SetDcAddress_state
*state
;
2875 struct tevent_req
*subreq
;
2877 req
= tevent_req_create(mem_ctx
, &state
,
2878 struct rpccli_dfs_SetDcAddress_state
);
2882 state
->out_mem_ctx
= NULL
;
2883 state
->dispatch_recv
= cli
->dispatch_recv
;
2886 state
->orig
.in
.servername
= _servername
;
2887 state
->orig
.in
.server_fullname
= _server_fullname
;
2888 state
->orig
.in
.flags
= _flags
;
2889 state
->orig
.in
.ttl
= _ttl
;
2891 /* Out parameters */
2894 ZERO_STRUCT(state
->orig
.out
.result
);
2896 if (DEBUGLEVEL
>= 10) {
2897 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress
, &state
->orig
);
2900 /* make a temporary copy, that we pass to the dispatch function */
2901 state
->tmp
= state
->orig
;
2903 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2905 NDR_DFS_SETDCADDRESS
,
2907 if (tevent_req_nomem(subreq
, req
)) {
2908 return tevent_req_post(req
, ev
);
2910 tevent_req_set_callback(subreq
, rpccli_dfs_SetDcAddress_done
, req
);
2914 static void rpccli_dfs_SetDcAddress_done(struct tevent_req
*subreq
)
2916 struct tevent_req
*req
= tevent_req_callback_data(
2917 subreq
, struct tevent_req
);
2918 struct rpccli_dfs_SetDcAddress_state
*state
= tevent_req_data(
2919 req
, struct rpccli_dfs_SetDcAddress_state
);
2921 TALLOC_CTX
*mem_ctx
;
2923 if (state
->out_mem_ctx
) {
2924 mem_ctx
= state
->out_mem_ctx
;
2929 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2930 TALLOC_FREE(subreq
);
2931 if (!NT_STATUS_IS_OK(status
)) {
2932 tevent_req_nterror(req
, status
);
2936 /* Copy out parameters */
2939 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2941 /* Reset temporary structure */
2942 ZERO_STRUCT(state
->tmp
);
2944 if (DEBUGLEVEL
>= 10) {
2945 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress
, &state
->orig
);
2948 tevent_req_done(req
);
2951 NTSTATUS
rpccli_dfs_SetDcAddress_recv(struct tevent_req
*req
,
2952 TALLOC_CTX
*mem_ctx
,
2955 struct rpccli_dfs_SetDcAddress_state
*state
= tevent_req_data(
2956 req
, struct rpccli_dfs_SetDcAddress_state
);
2959 if (tevent_req_is_nterror(req
, &status
)) {
2960 tevent_req_received(req
);
2964 /* Steal possbile out parameters to the callers context */
2965 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2968 *result
= state
->orig
.out
.result
;
2970 tevent_req_received(req
);
2971 return NT_STATUS_OK
;
2974 NTSTATUS
rpccli_dfs_SetDcAddress(struct rpc_pipe_client
*cli
,
2975 TALLOC_CTX
*mem_ctx
,
2976 const char *servername
/* [in] [charset(UTF16)] */,
2977 const char *server_fullname
/* [in] [charset(UTF16)] */,
2978 uint32_t flags
/* [in] */,
2979 uint32_t ttl
/* [in] */,
2982 struct dfs_SetDcAddress r
;
2986 r
.in
.servername
= servername
;
2987 r
.in
.server_fullname
= server_fullname
;
2991 if (DEBUGLEVEL
>= 10) {
2992 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress
, &r
);
2995 status
= cli
->dispatch(cli
,
2998 NDR_DFS_SETDCADDRESS
,
3001 if (!NT_STATUS_IS_OK(status
)) {
3005 if (DEBUGLEVEL
>= 10) {
3006 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress
, &r
);
3009 if (NT_STATUS_IS_ERR(status
)) {
3013 /* Return variables */
3017 *werror
= r
.out
.result
;
3020 return werror_to_ntstatus(r
.out
.result
);
3023 struct rpccli_dfs_FlushFtTable_state
{
3024 struct dfs_FlushFtTable orig
;
3025 struct dfs_FlushFtTable tmp
;
3026 TALLOC_CTX
*out_mem_ctx
;
3027 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3030 static void rpccli_dfs_FlushFtTable_done(struct tevent_req
*subreq
);
3032 struct tevent_req
*rpccli_dfs_FlushFtTable_send(TALLOC_CTX
*mem_ctx
,
3033 struct tevent_context
*ev
,
3034 struct rpc_pipe_client
*cli
,
3035 const char *_servername
/* [in] [charset(UTF16)] */,
3036 const char *_rootshare
/* [in] [charset(UTF16)] */)
3038 struct tevent_req
*req
;
3039 struct rpccli_dfs_FlushFtTable_state
*state
;
3040 struct tevent_req
*subreq
;
3042 req
= tevent_req_create(mem_ctx
, &state
,
3043 struct rpccli_dfs_FlushFtTable_state
);
3047 state
->out_mem_ctx
= NULL
;
3048 state
->dispatch_recv
= cli
->dispatch_recv
;
3051 state
->orig
.in
.servername
= _servername
;
3052 state
->orig
.in
.rootshare
= _rootshare
;
3054 /* Out parameters */
3057 ZERO_STRUCT(state
->orig
.out
.result
);
3059 if (DEBUGLEVEL
>= 10) {
3060 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable
, &state
->orig
);
3063 /* make a temporary copy, that we pass to the dispatch function */
3064 state
->tmp
= state
->orig
;
3066 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3068 NDR_DFS_FLUSHFTTABLE
,
3070 if (tevent_req_nomem(subreq
, req
)) {
3071 return tevent_req_post(req
, ev
);
3073 tevent_req_set_callback(subreq
, rpccli_dfs_FlushFtTable_done
, req
);
3077 static void rpccli_dfs_FlushFtTable_done(struct tevent_req
*subreq
)
3079 struct tevent_req
*req
= tevent_req_callback_data(
3080 subreq
, struct tevent_req
);
3081 struct rpccli_dfs_FlushFtTable_state
*state
= tevent_req_data(
3082 req
, struct rpccli_dfs_FlushFtTable_state
);
3084 TALLOC_CTX
*mem_ctx
;
3086 if (state
->out_mem_ctx
) {
3087 mem_ctx
= state
->out_mem_ctx
;
3092 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3093 TALLOC_FREE(subreq
);
3094 if (!NT_STATUS_IS_OK(status
)) {
3095 tevent_req_nterror(req
, status
);
3099 /* Copy out parameters */
3102 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3104 /* Reset temporary structure */
3105 ZERO_STRUCT(state
->tmp
);
3107 if (DEBUGLEVEL
>= 10) {
3108 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable
, &state
->orig
);
3111 tevent_req_done(req
);
3114 NTSTATUS
rpccli_dfs_FlushFtTable_recv(struct tevent_req
*req
,
3115 TALLOC_CTX
*mem_ctx
,
3118 struct rpccli_dfs_FlushFtTable_state
*state
= tevent_req_data(
3119 req
, struct rpccli_dfs_FlushFtTable_state
);
3122 if (tevent_req_is_nterror(req
, &status
)) {
3123 tevent_req_received(req
);
3127 /* Steal possbile out parameters to the callers context */
3128 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3131 *result
= state
->orig
.out
.result
;
3133 tevent_req_received(req
);
3134 return NT_STATUS_OK
;
3137 NTSTATUS
rpccli_dfs_FlushFtTable(struct rpc_pipe_client
*cli
,
3138 TALLOC_CTX
*mem_ctx
,
3139 const char *servername
/* [in] [charset(UTF16)] */,
3140 const char *rootshare
/* [in] [charset(UTF16)] */,
3143 struct dfs_FlushFtTable r
;
3147 r
.in
.servername
= servername
;
3148 r
.in
.rootshare
= rootshare
;
3150 if (DEBUGLEVEL
>= 10) {
3151 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable
, &r
);
3154 status
= cli
->dispatch(cli
,
3157 NDR_DFS_FLUSHFTTABLE
,
3160 if (!NT_STATUS_IS_OK(status
)) {
3164 if (DEBUGLEVEL
>= 10) {
3165 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable
, &r
);
3168 if (NT_STATUS_IS_ERR(status
)) {
3172 /* Return variables */
3176 *werror
= r
.out
.result
;
3179 return werror_to_ntstatus(r
.out
.result
);
3182 struct rpccli_dfs_Add2_state
{
3183 struct dfs_Add2 orig
;
3184 struct dfs_Add2 tmp
;
3185 TALLOC_CTX
*out_mem_ctx
;
3186 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3189 static void rpccli_dfs_Add2_done(struct tevent_req
*subreq
);
3191 struct tevent_req
*rpccli_dfs_Add2_send(TALLOC_CTX
*mem_ctx
,
3192 struct tevent_context
*ev
,
3193 struct rpc_pipe_client
*cli
)
3195 struct tevent_req
*req
;
3196 struct rpccli_dfs_Add2_state
*state
;
3197 struct tevent_req
*subreq
;
3199 req
= tevent_req_create(mem_ctx
, &state
,
3200 struct rpccli_dfs_Add2_state
);
3204 state
->out_mem_ctx
= NULL
;
3205 state
->dispatch_recv
= cli
->dispatch_recv
;
3209 /* Out parameters */
3212 ZERO_STRUCT(state
->orig
.out
.result
);
3214 if (DEBUGLEVEL
>= 10) {
3215 NDR_PRINT_IN_DEBUG(dfs_Add2
, &state
->orig
);
3218 /* make a temporary copy, that we pass to the dispatch function */
3219 state
->tmp
= state
->orig
;
3221 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3225 if (tevent_req_nomem(subreq
, req
)) {
3226 return tevent_req_post(req
, ev
);
3228 tevent_req_set_callback(subreq
, rpccli_dfs_Add2_done
, req
);
3232 static void rpccli_dfs_Add2_done(struct tevent_req
*subreq
)
3234 struct tevent_req
*req
= tevent_req_callback_data(
3235 subreq
, struct tevent_req
);
3236 struct rpccli_dfs_Add2_state
*state
= tevent_req_data(
3237 req
, struct rpccli_dfs_Add2_state
);
3239 TALLOC_CTX
*mem_ctx
;
3241 if (state
->out_mem_ctx
) {
3242 mem_ctx
= state
->out_mem_ctx
;
3247 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3248 TALLOC_FREE(subreq
);
3249 if (!NT_STATUS_IS_OK(status
)) {
3250 tevent_req_nterror(req
, status
);
3254 /* Copy out parameters */
3257 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3259 /* Reset temporary structure */
3260 ZERO_STRUCT(state
->tmp
);
3262 if (DEBUGLEVEL
>= 10) {
3263 NDR_PRINT_OUT_DEBUG(dfs_Add2
, &state
->orig
);
3266 tevent_req_done(req
);
3269 NTSTATUS
rpccli_dfs_Add2_recv(struct tevent_req
*req
,
3270 TALLOC_CTX
*mem_ctx
,
3273 struct rpccli_dfs_Add2_state
*state
= tevent_req_data(
3274 req
, struct rpccli_dfs_Add2_state
);
3277 if (tevent_req_is_nterror(req
, &status
)) {
3278 tevent_req_received(req
);
3282 /* Steal possbile out parameters to the callers context */
3283 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3286 *result
= state
->orig
.out
.result
;
3288 tevent_req_received(req
);
3289 return NT_STATUS_OK
;
3292 NTSTATUS
rpccli_dfs_Add2(struct rpc_pipe_client
*cli
,
3293 TALLOC_CTX
*mem_ctx
,
3301 if (DEBUGLEVEL
>= 10) {
3302 NDR_PRINT_IN_DEBUG(dfs_Add2
, &r
);
3305 status
= cli
->dispatch(cli
,
3311 if (!NT_STATUS_IS_OK(status
)) {
3315 if (DEBUGLEVEL
>= 10) {
3316 NDR_PRINT_OUT_DEBUG(dfs_Add2
, &r
);
3319 if (NT_STATUS_IS_ERR(status
)) {
3323 /* Return variables */
3327 *werror
= r
.out
.result
;
3330 return werror_to_ntstatus(r
.out
.result
);
3333 struct rpccli_dfs_Remove2_state
{
3334 struct dfs_Remove2 orig
;
3335 struct dfs_Remove2 tmp
;
3336 TALLOC_CTX
*out_mem_ctx
;
3337 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3340 static void rpccli_dfs_Remove2_done(struct tevent_req
*subreq
);
3342 struct tevent_req
*rpccli_dfs_Remove2_send(TALLOC_CTX
*mem_ctx
,
3343 struct tevent_context
*ev
,
3344 struct rpc_pipe_client
*cli
)
3346 struct tevent_req
*req
;
3347 struct rpccli_dfs_Remove2_state
*state
;
3348 struct tevent_req
*subreq
;
3350 req
= tevent_req_create(mem_ctx
, &state
,
3351 struct rpccli_dfs_Remove2_state
);
3355 state
->out_mem_ctx
= NULL
;
3356 state
->dispatch_recv
= cli
->dispatch_recv
;
3360 /* Out parameters */
3363 ZERO_STRUCT(state
->orig
.out
.result
);
3365 if (DEBUGLEVEL
>= 10) {
3366 NDR_PRINT_IN_DEBUG(dfs_Remove2
, &state
->orig
);
3369 /* make a temporary copy, that we pass to the dispatch function */
3370 state
->tmp
= state
->orig
;
3372 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3376 if (tevent_req_nomem(subreq
, req
)) {
3377 return tevent_req_post(req
, ev
);
3379 tevent_req_set_callback(subreq
, rpccli_dfs_Remove2_done
, req
);
3383 static void rpccli_dfs_Remove2_done(struct tevent_req
*subreq
)
3385 struct tevent_req
*req
= tevent_req_callback_data(
3386 subreq
, struct tevent_req
);
3387 struct rpccli_dfs_Remove2_state
*state
= tevent_req_data(
3388 req
, struct rpccli_dfs_Remove2_state
);
3390 TALLOC_CTX
*mem_ctx
;
3392 if (state
->out_mem_ctx
) {
3393 mem_ctx
= state
->out_mem_ctx
;
3398 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3399 TALLOC_FREE(subreq
);
3400 if (!NT_STATUS_IS_OK(status
)) {
3401 tevent_req_nterror(req
, status
);
3405 /* Copy out parameters */
3408 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3410 /* Reset temporary structure */
3411 ZERO_STRUCT(state
->tmp
);
3413 if (DEBUGLEVEL
>= 10) {
3414 NDR_PRINT_OUT_DEBUG(dfs_Remove2
, &state
->orig
);
3417 tevent_req_done(req
);
3420 NTSTATUS
rpccli_dfs_Remove2_recv(struct tevent_req
*req
,
3421 TALLOC_CTX
*mem_ctx
,
3424 struct rpccli_dfs_Remove2_state
*state
= tevent_req_data(
3425 req
, struct rpccli_dfs_Remove2_state
);
3428 if (tevent_req_is_nterror(req
, &status
)) {
3429 tevent_req_received(req
);
3433 /* Steal possbile out parameters to the callers context */
3434 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3437 *result
= state
->orig
.out
.result
;
3439 tevent_req_received(req
);
3440 return NT_STATUS_OK
;
3443 NTSTATUS
rpccli_dfs_Remove2(struct rpc_pipe_client
*cli
,
3444 TALLOC_CTX
*mem_ctx
,
3447 struct dfs_Remove2 r
;
3452 if (DEBUGLEVEL
>= 10) {
3453 NDR_PRINT_IN_DEBUG(dfs_Remove2
, &r
);
3456 status
= cli
->dispatch(cli
,
3462 if (!NT_STATUS_IS_OK(status
)) {
3466 if (DEBUGLEVEL
>= 10) {
3467 NDR_PRINT_OUT_DEBUG(dfs_Remove2
, &r
);
3470 if (NT_STATUS_IS_ERR(status
)) {
3474 /* Return variables */
3478 *werror
= r
.out
.result
;
3481 return werror_to_ntstatus(r
.out
.result
);
3484 struct rpccli_dfs_EnumEx_state
{
3485 struct dfs_EnumEx orig
;
3486 struct dfs_EnumEx tmp
;
3487 TALLOC_CTX
*out_mem_ctx
;
3488 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3491 static void rpccli_dfs_EnumEx_done(struct tevent_req
*subreq
);
3493 struct tevent_req
*rpccli_dfs_EnumEx_send(TALLOC_CTX
*mem_ctx
,
3494 struct tevent_context
*ev
,
3495 struct rpc_pipe_client
*cli
,
3496 const char *_dfs_name
/* [in] [charset(UTF16)] */,
3497 uint32_t _level
/* [in] */,
3498 uint32_t _bufsize
/* [in] */,
3499 struct dfs_EnumStruct
*_info
/* [in,out] [unique] */,
3500 uint32_t *_total
/* [in,out] [unique] */)
3502 struct tevent_req
*req
;
3503 struct rpccli_dfs_EnumEx_state
*state
;
3504 struct tevent_req
*subreq
;
3506 req
= tevent_req_create(mem_ctx
, &state
,
3507 struct rpccli_dfs_EnumEx_state
);
3511 state
->out_mem_ctx
= NULL
;
3512 state
->dispatch_recv
= cli
->dispatch_recv
;
3515 state
->orig
.in
.dfs_name
= _dfs_name
;
3516 state
->orig
.in
.level
= _level
;
3517 state
->orig
.in
.bufsize
= _bufsize
;
3518 state
->orig
.in
.info
= _info
;
3519 state
->orig
.in
.total
= _total
;
3521 /* Out parameters */
3522 state
->orig
.out
.info
= _info
;
3523 state
->orig
.out
.total
= _total
;
3526 ZERO_STRUCT(state
->orig
.out
.result
);
3528 if (DEBUGLEVEL
>= 10) {
3529 NDR_PRINT_IN_DEBUG(dfs_EnumEx
, &state
->orig
);
3532 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3533 "rpccli_dfs_EnumEx_out_memory");
3534 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3535 return tevent_req_post(req
, ev
);
3538 /* make a temporary copy, that we pass to the dispatch function */
3539 state
->tmp
= state
->orig
;
3541 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3545 if (tevent_req_nomem(subreq
, req
)) {
3546 return tevent_req_post(req
, ev
);
3548 tevent_req_set_callback(subreq
, rpccli_dfs_EnumEx_done
, req
);
3552 static void rpccli_dfs_EnumEx_done(struct tevent_req
*subreq
)
3554 struct tevent_req
*req
= tevent_req_callback_data(
3555 subreq
, struct tevent_req
);
3556 struct rpccli_dfs_EnumEx_state
*state
= tevent_req_data(
3557 req
, struct rpccli_dfs_EnumEx_state
);
3559 TALLOC_CTX
*mem_ctx
;
3561 if (state
->out_mem_ctx
) {
3562 mem_ctx
= state
->out_mem_ctx
;
3567 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3568 TALLOC_FREE(subreq
);
3569 if (!NT_STATUS_IS_OK(status
)) {
3570 tevent_req_nterror(req
, status
);
3574 /* Copy out parameters */
3575 if (state
->orig
.out
.info
&& state
->tmp
.out
.info
) {
3576 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3578 if (state
->orig
.out
.total
&& state
->tmp
.out
.total
) {
3579 *state
->orig
.out
.total
= *state
->tmp
.out
.total
;
3583 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3585 /* Reset temporary structure */
3586 ZERO_STRUCT(state
->tmp
);
3588 if (DEBUGLEVEL
>= 10) {
3589 NDR_PRINT_OUT_DEBUG(dfs_EnumEx
, &state
->orig
);
3592 tevent_req_done(req
);
3595 NTSTATUS
rpccli_dfs_EnumEx_recv(struct tevent_req
*req
,
3596 TALLOC_CTX
*mem_ctx
,
3599 struct rpccli_dfs_EnumEx_state
*state
= tevent_req_data(
3600 req
, struct rpccli_dfs_EnumEx_state
);
3603 if (tevent_req_is_nterror(req
, &status
)) {
3604 tevent_req_received(req
);
3608 /* Steal possbile out parameters to the callers context */
3609 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3612 *result
= state
->orig
.out
.result
;
3614 tevent_req_received(req
);
3615 return NT_STATUS_OK
;
3618 NTSTATUS
rpccli_dfs_EnumEx(struct rpc_pipe_client
*cli
,
3619 TALLOC_CTX
*mem_ctx
,
3620 const char *dfs_name
/* [in] [charset(UTF16)] */,
3621 uint32_t level
/* [in] */,
3622 uint32_t bufsize
/* [in] */,
3623 struct dfs_EnumStruct
*info
/* [in,out] [unique] */,
3624 uint32_t *total
/* [in,out] [unique] */,
3627 struct dfs_EnumEx r
;
3631 r
.in
.dfs_name
= dfs_name
;
3633 r
.in
.bufsize
= bufsize
;
3637 if (DEBUGLEVEL
>= 10) {
3638 NDR_PRINT_IN_DEBUG(dfs_EnumEx
, &r
);
3641 status
= cli
->dispatch(cli
,
3647 if (!NT_STATUS_IS_OK(status
)) {
3651 if (DEBUGLEVEL
>= 10) {
3652 NDR_PRINT_OUT_DEBUG(dfs_EnumEx
, &r
);
3655 if (NT_STATUS_IS_ERR(status
)) {
3659 /* Return variables */
3660 if (info
&& r
.out
.info
) {
3661 *info
= *r
.out
.info
;
3663 if (total
&& r
.out
.total
) {
3664 *total
= *r
.out
.total
;
3669 *werror
= r
.out
.result
;
3672 return werror_to_ntstatus(r
.out
.result
);
3675 struct rpccli_dfs_SetInfo2_state
{
3676 struct dfs_SetInfo2 orig
;
3677 struct dfs_SetInfo2 tmp
;
3678 TALLOC_CTX
*out_mem_ctx
;
3679 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3682 static void rpccli_dfs_SetInfo2_done(struct tevent_req
*subreq
);
3684 struct tevent_req
*rpccli_dfs_SetInfo2_send(TALLOC_CTX
*mem_ctx
,
3685 struct tevent_context
*ev
,
3686 struct rpc_pipe_client
*cli
)
3688 struct tevent_req
*req
;
3689 struct rpccli_dfs_SetInfo2_state
*state
;
3690 struct tevent_req
*subreq
;
3692 req
= tevent_req_create(mem_ctx
, &state
,
3693 struct rpccli_dfs_SetInfo2_state
);
3697 state
->out_mem_ctx
= NULL
;
3698 state
->dispatch_recv
= cli
->dispatch_recv
;
3702 /* Out parameters */
3705 ZERO_STRUCT(state
->orig
.out
.result
);
3707 if (DEBUGLEVEL
>= 10) {
3708 NDR_PRINT_IN_DEBUG(dfs_SetInfo2
, &state
->orig
);
3711 /* make a temporary copy, that we pass to the dispatch function */
3712 state
->tmp
= state
->orig
;
3714 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3718 if (tevent_req_nomem(subreq
, req
)) {
3719 return tevent_req_post(req
, ev
);
3721 tevent_req_set_callback(subreq
, rpccli_dfs_SetInfo2_done
, req
);
3725 static void rpccli_dfs_SetInfo2_done(struct tevent_req
*subreq
)
3727 struct tevent_req
*req
= tevent_req_callback_data(
3728 subreq
, struct tevent_req
);
3729 struct rpccli_dfs_SetInfo2_state
*state
= tevent_req_data(
3730 req
, struct rpccli_dfs_SetInfo2_state
);
3732 TALLOC_CTX
*mem_ctx
;
3734 if (state
->out_mem_ctx
) {
3735 mem_ctx
= state
->out_mem_ctx
;
3740 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3741 TALLOC_FREE(subreq
);
3742 if (!NT_STATUS_IS_OK(status
)) {
3743 tevent_req_nterror(req
, status
);
3747 /* Copy out parameters */
3750 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3752 /* Reset temporary structure */
3753 ZERO_STRUCT(state
->tmp
);
3755 if (DEBUGLEVEL
>= 10) {
3756 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2
, &state
->orig
);
3759 tevent_req_done(req
);
3762 NTSTATUS
rpccli_dfs_SetInfo2_recv(struct tevent_req
*req
,
3763 TALLOC_CTX
*mem_ctx
,
3766 struct rpccli_dfs_SetInfo2_state
*state
= tevent_req_data(
3767 req
, struct rpccli_dfs_SetInfo2_state
);
3770 if (tevent_req_is_nterror(req
, &status
)) {
3771 tevent_req_received(req
);
3775 /* Steal possbile out parameters to the callers context */
3776 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3779 *result
= state
->orig
.out
.result
;
3781 tevent_req_received(req
);
3782 return NT_STATUS_OK
;
3785 NTSTATUS
rpccli_dfs_SetInfo2(struct rpc_pipe_client
*cli
,
3786 TALLOC_CTX
*mem_ctx
,
3789 struct dfs_SetInfo2 r
;
3794 if (DEBUGLEVEL
>= 10) {
3795 NDR_PRINT_IN_DEBUG(dfs_SetInfo2
, &r
);
3798 status
= cli
->dispatch(cli
,
3804 if (!NT_STATUS_IS_OK(status
)) {
3808 if (DEBUGLEVEL
>= 10) {
3809 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2
, &r
);
3812 if (NT_STATUS_IS_ERR(status
)) {
3816 /* Return variables */
3820 *werror
= r
.out
.result
;
3823 return werror_to_ntstatus(r
.out
.result
);