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 state
->out_mem_ctx
= talloc_named_const(state
, 0,
41 "rpccli_dfs_GetManagerVersion_out_memory");
42 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
43 return tevent_req_post(req
, ev
);
46 /* make a temporary copy, that we pass to the dispatch function */
47 state
->tmp
= state
->orig
;
49 subreq
= cli
->dispatch_send(state
, ev
, cli
,
51 NDR_DFS_GETMANAGERVERSION
,
53 if (tevent_req_nomem(subreq
, req
)) {
54 return tevent_req_post(req
, ev
);
56 tevent_req_set_callback(subreq
, rpccli_dfs_GetManagerVersion_done
, req
);
60 static void rpccli_dfs_GetManagerVersion_done(struct tevent_req
*subreq
)
62 struct tevent_req
*req
= tevent_req_callback_data(
63 subreq
, struct tevent_req
);
64 struct rpccli_dfs_GetManagerVersion_state
*state
= tevent_req_data(
65 req
, struct rpccli_dfs_GetManagerVersion_state
);
69 if (state
->out_mem_ctx
) {
70 mem_ctx
= state
->out_mem_ctx
;
75 status
= state
->dispatch_recv(subreq
, mem_ctx
);
77 if (!NT_STATUS_IS_OK(status
)) {
78 tevent_req_nterror(req
, status
);
82 /* Copy out parameters */
83 *state
->orig
.out
.version
= *state
->tmp
.out
.version
;
85 /* Reset temporary structure */
86 ZERO_STRUCT(state
->tmp
);
91 NTSTATUS
rpccli_dfs_GetManagerVersion_recv(struct tevent_req
*req
,
94 struct rpccli_dfs_GetManagerVersion_state
*state
= tevent_req_data(
95 req
, struct rpccli_dfs_GetManagerVersion_state
);
98 if (tevent_req_is_nterror(req
, &status
)) {
99 tevent_req_received(req
);
103 /* Steal possbile out parameters to the callers context */
104 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
106 tevent_req_received(req
);
110 NTSTATUS
rpccli_dfs_GetManagerVersion(struct rpc_pipe_client
*cli
,
112 enum dfs_ManagerVersion
*version
/* [out] [ref] */)
114 struct dfs_GetManagerVersion r
;
119 status
= cli
->dispatch(cli
,
122 NDR_DFS_GETMANAGERVERSION
,
125 if (!NT_STATUS_IS_OK(status
)) {
129 if (NT_STATUS_IS_ERR(status
)) {
133 /* Return variables */
134 *version
= *r
.out
.version
;
140 struct rpccli_dfs_Add_state
{
143 TALLOC_CTX
*out_mem_ctx
;
144 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
147 static void rpccli_dfs_Add_done(struct tevent_req
*subreq
);
149 struct tevent_req
*rpccli_dfs_Add_send(TALLOC_CTX
*mem_ctx
,
150 struct tevent_context
*ev
,
151 struct rpc_pipe_client
*cli
,
152 const char *_path
/* [in] [ref,charset(UTF16)] */,
153 const char *_server
/* [in] [ref,charset(UTF16)] */,
154 const char *_share
/* [in] [unique,charset(UTF16)] */,
155 const char *_comment
/* [in] [unique,charset(UTF16)] */,
156 uint32_t _flags
/* [in] */)
158 struct tevent_req
*req
;
159 struct rpccli_dfs_Add_state
*state
;
160 struct tevent_req
*subreq
;
162 req
= tevent_req_create(mem_ctx
, &state
,
163 struct rpccli_dfs_Add_state
);
167 state
->out_mem_ctx
= NULL
;
168 state
->dispatch_recv
= cli
->dispatch_recv
;
171 state
->orig
.in
.path
= _path
;
172 state
->orig
.in
.server
= _server
;
173 state
->orig
.in
.share
= _share
;
174 state
->orig
.in
.comment
= _comment
;
175 state
->orig
.in
.flags
= _flags
;
180 ZERO_STRUCT(state
->orig
.out
.result
);
182 /* make a temporary copy, that we pass to the dispatch function */
183 state
->tmp
= state
->orig
;
185 subreq
= cli
->dispatch_send(state
, ev
, cli
,
189 if (tevent_req_nomem(subreq
, req
)) {
190 return tevent_req_post(req
, ev
);
192 tevent_req_set_callback(subreq
, rpccli_dfs_Add_done
, req
);
196 static void rpccli_dfs_Add_done(struct tevent_req
*subreq
)
198 struct tevent_req
*req
= tevent_req_callback_data(
199 subreq
, struct tevent_req
);
200 struct rpccli_dfs_Add_state
*state
= tevent_req_data(
201 req
, struct rpccli_dfs_Add_state
);
205 if (state
->out_mem_ctx
) {
206 mem_ctx
= state
->out_mem_ctx
;
211 status
= state
->dispatch_recv(subreq
, mem_ctx
);
213 if (!NT_STATUS_IS_OK(status
)) {
214 tevent_req_nterror(req
, status
);
218 /* Copy out parameters */
221 state
->orig
.out
.result
= state
->tmp
.out
.result
;
223 /* Reset temporary structure */
224 ZERO_STRUCT(state
->tmp
);
226 tevent_req_done(req
);
229 NTSTATUS
rpccli_dfs_Add_recv(struct tevent_req
*req
,
233 struct rpccli_dfs_Add_state
*state
= tevent_req_data(
234 req
, struct rpccli_dfs_Add_state
);
237 if (tevent_req_is_nterror(req
, &status
)) {
238 tevent_req_received(req
);
242 /* Steal possbile out parameters to the callers context */
243 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
246 *result
= state
->orig
.out
.result
;
248 tevent_req_received(req
);
252 NTSTATUS
rpccli_dfs_Add(struct rpc_pipe_client
*cli
,
254 const char *path
/* [in] [ref,charset(UTF16)] */,
255 const char *server
/* [in] [ref,charset(UTF16)] */,
256 const char *share
/* [in] [unique,charset(UTF16)] */,
257 const char *comment
/* [in] [unique,charset(UTF16)] */,
258 uint32_t flags
/* [in] */,
266 r
.in
.server
= server
;
268 r
.in
.comment
= comment
;
271 status
= cli
->dispatch(cli
,
277 if (!NT_STATUS_IS_OK(status
)) {
281 if (NT_STATUS_IS_ERR(status
)) {
285 /* Return variables */
289 *werror
= r
.out
.result
;
292 return werror_to_ntstatus(r
.out
.result
);
295 struct rpccli_dfs_Remove_state
{
296 struct dfs_Remove orig
;
297 struct dfs_Remove tmp
;
298 TALLOC_CTX
*out_mem_ctx
;
299 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
302 static void rpccli_dfs_Remove_done(struct tevent_req
*subreq
);
304 struct tevent_req
*rpccli_dfs_Remove_send(TALLOC_CTX
*mem_ctx
,
305 struct tevent_context
*ev
,
306 struct rpc_pipe_client
*cli
,
307 const char *_dfs_entry_path
/* [in] [ref,charset(UTF16)] */,
308 const char *_servername
/* [in] [unique,charset(UTF16)] */,
309 const char *_sharename
/* [in] [unique,charset(UTF16)] */)
311 struct tevent_req
*req
;
312 struct rpccli_dfs_Remove_state
*state
;
313 struct tevent_req
*subreq
;
315 req
= tevent_req_create(mem_ctx
, &state
,
316 struct rpccli_dfs_Remove_state
);
320 state
->out_mem_ctx
= NULL
;
321 state
->dispatch_recv
= cli
->dispatch_recv
;
324 state
->orig
.in
.dfs_entry_path
= _dfs_entry_path
;
325 state
->orig
.in
.servername
= _servername
;
326 state
->orig
.in
.sharename
= _sharename
;
331 ZERO_STRUCT(state
->orig
.out
.result
);
333 /* make a temporary copy, that we pass to the dispatch function */
334 state
->tmp
= state
->orig
;
336 subreq
= cli
->dispatch_send(state
, ev
, cli
,
340 if (tevent_req_nomem(subreq
, req
)) {
341 return tevent_req_post(req
, ev
);
343 tevent_req_set_callback(subreq
, rpccli_dfs_Remove_done
, req
);
347 static void rpccli_dfs_Remove_done(struct tevent_req
*subreq
)
349 struct tevent_req
*req
= tevent_req_callback_data(
350 subreq
, struct tevent_req
);
351 struct rpccli_dfs_Remove_state
*state
= tevent_req_data(
352 req
, struct rpccli_dfs_Remove_state
);
356 if (state
->out_mem_ctx
) {
357 mem_ctx
= state
->out_mem_ctx
;
362 status
= state
->dispatch_recv(subreq
, mem_ctx
);
364 if (!NT_STATUS_IS_OK(status
)) {
365 tevent_req_nterror(req
, status
);
369 /* Copy out parameters */
372 state
->orig
.out
.result
= state
->tmp
.out
.result
;
374 /* Reset temporary structure */
375 ZERO_STRUCT(state
->tmp
);
377 tevent_req_done(req
);
380 NTSTATUS
rpccli_dfs_Remove_recv(struct tevent_req
*req
,
384 struct rpccli_dfs_Remove_state
*state
= tevent_req_data(
385 req
, struct rpccli_dfs_Remove_state
);
388 if (tevent_req_is_nterror(req
, &status
)) {
389 tevent_req_received(req
);
393 /* Steal possbile out parameters to the callers context */
394 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
397 *result
= state
->orig
.out
.result
;
399 tevent_req_received(req
);
403 NTSTATUS
rpccli_dfs_Remove(struct rpc_pipe_client
*cli
,
405 const char *dfs_entry_path
/* [in] [ref,charset(UTF16)] */,
406 const char *servername
/* [in] [unique,charset(UTF16)] */,
407 const char *sharename
/* [in] [unique,charset(UTF16)] */,
414 r
.in
.dfs_entry_path
= dfs_entry_path
;
415 r
.in
.servername
= servername
;
416 r
.in
.sharename
= sharename
;
418 status
= cli
->dispatch(cli
,
424 if (!NT_STATUS_IS_OK(status
)) {
428 if (NT_STATUS_IS_ERR(status
)) {
432 /* Return variables */
436 *werror
= r
.out
.result
;
439 return werror_to_ntstatus(r
.out
.result
);
442 struct rpccli_dfs_SetInfo_state
{
443 struct dfs_SetInfo orig
;
444 struct dfs_SetInfo tmp
;
445 TALLOC_CTX
*out_mem_ctx
;
446 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
449 static void rpccli_dfs_SetInfo_done(struct tevent_req
*subreq
);
451 struct tevent_req
*rpccli_dfs_SetInfo_send(TALLOC_CTX
*mem_ctx
,
452 struct tevent_context
*ev
,
453 struct rpc_pipe_client
*cli
,
454 const char *_dfs_entry_path
/* [in] [charset(UTF16)] */,
455 const char *_servername
/* [in] [unique,charset(UTF16)] */,
456 const char *_sharename
/* [in] [unique,charset(UTF16)] */,
457 uint32_t _level
/* [in] */,
458 union dfs_Info
*_info
/* [in] [ref,switch_is(level)] */)
460 struct tevent_req
*req
;
461 struct rpccli_dfs_SetInfo_state
*state
;
462 struct tevent_req
*subreq
;
464 req
= tevent_req_create(mem_ctx
, &state
,
465 struct rpccli_dfs_SetInfo_state
);
469 state
->out_mem_ctx
= NULL
;
470 state
->dispatch_recv
= cli
->dispatch_recv
;
473 state
->orig
.in
.dfs_entry_path
= _dfs_entry_path
;
474 state
->orig
.in
.servername
= _servername
;
475 state
->orig
.in
.sharename
= _sharename
;
476 state
->orig
.in
.level
= _level
;
477 state
->orig
.in
.info
= _info
;
482 ZERO_STRUCT(state
->orig
.out
.result
);
484 /* make a temporary copy, that we pass to the dispatch function */
485 state
->tmp
= state
->orig
;
487 subreq
= cli
->dispatch_send(state
, ev
, cli
,
491 if (tevent_req_nomem(subreq
, req
)) {
492 return tevent_req_post(req
, ev
);
494 tevent_req_set_callback(subreq
, rpccli_dfs_SetInfo_done
, req
);
498 static void rpccli_dfs_SetInfo_done(struct tevent_req
*subreq
)
500 struct tevent_req
*req
= tevent_req_callback_data(
501 subreq
, struct tevent_req
);
502 struct rpccli_dfs_SetInfo_state
*state
= tevent_req_data(
503 req
, struct rpccli_dfs_SetInfo_state
);
507 if (state
->out_mem_ctx
) {
508 mem_ctx
= state
->out_mem_ctx
;
513 status
= state
->dispatch_recv(subreq
, mem_ctx
);
515 if (!NT_STATUS_IS_OK(status
)) {
516 tevent_req_nterror(req
, status
);
520 /* Copy out parameters */
523 state
->orig
.out
.result
= state
->tmp
.out
.result
;
525 /* Reset temporary structure */
526 ZERO_STRUCT(state
->tmp
);
528 tevent_req_done(req
);
531 NTSTATUS
rpccli_dfs_SetInfo_recv(struct tevent_req
*req
,
535 struct rpccli_dfs_SetInfo_state
*state
= tevent_req_data(
536 req
, struct rpccli_dfs_SetInfo_state
);
539 if (tevent_req_is_nterror(req
, &status
)) {
540 tevent_req_received(req
);
544 /* Steal possbile out parameters to the callers context */
545 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
548 *result
= state
->orig
.out
.result
;
550 tevent_req_received(req
);
554 NTSTATUS
rpccli_dfs_SetInfo(struct rpc_pipe_client
*cli
,
556 const char *dfs_entry_path
/* [in] [charset(UTF16)] */,
557 const char *servername
/* [in] [unique,charset(UTF16)] */,
558 const char *sharename
/* [in] [unique,charset(UTF16)] */,
559 uint32_t level
/* [in] */,
560 union dfs_Info
*info
/* [in] [ref,switch_is(level)] */,
563 struct dfs_SetInfo r
;
567 r
.in
.dfs_entry_path
= dfs_entry_path
;
568 r
.in
.servername
= servername
;
569 r
.in
.sharename
= sharename
;
573 status
= cli
->dispatch(cli
,
579 if (!NT_STATUS_IS_OK(status
)) {
583 if (NT_STATUS_IS_ERR(status
)) {
587 /* Return variables */
591 *werror
= r
.out
.result
;
594 return werror_to_ntstatus(r
.out
.result
);
597 struct rpccli_dfs_GetInfo_state
{
598 struct dfs_GetInfo orig
;
599 struct dfs_GetInfo tmp
;
600 TALLOC_CTX
*out_mem_ctx
;
601 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
604 static void rpccli_dfs_GetInfo_done(struct tevent_req
*subreq
);
606 struct tevent_req
*rpccli_dfs_GetInfo_send(TALLOC_CTX
*mem_ctx
,
607 struct tevent_context
*ev
,
608 struct rpc_pipe_client
*cli
,
609 const char *_dfs_entry_path
/* [in] [charset(UTF16)] */,
610 const char *_servername
/* [in] [unique,charset(UTF16)] */,
611 const char *_sharename
/* [in] [unique,charset(UTF16)] */,
612 uint32_t _level
/* [in] */,
613 union dfs_Info
*_info
/* [out] [ref,switch_is(level)] */)
615 struct tevent_req
*req
;
616 struct rpccli_dfs_GetInfo_state
*state
;
617 struct tevent_req
*subreq
;
619 req
= tevent_req_create(mem_ctx
, &state
,
620 struct rpccli_dfs_GetInfo_state
);
624 state
->out_mem_ctx
= NULL
;
625 state
->dispatch_recv
= cli
->dispatch_recv
;
628 state
->orig
.in
.dfs_entry_path
= _dfs_entry_path
;
629 state
->orig
.in
.servername
= _servername
;
630 state
->orig
.in
.sharename
= _sharename
;
631 state
->orig
.in
.level
= _level
;
634 state
->orig
.out
.info
= _info
;
637 ZERO_STRUCT(state
->orig
.out
.result
);
639 state
->out_mem_ctx
= talloc_named_const(state
, 0,
640 "rpccli_dfs_GetInfo_out_memory");
641 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
642 return tevent_req_post(req
, ev
);
645 /* make a temporary copy, that we pass to the dispatch function */
646 state
->tmp
= state
->orig
;
648 subreq
= cli
->dispatch_send(state
, ev
, cli
,
652 if (tevent_req_nomem(subreq
, req
)) {
653 return tevent_req_post(req
, ev
);
655 tevent_req_set_callback(subreq
, rpccli_dfs_GetInfo_done
, req
);
659 static void rpccli_dfs_GetInfo_done(struct tevent_req
*subreq
)
661 struct tevent_req
*req
= tevent_req_callback_data(
662 subreq
, struct tevent_req
);
663 struct rpccli_dfs_GetInfo_state
*state
= tevent_req_data(
664 req
, struct rpccli_dfs_GetInfo_state
);
668 if (state
->out_mem_ctx
) {
669 mem_ctx
= state
->out_mem_ctx
;
674 status
= state
->dispatch_recv(subreq
, mem_ctx
);
676 if (!NT_STATUS_IS_OK(status
)) {
677 tevent_req_nterror(req
, status
);
681 /* Copy out parameters */
682 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
685 state
->orig
.out
.result
= state
->tmp
.out
.result
;
687 /* Reset temporary structure */
688 ZERO_STRUCT(state
->tmp
);
690 tevent_req_done(req
);
693 NTSTATUS
rpccli_dfs_GetInfo_recv(struct tevent_req
*req
,
697 struct rpccli_dfs_GetInfo_state
*state
= tevent_req_data(
698 req
, struct rpccli_dfs_GetInfo_state
);
701 if (tevent_req_is_nterror(req
, &status
)) {
702 tevent_req_received(req
);
706 /* Steal possbile out parameters to the callers context */
707 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
710 *result
= state
->orig
.out
.result
;
712 tevent_req_received(req
);
716 NTSTATUS
rpccli_dfs_GetInfo(struct rpc_pipe_client
*cli
,
718 const char *dfs_entry_path
/* [in] [charset(UTF16)] */,
719 const char *servername
/* [in] [unique,charset(UTF16)] */,
720 const char *sharename
/* [in] [unique,charset(UTF16)] */,
721 uint32_t level
/* [in] */,
722 union dfs_Info
*info
/* [out] [ref,switch_is(level)] */,
725 struct dfs_GetInfo r
;
729 r
.in
.dfs_entry_path
= dfs_entry_path
;
730 r
.in
.servername
= servername
;
731 r
.in
.sharename
= sharename
;
734 status
= cli
->dispatch(cli
,
740 if (!NT_STATUS_IS_OK(status
)) {
744 if (NT_STATUS_IS_ERR(status
)) {
748 /* Return variables */
753 *werror
= r
.out
.result
;
756 return werror_to_ntstatus(r
.out
.result
);
759 struct rpccli_dfs_Enum_state
{
760 struct dfs_Enum orig
;
762 TALLOC_CTX
*out_mem_ctx
;
763 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
766 static void rpccli_dfs_Enum_done(struct tevent_req
*subreq
);
768 struct tevent_req
*rpccli_dfs_Enum_send(TALLOC_CTX
*mem_ctx
,
769 struct tevent_context
*ev
,
770 struct rpc_pipe_client
*cli
,
771 uint32_t _level
/* [in] */,
772 uint32_t _bufsize
/* [in] */,
773 struct dfs_EnumStruct
*_info
/* [in,out] [unique] */,
774 uint32_t *_total
/* [in,out] [unique] */)
776 struct tevent_req
*req
;
777 struct rpccli_dfs_Enum_state
*state
;
778 struct tevent_req
*subreq
;
780 req
= tevent_req_create(mem_ctx
, &state
,
781 struct rpccli_dfs_Enum_state
);
785 state
->out_mem_ctx
= NULL
;
786 state
->dispatch_recv
= cli
->dispatch_recv
;
789 state
->orig
.in
.level
= _level
;
790 state
->orig
.in
.bufsize
= _bufsize
;
791 state
->orig
.in
.info
= _info
;
792 state
->orig
.in
.total
= _total
;
795 state
->orig
.out
.info
= _info
;
796 state
->orig
.out
.total
= _total
;
799 ZERO_STRUCT(state
->orig
.out
.result
);
801 state
->out_mem_ctx
= talloc_named_const(state
, 0,
802 "rpccli_dfs_Enum_out_memory");
803 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
804 return tevent_req_post(req
, ev
);
807 /* make a temporary copy, that we pass to the dispatch function */
808 state
->tmp
= state
->orig
;
810 subreq
= cli
->dispatch_send(state
, ev
, cli
,
814 if (tevent_req_nomem(subreq
, req
)) {
815 return tevent_req_post(req
, ev
);
817 tevent_req_set_callback(subreq
, rpccli_dfs_Enum_done
, req
);
821 static void rpccli_dfs_Enum_done(struct tevent_req
*subreq
)
823 struct tevent_req
*req
= tevent_req_callback_data(
824 subreq
, struct tevent_req
);
825 struct rpccli_dfs_Enum_state
*state
= tevent_req_data(
826 req
, struct rpccli_dfs_Enum_state
);
830 if (state
->out_mem_ctx
) {
831 mem_ctx
= state
->out_mem_ctx
;
836 status
= state
->dispatch_recv(subreq
, mem_ctx
);
838 if (!NT_STATUS_IS_OK(status
)) {
839 tevent_req_nterror(req
, status
);
843 /* Copy out parameters */
844 if (state
->orig
.out
.info
&& state
->tmp
.out
.info
) {
845 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
847 if (state
->orig
.out
.total
&& state
->tmp
.out
.total
) {
848 *state
->orig
.out
.total
= *state
->tmp
.out
.total
;
852 state
->orig
.out
.result
= state
->tmp
.out
.result
;
854 /* Reset temporary structure */
855 ZERO_STRUCT(state
->tmp
);
857 tevent_req_done(req
);
860 NTSTATUS
rpccli_dfs_Enum_recv(struct tevent_req
*req
,
864 struct rpccli_dfs_Enum_state
*state
= tevent_req_data(
865 req
, struct rpccli_dfs_Enum_state
);
868 if (tevent_req_is_nterror(req
, &status
)) {
869 tevent_req_received(req
);
873 /* Steal possbile out parameters to the callers context */
874 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
877 *result
= state
->orig
.out
.result
;
879 tevent_req_received(req
);
883 NTSTATUS
rpccli_dfs_Enum(struct rpc_pipe_client
*cli
,
885 uint32_t level
/* [in] */,
886 uint32_t bufsize
/* [in] */,
887 struct dfs_EnumStruct
*info
/* [in,out] [unique] */,
888 uint32_t *total
/* [in,out] [unique] */,
896 r
.in
.bufsize
= bufsize
;
900 status
= cli
->dispatch(cli
,
906 if (!NT_STATUS_IS_OK(status
)) {
910 if (NT_STATUS_IS_ERR(status
)) {
914 /* Return variables */
915 if (info
&& r
.out
.info
) {
918 if (total
&& r
.out
.total
) {
919 *total
= *r
.out
.total
;
924 *werror
= r
.out
.result
;
927 return werror_to_ntstatus(r
.out
.result
);
930 struct rpccli_dfs_Rename_state
{
931 struct dfs_Rename orig
;
932 struct dfs_Rename tmp
;
933 TALLOC_CTX
*out_mem_ctx
;
934 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
937 static void rpccli_dfs_Rename_done(struct tevent_req
*subreq
);
939 struct tevent_req
*rpccli_dfs_Rename_send(TALLOC_CTX
*mem_ctx
,
940 struct tevent_context
*ev
,
941 struct rpc_pipe_client
*cli
)
943 struct tevent_req
*req
;
944 struct rpccli_dfs_Rename_state
*state
;
945 struct tevent_req
*subreq
;
947 req
= tevent_req_create(mem_ctx
, &state
,
948 struct rpccli_dfs_Rename_state
);
952 state
->out_mem_ctx
= NULL
;
953 state
->dispatch_recv
= cli
->dispatch_recv
;
960 ZERO_STRUCT(state
->orig
.out
.result
);
962 /* make a temporary copy, that we pass to the dispatch function */
963 state
->tmp
= state
->orig
;
965 subreq
= cli
->dispatch_send(state
, ev
, cli
,
969 if (tevent_req_nomem(subreq
, req
)) {
970 return tevent_req_post(req
, ev
);
972 tevent_req_set_callback(subreq
, rpccli_dfs_Rename_done
, req
);
976 static void rpccli_dfs_Rename_done(struct tevent_req
*subreq
)
978 struct tevent_req
*req
= tevent_req_callback_data(
979 subreq
, struct tevent_req
);
980 struct rpccli_dfs_Rename_state
*state
= tevent_req_data(
981 req
, struct rpccli_dfs_Rename_state
);
985 if (state
->out_mem_ctx
) {
986 mem_ctx
= state
->out_mem_ctx
;
991 status
= state
->dispatch_recv(subreq
, mem_ctx
);
993 if (!NT_STATUS_IS_OK(status
)) {
994 tevent_req_nterror(req
, status
);
998 /* Copy out parameters */
1001 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1003 /* Reset temporary structure */
1004 ZERO_STRUCT(state
->tmp
);
1006 tevent_req_done(req
);
1009 NTSTATUS
rpccli_dfs_Rename_recv(struct tevent_req
*req
,
1010 TALLOC_CTX
*mem_ctx
,
1013 struct rpccli_dfs_Rename_state
*state
= tevent_req_data(
1014 req
, struct rpccli_dfs_Rename_state
);
1017 if (tevent_req_is_nterror(req
, &status
)) {
1018 tevent_req_received(req
);
1022 /* Steal possbile out parameters to the callers context */
1023 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1026 *result
= state
->orig
.out
.result
;
1028 tevent_req_received(req
);
1029 return NT_STATUS_OK
;
1032 NTSTATUS
rpccli_dfs_Rename(struct rpc_pipe_client
*cli
,
1033 TALLOC_CTX
*mem_ctx
,
1036 struct dfs_Rename r
;
1041 status
= cli
->dispatch(cli
,
1047 if (!NT_STATUS_IS_OK(status
)) {
1051 if (NT_STATUS_IS_ERR(status
)) {
1055 /* Return variables */
1059 *werror
= r
.out
.result
;
1062 return werror_to_ntstatus(r
.out
.result
);
1065 struct rpccli_dfs_Move_state
{
1066 struct dfs_Move orig
;
1067 struct dfs_Move tmp
;
1068 TALLOC_CTX
*out_mem_ctx
;
1069 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1072 static void rpccli_dfs_Move_done(struct tevent_req
*subreq
);
1074 struct tevent_req
*rpccli_dfs_Move_send(TALLOC_CTX
*mem_ctx
,
1075 struct tevent_context
*ev
,
1076 struct rpc_pipe_client
*cli
)
1078 struct tevent_req
*req
;
1079 struct rpccli_dfs_Move_state
*state
;
1080 struct tevent_req
*subreq
;
1082 req
= tevent_req_create(mem_ctx
, &state
,
1083 struct rpccli_dfs_Move_state
);
1087 state
->out_mem_ctx
= NULL
;
1088 state
->dispatch_recv
= cli
->dispatch_recv
;
1092 /* Out parameters */
1095 ZERO_STRUCT(state
->orig
.out
.result
);
1097 /* make a temporary copy, that we pass to the dispatch function */
1098 state
->tmp
= state
->orig
;
1100 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1104 if (tevent_req_nomem(subreq
, req
)) {
1105 return tevent_req_post(req
, ev
);
1107 tevent_req_set_callback(subreq
, rpccli_dfs_Move_done
, req
);
1111 static void rpccli_dfs_Move_done(struct tevent_req
*subreq
)
1113 struct tevent_req
*req
= tevent_req_callback_data(
1114 subreq
, struct tevent_req
);
1115 struct rpccli_dfs_Move_state
*state
= tevent_req_data(
1116 req
, struct rpccli_dfs_Move_state
);
1118 TALLOC_CTX
*mem_ctx
;
1120 if (state
->out_mem_ctx
) {
1121 mem_ctx
= state
->out_mem_ctx
;
1126 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1127 TALLOC_FREE(subreq
);
1128 if (!NT_STATUS_IS_OK(status
)) {
1129 tevent_req_nterror(req
, status
);
1133 /* Copy out parameters */
1136 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1138 /* Reset temporary structure */
1139 ZERO_STRUCT(state
->tmp
);
1141 tevent_req_done(req
);
1144 NTSTATUS
rpccli_dfs_Move_recv(struct tevent_req
*req
,
1145 TALLOC_CTX
*mem_ctx
,
1148 struct rpccli_dfs_Move_state
*state
= tevent_req_data(
1149 req
, struct rpccli_dfs_Move_state
);
1152 if (tevent_req_is_nterror(req
, &status
)) {
1153 tevent_req_received(req
);
1157 /* Steal possbile out parameters to the callers context */
1158 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1161 *result
= state
->orig
.out
.result
;
1163 tevent_req_received(req
);
1164 return NT_STATUS_OK
;
1167 NTSTATUS
rpccli_dfs_Move(struct rpc_pipe_client
*cli
,
1168 TALLOC_CTX
*mem_ctx
,
1176 status
= cli
->dispatch(cli
,
1182 if (!NT_STATUS_IS_OK(status
)) {
1186 if (NT_STATUS_IS_ERR(status
)) {
1190 /* Return variables */
1194 *werror
= r
.out
.result
;
1197 return werror_to_ntstatus(r
.out
.result
);
1200 struct rpccli_dfs_ManagerGetConfigInfo_state
{
1201 struct dfs_ManagerGetConfigInfo orig
;
1202 struct dfs_ManagerGetConfigInfo tmp
;
1203 TALLOC_CTX
*out_mem_ctx
;
1204 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1207 static void rpccli_dfs_ManagerGetConfigInfo_done(struct tevent_req
*subreq
);
1209 struct tevent_req
*rpccli_dfs_ManagerGetConfigInfo_send(TALLOC_CTX
*mem_ctx
,
1210 struct tevent_context
*ev
,
1211 struct rpc_pipe_client
*cli
)
1213 struct tevent_req
*req
;
1214 struct rpccli_dfs_ManagerGetConfigInfo_state
*state
;
1215 struct tevent_req
*subreq
;
1217 req
= tevent_req_create(mem_ctx
, &state
,
1218 struct rpccli_dfs_ManagerGetConfigInfo_state
);
1222 state
->out_mem_ctx
= NULL
;
1223 state
->dispatch_recv
= cli
->dispatch_recv
;
1227 /* Out parameters */
1230 ZERO_STRUCT(state
->orig
.out
.result
);
1232 /* make a temporary copy, that we pass to the dispatch function */
1233 state
->tmp
= state
->orig
;
1235 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1237 NDR_DFS_MANAGERGETCONFIGINFO
,
1239 if (tevent_req_nomem(subreq
, req
)) {
1240 return tevent_req_post(req
, ev
);
1242 tevent_req_set_callback(subreq
, rpccli_dfs_ManagerGetConfigInfo_done
, req
);
1246 static void rpccli_dfs_ManagerGetConfigInfo_done(struct tevent_req
*subreq
)
1248 struct tevent_req
*req
= tevent_req_callback_data(
1249 subreq
, struct tevent_req
);
1250 struct rpccli_dfs_ManagerGetConfigInfo_state
*state
= tevent_req_data(
1251 req
, struct rpccli_dfs_ManagerGetConfigInfo_state
);
1253 TALLOC_CTX
*mem_ctx
;
1255 if (state
->out_mem_ctx
) {
1256 mem_ctx
= state
->out_mem_ctx
;
1261 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1262 TALLOC_FREE(subreq
);
1263 if (!NT_STATUS_IS_OK(status
)) {
1264 tevent_req_nterror(req
, status
);
1268 /* Copy out parameters */
1271 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1273 /* Reset temporary structure */
1274 ZERO_STRUCT(state
->tmp
);
1276 tevent_req_done(req
);
1279 NTSTATUS
rpccli_dfs_ManagerGetConfigInfo_recv(struct tevent_req
*req
,
1280 TALLOC_CTX
*mem_ctx
,
1283 struct rpccli_dfs_ManagerGetConfigInfo_state
*state
= tevent_req_data(
1284 req
, struct rpccli_dfs_ManagerGetConfigInfo_state
);
1287 if (tevent_req_is_nterror(req
, &status
)) {
1288 tevent_req_received(req
);
1292 /* Steal possbile out parameters to the callers context */
1293 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1296 *result
= state
->orig
.out
.result
;
1298 tevent_req_received(req
);
1299 return NT_STATUS_OK
;
1302 NTSTATUS
rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client
*cli
,
1303 TALLOC_CTX
*mem_ctx
,
1306 struct dfs_ManagerGetConfigInfo r
;
1311 status
= cli
->dispatch(cli
,
1314 NDR_DFS_MANAGERGETCONFIGINFO
,
1317 if (!NT_STATUS_IS_OK(status
)) {
1321 if (NT_STATUS_IS_ERR(status
)) {
1325 /* Return variables */
1329 *werror
= r
.out
.result
;
1332 return werror_to_ntstatus(r
.out
.result
);
1335 struct rpccli_dfs_ManagerSendSiteInfo_state
{
1336 struct dfs_ManagerSendSiteInfo orig
;
1337 struct dfs_ManagerSendSiteInfo tmp
;
1338 TALLOC_CTX
*out_mem_ctx
;
1339 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1342 static void rpccli_dfs_ManagerSendSiteInfo_done(struct tevent_req
*subreq
);
1344 struct tevent_req
*rpccli_dfs_ManagerSendSiteInfo_send(TALLOC_CTX
*mem_ctx
,
1345 struct tevent_context
*ev
,
1346 struct rpc_pipe_client
*cli
)
1348 struct tevent_req
*req
;
1349 struct rpccli_dfs_ManagerSendSiteInfo_state
*state
;
1350 struct tevent_req
*subreq
;
1352 req
= tevent_req_create(mem_ctx
, &state
,
1353 struct rpccli_dfs_ManagerSendSiteInfo_state
);
1357 state
->out_mem_ctx
= NULL
;
1358 state
->dispatch_recv
= cli
->dispatch_recv
;
1362 /* Out parameters */
1365 ZERO_STRUCT(state
->orig
.out
.result
);
1367 /* make a temporary copy, that we pass to the dispatch function */
1368 state
->tmp
= state
->orig
;
1370 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1372 NDR_DFS_MANAGERSENDSITEINFO
,
1374 if (tevent_req_nomem(subreq
, req
)) {
1375 return tevent_req_post(req
, ev
);
1377 tevent_req_set_callback(subreq
, rpccli_dfs_ManagerSendSiteInfo_done
, req
);
1381 static void rpccli_dfs_ManagerSendSiteInfo_done(struct tevent_req
*subreq
)
1383 struct tevent_req
*req
= tevent_req_callback_data(
1384 subreq
, struct tevent_req
);
1385 struct rpccli_dfs_ManagerSendSiteInfo_state
*state
= tevent_req_data(
1386 req
, struct rpccli_dfs_ManagerSendSiteInfo_state
);
1388 TALLOC_CTX
*mem_ctx
;
1390 if (state
->out_mem_ctx
) {
1391 mem_ctx
= state
->out_mem_ctx
;
1396 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1397 TALLOC_FREE(subreq
);
1398 if (!NT_STATUS_IS_OK(status
)) {
1399 tevent_req_nterror(req
, status
);
1403 /* Copy out parameters */
1406 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1408 /* Reset temporary structure */
1409 ZERO_STRUCT(state
->tmp
);
1411 tevent_req_done(req
);
1414 NTSTATUS
rpccli_dfs_ManagerSendSiteInfo_recv(struct tevent_req
*req
,
1415 TALLOC_CTX
*mem_ctx
,
1418 struct rpccli_dfs_ManagerSendSiteInfo_state
*state
= tevent_req_data(
1419 req
, struct rpccli_dfs_ManagerSendSiteInfo_state
);
1422 if (tevent_req_is_nterror(req
, &status
)) {
1423 tevent_req_received(req
);
1427 /* Steal possbile out parameters to the callers context */
1428 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1431 *result
= state
->orig
.out
.result
;
1433 tevent_req_received(req
);
1434 return NT_STATUS_OK
;
1437 NTSTATUS
rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client
*cli
,
1438 TALLOC_CTX
*mem_ctx
,
1441 struct dfs_ManagerSendSiteInfo r
;
1446 status
= cli
->dispatch(cli
,
1449 NDR_DFS_MANAGERSENDSITEINFO
,
1452 if (!NT_STATUS_IS_OK(status
)) {
1456 if (NT_STATUS_IS_ERR(status
)) {
1460 /* Return variables */
1464 *werror
= r
.out
.result
;
1467 return werror_to_ntstatus(r
.out
.result
);
1470 struct rpccli_dfs_AddFtRoot_state
{
1471 struct dfs_AddFtRoot orig
;
1472 struct dfs_AddFtRoot tmp
;
1473 TALLOC_CTX
*out_mem_ctx
;
1474 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1477 static void rpccli_dfs_AddFtRoot_done(struct tevent_req
*subreq
);
1479 struct tevent_req
*rpccli_dfs_AddFtRoot_send(TALLOC_CTX
*mem_ctx
,
1480 struct tevent_context
*ev
,
1481 struct rpc_pipe_client
*cli
,
1482 const char *_servername
/* [in] [charset(UTF16)] */,
1483 const char *_dns_servername
/* [in] [charset(UTF16)] */,
1484 const char *_dfsname
/* [in] [charset(UTF16)] */,
1485 const char *_rootshare
/* [in] [charset(UTF16)] */,
1486 const char *_comment
/* [in] [charset(UTF16)] */,
1487 const char *_dfs_config_dn
/* [in] [charset(UTF16)] */,
1488 uint8_t _unknown1
/* [in] */,
1489 uint32_t _flags
/* [in] */,
1490 struct dfs_UnknownStruct
**_unknown2
/* [in,out] [unique] */)
1492 struct tevent_req
*req
;
1493 struct rpccli_dfs_AddFtRoot_state
*state
;
1494 struct tevent_req
*subreq
;
1496 req
= tevent_req_create(mem_ctx
, &state
,
1497 struct rpccli_dfs_AddFtRoot_state
);
1501 state
->out_mem_ctx
= NULL
;
1502 state
->dispatch_recv
= cli
->dispatch_recv
;
1505 state
->orig
.in
.servername
= _servername
;
1506 state
->orig
.in
.dns_servername
= _dns_servername
;
1507 state
->orig
.in
.dfsname
= _dfsname
;
1508 state
->orig
.in
.rootshare
= _rootshare
;
1509 state
->orig
.in
.comment
= _comment
;
1510 state
->orig
.in
.dfs_config_dn
= _dfs_config_dn
;
1511 state
->orig
.in
.unknown1
= _unknown1
;
1512 state
->orig
.in
.flags
= _flags
;
1513 state
->orig
.in
.unknown2
= _unknown2
;
1515 /* Out parameters */
1516 state
->orig
.out
.unknown2
= _unknown2
;
1519 ZERO_STRUCT(state
->orig
.out
.result
);
1521 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1522 "rpccli_dfs_AddFtRoot_out_memory");
1523 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1524 return tevent_req_post(req
, ev
);
1527 /* make a temporary copy, that we pass to the dispatch function */
1528 state
->tmp
= state
->orig
;
1530 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1534 if (tevent_req_nomem(subreq
, req
)) {
1535 return tevent_req_post(req
, ev
);
1537 tevent_req_set_callback(subreq
, rpccli_dfs_AddFtRoot_done
, req
);
1541 static void rpccli_dfs_AddFtRoot_done(struct tevent_req
*subreq
)
1543 struct tevent_req
*req
= tevent_req_callback_data(
1544 subreq
, struct tevent_req
);
1545 struct rpccli_dfs_AddFtRoot_state
*state
= tevent_req_data(
1546 req
, struct rpccli_dfs_AddFtRoot_state
);
1548 TALLOC_CTX
*mem_ctx
;
1550 if (state
->out_mem_ctx
) {
1551 mem_ctx
= state
->out_mem_ctx
;
1556 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1557 TALLOC_FREE(subreq
);
1558 if (!NT_STATUS_IS_OK(status
)) {
1559 tevent_req_nterror(req
, status
);
1563 /* Copy out parameters */
1564 if (state
->orig
.out
.unknown2
&& state
->tmp
.out
.unknown2
) {
1565 *state
->orig
.out
.unknown2
= *state
->tmp
.out
.unknown2
;
1569 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1571 /* Reset temporary structure */
1572 ZERO_STRUCT(state
->tmp
);
1574 tevent_req_done(req
);
1577 NTSTATUS
rpccli_dfs_AddFtRoot_recv(struct tevent_req
*req
,
1578 TALLOC_CTX
*mem_ctx
,
1581 struct rpccli_dfs_AddFtRoot_state
*state
= tevent_req_data(
1582 req
, struct rpccli_dfs_AddFtRoot_state
);
1585 if (tevent_req_is_nterror(req
, &status
)) {
1586 tevent_req_received(req
);
1590 /* Steal possbile out parameters to the callers context */
1591 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1594 *result
= state
->orig
.out
.result
;
1596 tevent_req_received(req
);
1597 return NT_STATUS_OK
;
1600 NTSTATUS
rpccli_dfs_AddFtRoot(struct rpc_pipe_client
*cli
,
1601 TALLOC_CTX
*mem_ctx
,
1602 const char *servername
/* [in] [charset(UTF16)] */,
1603 const char *dns_servername
/* [in] [charset(UTF16)] */,
1604 const char *dfsname
/* [in] [charset(UTF16)] */,
1605 const char *rootshare
/* [in] [charset(UTF16)] */,
1606 const char *comment
/* [in] [charset(UTF16)] */,
1607 const char *dfs_config_dn
/* [in] [charset(UTF16)] */,
1608 uint8_t unknown1
/* [in] */,
1609 uint32_t flags
/* [in] */,
1610 struct dfs_UnknownStruct
**unknown2
/* [in,out] [unique] */,
1613 struct dfs_AddFtRoot r
;
1617 r
.in
.servername
= servername
;
1618 r
.in
.dns_servername
= dns_servername
;
1619 r
.in
.dfsname
= dfsname
;
1620 r
.in
.rootshare
= rootshare
;
1621 r
.in
.comment
= comment
;
1622 r
.in
.dfs_config_dn
= dfs_config_dn
;
1623 r
.in
.unknown1
= unknown1
;
1625 r
.in
.unknown2
= unknown2
;
1627 status
= cli
->dispatch(cli
,
1633 if (!NT_STATUS_IS_OK(status
)) {
1637 if (NT_STATUS_IS_ERR(status
)) {
1641 /* Return variables */
1642 if (unknown2
&& r
.out
.unknown2
) {
1643 *unknown2
= *r
.out
.unknown2
;
1648 *werror
= r
.out
.result
;
1651 return werror_to_ntstatus(r
.out
.result
);
1654 struct rpccli_dfs_RemoveFtRoot_state
{
1655 struct dfs_RemoveFtRoot orig
;
1656 struct dfs_RemoveFtRoot tmp
;
1657 TALLOC_CTX
*out_mem_ctx
;
1658 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1661 static void rpccli_dfs_RemoveFtRoot_done(struct tevent_req
*subreq
);
1663 struct tevent_req
*rpccli_dfs_RemoveFtRoot_send(TALLOC_CTX
*mem_ctx
,
1664 struct tevent_context
*ev
,
1665 struct rpc_pipe_client
*cli
,
1666 const char *_servername
/* [in] [charset(UTF16)] */,
1667 const char *_dns_servername
/* [in] [charset(UTF16)] */,
1668 const char *_dfsname
/* [in] [charset(UTF16)] */,
1669 const char *_rootshare
/* [in] [charset(UTF16)] */,
1670 uint32_t _flags
/* [in] */,
1671 struct dfs_UnknownStruct
**_unknown
/* [in,out] [unique] */)
1673 struct tevent_req
*req
;
1674 struct rpccli_dfs_RemoveFtRoot_state
*state
;
1675 struct tevent_req
*subreq
;
1677 req
= tevent_req_create(mem_ctx
, &state
,
1678 struct rpccli_dfs_RemoveFtRoot_state
);
1682 state
->out_mem_ctx
= NULL
;
1683 state
->dispatch_recv
= cli
->dispatch_recv
;
1686 state
->orig
.in
.servername
= _servername
;
1687 state
->orig
.in
.dns_servername
= _dns_servername
;
1688 state
->orig
.in
.dfsname
= _dfsname
;
1689 state
->orig
.in
.rootshare
= _rootshare
;
1690 state
->orig
.in
.flags
= _flags
;
1691 state
->orig
.in
.unknown
= _unknown
;
1693 /* Out parameters */
1694 state
->orig
.out
.unknown
= _unknown
;
1697 ZERO_STRUCT(state
->orig
.out
.result
);
1699 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1700 "rpccli_dfs_RemoveFtRoot_out_memory");
1701 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1702 return tevent_req_post(req
, ev
);
1705 /* make a temporary copy, that we pass to the dispatch function */
1706 state
->tmp
= state
->orig
;
1708 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1710 NDR_DFS_REMOVEFTROOT
,
1712 if (tevent_req_nomem(subreq
, req
)) {
1713 return tevent_req_post(req
, ev
);
1715 tevent_req_set_callback(subreq
, rpccli_dfs_RemoveFtRoot_done
, req
);
1719 static void rpccli_dfs_RemoveFtRoot_done(struct tevent_req
*subreq
)
1721 struct tevent_req
*req
= tevent_req_callback_data(
1722 subreq
, struct tevent_req
);
1723 struct rpccli_dfs_RemoveFtRoot_state
*state
= tevent_req_data(
1724 req
, struct rpccli_dfs_RemoveFtRoot_state
);
1726 TALLOC_CTX
*mem_ctx
;
1728 if (state
->out_mem_ctx
) {
1729 mem_ctx
= state
->out_mem_ctx
;
1734 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1735 TALLOC_FREE(subreq
);
1736 if (!NT_STATUS_IS_OK(status
)) {
1737 tevent_req_nterror(req
, status
);
1741 /* Copy out parameters */
1742 if (state
->orig
.out
.unknown
&& state
->tmp
.out
.unknown
) {
1743 *state
->orig
.out
.unknown
= *state
->tmp
.out
.unknown
;
1747 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1749 /* Reset temporary structure */
1750 ZERO_STRUCT(state
->tmp
);
1752 tevent_req_done(req
);
1755 NTSTATUS
rpccli_dfs_RemoveFtRoot_recv(struct tevent_req
*req
,
1756 TALLOC_CTX
*mem_ctx
,
1759 struct rpccli_dfs_RemoveFtRoot_state
*state
= tevent_req_data(
1760 req
, struct rpccli_dfs_RemoveFtRoot_state
);
1763 if (tevent_req_is_nterror(req
, &status
)) {
1764 tevent_req_received(req
);
1768 /* Steal possbile out parameters to the callers context */
1769 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1772 *result
= state
->orig
.out
.result
;
1774 tevent_req_received(req
);
1775 return NT_STATUS_OK
;
1778 NTSTATUS
rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client
*cli
,
1779 TALLOC_CTX
*mem_ctx
,
1780 const char *servername
/* [in] [charset(UTF16)] */,
1781 const char *dns_servername
/* [in] [charset(UTF16)] */,
1782 const char *dfsname
/* [in] [charset(UTF16)] */,
1783 const char *rootshare
/* [in] [charset(UTF16)] */,
1784 uint32_t flags
/* [in] */,
1785 struct dfs_UnknownStruct
**unknown
/* [in,out] [unique] */,
1788 struct dfs_RemoveFtRoot r
;
1792 r
.in
.servername
= servername
;
1793 r
.in
.dns_servername
= dns_servername
;
1794 r
.in
.dfsname
= dfsname
;
1795 r
.in
.rootshare
= rootshare
;
1797 r
.in
.unknown
= unknown
;
1799 status
= cli
->dispatch(cli
,
1802 NDR_DFS_REMOVEFTROOT
,
1805 if (!NT_STATUS_IS_OK(status
)) {
1809 if (NT_STATUS_IS_ERR(status
)) {
1813 /* Return variables */
1814 if (unknown
&& r
.out
.unknown
) {
1815 *unknown
= *r
.out
.unknown
;
1820 *werror
= r
.out
.result
;
1823 return werror_to_ntstatus(r
.out
.result
);
1826 struct rpccli_dfs_AddStdRoot_state
{
1827 struct dfs_AddStdRoot orig
;
1828 struct dfs_AddStdRoot tmp
;
1829 TALLOC_CTX
*out_mem_ctx
;
1830 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1833 static void rpccli_dfs_AddStdRoot_done(struct tevent_req
*subreq
);
1835 struct tevent_req
*rpccli_dfs_AddStdRoot_send(TALLOC_CTX
*mem_ctx
,
1836 struct tevent_context
*ev
,
1837 struct rpc_pipe_client
*cli
,
1838 const char *_servername
/* [in] [charset(UTF16)] */,
1839 const char *_rootshare
/* [in] [charset(UTF16)] */,
1840 const char *_comment
/* [in] [charset(UTF16)] */,
1841 uint32_t _flags
/* [in] */)
1843 struct tevent_req
*req
;
1844 struct rpccli_dfs_AddStdRoot_state
*state
;
1845 struct tevent_req
*subreq
;
1847 req
= tevent_req_create(mem_ctx
, &state
,
1848 struct rpccli_dfs_AddStdRoot_state
);
1852 state
->out_mem_ctx
= NULL
;
1853 state
->dispatch_recv
= cli
->dispatch_recv
;
1856 state
->orig
.in
.servername
= _servername
;
1857 state
->orig
.in
.rootshare
= _rootshare
;
1858 state
->orig
.in
.comment
= _comment
;
1859 state
->orig
.in
.flags
= _flags
;
1861 /* Out parameters */
1864 ZERO_STRUCT(state
->orig
.out
.result
);
1866 /* make a temporary copy, that we pass to the dispatch function */
1867 state
->tmp
= state
->orig
;
1869 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1873 if (tevent_req_nomem(subreq
, req
)) {
1874 return tevent_req_post(req
, ev
);
1876 tevent_req_set_callback(subreq
, rpccli_dfs_AddStdRoot_done
, req
);
1880 static void rpccli_dfs_AddStdRoot_done(struct tevent_req
*subreq
)
1882 struct tevent_req
*req
= tevent_req_callback_data(
1883 subreq
, struct tevent_req
);
1884 struct rpccli_dfs_AddStdRoot_state
*state
= tevent_req_data(
1885 req
, struct rpccli_dfs_AddStdRoot_state
);
1887 TALLOC_CTX
*mem_ctx
;
1889 if (state
->out_mem_ctx
) {
1890 mem_ctx
= state
->out_mem_ctx
;
1895 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1896 TALLOC_FREE(subreq
);
1897 if (!NT_STATUS_IS_OK(status
)) {
1898 tevent_req_nterror(req
, status
);
1902 /* Copy out parameters */
1905 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1907 /* Reset temporary structure */
1908 ZERO_STRUCT(state
->tmp
);
1910 tevent_req_done(req
);
1913 NTSTATUS
rpccli_dfs_AddStdRoot_recv(struct tevent_req
*req
,
1914 TALLOC_CTX
*mem_ctx
,
1917 struct rpccli_dfs_AddStdRoot_state
*state
= tevent_req_data(
1918 req
, struct rpccli_dfs_AddStdRoot_state
);
1921 if (tevent_req_is_nterror(req
, &status
)) {
1922 tevent_req_received(req
);
1926 /* Steal possbile out parameters to the callers context */
1927 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1930 *result
= state
->orig
.out
.result
;
1932 tevent_req_received(req
);
1933 return NT_STATUS_OK
;
1936 NTSTATUS
rpccli_dfs_AddStdRoot(struct rpc_pipe_client
*cli
,
1937 TALLOC_CTX
*mem_ctx
,
1938 const char *servername
/* [in] [charset(UTF16)] */,
1939 const char *rootshare
/* [in] [charset(UTF16)] */,
1940 const char *comment
/* [in] [charset(UTF16)] */,
1941 uint32_t flags
/* [in] */,
1944 struct dfs_AddStdRoot r
;
1948 r
.in
.servername
= servername
;
1949 r
.in
.rootshare
= rootshare
;
1950 r
.in
.comment
= comment
;
1953 status
= cli
->dispatch(cli
,
1959 if (!NT_STATUS_IS_OK(status
)) {
1963 if (NT_STATUS_IS_ERR(status
)) {
1967 /* Return variables */
1971 *werror
= r
.out
.result
;
1974 return werror_to_ntstatus(r
.out
.result
);
1977 struct rpccli_dfs_RemoveStdRoot_state
{
1978 struct dfs_RemoveStdRoot orig
;
1979 struct dfs_RemoveStdRoot tmp
;
1980 TALLOC_CTX
*out_mem_ctx
;
1981 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1984 static void rpccli_dfs_RemoveStdRoot_done(struct tevent_req
*subreq
);
1986 struct tevent_req
*rpccli_dfs_RemoveStdRoot_send(TALLOC_CTX
*mem_ctx
,
1987 struct tevent_context
*ev
,
1988 struct rpc_pipe_client
*cli
,
1989 const char *_servername
/* [in] [charset(UTF16)] */,
1990 const char *_rootshare
/* [in] [charset(UTF16)] */,
1991 uint32_t _flags
/* [in] */)
1993 struct tevent_req
*req
;
1994 struct rpccli_dfs_RemoveStdRoot_state
*state
;
1995 struct tevent_req
*subreq
;
1997 req
= tevent_req_create(mem_ctx
, &state
,
1998 struct rpccli_dfs_RemoveStdRoot_state
);
2002 state
->out_mem_ctx
= NULL
;
2003 state
->dispatch_recv
= cli
->dispatch_recv
;
2006 state
->orig
.in
.servername
= _servername
;
2007 state
->orig
.in
.rootshare
= _rootshare
;
2008 state
->orig
.in
.flags
= _flags
;
2010 /* Out parameters */
2013 ZERO_STRUCT(state
->orig
.out
.result
);
2015 /* make a temporary copy, that we pass to the dispatch function */
2016 state
->tmp
= state
->orig
;
2018 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2020 NDR_DFS_REMOVESTDROOT
,
2022 if (tevent_req_nomem(subreq
, req
)) {
2023 return tevent_req_post(req
, ev
);
2025 tevent_req_set_callback(subreq
, rpccli_dfs_RemoveStdRoot_done
, req
);
2029 static void rpccli_dfs_RemoveStdRoot_done(struct tevent_req
*subreq
)
2031 struct tevent_req
*req
= tevent_req_callback_data(
2032 subreq
, struct tevent_req
);
2033 struct rpccli_dfs_RemoveStdRoot_state
*state
= tevent_req_data(
2034 req
, struct rpccli_dfs_RemoveStdRoot_state
);
2036 TALLOC_CTX
*mem_ctx
;
2038 if (state
->out_mem_ctx
) {
2039 mem_ctx
= state
->out_mem_ctx
;
2044 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2045 TALLOC_FREE(subreq
);
2046 if (!NT_STATUS_IS_OK(status
)) {
2047 tevent_req_nterror(req
, status
);
2051 /* Copy out parameters */
2054 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2056 /* Reset temporary structure */
2057 ZERO_STRUCT(state
->tmp
);
2059 tevent_req_done(req
);
2062 NTSTATUS
rpccli_dfs_RemoveStdRoot_recv(struct tevent_req
*req
,
2063 TALLOC_CTX
*mem_ctx
,
2066 struct rpccli_dfs_RemoveStdRoot_state
*state
= tevent_req_data(
2067 req
, struct rpccli_dfs_RemoveStdRoot_state
);
2070 if (tevent_req_is_nterror(req
, &status
)) {
2071 tevent_req_received(req
);
2075 /* Steal possbile out parameters to the callers context */
2076 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2079 *result
= state
->orig
.out
.result
;
2081 tevent_req_received(req
);
2082 return NT_STATUS_OK
;
2085 NTSTATUS
rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client
*cli
,
2086 TALLOC_CTX
*mem_ctx
,
2087 const char *servername
/* [in] [charset(UTF16)] */,
2088 const char *rootshare
/* [in] [charset(UTF16)] */,
2089 uint32_t flags
/* [in] */,
2092 struct dfs_RemoveStdRoot r
;
2096 r
.in
.servername
= servername
;
2097 r
.in
.rootshare
= rootshare
;
2100 status
= cli
->dispatch(cli
,
2103 NDR_DFS_REMOVESTDROOT
,
2106 if (!NT_STATUS_IS_OK(status
)) {
2110 if (NT_STATUS_IS_ERR(status
)) {
2114 /* Return variables */
2118 *werror
= r
.out
.result
;
2121 return werror_to_ntstatus(r
.out
.result
);
2124 struct rpccli_dfs_ManagerInitialize_state
{
2125 struct dfs_ManagerInitialize orig
;
2126 struct dfs_ManagerInitialize tmp
;
2127 TALLOC_CTX
*out_mem_ctx
;
2128 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2131 static void rpccli_dfs_ManagerInitialize_done(struct tevent_req
*subreq
);
2133 struct tevent_req
*rpccli_dfs_ManagerInitialize_send(TALLOC_CTX
*mem_ctx
,
2134 struct tevent_context
*ev
,
2135 struct rpc_pipe_client
*cli
,
2136 const char *_servername
/* [in] [ref,charset(UTF16)] */,
2137 uint32_t _flags
/* [in] */)
2139 struct tevent_req
*req
;
2140 struct rpccli_dfs_ManagerInitialize_state
*state
;
2141 struct tevent_req
*subreq
;
2143 req
= tevent_req_create(mem_ctx
, &state
,
2144 struct rpccli_dfs_ManagerInitialize_state
);
2148 state
->out_mem_ctx
= NULL
;
2149 state
->dispatch_recv
= cli
->dispatch_recv
;
2152 state
->orig
.in
.servername
= _servername
;
2153 state
->orig
.in
.flags
= _flags
;
2155 /* Out parameters */
2158 ZERO_STRUCT(state
->orig
.out
.result
);
2160 /* make a temporary copy, that we pass to the dispatch function */
2161 state
->tmp
= state
->orig
;
2163 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2165 NDR_DFS_MANAGERINITIALIZE
,
2167 if (tevent_req_nomem(subreq
, req
)) {
2168 return tevent_req_post(req
, ev
);
2170 tevent_req_set_callback(subreq
, rpccli_dfs_ManagerInitialize_done
, req
);
2174 static void rpccli_dfs_ManagerInitialize_done(struct tevent_req
*subreq
)
2176 struct tevent_req
*req
= tevent_req_callback_data(
2177 subreq
, struct tevent_req
);
2178 struct rpccli_dfs_ManagerInitialize_state
*state
= tevent_req_data(
2179 req
, struct rpccli_dfs_ManagerInitialize_state
);
2181 TALLOC_CTX
*mem_ctx
;
2183 if (state
->out_mem_ctx
) {
2184 mem_ctx
= state
->out_mem_ctx
;
2189 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2190 TALLOC_FREE(subreq
);
2191 if (!NT_STATUS_IS_OK(status
)) {
2192 tevent_req_nterror(req
, status
);
2196 /* Copy out parameters */
2199 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2201 /* Reset temporary structure */
2202 ZERO_STRUCT(state
->tmp
);
2204 tevent_req_done(req
);
2207 NTSTATUS
rpccli_dfs_ManagerInitialize_recv(struct tevent_req
*req
,
2208 TALLOC_CTX
*mem_ctx
,
2211 struct rpccli_dfs_ManagerInitialize_state
*state
= tevent_req_data(
2212 req
, struct rpccli_dfs_ManagerInitialize_state
);
2215 if (tevent_req_is_nterror(req
, &status
)) {
2216 tevent_req_received(req
);
2220 /* Steal possbile out parameters to the callers context */
2221 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2224 *result
= state
->orig
.out
.result
;
2226 tevent_req_received(req
);
2227 return NT_STATUS_OK
;
2230 NTSTATUS
rpccli_dfs_ManagerInitialize(struct rpc_pipe_client
*cli
,
2231 TALLOC_CTX
*mem_ctx
,
2232 const char *servername
/* [in] [ref,charset(UTF16)] */,
2233 uint32_t flags
/* [in] */,
2236 struct dfs_ManagerInitialize r
;
2240 r
.in
.servername
= servername
;
2243 status
= cli
->dispatch(cli
,
2246 NDR_DFS_MANAGERINITIALIZE
,
2249 if (!NT_STATUS_IS_OK(status
)) {
2253 if (NT_STATUS_IS_ERR(status
)) {
2257 /* Return variables */
2261 *werror
= r
.out
.result
;
2264 return werror_to_ntstatus(r
.out
.result
);
2267 struct rpccli_dfs_AddStdRootForced_state
{
2268 struct dfs_AddStdRootForced orig
;
2269 struct dfs_AddStdRootForced tmp
;
2270 TALLOC_CTX
*out_mem_ctx
;
2271 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2274 static void rpccli_dfs_AddStdRootForced_done(struct tevent_req
*subreq
);
2276 struct tevent_req
*rpccli_dfs_AddStdRootForced_send(TALLOC_CTX
*mem_ctx
,
2277 struct tevent_context
*ev
,
2278 struct rpc_pipe_client
*cli
,
2279 const char *_servername
/* [in] [charset(UTF16)] */,
2280 const char *_rootshare
/* [in] [charset(UTF16)] */,
2281 const char *_comment
/* [in] [charset(UTF16)] */,
2282 const char *_store
/* [in] [charset(UTF16)] */)
2284 struct tevent_req
*req
;
2285 struct rpccli_dfs_AddStdRootForced_state
*state
;
2286 struct tevent_req
*subreq
;
2288 req
= tevent_req_create(mem_ctx
, &state
,
2289 struct rpccli_dfs_AddStdRootForced_state
);
2293 state
->out_mem_ctx
= NULL
;
2294 state
->dispatch_recv
= cli
->dispatch_recv
;
2297 state
->orig
.in
.servername
= _servername
;
2298 state
->orig
.in
.rootshare
= _rootshare
;
2299 state
->orig
.in
.comment
= _comment
;
2300 state
->orig
.in
.store
= _store
;
2302 /* Out parameters */
2305 ZERO_STRUCT(state
->orig
.out
.result
);
2307 /* make a temporary copy, that we pass to the dispatch function */
2308 state
->tmp
= state
->orig
;
2310 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2312 NDR_DFS_ADDSTDROOTFORCED
,
2314 if (tevent_req_nomem(subreq
, req
)) {
2315 return tevent_req_post(req
, ev
);
2317 tevent_req_set_callback(subreq
, rpccli_dfs_AddStdRootForced_done
, req
);
2321 static void rpccli_dfs_AddStdRootForced_done(struct tevent_req
*subreq
)
2323 struct tevent_req
*req
= tevent_req_callback_data(
2324 subreq
, struct tevent_req
);
2325 struct rpccli_dfs_AddStdRootForced_state
*state
= tevent_req_data(
2326 req
, struct rpccli_dfs_AddStdRootForced_state
);
2328 TALLOC_CTX
*mem_ctx
;
2330 if (state
->out_mem_ctx
) {
2331 mem_ctx
= state
->out_mem_ctx
;
2336 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2337 TALLOC_FREE(subreq
);
2338 if (!NT_STATUS_IS_OK(status
)) {
2339 tevent_req_nterror(req
, status
);
2343 /* Copy out parameters */
2346 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2348 /* Reset temporary structure */
2349 ZERO_STRUCT(state
->tmp
);
2351 tevent_req_done(req
);
2354 NTSTATUS
rpccli_dfs_AddStdRootForced_recv(struct tevent_req
*req
,
2355 TALLOC_CTX
*mem_ctx
,
2358 struct rpccli_dfs_AddStdRootForced_state
*state
= tevent_req_data(
2359 req
, struct rpccli_dfs_AddStdRootForced_state
);
2362 if (tevent_req_is_nterror(req
, &status
)) {
2363 tevent_req_received(req
);
2367 /* Steal possbile out parameters to the callers context */
2368 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2371 *result
= state
->orig
.out
.result
;
2373 tevent_req_received(req
);
2374 return NT_STATUS_OK
;
2377 NTSTATUS
rpccli_dfs_AddStdRootForced(struct rpc_pipe_client
*cli
,
2378 TALLOC_CTX
*mem_ctx
,
2379 const char *servername
/* [in] [charset(UTF16)] */,
2380 const char *rootshare
/* [in] [charset(UTF16)] */,
2381 const char *comment
/* [in] [charset(UTF16)] */,
2382 const char *store
/* [in] [charset(UTF16)] */,
2385 struct dfs_AddStdRootForced r
;
2389 r
.in
.servername
= servername
;
2390 r
.in
.rootshare
= rootshare
;
2391 r
.in
.comment
= comment
;
2394 status
= cli
->dispatch(cli
,
2397 NDR_DFS_ADDSTDROOTFORCED
,
2400 if (!NT_STATUS_IS_OK(status
)) {
2404 if (NT_STATUS_IS_ERR(status
)) {
2408 /* Return variables */
2412 *werror
= r
.out
.result
;
2415 return werror_to_ntstatus(r
.out
.result
);
2418 struct rpccli_dfs_GetDcAddress_state
{
2419 struct dfs_GetDcAddress orig
;
2420 struct dfs_GetDcAddress tmp
;
2421 TALLOC_CTX
*out_mem_ctx
;
2422 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2425 static void rpccli_dfs_GetDcAddress_done(struct tevent_req
*subreq
);
2427 struct tevent_req
*rpccli_dfs_GetDcAddress_send(TALLOC_CTX
*mem_ctx
,
2428 struct tevent_context
*ev
,
2429 struct rpc_pipe_client
*cli
,
2430 const char *_servername
/* [in] [charset(UTF16)] */,
2431 const char **_server_fullname
/* [in,out] [ref,charset(UTF16)] */,
2432 uint8_t *_is_root
/* [in,out] [ref] */,
2433 uint32_t *_ttl
/* [in,out] [ref] */)
2435 struct tevent_req
*req
;
2436 struct rpccli_dfs_GetDcAddress_state
*state
;
2437 struct tevent_req
*subreq
;
2439 req
= tevent_req_create(mem_ctx
, &state
,
2440 struct rpccli_dfs_GetDcAddress_state
);
2444 state
->out_mem_ctx
= NULL
;
2445 state
->dispatch_recv
= cli
->dispatch_recv
;
2448 state
->orig
.in
.servername
= _servername
;
2449 state
->orig
.in
.server_fullname
= _server_fullname
;
2450 state
->orig
.in
.is_root
= _is_root
;
2451 state
->orig
.in
.ttl
= _ttl
;
2453 /* Out parameters */
2454 state
->orig
.out
.server_fullname
= _server_fullname
;
2455 state
->orig
.out
.is_root
= _is_root
;
2456 state
->orig
.out
.ttl
= _ttl
;
2459 ZERO_STRUCT(state
->orig
.out
.result
);
2461 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2462 "rpccli_dfs_GetDcAddress_out_memory");
2463 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2464 return tevent_req_post(req
, ev
);
2467 /* make a temporary copy, that we pass to the dispatch function */
2468 state
->tmp
= state
->orig
;
2470 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2472 NDR_DFS_GETDCADDRESS
,
2474 if (tevent_req_nomem(subreq
, req
)) {
2475 return tevent_req_post(req
, ev
);
2477 tevent_req_set_callback(subreq
, rpccli_dfs_GetDcAddress_done
, req
);
2481 static void rpccli_dfs_GetDcAddress_done(struct tevent_req
*subreq
)
2483 struct tevent_req
*req
= tevent_req_callback_data(
2484 subreq
, struct tevent_req
);
2485 struct rpccli_dfs_GetDcAddress_state
*state
= tevent_req_data(
2486 req
, struct rpccli_dfs_GetDcAddress_state
);
2488 TALLOC_CTX
*mem_ctx
;
2490 if (state
->out_mem_ctx
) {
2491 mem_ctx
= state
->out_mem_ctx
;
2496 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2497 TALLOC_FREE(subreq
);
2498 if (!NT_STATUS_IS_OK(status
)) {
2499 tevent_req_nterror(req
, status
);
2503 /* Copy out parameters */
2504 *state
->orig
.out
.server_fullname
= *state
->tmp
.out
.server_fullname
;
2505 *state
->orig
.out
.is_root
= *state
->tmp
.out
.is_root
;
2506 *state
->orig
.out
.ttl
= *state
->tmp
.out
.ttl
;
2509 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2511 /* Reset temporary structure */
2512 ZERO_STRUCT(state
->tmp
);
2514 tevent_req_done(req
);
2517 NTSTATUS
rpccli_dfs_GetDcAddress_recv(struct tevent_req
*req
,
2518 TALLOC_CTX
*mem_ctx
,
2521 struct rpccli_dfs_GetDcAddress_state
*state
= tevent_req_data(
2522 req
, struct rpccli_dfs_GetDcAddress_state
);
2525 if (tevent_req_is_nterror(req
, &status
)) {
2526 tevent_req_received(req
);
2530 /* Steal possbile out parameters to the callers context */
2531 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2534 *result
= state
->orig
.out
.result
;
2536 tevent_req_received(req
);
2537 return NT_STATUS_OK
;
2540 NTSTATUS
rpccli_dfs_GetDcAddress(struct rpc_pipe_client
*cli
,
2541 TALLOC_CTX
*mem_ctx
,
2542 const char *servername
/* [in] [charset(UTF16)] */,
2543 const char **server_fullname
/* [in,out] [ref,charset(UTF16)] */,
2544 uint8_t *is_root
/* [in,out] [ref] */,
2545 uint32_t *ttl
/* [in,out] [ref] */,
2548 struct dfs_GetDcAddress r
;
2552 r
.in
.servername
= servername
;
2553 r
.in
.server_fullname
= server_fullname
;
2554 r
.in
.is_root
= is_root
;
2557 status
= cli
->dispatch(cli
,
2560 NDR_DFS_GETDCADDRESS
,
2563 if (!NT_STATUS_IS_OK(status
)) {
2567 if (NT_STATUS_IS_ERR(status
)) {
2571 /* Return variables */
2572 *server_fullname
= *r
.out
.server_fullname
;
2573 *is_root
= *r
.out
.is_root
;
2578 *werror
= r
.out
.result
;
2581 return werror_to_ntstatus(r
.out
.result
);
2584 struct rpccli_dfs_SetDcAddress_state
{
2585 struct dfs_SetDcAddress orig
;
2586 struct dfs_SetDcAddress tmp
;
2587 TALLOC_CTX
*out_mem_ctx
;
2588 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2591 static void rpccli_dfs_SetDcAddress_done(struct tevent_req
*subreq
);
2593 struct tevent_req
*rpccli_dfs_SetDcAddress_send(TALLOC_CTX
*mem_ctx
,
2594 struct tevent_context
*ev
,
2595 struct rpc_pipe_client
*cli
,
2596 const char *_servername
/* [in] [charset(UTF16)] */,
2597 const char *_server_fullname
/* [in] [charset(UTF16)] */,
2598 uint32_t _flags
/* [in] */,
2599 uint32_t _ttl
/* [in] */)
2601 struct tevent_req
*req
;
2602 struct rpccli_dfs_SetDcAddress_state
*state
;
2603 struct tevent_req
*subreq
;
2605 req
= tevent_req_create(mem_ctx
, &state
,
2606 struct rpccli_dfs_SetDcAddress_state
);
2610 state
->out_mem_ctx
= NULL
;
2611 state
->dispatch_recv
= cli
->dispatch_recv
;
2614 state
->orig
.in
.servername
= _servername
;
2615 state
->orig
.in
.server_fullname
= _server_fullname
;
2616 state
->orig
.in
.flags
= _flags
;
2617 state
->orig
.in
.ttl
= _ttl
;
2619 /* Out parameters */
2622 ZERO_STRUCT(state
->orig
.out
.result
);
2624 /* make a temporary copy, that we pass to the dispatch function */
2625 state
->tmp
= state
->orig
;
2627 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2629 NDR_DFS_SETDCADDRESS
,
2631 if (tevent_req_nomem(subreq
, req
)) {
2632 return tevent_req_post(req
, ev
);
2634 tevent_req_set_callback(subreq
, rpccli_dfs_SetDcAddress_done
, req
);
2638 static void rpccli_dfs_SetDcAddress_done(struct tevent_req
*subreq
)
2640 struct tevent_req
*req
= tevent_req_callback_data(
2641 subreq
, struct tevent_req
);
2642 struct rpccli_dfs_SetDcAddress_state
*state
= tevent_req_data(
2643 req
, struct rpccli_dfs_SetDcAddress_state
);
2645 TALLOC_CTX
*mem_ctx
;
2647 if (state
->out_mem_ctx
) {
2648 mem_ctx
= state
->out_mem_ctx
;
2653 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2654 TALLOC_FREE(subreq
);
2655 if (!NT_STATUS_IS_OK(status
)) {
2656 tevent_req_nterror(req
, status
);
2660 /* Copy out parameters */
2663 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2665 /* Reset temporary structure */
2666 ZERO_STRUCT(state
->tmp
);
2668 tevent_req_done(req
);
2671 NTSTATUS
rpccli_dfs_SetDcAddress_recv(struct tevent_req
*req
,
2672 TALLOC_CTX
*mem_ctx
,
2675 struct rpccli_dfs_SetDcAddress_state
*state
= tevent_req_data(
2676 req
, struct rpccli_dfs_SetDcAddress_state
);
2679 if (tevent_req_is_nterror(req
, &status
)) {
2680 tevent_req_received(req
);
2684 /* Steal possbile out parameters to the callers context */
2685 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2688 *result
= state
->orig
.out
.result
;
2690 tevent_req_received(req
);
2691 return NT_STATUS_OK
;
2694 NTSTATUS
rpccli_dfs_SetDcAddress(struct rpc_pipe_client
*cli
,
2695 TALLOC_CTX
*mem_ctx
,
2696 const char *servername
/* [in] [charset(UTF16)] */,
2697 const char *server_fullname
/* [in] [charset(UTF16)] */,
2698 uint32_t flags
/* [in] */,
2699 uint32_t ttl
/* [in] */,
2702 struct dfs_SetDcAddress r
;
2706 r
.in
.servername
= servername
;
2707 r
.in
.server_fullname
= server_fullname
;
2711 status
= cli
->dispatch(cli
,
2714 NDR_DFS_SETDCADDRESS
,
2717 if (!NT_STATUS_IS_OK(status
)) {
2721 if (NT_STATUS_IS_ERR(status
)) {
2725 /* Return variables */
2729 *werror
= r
.out
.result
;
2732 return werror_to_ntstatus(r
.out
.result
);
2735 struct rpccli_dfs_FlushFtTable_state
{
2736 struct dfs_FlushFtTable orig
;
2737 struct dfs_FlushFtTable tmp
;
2738 TALLOC_CTX
*out_mem_ctx
;
2739 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2742 static void rpccli_dfs_FlushFtTable_done(struct tevent_req
*subreq
);
2744 struct tevent_req
*rpccli_dfs_FlushFtTable_send(TALLOC_CTX
*mem_ctx
,
2745 struct tevent_context
*ev
,
2746 struct rpc_pipe_client
*cli
,
2747 const char *_servername
/* [in] [charset(UTF16)] */,
2748 const char *_rootshare
/* [in] [charset(UTF16)] */)
2750 struct tevent_req
*req
;
2751 struct rpccli_dfs_FlushFtTable_state
*state
;
2752 struct tevent_req
*subreq
;
2754 req
= tevent_req_create(mem_ctx
, &state
,
2755 struct rpccli_dfs_FlushFtTable_state
);
2759 state
->out_mem_ctx
= NULL
;
2760 state
->dispatch_recv
= cli
->dispatch_recv
;
2763 state
->orig
.in
.servername
= _servername
;
2764 state
->orig
.in
.rootshare
= _rootshare
;
2766 /* Out parameters */
2769 ZERO_STRUCT(state
->orig
.out
.result
);
2771 /* make a temporary copy, that we pass to the dispatch function */
2772 state
->tmp
= state
->orig
;
2774 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2776 NDR_DFS_FLUSHFTTABLE
,
2778 if (tevent_req_nomem(subreq
, req
)) {
2779 return tevent_req_post(req
, ev
);
2781 tevent_req_set_callback(subreq
, rpccli_dfs_FlushFtTable_done
, req
);
2785 static void rpccli_dfs_FlushFtTable_done(struct tevent_req
*subreq
)
2787 struct tevent_req
*req
= tevent_req_callback_data(
2788 subreq
, struct tevent_req
);
2789 struct rpccli_dfs_FlushFtTable_state
*state
= tevent_req_data(
2790 req
, struct rpccli_dfs_FlushFtTable_state
);
2792 TALLOC_CTX
*mem_ctx
;
2794 if (state
->out_mem_ctx
) {
2795 mem_ctx
= state
->out_mem_ctx
;
2800 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2801 TALLOC_FREE(subreq
);
2802 if (!NT_STATUS_IS_OK(status
)) {
2803 tevent_req_nterror(req
, status
);
2807 /* Copy out parameters */
2810 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2812 /* Reset temporary structure */
2813 ZERO_STRUCT(state
->tmp
);
2815 tevent_req_done(req
);
2818 NTSTATUS
rpccli_dfs_FlushFtTable_recv(struct tevent_req
*req
,
2819 TALLOC_CTX
*mem_ctx
,
2822 struct rpccli_dfs_FlushFtTable_state
*state
= tevent_req_data(
2823 req
, struct rpccli_dfs_FlushFtTable_state
);
2826 if (tevent_req_is_nterror(req
, &status
)) {
2827 tevent_req_received(req
);
2831 /* Steal possbile out parameters to the callers context */
2832 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2835 *result
= state
->orig
.out
.result
;
2837 tevent_req_received(req
);
2838 return NT_STATUS_OK
;
2841 NTSTATUS
rpccli_dfs_FlushFtTable(struct rpc_pipe_client
*cli
,
2842 TALLOC_CTX
*mem_ctx
,
2843 const char *servername
/* [in] [charset(UTF16)] */,
2844 const char *rootshare
/* [in] [charset(UTF16)] */,
2847 struct dfs_FlushFtTable r
;
2851 r
.in
.servername
= servername
;
2852 r
.in
.rootshare
= rootshare
;
2854 status
= cli
->dispatch(cli
,
2857 NDR_DFS_FLUSHFTTABLE
,
2860 if (!NT_STATUS_IS_OK(status
)) {
2864 if (NT_STATUS_IS_ERR(status
)) {
2868 /* Return variables */
2872 *werror
= r
.out
.result
;
2875 return werror_to_ntstatus(r
.out
.result
);
2878 struct rpccli_dfs_Add2_state
{
2879 struct dfs_Add2 orig
;
2880 struct dfs_Add2 tmp
;
2881 TALLOC_CTX
*out_mem_ctx
;
2882 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2885 static void rpccli_dfs_Add2_done(struct tevent_req
*subreq
);
2887 struct tevent_req
*rpccli_dfs_Add2_send(TALLOC_CTX
*mem_ctx
,
2888 struct tevent_context
*ev
,
2889 struct rpc_pipe_client
*cli
)
2891 struct tevent_req
*req
;
2892 struct rpccli_dfs_Add2_state
*state
;
2893 struct tevent_req
*subreq
;
2895 req
= tevent_req_create(mem_ctx
, &state
,
2896 struct rpccli_dfs_Add2_state
);
2900 state
->out_mem_ctx
= NULL
;
2901 state
->dispatch_recv
= cli
->dispatch_recv
;
2905 /* Out parameters */
2908 ZERO_STRUCT(state
->orig
.out
.result
);
2910 /* make a temporary copy, that we pass to the dispatch function */
2911 state
->tmp
= state
->orig
;
2913 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2917 if (tevent_req_nomem(subreq
, req
)) {
2918 return tevent_req_post(req
, ev
);
2920 tevent_req_set_callback(subreq
, rpccli_dfs_Add2_done
, req
);
2924 static void rpccli_dfs_Add2_done(struct tevent_req
*subreq
)
2926 struct tevent_req
*req
= tevent_req_callback_data(
2927 subreq
, struct tevent_req
);
2928 struct rpccli_dfs_Add2_state
*state
= tevent_req_data(
2929 req
, struct rpccli_dfs_Add2_state
);
2931 TALLOC_CTX
*mem_ctx
;
2933 if (state
->out_mem_ctx
) {
2934 mem_ctx
= state
->out_mem_ctx
;
2939 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2940 TALLOC_FREE(subreq
);
2941 if (!NT_STATUS_IS_OK(status
)) {
2942 tevent_req_nterror(req
, status
);
2946 /* Copy out parameters */
2949 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2951 /* Reset temporary structure */
2952 ZERO_STRUCT(state
->tmp
);
2954 tevent_req_done(req
);
2957 NTSTATUS
rpccli_dfs_Add2_recv(struct tevent_req
*req
,
2958 TALLOC_CTX
*mem_ctx
,
2961 struct rpccli_dfs_Add2_state
*state
= tevent_req_data(
2962 req
, struct rpccli_dfs_Add2_state
);
2965 if (tevent_req_is_nterror(req
, &status
)) {
2966 tevent_req_received(req
);
2970 /* Steal possbile out parameters to the callers context */
2971 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2974 *result
= state
->orig
.out
.result
;
2976 tevent_req_received(req
);
2977 return NT_STATUS_OK
;
2980 NTSTATUS
rpccli_dfs_Add2(struct rpc_pipe_client
*cli
,
2981 TALLOC_CTX
*mem_ctx
,
2989 status
= cli
->dispatch(cli
,
2995 if (!NT_STATUS_IS_OK(status
)) {
2999 if (NT_STATUS_IS_ERR(status
)) {
3003 /* Return variables */
3007 *werror
= r
.out
.result
;
3010 return werror_to_ntstatus(r
.out
.result
);
3013 struct rpccli_dfs_Remove2_state
{
3014 struct dfs_Remove2 orig
;
3015 struct dfs_Remove2 tmp
;
3016 TALLOC_CTX
*out_mem_ctx
;
3017 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3020 static void rpccli_dfs_Remove2_done(struct tevent_req
*subreq
);
3022 struct tevent_req
*rpccli_dfs_Remove2_send(TALLOC_CTX
*mem_ctx
,
3023 struct tevent_context
*ev
,
3024 struct rpc_pipe_client
*cli
)
3026 struct tevent_req
*req
;
3027 struct rpccli_dfs_Remove2_state
*state
;
3028 struct tevent_req
*subreq
;
3030 req
= tevent_req_create(mem_ctx
, &state
,
3031 struct rpccli_dfs_Remove2_state
);
3035 state
->out_mem_ctx
= NULL
;
3036 state
->dispatch_recv
= cli
->dispatch_recv
;
3040 /* Out parameters */
3043 ZERO_STRUCT(state
->orig
.out
.result
);
3045 /* make a temporary copy, that we pass to the dispatch function */
3046 state
->tmp
= state
->orig
;
3048 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3052 if (tevent_req_nomem(subreq
, req
)) {
3053 return tevent_req_post(req
, ev
);
3055 tevent_req_set_callback(subreq
, rpccli_dfs_Remove2_done
, req
);
3059 static void rpccli_dfs_Remove2_done(struct tevent_req
*subreq
)
3061 struct tevent_req
*req
= tevent_req_callback_data(
3062 subreq
, struct tevent_req
);
3063 struct rpccli_dfs_Remove2_state
*state
= tevent_req_data(
3064 req
, struct rpccli_dfs_Remove2_state
);
3066 TALLOC_CTX
*mem_ctx
;
3068 if (state
->out_mem_ctx
) {
3069 mem_ctx
= state
->out_mem_ctx
;
3074 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3075 TALLOC_FREE(subreq
);
3076 if (!NT_STATUS_IS_OK(status
)) {
3077 tevent_req_nterror(req
, status
);
3081 /* Copy out parameters */
3084 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3086 /* Reset temporary structure */
3087 ZERO_STRUCT(state
->tmp
);
3089 tevent_req_done(req
);
3092 NTSTATUS
rpccli_dfs_Remove2_recv(struct tevent_req
*req
,
3093 TALLOC_CTX
*mem_ctx
,
3096 struct rpccli_dfs_Remove2_state
*state
= tevent_req_data(
3097 req
, struct rpccli_dfs_Remove2_state
);
3100 if (tevent_req_is_nterror(req
, &status
)) {
3101 tevent_req_received(req
);
3105 /* Steal possbile out parameters to the callers context */
3106 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3109 *result
= state
->orig
.out
.result
;
3111 tevent_req_received(req
);
3112 return NT_STATUS_OK
;
3115 NTSTATUS
rpccli_dfs_Remove2(struct rpc_pipe_client
*cli
,
3116 TALLOC_CTX
*mem_ctx
,
3119 struct dfs_Remove2 r
;
3124 status
= cli
->dispatch(cli
,
3130 if (!NT_STATUS_IS_OK(status
)) {
3134 if (NT_STATUS_IS_ERR(status
)) {
3138 /* Return variables */
3142 *werror
= r
.out
.result
;
3145 return werror_to_ntstatus(r
.out
.result
);
3148 struct rpccli_dfs_EnumEx_state
{
3149 struct dfs_EnumEx orig
;
3150 struct dfs_EnumEx tmp
;
3151 TALLOC_CTX
*out_mem_ctx
;
3152 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3155 static void rpccli_dfs_EnumEx_done(struct tevent_req
*subreq
);
3157 struct tevent_req
*rpccli_dfs_EnumEx_send(TALLOC_CTX
*mem_ctx
,
3158 struct tevent_context
*ev
,
3159 struct rpc_pipe_client
*cli
,
3160 const char *_dfs_name
/* [in] [charset(UTF16)] */,
3161 uint32_t _level
/* [in] */,
3162 uint32_t _bufsize
/* [in] */,
3163 struct dfs_EnumStruct
*_info
/* [in,out] [unique] */,
3164 uint32_t *_total
/* [in,out] [unique] */)
3166 struct tevent_req
*req
;
3167 struct rpccli_dfs_EnumEx_state
*state
;
3168 struct tevent_req
*subreq
;
3170 req
= tevent_req_create(mem_ctx
, &state
,
3171 struct rpccli_dfs_EnumEx_state
);
3175 state
->out_mem_ctx
= NULL
;
3176 state
->dispatch_recv
= cli
->dispatch_recv
;
3179 state
->orig
.in
.dfs_name
= _dfs_name
;
3180 state
->orig
.in
.level
= _level
;
3181 state
->orig
.in
.bufsize
= _bufsize
;
3182 state
->orig
.in
.info
= _info
;
3183 state
->orig
.in
.total
= _total
;
3185 /* Out parameters */
3186 state
->orig
.out
.info
= _info
;
3187 state
->orig
.out
.total
= _total
;
3190 ZERO_STRUCT(state
->orig
.out
.result
);
3192 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3193 "rpccli_dfs_EnumEx_out_memory");
3194 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3195 return tevent_req_post(req
, ev
);
3198 /* make a temporary copy, that we pass to the dispatch function */
3199 state
->tmp
= state
->orig
;
3201 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3205 if (tevent_req_nomem(subreq
, req
)) {
3206 return tevent_req_post(req
, ev
);
3208 tevent_req_set_callback(subreq
, rpccli_dfs_EnumEx_done
, req
);
3212 static void rpccli_dfs_EnumEx_done(struct tevent_req
*subreq
)
3214 struct tevent_req
*req
= tevent_req_callback_data(
3215 subreq
, struct tevent_req
);
3216 struct rpccli_dfs_EnumEx_state
*state
= tevent_req_data(
3217 req
, struct rpccli_dfs_EnumEx_state
);
3219 TALLOC_CTX
*mem_ctx
;
3221 if (state
->out_mem_ctx
) {
3222 mem_ctx
= state
->out_mem_ctx
;
3227 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3228 TALLOC_FREE(subreq
);
3229 if (!NT_STATUS_IS_OK(status
)) {
3230 tevent_req_nterror(req
, status
);
3234 /* Copy out parameters */
3235 if (state
->orig
.out
.info
&& state
->tmp
.out
.info
) {
3236 *state
->orig
.out
.info
= *state
->tmp
.out
.info
;
3238 if (state
->orig
.out
.total
&& state
->tmp
.out
.total
) {
3239 *state
->orig
.out
.total
= *state
->tmp
.out
.total
;
3243 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3245 /* Reset temporary structure */
3246 ZERO_STRUCT(state
->tmp
);
3248 tevent_req_done(req
);
3251 NTSTATUS
rpccli_dfs_EnumEx_recv(struct tevent_req
*req
,
3252 TALLOC_CTX
*mem_ctx
,
3255 struct rpccli_dfs_EnumEx_state
*state
= tevent_req_data(
3256 req
, struct rpccli_dfs_EnumEx_state
);
3259 if (tevent_req_is_nterror(req
, &status
)) {
3260 tevent_req_received(req
);
3264 /* Steal possbile out parameters to the callers context */
3265 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3268 *result
= state
->orig
.out
.result
;
3270 tevent_req_received(req
);
3271 return NT_STATUS_OK
;
3274 NTSTATUS
rpccli_dfs_EnumEx(struct rpc_pipe_client
*cli
,
3275 TALLOC_CTX
*mem_ctx
,
3276 const char *dfs_name
/* [in] [charset(UTF16)] */,
3277 uint32_t level
/* [in] */,
3278 uint32_t bufsize
/* [in] */,
3279 struct dfs_EnumStruct
*info
/* [in,out] [unique] */,
3280 uint32_t *total
/* [in,out] [unique] */,
3283 struct dfs_EnumEx r
;
3287 r
.in
.dfs_name
= dfs_name
;
3289 r
.in
.bufsize
= bufsize
;
3293 status
= cli
->dispatch(cli
,
3299 if (!NT_STATUS_IS_OK(status
)) {
3303 if (NT_STATUS_IS_ERR(status
)) {
3307 /* Return variables */
3308 if (info
&& r
.out
.info
) {
3309 *info
= *r
.out
.info
;
3311 if (total
&& r
.out
.total
) {
3312 *total
= *r
.out
.total
;
3317 *werror
= r
.out
.result
;
3320 return werror_to_ntstatus(r
.out
.result
);
3323 struct rpccli_dfs_SetInfo2_state
{
3324 struct dfs_SetInfo2 orig
;
3325 struct dfs_SetInfo2 tmp
;
3326 TALLOC_CTX
*out_mem_ctx
;
3327 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3330 static void rpccli_dfs_SetInfo2_done(struct tevent_req
*subreq
);
3332 struct tevent_req
*rpccli_dfs_SetInfo2_send(TALLOC_CTX
*mem_ctx
,
3333 struct tevent_context
*ev
,
3334 struct rpc_pipe_client
*cli
)
3336 struct tevent_req
*req
;
3337 struct rpccli_dfs_SetInfo2_state
*state
;
3338 struct tevent_req
*subreq
;
3340 req
= tevent_req_create(mem_ctx
, &state
,
3341 struct rpccli_dfs_SetInfo2_state
);
3345 state
->out_mem_ctx
= NULL
;
3346 state
->dispatch_recv
= cli
->dispatch_recv
;
3350 /* Out parameters */
3353 ZERO_STRUCT(state
->orig
.out
.result
);
3355 /* make a temporary copy, that we pass to the dispatch function */
3356 state
->tmp
= state
->orig
;
3358 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3362 if (tevent_req_nomem(subreq
, req
)) {
3363 return tevent_req_post(req
, ev
);
3365 tevent_req_set_callback(subreq
, rpccli_dfs_SetInfo2_done
, req
);
3369 static void rpccli_dfs_SetInfo2_done(struct tevent_req
*subreq
)
3371 struct tevent_req
*req
= tevent_req_callback_data(
3372 subreq
, struct tevent_req
);
3373 struct rpccli_dfs_SetInfo2_state
*state
= tevent_req_data(
3374 req
, struct rpccli_dfs_SetInfo2_state
);
3376 TALLOC_CTX
*mem_ctx
;
3378 if (state
->out_mem_ctx
) {
3379 mem_ctx
= state
->out_mem_ctx
;
3384 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3385 TALLOC_FREE(subreq
);
3386 if (!NT_STATUS_IS_OK(status
)) {
3387 tevent_req_nterror(req
, status
);
3391 /* Copy out parameters */
3394 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3396 /* Reset temporary structure */
3397 ZERO_STRUCT(state
->tmp
);
3399 tevent_req_done(req
);
3402 NTSTATUS
rpccli_dfs_SetInfo2_recv(struct tevent_req
*req
,
3403 TALLOC_CTX
*mem_ctx
,
3406 struct rpccli_dfs_SetInfo2_state
*state
= tevent_req_data(
3407 req
, struct rpccli_dfs_SetInfo2_state
);
3410 if (tevent_req_is_nterror(req
, &status
)) {
3411 tevent_req_received(req
);
3415 /* Steal possbile out parameters to the callers context */
3416 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3419 *result
= state
->orig
.out
.result
;
3421 tevent_req_received(req
);
3422 return NT_STATUS_OK
;
3425 NTSTATUS
rpccli_dfs_SetInfo2(struct rpc_pipe_client
*cli
,
3426 TALLOC_CTX
*mem_ctx
,
3429 struct dfs_SetInfo2 r
;
3434 status
= cli
->dispatch(cli
,
3440 if (!NT_STATUS_IS_OK(status
)) {
3444 if (NT_STATUS_IS_ERR(status
)) {
3448 /* Return variables */
3452 *werror
= r
.out
.result
;
3455 return werror_to_ntstatus(r
.out
.result
);