Merge branch 'master' of /home/tridge/samba/git/combined
[Samba/aatanasov.git] / librpc / gen_ndr / cli_dfs.c
blob685e3b5e75e82f1003fda779bac233e396811e52
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
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);
29 if (req == NULL) {
30 return NULL;
32 state->out_mem_ctx = NULL;
33 state->dispatch_recv = cli->dispatch_recv;
35 /* In parameters */
37 /* Out parameters */
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,
54 &ndr_table_netdfs,
55 NDR_DFS_GETMANAGERVERSION,
56 &state->tmp);
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);
61 return 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);
70 NTSTATUS status;
71 TALLOC_CTX *mem_ctx;
73 if (state->out_mem_ctx) {
74 mem_ctx = state->out_mem_ctx;
75 } else {
76 mem_ctx = state;
79 status = state->dispatch_recv(subreq, mem_ctx);
80 TALLOC_FREE(subreq);
81 if (!NT_STATUS_IS_OK(status)) {
82 tevent_req_nterror(req, status);
83 return;
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);
96 tevent_req_done(req);
99 NTSTATUS rpccli_dfs_GetManagerVersion_recv(struct tevent_req *req,
100 TALLOC_CTX *mem_ctx)
102 struct rpccli_dfs_GetManagerVersion_state *state = tevent_req_data(
103 req, struct rpccli_dfs_GetManagerVersion_state);
104 NTSTATUS status;
106 if (tevent_req_is_nterror(req, &status)) {
107 tevent_req_received(req);
108 return status;
111 /* Steal possbile out parameters to the callers context */
112 talloc_steal(mem_ctx, state->out_mem_ctx);
114 tevent_req_received(req);
115 return NT_STATUS_OK;
118 NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli,
119 TALLOC_CTX *mem_ctx,
120 enum dfs_ManagerVersion *version /* [out] [ref] */)
122 struct dfs_GetManagerVersion r;
123 NTSTATUS status;
125 /* In parameters */
127 if (DEBUGLEVEL >= 10) {
128 NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &r);
131 status = cli->dispatch(cli,
132 mem_ctx,
133 &ndr_table_netdfs,
134 NDR_DFS_GETMANAGERVERSION,
135 &r);
137 if (!NT_STATUS_IS_OK(status)) {
138 return status;
141 if (DEBUGLEVEL >= 10) {
142 NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r);
145 if (NT_STATUS_IS_ERR(status)) {
146 return status;
149 /* Return variables */
150 *version = *r.out.version;
152 /* Return result */
153 return NT_STATUS_OK;
156 struct rpccli_dfs_Add_state {
157 struct dfs_Add orig;
158 struct dfs_Add tmp;
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);
180 if (req == NULL) {
181 return NULL;
183 state->out_mem_ctx = NULL;
184 state->dispatch_recv = cli->dispatch_recv;
186 /* In parameters */
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;
193 /* Out parameters */
195 /* Result */
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,
206 &ndr_table_netdfs,
207 NDR_DFS_ADD,
208 &state->tmp);
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);
213 return 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);
222 NTSTATUS status;
223 TALLOC_CTX *mem_ctx;
225 if (state->out_mem_ctx) {
226 mem_ctx = state->out_mem_ctx;
227 } else {
228 mem_ctx = state;
231 status = state->dispatch_recv(subreq, mem_ctx);
232 TALLOC_FREE(subreq);
233 if (!NT_STATUS_IS_OK(status)) {
234 tevent_req_nterror(req, status);
235 return;
238 /* Copy out parameters */
240 /* Copy result */
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,
254 TALLOC_CTX *mem_ctx,
255 WERROR *result)
257 struct rpccli_dfs_Add_state *state = tevent_req_data(
258 req, struct rpccli_dfs_Add_state);
259 NTSTATUS status;
261 if (tevent_req_is_nterror(req, &status)) {
262 tevent_req_received(req);
263 return status;
266 /* Steal possbile out parameters to the callers context */
267 talloc_steal(mem_ctx, state->out_mem_ctx);
269 /* Return result */
270 *result = state->orig.out.result;
272 tevent_req_received(req);
273 return NT_STATUS_OK;
276 NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli,
277 TALLOC_CTX *mem_ctx,
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] */,
283 WERROR *werror)
285 struct dfs_Add r;
286 NTSTATUS status;
288 /* In parameters */
289 r.in.path = path;
290 r.in.server = server;
291 r.in.share = share;
292 r.in.comment = comment;
293 r.in.flags = flags;
295 if (DEBUGLEVEL >= 10) {
296 NDR_PRINT_IN_DEBUG(dfs_Add, &r);
299 status = cli->dispatch(cli,
300 mem_ctx,
301 &ndr_table_netdfs,
302 NDR_DFS_ADD,
303 &r);
305 if (!NT_STATUS_IS_OK(status)) {
306 return status;
309 if (DEBUGLEVEL >= 10) {
310 NDR_PRINT_OUT_DEBUG(dfs_Add, &r);
313 if (NT_STATUS_IS_ERR(status)) {
314 return status;
317 /* Return variables */
319 /* Return result */
320 if (werror) {
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);
349 if (req == NULL) {
350 return NULL;
352 state->out_mem_ctx = NULL;
353 state->dispatch_recv = cli->dispatch_recv;
355 /* In parameters */
356 state->orig.in.dfs_entry_path = _dfs_entry_path;
357 state->orig.in.servername = _servername;
358 state->orig.in.sharename = _sharename;
360 /* Out parameters */
362 /* Result */
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,
373 &ndr_table_netdfs,
374 NDR_DFS_REMOVE,
375 &state->tmp);
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);
380 return 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);
389 NTSTATUS status;
390 TALLOC_CTX *mem_ctx;
392 if (state->out_mem_ctx) {
393 mem_ctx = state->out_mem_ctx;
394 } else {
395 mem_ctx = state;
398 status = state->dispatch_recv(subreq, mem_ctx);
399 TALLOC_FREE(subreq);
400 if (!NT_STATUS_IS_OK(status)) {
401 tevent_req_nterror(req, status);
402 return;
405 /* Copy out parameters */
407 /* Copy result */
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,
421 TALLOC_CTX *mem_ctx,
422 WERROR *result)
424 struct rpccli_dfs_Remove_state *state = tevent_req_data(
425 req, struct rpccli_dfs_Remove_state);
426 NTSTATUS status;
428 if (tevent_req_is_nterror(req, &status)) {
429 tevent_req_received(req);
430 return status;
433 /* Steal possbile out parameters to the callers context */
434 talloc_steal(mem_ctx, state->out_mem_ctx);
436 /* Return result */
437 *result = state->orig.out.result;
439 tevent_req_received(req);
440 return NT_STATUS_OK;
443 NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli,
444 TALLOC_CTX *mem_ctx,
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)] */,
448 WERROR *werror)
450 struct dfs_Remove r;
451 NTSTATUS status;
453 /* In parameters */
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,
463 mem_ctx,
464 &ndr_table_netdfs,
465 NDR_DFS_REMOVE,
466 &r);
468 if (!NT_STATUS_IS_OK(status)) {
469 return status;
472 if (DEBUGLEVEL >= 10) {
473 NDR_PRINT_OUT_DEBUG(dfs_Remove, &r);
476 if (NT_STATUS_IS_ERR(status)) {
477 return status;
480 /* Return variables */
482 /* Return result */
483 if (werror) {
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);
514 if (req == NULL) {
515 return NULL;
517 state->out_mem_ctx = NULL;
518 state->dispatch_recv = cli->dispatch_recv;
520 /* In parameters */
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;
527 /* Out parameters */
529 /* Result */
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,
540 &ndr_table_netdfs,
541 NDR_DFS_SETINFO,
542 &state->tmp);
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);
547 return 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);
556 NTSTATUS status;
557 TALLOC_CTX *mem_ctx;
559 if (state->out_mem_ctx) {
560 mem_ctx = state->out_mem_ctx;
561 } else {
562 mem_ctx = state;
565 status = state->dispatch_recv(subreq, mem_ctx);
566 TALLOC_FREE(subreq);
567 if (!NT_STATUS_IS_OK(status)) {
568 tevent_req_nterror(req, status);
569 return;
572 /* Copy out parameters */
574 /* Copy result */
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,
588 TALLOC_CTX *mem_ctx,
589 WERROR *result)
591 struct rpccli_dfs_SetInfo_state *state = tevent_req_data(
592 req, struct rpccli_dfs_SetInfo_state);
593 NTSTATUS status;
595 if (tevent_req_is_nterror(req, &status)) {
596 tevent_req_received(req);
597 return status;
600 /* Steal possbile out parameters to the callers context */
601 talloc_steal(mem_ctx, state->out_mem_ctx);
603 /* Return result */
604 *result = state->orig.out.result;
606 tevent_req_received(req);
607 return NT_STATUS_OK;
610 NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli,
611 TALLOC_CTX *mem_ctx,
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)] */,
617 WERROR *werror)
619 struct dfs_SetInfo r;
620 NTSTATUS status;
622 /* In parameters */
623 r.in.dfs_entry_path = dfs_entry_path;
624 r.in.servername = servername;
625 r.in.sharename = sharename;
626 r.in.level = level;
627 r.in.info = info;
629 if (DEBUGLEVEL >= 10) {
630 NDR_PRINT_IN_DEBUG(dfs_SetInfo, &r);
633 status = cli->dispatch(cli,
634 mem_ctx,
635 &ndr_table_netdfs,
636 NDR_DFS_SETINFO,
637 &r);
639 if (!NT_STATUS_IS_OK(status)) {
640 return status;
643 if (DEBUGLEVEL >= 10) {
644 NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r);
647 if (NT_STATUS_IS_ERR(status)) {
648 return status;
651 /* Return variables */
653 /* Return result */
654 if (werror) {
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);
685 if (req == NULL) {
686 return NULL;
688 state->out_mem_ctx = NULL;
689 state->dispatch_recv = cli->dispatch_recv;
691 /* In parameters */
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;
697 /* Out parameters */
698 state->orig.out.info = _info;
700 /* Result */
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,
717 &ndr_table_netdfs,
718 NDR_DFS_GETINFO,
719 &state->tmp);
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);
724 return 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);
733 NTSTATUS status;
734 TALLOC_CTX *mem_ctx;
736 if (state->out_mem_ctx) {
737 mem_ctx = state->out_mem_ctx;
738 } else {
739 mem_ctx = state;
742 status = state->dispatch_recv(subreq, mem_ctx);
743 TALLOC_FREE(subreq);
744 if (!NT_STATUS_IS_OK(status)) {
745 tevent_req_nterror(req, status);
746 return;
749 /* Copy out parameters */
750 *state->orig.out.info = *state->tmp.out.info;
752 /* Copy result */
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,
766 TALLOC_CTX *mem_ctx,
767 WERROR *result)
769 struct rpccli_dfs_GetInfo_state *state = tevent_req_data(
770 req, struct rpccli_dfs_GetInfo_state);
771 NTSTATUS status;
773 if (tevent_req_is_nterror(req, &status)) {
774 tevent_req_received(req);
775 return status;
778 /* Steal possbile out parameters to the callers context */
779 talloc_steal(mem_ctx, state->out_mem_ctx);
781 /* Return result */
782 *result = state->orig.out.result;
784 tevent_req_received(req);
785 return NT_STATUS_OK;
788 NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli,
789 TALLOC_CTX *mem_ctx,
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)] */,
795 WERROR *werror)
797 struct dfs_GetInfo r;
798 NTSTATUS status;
800 /* In parameters */
801 r.in.dfs_entry_path = dfs_entry_path;
802 r.in.servername = servername;
803 r.in.sharename = sharename;
804 r.in.level = level;
806 if (DEBUGLEVEL >= 10) {
807 NDR_PRINT_IN_DEBUG(dfs_GetInfo, &r);
810 status = cli->dispatch(cli,
811 mem_ctx,
812 &ndr_table_netdfs,
813 NDR_DFS_GETINFO,
814 &r);
816 if (!NT_STATUS_IS_OK(status)) {
817 return status;
820 if (DEBUGLEVEL >= 10) {
821 NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r);
824 if (NT_STATUS_IS_ERR(status)) {
825 return status;
828 /* Return variables */
829 *info = *r.out.info;
831 /* Return result */
832 if (werror) {
833 *werror = r.out.result;
836 return werror_to_ntstatus(r.out.result);
839 struct rpccli_dfs_Enum_state {
840 struct dfs_Enum orig;
841 struct dfs_Enum tmp;
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);
862 if (req == NULL) {
863 return NULL;
865 state->out_mem_ctx = NULL;
866 state->dispatch_recv = cli->dispatch_recv;
868 /* In parameters */
869 state->orig.in.level = _level;
870 state->orig.in.bufsize = _bufsize;
871 state->orig.in.info = _info;
872 state->orig.in.total = _total;
874 /* Out parameters */
875 state->orig.out.info = _info;
876 state->orig.out.total = _total;
878 /* Result */
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,
895 &ndr_table_netdfs,
896 NDR_DFS_ENUM,
897 &state->tmp);
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);
902 return 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);
911 NTSTATUS status;
912 TALLOC_CTX *mem_ctx;
914 if (state->out_mem_ctx) {
915 mem_ctx = state->out_mem_ctx;
916 } else {
917 mem_ctx = state;
920 status = state->dispatch_recv(subreq, mem_ctx);
921 TALLOC_FREE(subreq);
922 if (!NT_STATUS_IS_OK(status)) {
923 tevent_req_nterror(req, status);
924 return;
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;
935 /* Copy result */
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,
949 TALLOC_CTX *mem_ctx,
950 WERROR *result)
952 struct rpccli_dfs_Enum_state *state = tevent_req_data(
953 req, struct rpccli_dfs_Enum_state);
954 NTSTATUS status;
956 if (tevent_req_is_nterror(req, &status)) {
957 tevent_req_received(req);
958 return status;
961 /* Steal possbile out parameters to the callers context */
962 talloc_steal(mem_ctx, state->out_mem_ctx);
964 /* Return result */
965 *result = state->orig.out.result;
967 tevent_req_received(req);
968 return NT_STATUS_OK;
971 NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli,
972 TALLOC_CTX *mem_ctx,
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] */,
977 WERROR *werror)
979 struct dfs_Enum r;
980 NTSTATUS status;
982 /* In parameters */
983 r.in.level = level;
984 r.in.bufsize = bufsize;
985 r.in.info = info;
986 r.in.total = total;
988 if (DEBUGLEVEL >= 10) {
989 NDR_PRINT_IN_DEBUG(dfs_Enum, &r);
992 status = cli->dispatch(cli,
993 mem_ctx,
994 &ndr_table_netdfs,
995 NDR_DFS_ENUM,
996 &r);
998 if (!NT_STATUS_IS_OK(status)) {
999 return status;
1002 if (DEBUGLEVEL >= 10) {
1003 NDR_PRINT_OUT_DEBUG(dfs_Enum, &r);
1006 if (NT_STATUS_IS_ERR(status)) {
1007 return 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;
1018 /* Return result */
1019 if (werror) {
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);
1045 if (req == NULL) {
1046 return NULL;
1048 state->out_mem_ctx = NULL;
1049 state->dispatch_recv = cli->dispatch_recv;
1051 /* In parameters */
1053 /* Out parameters */
1055 /* Result */
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,
1066 &ndr_table_netdfs,
1067 NDR_DFS_RENAME,
1068 &state->tmp);
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);
1073 return 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);
1082 NTSTATUS status;
1083 TALLOC_CTX *mem_ctx;
1085 if (state->out_mem_ctx) {
1086 mem_ctx = state->out_mem_ctx;
1087 } else {
1088 mem_ctx = state;
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);
1095 return;
1098 /* Copy out parameters */
1100 /* Copy result */
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,
1115 WERROR *result)
1117 struct rpccli_dfs_Rename_state *state = tevent_req_data(
1118 req, struct rpccli_dfs_Rename_state);
1119 NTSTATUS status;
1121 if (tevent_req_is_nterror(req, &status)) {
1122 tevent_req_received(req);
1123 return status;
1126 /* Steal possbile out parameters to the callers context */
1127 talloc_steal(mem_ctx, state->out_mem_ctx);
1129 /* Return result */
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,
1138 WERROR *werror)
1140 struct dfs_Rename r;
1141 NTSTATUS status;
1143 /* In parameters */
1145 if (DEBUGLEVEL >= 10) {
1146 NDR_PRINT_IN_DEBUG(dfs_Rename, &r);
1149 status = cli->dispatch(cli,
1150 mem_ctx,
1151 &ndr_table_netdfs,
1152 NDR_DFS_RENAME,
1153 &r);
1155 if (!NT_STATUS_IS_OK(status)) {
1156 return status;
1159 if (DEBUGLEVEL >= 10) {
1160 NDR_PRINT_OUT_DEBUG(dfs_Rename, &r);
1163 if (NT_STATUS_IS_ERR(status)) {
1164 return status;
1167 /* Return variables */
1169 /* Return result */
1170 if (werror) {
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);
1196 if (req == NULL) {
1197 return NULL;
1199 state->out_mem_ctx = NULL;
1200 state->dispatch_recv = cli->dispatch_recv;
1202 /* In parameters */
1204 /* Out parameters */
1206 /* Result */
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,
1217 &ndr_table_netdfs,
1218 NDR_DFS_MOVE,
1219 &state->tmp);
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);
1224 return 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);
1233 NTSTATUS status;
1234 TALLOC_CTX *mem_ctx;
1236 if (state->out_mem_ctx) {
1237 mem_ctx = state->out_mem_ctx;
1238 } else {
1239 mem_ctx = state;
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);
1246 return;
1249 /* Copy out parameters */
1251 /* Copy result */
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,
1266 WERROR *result)
1268 struct rpccli_dfs_Move_state *state = tevent_req_data(
1269 req, struct rpccli_dfs_Move_state);
1270 NTSTATUS status;
1272 if (tevent_req_is_nterror(req, &status)) {
1273 tevent_req_received(req);
1274 return status;
1277 /* Steal possbile out parameters to the callers context */
1278 talloc_steal(mem_ctx, state->out_mem_ctx);
1280 /* Return result */
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,
1289 WERROR *werror)
1291 struct dfs_Move r;
1292 NTSTATUS status;
1294 /* In parameters */
1296 if (DEBUGLEVEL >= 10) {
1297 NDR_PRINT_IN_DEBUG(dfs_Move, &r);
1300 status = cli->dispatch(cli,
1301 mem_ctx,
1302 &ndr_table_netdfs,
1303 NDR_DFS_MOVE,
1304 &r);
1306 if (!NT_STATUS_IS_OK(status)) {
1307 return status;
1310 if (DEBUGLEVEL >= 10) {
1311 NDR_PRINT_OUT_DEBUG(dfs_Move, &r);
1314 if (NT_STATUS_IS_ERR(status)) {
1315 return status;
1318 /* Return variables */
1320 /* Return result */
1321 if (werror) {
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);
1347 if (req == NULL) {
1348 return NULL;
1350 state->out_mem_ctx = NULL;
1351 state->dispatch_recv = cli->dispatch_recv;
1353 /* In parameters */
1355 /* Out parameters */
1357 /* Result */
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,
1368 &ndr_table_netdfs,
1369 NDR_DFS_MANAGERGETCONFIGINFO,
1370 &state->tmp);
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);
1375 return 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);
1384 NTSTATUS status;
1385 TALLOC_CTX *mem_ctx;
1387 if (state->out_mem_ctx) {
1388 mem_ctx = state->out_mem_ctx;
1389 } else {
1390 mem_ctx = state;
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);
1397 return;
1400 /* Copy out parameters */
1402 /* Copy result */
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,
1417 WERROR *result)
1419 struct rpccli_dfs_ManagerGetConfigInfo_state *state = tevent_req_data(
1420 req, struct rpccli_dfs_ManagerGetConfigInfo_state);
1421 NTSTATUS status;
1423 if (tevent_req_is_nterror(req, &status)) {
1424 tevent_req_received(req);
1425 return status;
1428 /* Steal possbile out parameters to the callers context */
1429 talloc_steal(mem_ctx, state->out_mem_ctx);
1431 /* Return result */
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,
1440 WERROR *werror)
1442 struct dfs_ManagerGetConfigInfo r;
1443 NTSTATUS status;
1445 /* In parameters */
1447 if (DEBUGLEVEL >= 10) {
1448 NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, &r);
1451 status = cli->dispatch(cli,
1452 mem_ctx,
1453 &ndr_table_netdfs,
1454 NDR_DFS_MANAGERGETCONFIGINFO,
1455 &r);
1457 if (!NT_STATUS_IS_OK(status)) {
1458 return status;
1461 if (DEBUGLEVEL >= 10) {
1462 NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r);
1465 if (NT_STATUS_IS_ERR(status)) {
1466 return status;
1469 /* Return variables */
1471 /* Return result */
1472 if (werror) {
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);
1498 if (req == NULL) {
1499 return NULL;
1501 state->out_mem_ctx = NULL;
1502 state->dispatch_recv = cli->dispatch_recv;
1504 /* In parameters */
1506 /* Out parameters */
1508 /* Result */
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,
1519 &ndr_table_netdfs,
1520 NDR_DFS_MANAGERSENDSITEINFO,
1521 &state->tmp);
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);
1526 return 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);
1535 NTSTATUS status;
1536 TALLOC_CTX *mem_ctx;
1538 if (state->out_mem_ctx) {
1539 mem_ctx = state->out_mem_ctx;
1540 } else {
1541 mem_ctx = state;
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);
1548 return;
1551 /* Copy out parameters */
1553 /* Copy result */
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,
1568 WERROR *result)
1570 struct rpccli_dfs_ManagerSendSiteInfo_state *state = tevent_req_data(
1571 req, struct rpccli_dfs_ManagerSendSiteInfo_state);
1572 NTSTATUS status;
1574 if (tevent_req_is_nterror(req, &status)) {
1575 tevent_req_received(req);
1576 return status;
1579 /* Steal possbile out parameters to the callers context */
1580 talloc_steal(mem_ctx, state->out_mem_ctx);
1582 /* Return result */
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,
1591 WERROR *werror)
1593 struct dfs_ManagerSendSiteInfo r;
1594 NTSTATUS status;
1596 /* In parameters */
1598 if (DEBUGLEVEL >= 10) {
1599 NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, &r);
1602 status = cli->dispatch(cli,
1603 mem_ctx,
1604 &ndr_table_netdfs,
1605 NDR_DFS_MANAGERSENDSITEINFO,
1606 &r);
1608 if (!NT_STATUS_IS_OK(status)) {
1609 return status;
1612 if (DEBUGLEVEL >= 10) {
1613 NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r);
1616 if (NT_STATUS_IS_ERR(status)) {
1617 return status;
1620 /* Return variables */
1622 /* Return result */
1623 if (werror) {
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);
1658 if (req == NULL) {
1659 return NULL;
1661 state->out_mem_ctx = NULL;
1662 state->dispatch_recv = cli->dispatch_recv;
1664 /* In parameters */
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;
1678 /* Result */
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,
1695 &ndr_table_netdfs,
1696 NDR_DFS_ADDFTROOT,
1697 &state->tmp);
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);
1702 return 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);
1711 NTSTATUS status;
1712 TALLOC_CTX *mem_ctx;
1714 if (state->out_mem_ctx) {
1715 mem_ctx = state->out_mem_ctx;
1716 } else {
1717 mem_ctx = state;
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);
1724 return;
1727 /* Copy out parameters */
1728 if (state->orig.out.unknown2 && state->tmp.out.unknown2) {
1729 *state->orig.out.unknown2 = *state->tmp.out.unknown2;
1732 /* Copy result */
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,
1747 WERROR *result)
1749 struct rpccli_dfs_AddFtRoot_state *state = tevent_req_data(
1750 req, struct rpccli_dfs_AddFtRoot_state);
1751 NTSTATUS status;
1753 if (tevent_req_is_nterror(req, &status)) {
1754 tevent_req_received(req);
1755 return status;
1758 /* Steal possbile out parameters to the callers context */
1759 talloc_steal(mem_ctx, state->out_mem_ctx);
1761 /* Return result */
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] */,
1779 WERROR *werror)
1781 struct dfs_AddFtRoot r;
1782 NTSTATUS status;
1784 /* In parameters */
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;
1792 r.in.flags = flags;
1793 r.in.unknown2 = unknown2;
1795 if (DEBUGLEVEL >= 10) {
1796 NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &r);
1799 status = cli->dispatch(cli,
1800 mem_ctx,
1801 &ndr_table_netdfs,
1802 NDR_DFS_ADDFTROOT,
1803 &r);
1805 if (!NT_STATUS_IS_OK(status)) {
1806 return status;
1809 if (DEBUGLEVEL >= 10) {
1810 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r);
1813 if (NT_STATUS_IS_ERR(status)) {
1814 return status;
1817 /* Return variables */
1818 if (unknown2 && r.out.unknown2) {
1819 *unknown2 = *r.out.unknown2;
1822 /* Return result */
1823 if (werror) {
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);
1855 if (req == NULL) {
1856 return NULL;
1858 state->out_mem_ctx = NULL;
1859 state->dispatch_recv = cli->dispatch_recv;
1861 /* In parameters */
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;
1872 /* Result */
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,
1889 &ndr_table_netdfs,
1890 NDR_DFS_REMOVEFTROOT,
1891 &state->tmp);
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);
1896 return 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);
1905 NTSTATUS status;
1906 TALLOC_CTX *mem_ctx;
1908 if (state->out_mem_ctx) {
1909 mem_ctx = state->out_mem_ctx;
1910 } else {
1911 mem_ctx = state;
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);
1918 return;
1921 /* Copy out parameters */
1922 if (state->orig.out.unknown && state->tmp.out.unknown) {
1923 *state->orig.out.unknown = *state->tmp.out.unknown;
1926 /* Copy result */
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,
1941 WERROR *result)
1943 struct rpccli_dfs_RemoveFtRoot_state *state = tevent_req_data(
1944 req, struct rpccli_dfs_RemoveFtRoot_state);
1945 NTSTATUS status;
1947 if (tevent_req_is_nterror(req, &status)) {
1948 tevent_req_received(req);
1949 return status;
1952 /* Steal possbile out parameters to the callers context */
1953 talloc_steal(mem_ctx, state->out_mem_ctx);
1955 /* Return result */
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] */,
1970 WERROR *werror)
1972 struct dfs_RemoveFtRoot r;
1973 NTSTATUS status;
1975 /* In parameters */
1976 r.in.servername = servername;
1977 r.in.dns_servername = dns_servername;
1978 r.in.dfsname = dfsname;
1979 r.in.rootshare = rootshare;
1980 r.in.flags = flags;
1981 r.in.unknown = unknown;
1983 if (DEBUGLEVEL >= 10) {
1984 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &r);
1987 status = cli->dispatch(cli,
1988 mem_ctx,
1989 &ndr_table_netdfs,
1990 NDR_DFS_REMOVEFTROOT,
1991 &r);
1993 if (!NT_STATUS_IS_OK(status)) {
1994 return status;
1997 if (DEBUGLEVEL >= 10) {
1998 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r);
2001 if (NT_STATUS_IS_ERR(status)) {
2002 return status;
2005 /* Return variables */
2006 if (unknown && r.out.unknown) {
2007 *unknown = *r.out.unknown;
2010 /* Return result */
2011 if (werror) {
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);
2041 if (req == NULL) {
2042 return NULL;
2044 state->out_mem_ctx = NULL;
2045 state->dispatch_recv = cli->dispatch_recv;
2047 /* In parameters */
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 */
2055 /* Result */
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,
2066 &ndr_table_netdfs,
2067 NDR_DFS_ADDSTDROOT,
2068 &state->tmp);
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);
2073 return 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);
2082 NTSTATUS status;
2083 TALLOC_CTX *mem_ctx;
2085 if (state->out_mem_ctx) {
2086 mem_ctx = state->out_mem_ctx;
2087 } else {
2088 mem_ctx = state;
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);
2095 return;
2098 /* Copy out parameters */
2100 /* Copy result */
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,
2115 WERROR *result)
2117 struct rpccli_dfs_AddStdRoot_state *state = tevent_req_data(
2118 req, struct rpccli_dfs_AddStdRoot_state);
2119 NTSTATUS status;
2121 if (tevent_req_is_nterror(req, &status)) {
2122 tevent_req_received(req);
2123 return status;
2126 /* Steal possbile out parameters to the callers context */
2127 talloc_steal(mem_ctx, state->out_mem_ctx);
2129 /* Return result */
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] */,
2142 WERROR *werror)
2144 struct dfs_AddStdRoot r;
2145 NTSTATUS status;
2147 /* In parameters */
2148 r.in.servername = servername;
2149 r.in.rootshare = rootshare;
2150 r.in.comment = comment;
2151 r.in.flags = flags;
2153 if (DEBUGLEVEL >= 10) {
2154 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &r);
2157 status = cli->dispatch(cli,
2158 mem_ctx,
2159 &ndr_table_netdfs,
2160 NDR_DFS_ADDSTDROOT,
2161 &r);
2163 if (!NT_STATUS_IS_OK(status)) {
2164 return status;
2167 if (DEBUGLEVEL >= 10) {
2168 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r);
2171 if (NT_STATUS_IS_ERR(status)) {
2172 return status;
2175 /* Return variables */
2177 /* Return result */
2178 if (werror) {
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);
2207 if (req == NULL) {
2208 return NULL;
2210 state->out_mem_ctx = NULL;
2211 state->dispatch_recv = cli->dispatch_recv;
2213 /* In parameters */
2214 state->orig.in.servername = _servername;
2215 state->orig.in.rootshare = _rootshare;
2216 state->orig.in.flags = _flags;
2218 /* Out parameters */
2220 /* Result */
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,
2231 &ndr_table_netdfs,
2232 NDR_DFS_REMOVESTDROOT,
2233 &state->tmp);
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);
2238 return 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);
2247 NTSTATUS status;
2248 TALLOC_CTX *mem_ctx;
2250 if (state->out_mem_ctx) {
2251 mem_ctx = state->out_mem_ctx;
2252 } else {
2253 mem_ctx = state;
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);
2260 return;
2263 /* Copy out parameters */
2265 /* Copy result */
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,
2280 WERROR *result)
2282 struct rpccli_dfs_RemoveStdRoot_state *state = tevent_req_data(
2283 req, struct rpccli_dfs_RemoveStdRoot_state);
2284 NTSTATUS status;
2286 if (tevent_req_is_nterror(req, &status)) {
2287 tevent_req_received(req);
2288 return status;
2291 /* Steal possbile out parameters to the callers context */
2292 talloc_steal(mem_ctx, state->out_mem_ctx);
2294 /* Return result */
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] */,
2306 WERROR *werror)
2308 struct dfs_RemoveStdRoot r;
2309 NTSTATUS status;
2311 /* In parameters */
2312 r.in.servername = servername;
2313 r.in.rootshare = rootshare;
2314 r.in.flags = flags;
2316 if (DEBUGLEVEL >= 10) {
2317 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &r);
2320 status = cli->dispatch(cli,
2321 mem_ctx,
2322 &ndr_table_netdfs,
2323 NDR_DFS_REMOVESTDROOT,
2324 &r);
2326 if (!NT_STATUS_IS_OK(status)) {
2327 return status;
2330 if (DEBUGLEVEL >= 10) {
2331 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r);
2334 if (NT_STATUS_IS_ERR(status)) {
2335 return status;
2338 /* Return variables */
2340 /* Return result */
2341 if (werror) {
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);
2369 if (req == NULL) {
2370 return NULL;
2372 state->out_mem_ctx = NULL;
2373 state->dispatch_recv = cli->dispatch_recv;
2375 /* In parameters */
2376 state->orig.in.servername = _servername;
2377 state->orig.in.flags = _flags;
2379 /* Out parameters */
2381 /* Result */
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,
2392 &ndr_table_netdfs,
2393 NDR_DFS_MANAGERINITIALIZE,
2394 &state->tmp);
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);
2399 return 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);
2408 NTSTATUS status;
2409 TALLOC_CTX *mem_ctx;
2411 if (state->out_mem_ctx) {
2412 mem_ctx = state->out_mem_ctx;
2413 } else {
2414 mem_ctx = state;
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);
2421 return;
2424 /* Copy out parameters */
2426 /* Copy result */
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,
2441 WERROR *result)
2443 struct rpccli_dfs_ManagerInitialize_state *state = tevent_req_data(
2444 req, struct rpccli_dfs_ManagerInitialize_state);
2445 NTSTATUS status;
2447 if (tevent_req_is_nterror(req, &status)) {
2448 tevent_req_received(req);
2449 return status;
2452 /* Steal possbile out parameters to the callers context */
2453 talloc_steal(mem_ctx, state->out_mem_ctx);
2455 /* Return result */
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] */,
2466 WERROR *werror)
2468 struct dfs_ManagerInitialize r;
2469 NTSTATUS status;
2471 /* In parameters */
2472 r.in.servername = servername;
2473 r.in.flags = flags;
2475 if (DEBUGLEVEL >= 10) {
2476 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &r);
2479 status = cli->dispatch(cli,
2480 mem_ctx,
2481 &ndr_table_netdfs,
2482 NDR_DFS_MANAGERINITIALIZE,
2483 &r);
2485 if (!NT_STATUS_IS_OK(status)) {
2486 return status;
2489 if (DEBUGLEVEL >= 10) {
2490 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r);
2493 if (NT_STATUS_IS_ERR(status)) {
2494 return status;
2497 /* Return variables */
2499 /* Return result */
2500 if (werror) {
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);
2530 if (req == NULL) {
2531 return NULL;
2533 state->out_mem_ctx = NULL;
2534 state->dispatch_recv = cli->dispatch_recv;
2536 /* In parameters */
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 */
2544 /* Result */
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,
2555 &ndr_table_netdfs,
2556 NDR_DFS_ADDSTDROOTFORCED,
2557 &state->tmp);
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);
2562 return 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);
2571 NTSTATUS status;
2572 TALLOC_CTX *mem_ctx;
2574 if (state->out_mem_ctx) {
2575 mem_ctx = state->out_mem_ctx;
2576 } else {
2577 mem_ctx = state;
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);
2584 return;
2587 /* Copy out parameters */
2589 /* Copy result */
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,
2604 WERROR *result)
2606 struct rpccli_dfs_AddStdRootForced_state *state = tevent_req_data(
2607 req, struct rpccli_dfs_AddStdRootForced_state);
2608 NTSTATUS status;
2610 if (tevent_req_is_nterror(req, &status)) {
2611 tevent_req_received(req);
2612 return status;
2615 /* Steal possbile out parameters to the callers context */
2616 talloc_steal(mem_ctx, state->out_mem_ctx);
2618 /* Return result */
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)] */,
2631 WERROR *werror)
2633 struct dfs_AddStdRootForced r;
2634 NTSTATUS status;
2636 /* In parameters */
2637 r.in.servername = servername;
2638 r.in.rootshare = rootshare;
2639 r.in.comment = comment;
2640 r.in.store = store;
2642 if (DEBUGLEVEL >= 10) {
2643 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &r);
2646 status = cli->dispatch(cli,
2647 mem_ctx,
2648 &ndr_table_netdfs,
2649 NDR_DFS_ADDSTDROOTFORCED,
2650 &r);
2652 if (!NT_STATUS_IS_OK(status)) {
2653 return status;
2656 if (DEBUGLEVEL >= 10) {
2657 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r);
2660 if (NT_STATUS_IS_ERR(status)) {
2661 return status;
2664 /* Return variables */
2666 /* Return result */
2667 if (werror) {
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);
2697 if (req == NULL) {
2698 return NULL;
2700 state->out_mem_ctx = NULL;
2701 state->dispatch_recv = cli->dispatch_recv;
2703 /* In parameters */
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;
2714 /* Result */
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,
2731 &ndr_table_netdfs,
2732 NDR_DFS_GETDCADDRESS,
2733 &state->tmp);
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);
2738 return 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);
2747 NTSTATUS status;
2748 TALLOC_CTX *mem_ctx;
2750 if (state->out_mem_ctx) {
2751 mem_ctx = state->out_mem_ctx;
2752 } else {
2753 mem_ctx = state;
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);
2760 return;
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;
2768 /* Copy result */
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,
2783 WERROR *result)
2785 struct rpccli_dfs_GetDcAddress_state *state = tevent_req_data(
2786 req, struct rpccli_dfs_GetDcAddress_state);
2787 NTSTATUS status;
2789 if (tevent_req_is_nterror(req, &status)) {
2790 tevent_req_received(req);
2791 return status;
2794 /* Steal possbile out parameters to the callers context */
2795 talloc_steal(mem_ctx, state->out_mem_ctx);
2797 /* Return result */
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] */,
2810 WERROR *werror)
2812 struct dfs_GetDcAddress r;
2813 NTSTATUS status;
2815 /* In parameters */
2816 r.in.servername = servername;
2817 r.in.server_fullname = server_fullname;
2818 r.in.is_root = is_root;
2819 r.in.ttl = ttl;
2821 if (DEBUGLEVEL >= 10) {
2822 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &r);
2825 status = cli->dispatch(cli,
2826 mem_ctx,
2827 &ndr_table_netdfs,
2828 NDR_DFS_GETDCADDRESS,
2829 &r);
2831 if (!NT_STATUS_IS_OK(status)) {
2832 return status;
2835 if (DEBUGLEVEL >= 10) {
2836 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r);
2839 if (NT_STATUS_IS_ERR(status)) {
2840 return status;
2843 /* Return variables */
2844 *server_fullname = *r.out.server_fullname;
2845 *is_root = *r.out.is_root;
2846 *ttl = *r.out.ttl;
2848 /* Return result */
2849 if (werror) {
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);
2879 if (req == NULL) {
2880 return NULL;
2882 state->out_mem_ctx = NULL;
2883 state->dispatch_recv = cli->dispatch_recv;
2885 /* In parameters */
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 */
2893 /* Result */
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,
2904 &ndr_table_netdfs,
2905 NDR_DFS_SETDCADDRESS,
2906 &state->tmp);
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);
2911 return 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);
2920 NTSTATUS status;
2921 TALLOC_CTX *mem_ctx;
2923 if (state->out_mem_ctx) {
2924 mem_ctx = state->out_mem_ctx;
2925 } else {
2926 mem_ctx = state;
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);
2933 return;
2936 /* Copy out parameters */
2938 /* Copy result */
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,
2953 WERROR *result)
2955 struct rpccli_dfs_SetDcAddress_state *state = tevent_req_data(
2956 req, struct rpccli_dfs_SetDcAddress_state);
2957 NTSTATUS status;
2959 if (tevent_req_is_nterror(req, &status)) {
2960 tevent_req_received(req);
2961 return status;
2964 /* Steal possbile out parameters to the callers context */
2965 talloc_steal(mem_ctx, state->out_mem_ctx);
2967 /* Return result */
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] */,
2980 WERROR *werror)
2982 struct dfs_SetDcAddress r;
2983 NTSTATUS status;
2985 /* In parameters */
2986 r.in.servername = servername;
2987 r.in.server_fullname = server_fullname;
2988 r.in.flags = flags;
2989 r.in.ttl = ttl;
2991 if (DEBUGLEVEL >= 10) {
2992 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &r);
2995 status = cli->dispatch(cli,
2996 mem_ctx,
2997 &ndr_table_netdfs,
2998 NDR_DFS_SETDCADDRESS,
2999 &r);
3001 if (!NT_STATUS_IS_OK(status)) {
3002 return status;
3005 if (DEBUGLEVEL >= 10) {
3006 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r);
3009 if (NT_STATUS_IS_ERR(status)) {
3010 return status;
3013 /* Return variables */
3015 /* Return result */
3016 if (werror) {
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);
3044 if (req == NULL) {
3045 return NULL;
3047 state->out_mem_ctx = NULL;
3048 state->dispatch_recv = cli->dispatch_recv;
3050 /* In parameters */
3051 state->orig.in.servername = _servername;
3052 state->orig.in.rootshare = _rootshare;
3054 /* Out parameters */
3056 /* Result */
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,
3067 &ndr_table_netdfs,
3068 NDR_DFS_FLUSHFTTABLE,
3069 &state->tmp);
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);
3074 return 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);
3083 NTSTATUS status;
3084 TALLOC_CTX *mem_ctx;
3086 if (state->out_mem_ctx) {
3087 mem_ctx = state->out_mem_ctx;
3088 } else {
3089 mem_ctx = state;
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);
3096 return;
3099 /* Copy out parameters */
3101 /* Copy result */
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,
3116 WERROR *result)
3118 struct rpccli_dfs_FlushFtTable_state *state = tevent_req_data(
3119 req, struct rpccli_dfs_FlushFtTable_state);
3120 NTSTATUS status;
3122 if (tevent_req_is_nterror(req, &status)) {
3123 tevent_req_received(req);
3124 return status;
3127 /* Steal possbile out parameters to the callers context */
3128 talloc_steal(mem_ctx, state->out_mem_ctx);
3130 /* Return result */
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)] */,
3141 WERROR *werror)
3143 struct dfs_FlushFtTable r;
3144 NTSTATUS status;
3146 /* In parameters */
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,
3155 mem_ctx,
3156 &ndr_table_netdfs,
3157 NDR_DFS_FLUSHFTTABLE,
3158 &r);
3160 if (!NT_STATUS_IS_OK(status)) {
3161 return status;
3164 if (DEBUGLEVEL >= 10) {
3165 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r);
3168 if (NT_STATUS_IS_ERR(status)) {
3169 return status;
3172 /* Return variables */
3174 /* Return result */
3175 if (werror) {
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);
3201 if (req == NULL) {
3202 return NULL;
3204 state->out_mem_ctx = NULL;
3205 state->dispatch_recv = cli->dispatch_recv;
3207 /* In parameters */
3209 /* Out parameters */
3211 /* Result */
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,
3222 &ndr_table_netdfs,
3223 NDR_DFS_ADD2,
3224 &state->tmp);
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);
3229 return 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);
3238 NTSTATUS status;
3239 TALLOC_CTX *mem_ctx;
3241 if (state->out_mem_ctx) {
3242 mem_ctx = state->out_mem_ctx;
3243 } else {
3244 mem_ctx = state;
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);
3251 return;
3254 /* Copy out parameters */
3256 /* Copy result */
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,
3271 WERROR *result)
3273 struct rpccli_dfs_Add2_state *state = tevent_req_data(
3274 req, struct rpccli_dfs_Add2_state);
3275 NTSTATUS status;
3277 if (tevent_req_is_nterror(req, &status)) {
3278 tevent_req_received(req);
3279 return status;
3282 /* Steal possbile out parameters to the callers context */
3283 talloc_steal(mem_ctx, state->out_mem_ctx);
3285 /* Return result */
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,
3294 WERROR *werror)
3296 struct dfs_Add2 r;
3297 NTSTATUS status;
3299 /* In parameters */
3301 if (DEBUGLEVEL >= 10) {
3302 NDR_PRINT_IN_DEBUG(dfs_Add2, &r);
3305 status = cli->dispatch(cli,
3306 mem_ctx,
3307 &ndr_table_netdfs,
3308 NDR_DFS_ADD2,
3309 &r);
3311 if (!NT_STATUS_IS_OK(status)) {
3312 return status;
3315 if (DEBUGLEVEL >= 10) {
3316 NDR_PRINT_OUT_DEBUG(dfs_Add2, &r);
3319 if (NT_STATUS_IS_ERR(status)) {
3320 return status;
3323 /* Return variables */
3325 /* Return result */
3326 if (werror) {
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);
3352 if (req == NULL) {
3353 return NULL;
3355 state->out_mem_ctx = NULL;
3356 state->dispatch_recv = cli->dispatch_recv;
3358 /* In parameters */
3360 /* Out parameters */
3362 /* Result */
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,
3373 &ndr_table_netdfs,
3374 NDR_DFS_REMOVE2,
3375 &state->tmp);
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);
3380 return 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);
3389 NTSTATUS status;
3390 TALLOC_CTX *mem_ctx;
3392 if (state->out_mem_ctx) {
3393 mem_ctx = state->out_mem_ctx;
3394 } else {
3395 mem_ctx = state;
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);
3402 return;
3405 /* Copy out parameters */
3407 /* Copy result */
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,
3422 WERROR *result)
3424 struct rpccli_dfs_Remove2_state *state = tevent_req_data(
3425 req, struct rpccli_dfs_Remove2_state);
3426 NTSTATUS status;
3428 if (tevent_req_is_nterror(req, &status)) {
3429 tevent_req_received(req);
3430 return status;
3433 /* Steal possbile out parameters to the callers context */
3434 talloc_steal(mem_ctx, state->out_mem_ctx);
3436 /* Return result */
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,
3445 WERROR *werror)
3447 struct dfs_Remove2 r;
3448 NTSTATUS status;
3450 /* In parameters */
3452 if (DEBUGLEVEL >= 10) {
3453 NDR_PRINT_IN_DEBUG(dfs_Remove2, &r);
3456 status = cli->dispatch(cli,
3457 mem_ctx,
3458 &ndr_table_netdfs,
3459 NDR_DFS_REMOVE2,
3460 &r);
3462 if (!NT_STATUS_IS_OK(status)) {
3463 return status;
3466 if (DEBUGLEVEL >= 10) {
3467 NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r);
3470 if (NT_STATUS_IS_ERR(status)) {
3471 return status;
3474 /* Return variables */
3476 /* Return result */
3477 if (werror) {
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);
3508 if (req == NULL) {
3509 return NULL;
3511 state->out_mem_ctx = NULL;
3512 state->dispatch_recv = cli->dispatch_recv;
3514 /* In parameters */
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;
3525 /* Result */
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,
3542 &ndr_table_netdfs,
3543 NDR_DFS_ENUMEX,
3544 &state->tmp);
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);
3549 return 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);
3558 NTSTATUS status;
3559 TALLOC_CTX *mem_ctx;
3561 if (state->out_mem_ctx) {
3562 mem_ctx = state->out_mem_ctx;
3563 } else {
3564 mem_ctx = state;
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);
3571 return;
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;
3582 /* Copy result */
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,
3597 WERROR *result)
3599 struct rpccli_dfs_EnumEx_state *state = tevent_req_data(
3600 req, struct rpccli_dfs_EnumEx_state);
3601 NTSTATUS status;
3603 if (tevent_req_is_nterror(req, &status)) {
3604 tevent_req_received(req);
3605 return status;
3608 /* Steal possbile out parameters to the callers context */
3609 talloc_steal(mem_ctx, state->out_mem_ctx);
3611 /* Return result */
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] */,
3625 WERROR *werror)
3627 struct dfs_EnumEx r;
3628 NTSTATUS status;
3630 /* In parameters */
3631 r.in.dfs_name = dfs_name;
3632 r.in.level = level;
3633 r.in.bufsize = bufsize;
3634 r.in.info = info;
3635 r.in.total = total;
3637 if (DEBUGLEVEL >= 10) {
3638 NDR_PRINT_IN_DEBUG(dfs_EnumEx, &r);
3641 status = cli->dispatch(cli,
3642 mem_ctx,
3643 &ndr_table_netdfs,
3644 NDR_DFS_ENUMEX,
3645 &r);
3647 if (!NT_STATUS_IS_OK(status)) {
3648 return status;
3651 if (DEBUGLEVEL >= 10) {
3652 NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r);
3655 if (NT_STATUS_IS_ERR(status)) {
3656 return 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;
3667 /* Return result */
3668 if (werror) {
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);
3694 if (req == NULL) {
3695 return NULL;
3697 state->out_mem_ctx = NULL;
3698 state->dispatch_recv = cli->dispatch_recv;
3700 /* In parameters */
3702 /* Out parameters */
3704 /* Result */
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,
3715 &ndr_table_netdfs,
3716 NDR_DFS_SETINFO2,
3717 &state->tmp);
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);
3722 return 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);
3731 NTSTATUS status;
3732 TALLOC_CTX *mem_ctx;
3734 if (state->out_mem_ctx) {
3735 mem_ctx = state->out_mem_ctx;
3736 } else {
3737 mem_ctx = state;
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);
3744 return;
3747 /* Copy out parameters */
3749 /* Copy result */
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,
3764 WERROR *result)
3766 struct rpccli_dfs_SetInfo2_state *state = tevent_req_data(
3767 req, struct rpccli_dfs_SetInfo2_state);
3768 NTSTATUS status;
3770 if (tevent_req_is_nterror(req, &status)) {
3771 tevent_req_received(req);
3772 return status;
3775 /* Steal possbile out parameters to the callers context */
3776 talloc_steal(mem_ctx, state->out_mem_ctx);
3778 /* Return result */
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,
3787 WERROR *werror)
3789 struct dfs_SetInfo2 r;
3790 NTSTATUS status;
3792 /* In parameters */
3794 if (DEBUGLEVEL >= 10) {
3795 NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &r);
3798 status = cli->dispatch(cli,
3799 mem_ctx,
3800 &ndr_table_netdfs,
3801 NDR_DFS_SETINFO2,
3802 &r);
3804 if (!NT_STATUS_IS_OK(status)) {
3805 return status;
3808 if (DEBUGLEVEL >= 10) {
3809 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r);
3812 if (NT_STATUS_IS_ERR(status)) {
3813 return status;
3816 /* Return variables */
3818 /* Return result */
3819 if (werror) {
3820 *werror = r.out.result;
3823 return werror_to_ntstatus(r.out.result);