idl: removed the generated gen_ndr/ files from pidl
authorAndrew Tridgell <tridge@samba.org>
Mon, 3 May 2010 15:17:43 +0000 (17:17 +0200)
committerAndrew Tridgell <tridge@samba.org>
Tue, 4 May 2010 11:47:07 +0000 (13:47 +0200)
Samba3 will add these to the release tarball instead. See the mail on
samba-technical

144 files changed:
librpc/gen_ndr/cli_dfs.c [deleted file]
librpc/gen_ndr/cli_dfs.h [deleted file]
librpc/gen_ndr/cli_drsuapi.c [deleted file]
librpc/gen_ndr/cli_drsuapi.h [deleted file]
librpc/gen_ndr/cli_dssetup.c [deleted file]
librpc/gen_ndr/cli_dssetup.h [deleted file]
librpc/gen_ndr/cli_echo.c [deleted file]
librpc/gen_ndr/cli_echo.h [deleted file]
librpc/gen_ndr/cli_epmapper.c [deleted file]
librpc/gen_ndr/cli_epmapper.h [deleted file]
librpc/gen_ndr/cli_eventlog.c [deleted file]
librpc/gen_ndr/cli_eventlog.h [deleted file]
librpc/gen_ndr/cli_initshutdown.c [deleted file]
librpc/gen_ndr/cli_initshutdown.h [deleted file]
librpc/gen_ndr/cli_lsa.c [deleted file]
librpc/gen_ndr/cli_lsa.h [deleted file]
librpc/gen_ndr/cli_netlogon.c [deleted file]
librpc/gen_ndr/cli_netlogon.h [deleted file]
librpc/gen_ndr/cli_ntsvcs.c [deleted file]
librpc/gen_ndr/cli_ntsvcs.h [deleted file]
librpc/gen_ndr/cli_samr.c [deleted file]
librpc/gen_ndr/cli_samr.h [deleted file]
librpc/gen_ndr/cli_spoolss.c [deleted file]
librpc/gen_ndr/cli_spoolss.h [deleted file]
librpc/gen_ndr/cli_srvsvc.c [deleted file]
librpc/gen_ndr/cli_srvsvc.h [deleted file]
librpc/gen_ndr/cli_svcctl.c [deleted file]
librpc/gen_ndr/cli_svcctl.h [deleted file]
librpc/gen_ndr/cli_winreg.c [deleted file]
librpc/gen_ndr/cli_winreg.h [deleted file]
librpc/gen_ndr/cli_wkssvc.c [deleted file]
librpc/gen_ndr/cli_wkssvc.h [deleted file]
librpc/gen_ndr/dcerpc.h [deleted file]
librpc/gen_ndr/dfs.h [deleted file]
librpc/gen_ndr/drsblobs.h [deleted file]
librpc/gen_ndr/drsuapi.h [deleted file]
librpc/gen_ndr/dssetup.h [deleted file]
librpc/gen_ndr/echo.h [deleted file]
librpc/gen_ndr/epmapper.h [deleted file]
librpc/gen_ndr/eventlog.h [deleted file]
librpc/gen_ndr/initshutdown.h [deleted file]
librpc/gen_ndr/krb5pac.h [deleted file]
librpc/gen_ndr/lsa.h [deleted file]
librpc/gen_ndr/misc.h [deleted file]
librpc/gen_ndr/named_pipe_auth.h [deleted file]
librpc/gen_ndr/nbt.h [deleted file]
librpc/gen_ndr/ndr_dcerpc.c [deleted file]
librpc/gen_ndr/ndr_dcerpc.h [deleted file]
librpc/gen_ndr/ndr_dfs.c [deleted file]
librpc/gen_ndr/ndr_dfs.h [deleted file]
librpc/gen_ndr/ndr_drsblobs.c [deleted file]
librpc/gen_ndr/ndr_drsblobs.h [deleted file]
librpc/gen_ndr/ndr_drsuapi.c [deleted file]
librpc/gen_ndr/ndr_drsuapi.h [deleted file]
librpc/gen_ndr/ndr_dssetup.c [deleted file]
librpc/gen_ndr/ndr_dssetup.h [deleted file]
librpc/gen_ndr/ndr_echo.c [deleted file]
librpc/gen_ndr/ndr_echo.h [deleted file]
librpc/gen_ndr/ndr_epmapper.c [deleted file]
librpc/gen_ndr/ndr_epmapper.h [deleted file]
librpc/gen_ndr/ndr_eventlog.c [deleted file]
librpc/gen_ndr/ndr_eventlog.h [deleted file]
librpc/gen_ndr/ndr_initshutdown.c [deleted file]
librpc/gen_ndr/ndr_initshutdown.h [deleted file]
librpc/gen_ndr/ndr_krb5pac.c [deleted file]
librpc/gen_ndr/ndr_krb5pac.h [deleted file]
librpc/gen_ndr/ndr_lsa.c [deleted file]
librpc/gen_ndr/ndr_lsa.h [deleted file]
librpc/gen_ndr/ndr_misc.c [deleted file]
librpc/gen_ndr/ndr_misc.h [deleted file]
librpc/gen_ndr/ndr_named_pipe_auth.c [deleted file]
librpc/gen_ndr/ndr_named_pipe_auth.h [deleted file]
librpc/gen_ndr/ndr_nbt.c [deleted file]
librpc/gen_ndr/ndr_nbt.h [deleted file]
librpc/gen_ndr/ndr_netlogon.c [deleted file]
librpc/gen_ndr/ndr_netlogon.h [deleted file]
librpc/gen_ndr/ndr_ntlmssp.c [deleted file]
librpc/gen_ndr/ndr_ntlmssp.h [deleted file]
librpc/gen_ndr/ndr_ntsvcs.c [deleted file]
librpc/gen_ndr/ndr_ntsvcs.h [deleted file]
librpc/gen_ndr/ndr_rap.c [deleted file]
librpc/gen_ndr/ndr_rap.h [deleted file]
librpc/gen_ndr/ndr_samr.c [deleted file]
librpc/gen_ndr/ndr_samr.h [deleted file]
librpc/gen_ndr/ndr_schannel.c [deleted file]
librpc/gen_ndr/ndr_schannel.h [deleted file]
librpc/gen_ndr/ndr_security.c [deleted file]
librpc/gen_ndr/ndr_security.h [deleted file]
librpc/gen_ndr/ndr_spoolss.c [deleted file]
librpc/gen_ndr/ndr_spoolss.h [deleted file]
librpc/gen_ndr/ndr_srvsvc.c [deleted file]
librpc/gen_ndr/ndr_srvsvc.h [deleted file]
librpc/gen_ndr/ndr_svcctl.c [deleted file]
librpc/gen_ndr/ndr_svcctl.h [deleted file]
librpc/gen_ndr/ndr_winreg.c [deleted file]
librpc/gen_ndr/ndr_winreg.h [deleted file]
librpc/gen_ndr/ndr_wkssvc.c [deleted file]
librpc/gen_ndr/ndr_wkssvc.h [deleted file]
librpc/gen_ndr/ndr_xattr.c [deleted file]
librpc/gen_ndr/ndr_xattr.h [deleted file]
librpc/gen_ndr/netlogon.h [deleted file]
librpc/gen_ndr/ntlmssp.h [deleted file]
librpc/gen_ndr/ntsvcs.h [deleted file]
librpc/gen_ndr/rap.h [deleted file]
librpc/gen_ndr/samr.h [deleted file]
librpc/gen_ndr/schannel.h [deleted file]
librpc/gen_ndr/security.h [deleted file]
librpc/gen_ndr/spoolss.h [deleted file]
librpc/gen_ndr/srv_dfs.c [deleted file]
librpc/gen_ndr/srv_dfs.h [deleted file]
librpc/gen_ndr/srv_dssetup.c [deleted file]
librpc/gen_ndr/srv_dssetup.h [deleted file]
librpc/gen_ndr/srv_echo.c [deleted file]
librpc/gen_ndr/srv_echo.h [deleted file]
librpc/gen_ndr/srv_epmapper.c [deleted file]
librpc/gen_ndr/srv_epmapper.h [deleted file]
librpc/gen_ndr/srv_eventlog.c [deleted file]
librpc/gen_ndr/srv_eventlog.h [deleted file]
librpc/gen_ndr/srv_initshutdown.c [deleted file]
librpc/gen_ndr/srv_initshutdown.h [deleted file]
librpc/gen_ndr/srv_lsa.c [deleted file]
librpc/gen_ndr/srv_lsa.h [deleted file]
librpc/gen_ndr/srv_netlogon.c [deleted file]
librpc/gen_ndr/srv_netlogon.h [deleted file]
librpc/gen_ndr/srv_ntsvcs.c [deleted file]
librpc/gen_ndr/srv_ntsvcs.h [deleted file]
librpc/gen_ndr/srv_samr.c [deleted file]
librpc/gen_ndr/srv_samr.h [deleted file]
librpc/gen_ndr/srv_spoolss.c [deleted file]
librpc/gen_ndr/srv_spoolss.h [deleted file]
librpc/gen_ndr/srv_srvsvc.c [deleted file]
librpc/gen_ndr/srv_srvsvc.h [deleted file]
librpc/gen_ndr/srv_svcctl.c [deleted file]
librpc/gen_ndr/srv_svcctl.h [deleted file]
librpc/gen_ndr/srv_winreg.c [deleted file]
librpc/gen_ndr/srv_winreg.h [deleted file]
librpc/gen_ndr/srv_wkssvc.c [deleted file]
librpc/gen_ndr/srv_wkssvc.h [deleted file]
librpc/gen_ndr/srvsvc.h [deleted file]
librpc/gen_ndr/svcctl.h [deleted file]
librpc/gen_ndr/tables.c [deleted file]
librpc/gen_ndr/winreg.h [deleted file]
librpc/gen_ndr/wkssvc.h [deleted file]
librpc/gen_ndr/xattr.h [deleted file]

diff --git a/librpc/gen_ndr/cli_dfs.c b/librpc/gen_ndr/cli_dfs.c
deleted file mode 100644 (file)
index 6ce5b5f..0000000
+++ /dev/null
@@ -1,3457 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * client auto-generated by pidl. DO NOT MODIFY!
- */
-
-#include "includes.h"
-#include "../librpc/gen_ndr/cli_dfs.h"
-
-struct rpccli_dfs_GetManagerVersion_state {
-       struct dfs_GetManagerVersion orig;
-       struct dfs_GetManagerVersion tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_GetManagerVersion_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_GetManagerVersion_send(TALLOC_CTX *mem_ctx,
-                                                    struct tevent_context *ev,
-                                                    struct rpc_pipe_client *cli,
-                                                    enum dfs_ManagerVersion *_version /* [out] [ref] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_GetManagerVersion_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_GetManagerVersion_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-       state->orig.out.version = _version;
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_dfs_GetManagerVersion_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_GETMANAGERVERSION,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_GetManagerVersion_done, req);
-       return req;
-}
-
-static void rpccli_dfs_GetManagerVersion_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_GetManagerVersion_state *state = tevent_req_data(
-               req, struct rpccli_dfs_GetManagerVersion_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.version = *state->tmp.out.version;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_GetManagerVersion_recv(struct tevent_req *req,
-                                          TALLOC_CTX *mem_ctx)
-{
-       struct rpccli_dfs_GetManagerVersion_state *state = tevent_req_data(
-               req, struct rpccli_dfs_GetManagerVersion_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli,
-                                     TALLOC_CTX *mem_ctx,
-                                     enum dfs_ManagerVersion *version /* [out] [ref] */)
-{
-       struct dfs_GetManagerVersion r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_GETMANAGERVERSION,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *version = *r.out.version;
-
-       /* Return result */
-       return NT_STATUS_OK;
-}
-
-struct rpccli_dfs_Add_state {
-       struct dfs_Add orig;
-       struct dfs_Add tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_Add_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_Add_send(TALLOC_CTX *mem_ctx,
-                                      struct tevent_context *ev,
-                                      struct rpc_pipe_client *cli,
-                                      const char *_path /* [in] [ref,charset(UTF16)] */,
-                                      const char *_server /* [in] [ref,charset(UTF16)] */,
-                                      const char *_share /* [in] [unique,charset(UTF16)] */,
-                                      const char *_comment /* [in] [unique,charset(UTF16)] */,
-                                      uint32_t _flags /* [in]  */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_Add_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_Add_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.path = _path;
-       state->orig.in.server = _server;
-       state->orig.in.share = _share;
-       state->orig.in.comment = _comment;
-       state->orig.in.flags = _flags;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_ADD,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_Add_done, req);
-       return req;
-}
-
-static void rpccli_dfs_Add_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_Add_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Add_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_Add_recv(struct tevent_req *req,
-                            TALLOC_CTX *mem_ctx,
-                            WERROR *result)
-{
-       struct rpccli_dfs_Add_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Add_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli,
-                       TALLOC_CTX *mem_ctx,
-                       const char *path /* [in] [ref,charset(UTF16)] */,
-                       const char *server /* [in] [ref,charset(UTF16)] */,
-                       const char *share /* [in] [unique,charset(UTF16)] */,
-                       const char *comment /* [in] [unique,charset(UTF16)] */,
-                       uint32_t flags /* [in]  */,
-                       WERROR *werror)
-{
-       struct dfs_Add r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.path = path;
-       r.in.server = server;
-       r.in.share = share;
-       r.in.comment = comment;
-       r.in.flags = flags;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_ADD,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_Remove_state {
-       struct dfs_Remove orig;
-       struct dfs_Remove tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_Remove_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_Remove_send(TALLOC_CTX *mem_ctx,
-                                         struct tevent_context *ev,
-                                         struct rpc_pipe_client *cli,
-                                         const char *_dfs_entry_path /* [in] [ref,charset(UTF16)] */,
-                                         const char *_servername /* [in] [unique,charset(UTF16)] */,
-                                         const char *_sharename /* [in] [unique,charset(UTF16)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_Remove_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_Remove_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.dfs_entry_path = _dfs_entry_path;
-       state->orig.in.servername = _servername;
-       state->orig.in.sharename = _sharename;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_REMOVE,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_Remove_done, req);
-       return req;
-}
-
-static void rpccli_dfs_Remove_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_Remove_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Remove_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_Remove_recv(struct tevent_req *req,
-                               TALLOC_CTX *mem_ctx,
-                               WERROR *result)
-{
-       struct rpccli_dfs_Remove_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Remove_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli,
-                          TALLOC_CTX *mem_ctx,
-                          const char *dfs_entry_path /* [in] [ref,charset(UTF16)] */,
-                          const char *servername /* [in] [unique,charset(UTF16)] */,
-                          const char *sharename /* [in] [unique,charset(UTF16)] */,
-                          WERROR *werror)
-{
-       struct dfs_Remove r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.dfs_entry_path = dfs_entry_path;
-       r.in.servername = servername;
-       r.in.sharename = sharename;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_REMOVE,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_SetInfo_state {
-       struct dfs_SetInfo orig;
-       struct dfs_SetInfo tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_SetInfo_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_SetInfo_send(TALLOC_CTX *mem_ctx,
-                                          struct tevent_context *ev,
-                                          struct rpc_pipe_client *cli,
-                                          const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
-                                          const char *_servername /* [in] [unique,charset(UTF16)] */,
-                                          const char *_sharename /* [in] [unique,charset(UTF16)] */,
-                                          uint32_t _level /* [in]  */,
-                                          union dfs_Info *_info /* [in] [ref,switch_is(level)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_SetInfo_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_SetInfo_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.dfs_entry_path = _dfs_entry_path;
-       state->orig.in.servername = _servername;
-       state->orig.in.sharename = _sharename;
-       state->orig.in.level = _level;
-       state->orig.in.info = _info;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_SETINFO,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_SetInfo_done, req);
-       return req;
-}
-
-static void rpccli_dfs_SetInfo_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_SetInfo_state *state = tevent_req_data(
-               req, struct rpccli_dfs_SetInfo_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_SetInfo_recv(struct tevent_req *req,
-                                TALLOC_CTX *mem_ctx,
-                                WERROR *result)
-{
-       struct rpccli_dfs_SetInfo_state *state = tevent_req_data(
-               req, struct rpccli_dfs_SetInfo_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli,
-                           TALLOC_CTX *mem_ctx,
-                           const char *dfs_entry_path /* [in] [charset(UTF16)] */,
-                           const char *servername /* [in] [unique,charset(UTF16)] */,
-                           const char *sharename /* [in] [unique,charset(UTF16)] */,
-                           uint32_t level /* [in]  */,
-                           union dfs_Info *info /* [in] [ref,switch_is(level)] */,
-                           WERROR *werror)
-{
-       struct dfs_SetInfo r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.dfs_entry_path = dfs_entry_path;
-       r.in.servername = servername;
-       r.in.sharename = sharename;
-       r.in.level = level;
-       r.in.info = info;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_SETINFO,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_GetInfo_state {
-       struct dfs_GetInfo orig;
-       struct dfs_GetInfo tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_GetInfo_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_GetInfo_send(TALLOC_CTX *mem_ctx,
-                                          struct tevent_context *ev,
-                                          struct rpc_pipe_client *cli,
-                                          const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
-                                          const char *_servername /* [in] [unique,charset(UTF16)] */,
-                                          const char *_sharename /* [in] [unique,charset(UTF16)] */,
-                                          uint32_t _level /* [in]  */,
-                                          union dfs_Info *_info /* [out] [ref,switch_is(level)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_GetInfo_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_GetInfo_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.dfs_entry_path = _dfs_entry_path;
-       state->orig.in.servername = _servername;
-       state->orig.in.sharename = _sharename;
-       state->orig.in.level = _level;
-
-       /* Out parameters */
-       state->orig.out.info = _info;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_dfs_GetInfo_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_GETINFO,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_GetInfo_done, req);
-       return req;
-}
-
-static void rpccli_dfs_GetInfo_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_GetInfo_state *state = tevent_req_data(
-               req, struct rpccli_dfs_GetInfo_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.info = *state->tmp.out.info;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_GetInfo_recv(struct tevent_req *req,
-                                TALLOC_CTX *mem_ctx,
-                                WERROR *result)
-{
-       struct rpccli_dfs_GetInfo_state *state = tevent_req_data(
-               req, struct rpccli_dfs_GetInfo_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli,
-                           TALLOC_CTX *mem_ctx,
-                           const char *dfs_entry_path /* [in] [charset(UTF16)] */,
-                           const char *servername /* [in] [unique,charset(UTF16)] */,
-                           const char *sharename /* [in] [unique,charset(UTF16)] */,
-                           uint32_t level /* [in]  */,
-                           union dfs_Info *info /* [out] [ref,switch_is(level)] */,
-                           WERROR *werror)
-{
-       struct dfs_GetInfo r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.dfs_entry_path = dfs_entry_path;
-       r.in.servername = servername;
-       r.in.sharename = sharename;
-       r.in.level = level;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_GETINFO,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *info = *r.out.info;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_Enum_state {
-       struct dfs_Enum orig;
-       struct dfs_Enum tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_Enum_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_Enum_send(TALLOC_CTX *mem_ctx,
-                                       struct tevent_context *ev,
-                                       struct rpc_pipe_client *cli,
-                                       uint32_t _level /* [in]  */,
-                                       uint32_t _bufsize /* [in]  */,
-                                       struct dfs_EnumStruct *_info /* [in,out] [unique] */,
-                                       uint32_t *_total /* [in,out] [unique] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_Enum_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_Enum_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.level = _level;
-       state->orig.in.bufsize = _bufsize;
-       state->orig.in.info = _info;
-       state->orig.in.total = _total;
-
-       /* Out parameters */
-       state->orig.out.info = _info;
-       state->orig.out.total = _total;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_dfs_Enum_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_ENUM,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_Enum_done, req);
-       return req;
-}
-
-static void rpccli_dfs_Enum_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_Enum_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Enum_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       if (state->orig.out.info && state->tmp.out.info) {
-               *state->orig.out.info = *state->tmp.out.info;
-       }
-       if (state->orig.out.total && state->tmp.out.total) {
-               *state->orig.out.total = *state->tmp.out.total;
-       }
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_Enum_recv(struct tevent_req *req,
-                             TALLOC_CTX *mem_ctx,
-                             WERROR *result)
-{
-       struct rpccli_dfs_Enum_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Enum_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli,
-                        TALLOC_CTX *mem_ctx,
-                        uint32_t level /* [in]  */,
-                        uint32_t bufsize /* [in]  */,
-                        struct dfs_EnumStruct *info /* [in,out] [unique] */,
-                        uint32_t *total /* [in,out] [unique] */,
-                        WERROR *werror)
-{
-       struct dfs_Enum r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.level = level;
-       r.in.bufsize = bufsize;
-       r.in.info = info;
-       r.in.total = total;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_ENUM,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       if (info && r.out.info) {
-               *info = *r.out.info;
-       }
-       if (total && r.out.total) {
-               *total = *r.out.total;
-       }
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_Rename_state {
-       struct dfs_Rename orig;
-       struct dfs_Rename tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_Rename_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_Rename_send(TALLOC_CTX *mem_ctx,
-                                         struct tevent_context *ev,
-                                         struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_Rename_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_Rename_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_RENAME,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_Rename_done, req);
-       return req;
-}
-
-static void rpccli_dfs_Rename_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_Rename_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Rename_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_Rename_recv(struct tevent_req *req,
-                               TALLOC_CTX *mem_ctx,
-                               WERROR *result)
-{
-       struct rpccli_dfs_Rename_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Rename_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli,
-                          TALLOC_CTX *mem_ctx,
-                          WERROR *werror)
-{
-       struct dfs_Rename r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_RENAME,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_Move_state {
-       struct dfs_Move orig;
-       struct dfs_Move tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_Move_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_Move_send(TALLOC_CTX *mem_ctx,
-                                       struct tevent_context *ev,
-                                       struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_Move_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_Move_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_MOVE,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_Move_done, req);
-       return req;
-}
-
-static void rpccli_dfs_Move_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_Move_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Move_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_Move_recv(struct tevent_req *req,
-                             TALLOC_CTX *mem_ctx,
-                             WERROR *result)
-{
-       struct rpccli_dfs_Move_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Move_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli,
-                        TALLOC_CTX *mem_ctx,
-                        WERROR *werror)
-{
-       struct dfs_Move r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_MOVE,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_ManagerGetConfigInfo_state {
-       struct dfs_ManagerGetConfigInfo orig;
-       struct dfs_ManagerGetConfigInfo tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_ManagerGetConfigInfo_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_ManagerGetConfigInfo_send(TALLOC_CTX *mem_ctx,
-                                                       struct tevent_context *ev,
-                                                       struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_ManagerGetConfigInfo_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_ManagerGetConfigInfo_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_MANAGERGETCONFIGINFO,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_ManagerGetConfigInfo_done, req);
-       return req;
-}
-
-static void rpccli_dfs_ManagerGetConfigInfo_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_ManagerGetConfigInfo_state *state = tevent_req_data(
-               req, struct rpccli_dfs_ManagerGetConfigInfo_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_ManagerGetConfigInfo_recv(struct tevent_req *req,
-                                             TALLOC_CTX *mem_ctx,
-                                             WERROR *result)
-{
-       struct rpccli_dfs_ManagerGetConfigInfo_state *state = tevent_req_data(
-               req, struct rpccli_dfs_ManagerGetConfigInfo_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli,
-                                        TALLOC_CTX *mem_ctx,
-                                        WERROR *werror)
-{
-       struct dfs_ManagerGetConfigInfo r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_MANAGERGETCONFIGINFO,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_ManagerSendSiteInfo_state {
-       struct dfs_ManagerSendSiteInfo orig;
-       struct dfs_ManagerSendSiteInfo tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_ManagerSendSiteInfo_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_ManagerSendSiteInfo_send(TALLOC_CTX *mem_ctx,
-                                                      struct tevent_context *ev,
-                                                      struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_ManagerSendSiteInfo_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_ManagerSendSiteInfo_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_MANAGERSENDSITEINFO,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_ManagerSendSiteInfo_done, req);
-       return req;
-}
-
-static void rpccli_dfs_ManagerSendSiteInfo_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_ManagerSendSiteInfo_state *state = tevent_req_data(
-               req, struct rpccli_dfs_ManagerSendSiteInfo_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_ManagerSendSiteInfo_recv(struct tevent_req *req,
-                                            TALLOC_CTX *mem_ctx,
-                                            WERROR *result)
-{
-       struct rpccli_dfs_ManagerSendSiteInfo_state *state = tevent_req_data(
-               req, struct rpccli_dfs_ManagerSendSiteInfo_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli,
-                                       TALLOC_CTX *mem_ctx,
-                                       WERROR *werror)
-{
-       struct dfs_ManagerSendSiteInfo r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_MANAGERSENDSITEINFO,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_AddFtRoot_state {
-       struct dfs_AddFtRoot orig;
-       struct dfs_AddFtRoot tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_AddFtRoot_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_AddFtRoot_send(TALLOC_CTX *mem_ctx,
-                                            struct tevent_context *ev,
-                                            struct rpc_pipe_client *cli,
-                                            const char *_servername /* [in] [charset(UTF16)] */,
-                                            const char *_dns_servername /* [in] [charset(UTF16)] */,
-                                            const char *_dfsname /* [in] [charset(UTF16)] */,
-                                            const char *_rootshare /* [in] [charset(UTF16)] */,
-                                            const char *_comment /* [in] [charset(UTF16)] */,
-                                            const char *_dfs_config_dn /* [in] [charset(UTF16)] */,
-                                            uint8_t _unknown1 /* [in]  */,
-                                            uint32_t _flags /* [in]  */,
-                                            struct dfs_UnknownStruct **_unknown2 /* [in,out] [unique] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_AddFtRoot_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_AddFtRoot_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.dns_servername = _dns_servername;
-       state->orig.in.dfsname = _dfsname;
-       state->orig.in.rootshare = _rootshare;
-       state->orig.in.comment = _comment;
-       state->orig.in.dfs_config_dn = _dfs_config_dn;
-       state->orig.in.unknown1 = _unknown1;
-       state->orig.in.flags = _flags;
-       state->orig.in.unknown2 = _unknown2;
-
-       /* Out parameters */
-       state->orig.out.unknown2 = _unknown2;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_dfs_AddFtRoot_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_ADDFTROOT,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_AddFtRoot_done, req);
-       return req;
-}
-
-static void rpccli_dfs_AddFtRoot_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_AddFtRoot_state *state = tevent_req_data(
-               req, struct rpccli_dfs_AddFtRoot_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       if (state->orig.out.unknown2 && state->tmp.out.unknown2) {
-               *state->orig.out.unknown2 = *state->tmp.out.unknown2;
-       }
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_AddFtRoot_recv(struct tevent_req *req,
-                                  TALLOC_CTX *mem_ctx,
-                                  WERROR *result)
-{
-       struct rpccli_dfs_AddFtRoot_state *state = tevent_req_data(
-               req, struct rpccli_dfs_AddFtRoot_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli,
-                             TALLOC_CTX *mem_ctx,
-                             const char *servername /* [in] [charset(UTF16)] */,
-                             const char *dns_servername /* [in] [charset(UTF16)] */,
-                             const char *dfsname /* [in] [charset(UTF16)] */,
-                             const char *rootshare /* [in] [charset(UTF16)] */,
-                             const char *comment /* [in] [charset(UTF16)] */,
-                             const char *dfs_config_dn /* [in] [charset(UTF16)] */,
-                             uint8_t unknown1 /* [in]  */,
-                             uint32_t flags /* [in]  */,
-                             struct dfs_UnknownStruct **unknown2 /* [in,out] [unique] */,
-                             WERROR *werror)
-{
-       struct dfs_AddFtRoot r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.dns_servername = dns_servername;
-       r.in.dfsname = dfsname;
-       r.in.rootshare = rootshare;
-       r.in.comment = comment;
-       r.in.dfs_config_dn = dfs_config_dn;
-       r.in.unknown1 = unknown1;
-       r.in.flags = flags;
-       r.in.unknown2 = unknown2;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_ADDFTROOT,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       if (unknown2 && r.out.unknown2) {
-               *unknown2 = *r.out.unknown2;
-       }
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_RemoveFtRoot_state {
-       struct dfs_RemoveFtRoot orig;
-       struct dfs_RemoveFtRoot tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_RemoveFtRoot_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_RemoveFtRoot_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               const char *_servername /* [in] [charset(UTF16)] */,
-                                               const char *_dns_servername /* [in] [charset(UTF16)] */,
-                                               const char *_dfsname /* [in] [charset(UTF16)] */,
-                                               const char *_rootshare /* [in] [charset(UTF16)] */,
-                                               uint32_t _flags /* [in]  */,
-                                               struct dfs_UnknownStruct **_unknown /* [in,out] [unique] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_RemoveFtRoot_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_RemoveFtRoot_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.dns_servername = _dns_servername;
-       state->orig.in.dfsname = _dfsname;
-       state->orig.in.rootshare = _rootshare;
-       state->orig.in.flags = _flags;
-       state->orig.in.unknown = _unknown;
-
-       /* Out parameters */
-       state->orig.out.unknown = _unknown;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_dfs_RemoveFtRoot_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_REMOVEFTROOT,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_RemoveFtRoot_done, req);
-       return req;
-}
-
-static void rpccli_dfs_RemoveFtRoot_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_RemoveFtRoot_state *state = tevent_req_data(
-               req, struct rpccli_dfs_RemoveFtRoot_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       if (state->orig.out.unknown && state->tmp.out.unknown) {
-               *state->orig.out.unknown = *state->tmp.out.unknown;
-       }
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_RemoveFtRoot_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result)
-{
-       struct rpccli_dfs_RemoveFtRoot_state *state = tevent_req_data(
-               req, struct rpccli_dfs_RemoveFtRoot_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                const char *servername /* [in] [charset(UTF16)] */,
-                                const char *dns_servername /* [in] [charset(UTF16)] */,
-                                const char *dfsname /* [in] [charset(UTF16)] */,
-                                const char *rootshare /* [in] [charset(UTF16)] */,
-                                uint32_t flags /* [in]  */,
-                                struct dfs_UnknownStruct **unknown /* [in,out] [unique] */,
-                                WERROR *werror)
-{
-       struct dfs_RemoveFtRoot r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.dns_servername = dns_servername;
-       r.in.dfsname = dfsname;
-       r.in.rootshare = rootshare;
-       r.in.flags = flags;
-       r.in.unknown = unknown;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_REMOVEFTROOT,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       if (unknown && r.out.unknown) {
-               *unknown = *r.out.unknown;
-       }
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_AddStdRoot_state {
-       struct dfs_AddStdRoot orig;
-       struct dfs_AddStdRoot tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_AddStdRoot_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_AddStdRoot_send(TALLOC_CTX *mem_ctx,
-                                             struct tevent_context *ev,
-                                             struct rpc_pipe_client *cli,
-                                             const char *_servername /* [in] [charset(UTF16)] */,
-                                             const char *_rootshare /* [in] [charset(UTF16)] */,
-                                             const char *_comment /* [in] [charset(UTF16)] */,
-                                             uint32_t _flags /* [in]  */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_AddStdRoot_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_AddStdRoot_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.rootshare = _rootshare;
-       state->orig.in.comment = _comment;
-       state->orig.in.flags = _flags;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_ADDSTDROOT,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_AddStdRoot_done, req);
-       return req;
-}
-
-static void rpccli_dfs_AddStdRoot_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_AddStdRoot_state *state = tevent_req_data(
-               req, struct rpccli_dfs_AddStdRoot_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_AddStdRoot_recv(struct tevent_req *req,
-                                   TALLOC_CTX *mem_ctx,
-                                   WERROR *result)
-{
-       struct rpccli_dfs_AddStdRoot_state *state = tevent_req_data(
-               req, struct rpccli_dfs_AddStdRoot_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli,
-                              TALLOC_CTX *mem_ctx,
-                              const char *servername /* [in] [charset(UTF16)] */,
-                              const char *rootshare /* [in] [charset(UTF16)] */,
-                              const char *comment /* [in] [charset(UTF16)] */,
-                              uint32_t flags /* [in]  */,
-                              WERROR *werror)
-{
-       struct dfs_AddStdRoot r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.rootshare = rootshare;
-       r.in.comment = comment;
-       r.in.flags = flags;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_ADDSTDROOT,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_RemoveStdRoot_state {
-       struct dfs_RemoveStdRoot orig;
-       struct dfs_RemoveStdRoot tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_RemoveStdRoot_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_RemoveStdRoot_send(TALLOC_CTX *mem_ctx,
-                                                struct tevent_context *ev,
-                                                struct rpc_pipe_client *cli,
-                                                const char *_servername /* [in] [charset(UTF16)] */,
-                                                const char *_rootshare /* [in] [charset(UTF16)] */,
-                                                uint32_t _flags /* [in]  */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_RemoveStdRoot_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_RemoveStdRoot_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.rootshare = _rootshare;
-       state->orig.in.flags = _flags;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_REMOVESTDROOT,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_RemoveStdRoot_done, req);
-       return req;
-}
-
-static void rpccli_dfs_RemoveStdRoot_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_RemoveStdRoot_state *state = tevent_req_data(
-               req, struct rpccli_dfs_RemoveStdRoot_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_RemoveStdRoot_recv(struct tevent_req *req,
-                                      TALLOC_CTX *mem_ctx,
-                                      WERROR *result)
-{
-       struct rpccli_dfs_RemoveStdRoot_state *state = tevent_req_data(
-               req, struct rpccli_dfs_RemoveStdRoot_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli,
-                                 TALLOC_CTX *mem_ctx,
-                                 const char *servername /* [in] [charset(UTF16)] */,
-                                 const char *rootshare /* [in] [charset(UTF16)] */,
-                                 uint32_t flags /* [in]  */,
-                                 WERROR *werror)
-{
-       struct dfs_RemoveStdRoot r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.rootshare = rootshare;
-       r.in.flags = flags;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_REMOVESTDROOT,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_ManagerInitialize_state {
-       struct dfs_ManagerInitialize orig;
-       struct dfs_ManagerInitialize tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_ManagerInitialize_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_ManagerInitialize_send(TALLOC_CTX *mem_ctx,
-                                                    struct tevent_context *ev,
-                                                    struct rpc_pipe_client *cli,
-                                                    const char *_servername /* [in] [ref,charset(UTF16)] */,
-                                                    uint32_t _flags /* [in]  */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_ManagerInitialize_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_ManagerInitialize_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.flags = _flags;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_MANAGERINITIALIZE,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_ManagerInitialize_done, req);
-       return req;
-}
-
-static void rpccli_dfs_ManagerInitialize_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_ManagerInitialize_state *state = tevent_req_data(
-               req, struct rpccli_dfs_ManagerInitialize_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_ManagerInitialize_recv(struct tevent_req *req,
-                                          TALLOC_CTX *mem_ctx,
-                                          WERROR *result)
-{
-       struct rpccli_dfs_ManagerInitialize_state *state = tevent_req_data(
-               req, struct rpccli_dfs_ManagerInitialize_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli,
-                                     TALLOC_CTX *mem_ctx,
-                                     const char *servername /* [in] [ref,charset(UTF16)] */,
-                                     uint32_t flags /* [in]  */,
-                                     WERROR *werror)
-{
-       struct dfs_ManagerInitialize r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.flags = flags;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_MANAGERINITIALIZE,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_AddStdRootForced_state {
-       struct dfs_AddStdRootForced orig;
-       struct dfs_AddStdRootForced tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_AddStdRootForced_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_AddStdRootForced_send(TALLOC_CTX *mem_ctx,
-                                                   struct tevent_context *ev,
-                                                   struct rpc_pipe_client *cli,
-                                                   const char *_servername /* [in] [charset(UTF16)] */,
-                                                   const char *_rootshare /* [in] [charset(UTF16)] */,
-                                                   const char *_comment /* [in] [charset(UTF16)] */,
-                                                   const char *_store /* [in] [charset(UTF16)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_AddStdRootForced_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_AddStdRootForced_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.rootshare = _rootshare;
-       state->orig.in.comment = _comment;
-       state->orig.in.store = _store;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_ADDSTDROOTFORCED,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_AddStdRootForced_done, req);
-       return req;
-}
-
-static void rpccli_dfs_AddStdRootForced_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_AddStdRootForced_state *state = tevent_req_data(
-               req, struct rpccli_dfs_AddStdRootForced_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_AddStdRootForced_recv(struct tevent_req *req,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *result)
-{
-       struct rpccli_dfs_AddStdRootForced_state *state = tevent_req_data(
-               req, struct rpccli_dfs_AddStdRootForced_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli,
-                                    TALLOC_CTX *mem_ctx,
-                                    const char *servername /* [in] [charset(UTF16)] */,
-                                    const char *rootshare /* [in] [charset(UTF16)] */,
-                                    const char *comment /* [in] [charset(UTF16)] */,
-                                    const char *store /* [in] [charset(UTF16)] */,
-                                    WERROR *werror)
-{
-       struct dfs_AddStdRootForced r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.rootshare = rootshare;
-       r.in.comment = comment;
-       r.in.store = store;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_ADDSTDROOTFORCED,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_GetDcAddress_state {
-       struct dfs_GetDcAddress orig;
-       struct dfs_GetDcAddress tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_GetDcAddress_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_GetDcAddress_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               const char *_servername /* [in] [charset(UTF16)] */,
-                                               const char **_server_fullname /* [in,out] [ref,charset(UTF16)] */,
-                                               uint8_t *_is_root /* [in,out] [ref] */,
-                                               uint32_t *_ttl /* [in,out] [ref] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_GetDcAddress_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_GetDcAddress_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.server_fullname = _server_fullname;
-       state->orig.in.is_root = _is_root;
-       state->orig.in.ttl = _ttl;
-
-       /* Out parameters */
-       state->orig.out.server_fullname = _server_fullname;
-       state->orig.out.is_root = _is_root;
-       state->orig.out.ttl = _ttl;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_dfs_GetDcAddress_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_GETDCADDRESS,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_GetDcAddress_done, req);
-       return req;
-}
-
-static void rpccli_dfs_GetDcAddress_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_GetDcAddress_state *state = tevent_req_data(
-               req, struct rpccli_dfs_GetDcAddress_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.server_fullname = *state->tmp.out.server_fullname;
-       *state->orig.out.is_root = *state->tmp.out.is_root;
-       *state->orig.out.ttl = *state->tmp.out.ttl;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_GetDcAddress_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result)
-{
-       struct rpccli_dfs_GetDcAddress_state *state = tevent_req_data(
-               req, struct rpccli_dfs_GetDcAddress_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                const char *servername /* [in] [charset(UTF16)] */,
-                                const char **server_fullname /* [in,out] [ref,charset(UTF16)] */,
-                                uint8_t *is_root /* [in,out] [ref] */,
-                                uint32_t *ttl /* [in,out] [ref] */,
-                                WERROR *werror)
-{
-       struct dfs_GetDcAddress r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.server_fullname = server_fullname;
-       r.in.is_root = is_root;
-       r.in.ttl = ttl;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_GETDCADDRESS,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *server_fullname = *r.out.server_fullname;
-       *is_root = *r.out.is_root;
-       *ttl = *r.out.ttl;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_SetDcAddress_state {
-       struct dfs_SetDcAddress orig;
-       struct dfs_SetDcAddress tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_SetDcAddress_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_SetDcAddress_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               const char *_servername /* [in] [charset(UTF16)] */,
-                                               const char *_server_fullname /* [in] [charset(UTF16)] */,
-                                               uint32_t _flags /* [in]  */,
-                                               uint32_t _ttl /* [in]  */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_SetDcAddress_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_SetDcAddress_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.server_fullname = _server_fullname;
-       state->orig.in.flags = _flags;
-       state->orig.in.ttl = _ttl;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_SETDCADDRESS,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_SetDcAddress_done, req);
-       return req;
-}
-
-static void rpccli_dfs_SetDcAddress_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_SetDcAddress_state *state = tevent_req_data(
-               req, struct rpccli_dfs_SetDcAddress_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_SetDcAddress_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result)
-{
-       struct rpccli_dfs_SetDcAddress_state *state = tevent_req_data(
-               req, struct rpccli_dfs_SetDcAddress_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                const char *servername /* [in] [charset(UTF16)] */,
-                                const char *server_fullname /* [in] [charset(UTF16)] */,
-                                uint32_t flags /* [in]  */,
-                                uint32_t ttl /* [in]  */,
-                                WERROR *werror)
-{
-       struct dfs_SetDcAddress r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.server_fullname = server_fullname;
-       r.in.flags = flags;
-       r.in.ttl = ttl;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_SETDCADDRESS,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_FlushFtTable_state {
-       struct dfs_FlushFtTable orig;
-       struct dfs_FlushFtTable tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_FlushFtTable_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_FlushFtTable_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               const char *_servername /* [in] [charset(UTF16)] */,
-                                               const char *_rootshare /* [in] [charset(UTF16)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_FlushFtTable_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_FlushFtTable_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.servername = _servername;
-       state->orig.in.rootshare = _rootshare;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_FLUSHFTTABLE,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_FlushFtTable_done, req);
-       return req;
-}
-
-static void rpccli_dfs_FlushFtTable_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_FlushFtTable_state *state = tevent_req_data(
-               req, struct rpccli_dfs_FlushFtTable_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_FlushFtTable_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result)
-{
-       struct rpccli_dfs_FlushFtTable_state *state = tevent_req_data(
-               req, struct rpccli_dfs_FlushFtTable_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                const char *servername /* [in] [charset(UTF16)] */,
-                                const char *rootshare /* [in] [charset(UTF16)] */,
-                                WERROR *werror)
-{
-       struct dfs_FlushFtTable r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.servername = servername;
-       r.in.rootshare = rootshare;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_FLUSHFTTABLE,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_Add2_state {
-       struct dfs_Add2 orig;
-       struct dfs_Add2 tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_Add2_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_Add2_send(TALLOC_CTX *mem_ctx,
-                                       struct tevent_context *ev,
-                                       struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_Add2_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_Add2_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_ADD2,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_Add2_done, req);
-       return req;
-}
-
-static void rpccli_dfs_Add2_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_Add2_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Add2_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_Add2_recv(struct tevent_req *req,
-                             TALLOC_CTX *mem_ctx,
-                             WERROR *result)
-{
-       struct rpccli_dfs_Add2_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Add2_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli,
-                        TALLOC_CTX *mem_ctx,
-                        WERROR *werror)
-{
-       struct dfs_Add2 r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_ADD2,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_Remove2_state {
-       struct dfs_Remove2 orig;
-       struct dfs_Remove2 tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_Remove2_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_Remove2_send(TALLOC_CTX *mem_ctx,
-                                          struct tevent_context *ev,
-                                          struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_Remove2_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_Remove2_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_REMOVE2,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_Remove2_done, req);
-       return req;
-}
-
-static void rpccli_dfs_Remove2_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_Remove2_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Remove2_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_Remove2_recv(struct tevent_req *req,
-                                TALLOC_CTX *mem_ctx,
-                                WERROR *result)
-{
-       struct rpccli_dfs_Remove2_state *state = tevent_req_data(
-               req, struct rpccli_dfs_Remove2_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli,
-                           TALLOC_CTX *mem_ctx,
-                           WERROR *werror)
-{
-       struct dfs_Remove2 r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_REMOVE2,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_EnumEx_state {
-       struct dfs_EnumEx orig;
-       struct dfs_EnumEx tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_EnumEx_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_EnumEx_send(TALLOC_CTX *mem_ctx,
-                                         struct tevent_context *ev,
-                                         struct rpc_pipe_client *cli,
-                                         const char *_dfs_name /* [in] [charset(UTF16)] */,
-                                         uint32_t _level /* [in]  */,
-                                         uint32_t _bufsize /* [in]  */,
-                                         struct dfs_EnumStruct *_info /* [in,out] [unique] */,
-                                         uint32_t *_total /* [in,out] [unique] */)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_EnumEx_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_EnumEx_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.dfs_name = _dfs_name;
-       state->orig.in.level = _level;
-       state->orig.in.bufsize = _bufsize;
-       state->orig.in.info = _info;
-       state->orig.in.total = _total;
-
-       /* Out parameters */
-       state->orig.out.info = _info;
-       state->orig.out.total = _total;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_dfs_EnumEx_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_ENUMEX,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_EnumEx_done, req);
-       return req;
-}
-
-static void rpccli_dfs_EnumEx_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_EnumEx_state *state = tevent_req_data(
-               req, struct rpccli_dfs_EnumEx_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       if (state->orig.out.info && state->tmp.out.info) {
-               *state->orig.out.info = *state->tmp.out.info;
-       }
-       if (state->orig.out.total && state->tmp.out.total) {
-               *state->orig.out.total = *state->tmp.out.total;
-       }
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_EnumEx_recv(struct tevent_req *req,
-                               TALLOC_CTX *mem_ctx,
-                               WERROR *result)
-{
-       struct rpccli_dfs_EnumEx_state *state = tevent_req_data(
-               req, struct rpccli_dfs_EnumEx_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli,
-                          TALLOC_CTX *mem_ctx,
-                          const char *dfs_name /* [in] [charset(UTF16)] */,
-                          uint32_t level /* [in]  */,
-                          uint32_t bufsize /* [in]  */,
-                          struct dfs_EnumStruct *info /* [in,out] [unique] */,
-                          uint32_t *total /* [in,out] [unique] */,
-                          WERROR *werror)
-{
-       struct dfs_EnumEx r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.dfs_name = dfs_name;
-       r.in.level = level;
-       r.in.bufsize = bufsize;
-       r.in.info = info;
-       r.in.total = total;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_ENUMEX,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       if (info && r.out.info) {
-               *info = *r.out.info;
-       }
-       if (total && r.out.total) {
-               *total = *r.out.total;
-       }
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_dfs_SetInfo2_state {
-       struct dfs_SetInfo2 orig;
-       struct dfs_SetInfo2 tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_dfs_SetInfo2_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_dfs_SetInfo2_send(TALLOC_CTX *mem_ctx,
-                                           struct tevent_context *ev,
-                                           struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_dfs_SetInfo2_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_dfs_SetInfo2_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_netdfs,
-                                   NDR_DFS_SETINFO2,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_dfs_SetInfo2_done, req);
-       return req;
-}
-
-static void rpccli_dfs_SetInfo2_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_dfs_SetInfo2_state *state = tevent_req_data(
-               req, struct rpccli_dfs_SetInfo2_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_dfs_SetInfo2_recv(struct tevent_req *req,
-                                 TALLOC_CTX *mem_ctx,
-                                 WERROR *result)
-{
-       struct rpccli_dfs_SetInfo2_state *state = tevent_req_data(
-               req, struct rpccli_dfs_SetInfo2_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli,
-                            TALLOC_CTX *mem_ctx,
-                            WERROR *werror)
-{
-       struct dfs_SetInfo2 r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_netdfs,
-                               NDR_DFS_SETINFO2,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
diff --git a/librpc/gen_ndr/cli_dfs.h b/librpc/gen_ndr/cli_dfs.h
deleted file mode 100644 (file)
index ed958e2..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-#include "../librpc/gen_ndr/ndr_dfs.h"
-#ifndef __CLI_NETDFS__
-#define __CLI_NETDFS__
-struct tevent_req *rpccli_dfs_GetManagerVersion_send(TALLOC_CTX *mem_ctx,
-                                                    struct tevent_context *ev,
-                                                    struct rpc_pipe_client *cli,
-                                                    enum dfs_ManagerVersion *_version /* [out] [ref] */);
-NTSTATUS rpccli_dfs_GetManagerVersion_recv(struct tevent_req *req,
-                                          TALLOC_CTX *mem_ctx);
-NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli,
-                                     TALLOC_CTX *mem_ctx,
-                                     enum dfs_ManagerVersion *version /* [out] [ref] */);
-struct tevent_req *rpccli_dfs_Add_send(TALLOC_CTX *mem_ctx,
-                                      struct tevent_context *ev,
-                                      struct rpc_pipe_client *cli,
-                                      const char *_path /* [in] [ref,charset(UTF16)] */,
-                                      const char *_server /* [in] [ref,charset(UTF16)] */,
-                                      const char *_share /* [in] [unique,charset(UTF16)] */,
-                                      const char *_comment /* [in] [unique,charset(UTF16)] */,
-                                      uint32_t _flags /* [in]  */);
-NTSTATUS rpccli_dfs_Add_recv(struct tevent_req *req,
-                            TALLOC_CTX *mem_ctx,
-                            WERROR *result);
-NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli,
-                       TALLOC_CTX *mem_ctx,
-                       const char *path /* [in] [ref,charset(UTF16)] */,
-                       const char *server /* [in] [ref,charset(UTF16)] */,
-                       const char *share /* [in] [unique,charset(UTF16)] */,
-                       const char *comment /* [in] [unique,charset(UTF16)] */,
-                       uint32_t flags /* [in]  */,
-                       WERROR *werror);
-struct tevent_req *rpccli_dfs_Remove_send(TALLOC_CTX *mem_ctx,
-                                         struct tevent_context *ev,
-                                         struct rpc_pipe_client *cli,
-                                         const char *_dfs_entry_path /* [in] [ref,charset(UTF16)] */,
-                                         const char *_servername /* [in] [unique,charset(UTF16)] */,
-                                         const char *_sharename /* [in] [unique,charset(UTF16)] */);
-NTSTATUS rpccli_dfs_Remove_recv(struct tevent_req *req,
-                               TALLOC_CTX *mem_ctx,
-                               WERROR *result);
-NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli,
-                          TALLOC_CTX *mem_ctx,
-                          const char *dfs_entry_path /* [in] [ref,charset(UTF16)] */,
-                          const char *servername /* [in] [unique,charset(UTF16)] */,
-                          const char *sharename /* [in] [unique,charset(UTF16)] */,
-                          WERROR *werror);
-struct tevent_req *rpccli_dfs_SetInfo_send(TALLOC_CTX *mem_ctx,
-                                          struct tevent_context *ev,
-                                          struct rpc_pipe_client *cli,
-                                          const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
-                                          const char *_servername /* [in] [unique,charset(UTF16)] */,
-                                          const char *_sharename /* [in] [unique,charset(UTF16)] */,
-                                          uint32_t _level /* [in]  */,
-                                          union dfs_Info *_info /* [in] [ref,switch_is(level)] */);
-NTSTATUS rpccli_dfs_SetInfo_recv(struct tevent_req *req,
-                                TALLOC_CTX *mem_ctx,
-                                WERROR *result);
-NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli,
-                           TALLOC_CTX *mem_ctx,
-                           const char *dfs_entry_path /* [in] [charset(UTF16)] */,
-                           const char *servername /* [in] [unique,charset(UTF16)] */,
-                           const char *sharename /* [in] [unique,charset(UTF16)] */,
-                           uint32_t level /* [in]  */,
-                           union dfs_Info *info /* [in] [ref,switch_is(level)] */,
-                           WERROR *werror);
-struct tevent_req *rpccli_dfs_GetInfo_send(TALLOC_CTX *mem_ctx,
-                                          struct tevent_context *ev,
-                                          struct rpc_pipe_client *cli,
-                                          const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
-                                          const char *_servername /* [in] [unique,charset(UTF16)] */,
-                                          const char *_sharename /* [in] [unique,charset(UTF16)] */,
-                                          uint32_t _level /* [in]  */,
-                                          union dfs_Info *_info /* [out] [ref,switch_is(level)] */);
-NTSTATUS rpccli_dfs_GetInfo_recv(struct tevent_req *req,
-                                TALLOC_CTX *mem_ctx,
-                                WERROR *result);
-NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli,
-                           TALLOC_CTX *mem_ctx,
-                           const char *dfs_entry_path /* [in] [charset(UTF16)] */,
-                           const char *servername /* [in] [unique,charset(UTF16)] */,
-                           const char *sharename /* [in] [unique,charset(UTF16)] */,
-                           uint32_t level /* [in]  */,
-                           union dfs_Info *info /* [out] [ref,switch_is(level)] */,
-                           WERROR *werror);
-struct tevent_req *rpccli_dfs_Enum_send(TALLOC_CTX *mem_ctx,
-                                       struct tevent_context *ev,
-                                       struct rpc_pipe_client *cli,
-                                       uint32_t _level /* [in]  */,
-                                       uint32_t _bufsize /* [in]  */,
-                                       struct dfs_EnumStruct *_info /* [in,out] [unique] */,
-                                       uint32_t *_total /* [in,out] [unique] */);
-NTSTATUS rpccli_dfs_Enum_recv(struct tevent_req *req,
-                             TALLOC_CTX *mem_ctx,
-                             WERROR *result);
-NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli,
-                        TALLOC_CTX *mem_ctx,
-                        uint32_t level /* [in]  */,
-                        uint32_t bufsize /* [in]  */,
-                        struct dfs_EnumStruct *info /* [in,out] [unique] */,
-                        uint32_t *total /* [in,out] [unique] */,
-                        WERROR *werror);
-struct tevent_req *rpccli_dfs_Rename_send(TALLOC_CTX *mem_ctx,
-                                         struct tevent_context *ev,
-                                         struct rpc_pipe_client *cli);
-NTSTATUS rpccli_dfs_Rename_recv(struct tevent_req *req,
-                               TALLOC_CTX *mem_ctx,
-                               WERROR *result);
-NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli,
-                          TALLOC_CTX *mem_ctx,
-                          WERROR *werror);
-struct tevent_req *rpccli_dfs_Move_send(TALLOC_CTX *mem_ctx,
-                                       struct tevent_context *ev,
-                                       struct rpc_pipe_client *cli);
-NTSTATUS rpccli_dfs_Move_recv(struct tevent_req *req,
-                             TALLOC_CTX *mem_ctx,
-                             WERROR *result);
-NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli,
-                        TALLOC_CTX *mem_ctx,
-                        WERROR *werror);
-struct tevent_req *rpccli_dfs_ManagerGetConfigInfo_send(TALLOC_CTX *mem_ctx,
-                                                       struct tevent_context *ev,
-                                                       struct rpc_pipe_client *cli);
-NTSTATUS rpccli_dfs_ManagerGetConfigInfo_recv(struct tevent_req *req,
-                                             TALLOC_CTX *mem_ctx,
-                                             WERROR *result);
-NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli,
-                                        TALLOC_CTX *mem_ctx,
-                                        WERROR *werror);
-struct tevent_req *rpccli_dfs_ManagerSendSiteInfo_send(TALLOC_CTX *mem_ctx,
-                                                      struct tevent_context *ev,
-                                                      struct rpc_pipe_client *cli);
-NTSTATUS rpccli_dfs_ManagerSendSiteInfo_recv(struct tevent_req *req,
-                                            TALLOC_CTX *mem_ctx,
-                                            WERROR *result);
-NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli,
-                                       TALLOC_CTX *mem_ctx,
-                                       WERROR *werror);
-struct tevent_req *rpccli_dfs_AddFtRoot_send(TALLOC_CTX *mem_ctx,
-                                            struct tevent_context *ev,
-                                            struct rpc_pipe_client *cli,
-                                            const char *_servername /* [in] [charset(UTF16)] */,
-                                            const char *_dns_servername /* [in] [charset(UTF16)] */,
-                                            const char *_dfsname /* [in] [charset(UTF16)] */,
-                                            const char *_rootshare /* [in] [charset(UTF16)] */,
-                                            const char *_comment /* [in] [charset(UTF16)] */,
-                                            const char *_dfs_config_dn /* [in] [charset(UTF16)] */,
-                                            uint8_t _unknown1 /* [in]  */,
-                                            uint32_t _flags /* [in]  */,
-                                            struct dfs_UnknownStruct **_unknown2 /* [in,out] [unique] */);
-NTSTATUS rpccli_dfs_AddFtRoot_recv(struct tevent_req *req,
-                                  TALLOC_CTX *mem_ctx,
-                                  WERROR *result);
-NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli,
-                             TALLOC_CTX *mem_ctx,
-                             const char *servername /* [in] [charset(UTF16)] */,
-                             const char *dns_servername /* [in] [charset(UTF16)] */,
-                             const char *dfsname /* [in] [charset(UTF16)] */,
-                             const char *rootshare /* [in] [charset(UTF16)] */,
-                             const char *comment /* [in] [charset(UTF16)] */,
-                             const char *dfs_config_dn /* [in] [charset(UTF16)] */,
-                             uint8_t unknown1 /* [in]  */,
-                             uint32_t flags /* [in]  */,
-                             struct dfs_UnknownStruct **unknown2 /* [in,out] [unique] */,
-                             WERROR *werror);
-struct tevent_req *rpccli_dfs_RemoveFtRoot_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               const char *_servername /* [in] [charset(UTF16)] */,
-                                               const char *_dns_servername /* [in] [charset(UTF16)] */,
-                                               const char *_dfsname /* [in] [charset(UTF16)] */,
-                                               const char *_rootshare /* [in] [charset(UTF16)] */,
-                                               uint32_t _flags /* [in]  */,
-                                               struct dfs_UnknownStruct **_unknown /* [in,out] [unique] */);
-NTSTATUS rpccli_dfs_RemoveFtRoot_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result);
-NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                const char *servername /* [in] [charset(UTF16)] */,
-                                const char *dns_servername /* [in] [charset(UTF16)] */,
-                                const char *dfsname /* [in] [charset(UTF16)] */,
-                                const char *rootshare /* [in] [charset(UTF16)] */,
-                                uint32_t flags /* [in]  */,
-                                struct dfs_UnknownStruct **unknown /* [in,out] [unique] */,
-                                WERROR *werror);
-struct tevent_req *rpccli_dfs_AddStdRoot_send(TALLOC_CTX *mem_ctx,
-                                             struct tevent_context *ev,
-                                             struct rpc_pipe_client *cli,
-                                             const char *_servername /* [in] [charset(UTF16)] */,
-                                             const char *_rootshare /* [in] [charset(UTF16)] */,
-                                             const char *_comment /* [in] [charset(UTF16)] */,
-                                             uint32_t _flags /* [in]  */);
-NTSTATUS rpccli_dfs_AddStdRoot_recv(struct tevent_req *req,
-                                   TALLOC_CTX *mem_ctx,
-                                   WERROR *result);
-NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli,
-                              TALLOC_CTX *mem_ctx,
-                              const char *servername /* [in] [charset(UTF16)] */,
-                              const char *rootshare /* [in] [charset(UTF16)] */,
-                              const char *comment /* [in] [charset(UTF16)] */,
-                              uint32_t flags /* [in]  */,
-                              WERROR *werror);
-struct tevent_req *rpccli_dfs_RemoveStdRoot_send(TALLOC_CTX *mem_ctx,
-                                                struct tevent_context *ev,
-                                                struct rpc_pipe_client *cli,
-                                                const char *_servername /* [in] [charset(UTF16)] */,
-                                                const char *_rootshare /* [in] [charset(UTF16)] */,
-                                                uint32_t _flags /* [in]  */);
-NTSTATUS rpccli_dfs_RemoveStdRoot_recv(struct tevent_req *req,
-                                      TALLOC_CTX *mem_ctx,
-                                      WERROR *result);
-NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli,
-                                 TALLOC_CTX *mem_ctx,
-                                 const char *servername /* [in] [charset(UTF16)] */,
-                                 const char *rootshare /* [in] [charset(UTF16)] */,
-                                 uint32_t flags /* [in]  */,
-                                 WERROR *werror);
-struct tevent_req *rpccli_dfs_ManagerInitialize_send(TALLOC_CTX *mem_ctx,
-                                                    struct tevent_context *ev,
-                                                    struct rpc_pipe_client *cli,
-                                                    const char *_servername /* [in] [ref,charset(UTF16)] */,
-                                                    uint32_t _flags /* [in]  */);
-NTSTATUS rpccli_dfs_ManagerInitialize_recv(struct tevent_req *req,
-                                          TALLOC_CTX *mem_ctx,
-                                          WERROR *result);
-NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli,
-                                     TALLOC_CTX *mem_ctx,
-                                     const char *servername /* [in] [ref,charset(UTF16)] */,
-                                     uint32_t flags /* [in]  */,
-                                     WERROR *werror);
-struct tevent_req *rpccli_dfs_AddStdRootForced_send(TALLOC_CTX *mem_ctx,
-                                                   struct tevent_context *ev,
-                                                   struct rpc_pipe_client *cli,
-                                                   const char *_servername /* [in] [charset(UTF16)] */,
-                                                   const char *_rootshare /* [in] [charset(UTF16)] */,
-                                                   const char *_comment /* [in] [charset(UTF16)] */,
-                                                   const char *_store /* [in] [charset(UTF16)] */);
-NTSTATUS rpccli_dfs_AddStdRootForced_recv(struct tevent_req *req,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *result);
-NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli,
-                                    TALLOC_CTX *mem_ctx,
-                                    const char *servername /* [in] [charset(UTF16)] */,
-                                    const char *rootshare /* [in] [charset(UTF16)] */,
-                                    const char *comment /* [in] [charset(UTF16)] */,
-                                    const char *store /* [in] [charset(UTF16)] */,
-                                    WERROR *werror);
-struct tevent_req *rpccli_dfs_GetDcAddress_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               const char *_servername /* [in] [charset(UTF16)] */,
-                                               const char **_server_fullname /* [in,out] [ref,charset(UTF16)] */,
-                                               uint8_t *_is_root /* [in,out] [ref] */,
-                                               uint32_t *_ttl /* [in,out] [ref] */);
-NTSTATUS rpccli_dfs_GetDcAddress_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result);
-NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                const char *servername /* [in] [charset(UTF16)] */,
-                                const char **server_fullname /* [in,out] [ref,charset(UTF16)] */,
-                                uint8_t *is_root /* [in,out] [ref] */,
-                                uint32_t *ttl /* [in,out] [ref] */,
-                                WERROR *werror);
-struct tevent_req *rpccli_dfs_SetDcAddress_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               const char *_servername /* [in] [charset(UTF16)] */,
-                                               const char *_server_fullname /* [in] [charset(UTF16)] */,
-                                               uint32_t _flags /* [in]  */,
-                                               uint32_t _ttl /* [in]  */);
-NTSTATUS rpccli_dfs_SetDcAddress_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result);
-NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                const char *servername /* [in] [charset(UTF16)] */,
-                                const char *server_fullname /* [in] [charset(UTF16)] */,
-                                uint32_t flags /* [in]  */,
-                                uint32_t ttl /* [in]  */,
-                                WERROR *werror);
-struct tevent_req *rpccli_dfs_FlushFtTable_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               const char *_servername /* [in] [charset(UTF16)] */,
-                                               const char *_rootshare /* [in] [charset(UTF16)] */);
-NTSTATUS rpccli_dfs_FlushFtTable_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result);
-NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                const char *servername /* [in] [charset(UTF16)] */,
-                                const char *rootshare /* [in] [charset(UTF16)] */,
-                                WERROR *werror);
-struct tevent_req *rpccli_dfs_Add2_send(TALLOC_CTX *mem_ctx,
-                                       struct tevent_context *ev,
-                                       struct rpc_pipe_client *cli);
-NTSTATUS rpccli_dfs_Add2_recv(struct tevent_req *req,
-                             TALLOC_CTX *mem_ctx,
-                             WERROR *result);
-NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli,
-                        TALLOC_CTX *mem_ctx,
-                        WERROR *werror);
-struct tevent_req *rpccli_dfs_Remove2_send(TALLOC_CTX *mem_ctx,
-                                          struct tevent_context *ev,
-                                          struct rpc_pipe_client *cli);
-NTSTATUS rpccli_dfs_Remove2_recv(struct tevent_req *req,
-                                TALLOC_CTX *mem_ctx,
-                                WERROR *result);
-NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli,
-                           TALLOC_CTX *mem_ctx,
-                           WERROR *werror);
-struct tevent_req *rpccli_dfs_EnumEx_send(TALLOC_CTX *mem_ctx,
-                                         struct tevent_context *ev,
-                                         struct rpc_pipe_client *cli,
-                                         const char *_dfs_name /* [in] [charset(UTF16)] */,
-                                         uint32_t _level /* [in]  */,
-                                         uint32_t _bufsize /* [in]  */,
-                                         struct dfs_EnumStruct *_info /* [in,out] [unique] */,
-                                         uint32_t *_total /* [in,out] [unique] */);
-NTSTATUS rpccli_dfs_EnumEx_recv(struct tevent_req *req,
-                               TALLOC_CTX *mem_ctx,
-                               WERROR *result);
-NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli,
-                          TALLOC_CTX *mem_ctx,
-                          const char *dfs_name /* [in] [charset(UTF16)] */,
-                          uint32_t level /* [in]  */,
-                          uint32_t bufsize /* [in]  */,
-                          struct dfs_EnumStruct *info /* [in,out] [unique] */,
-                          uint32_t *total /* [in,out] [unique] */,
-                          WERROR *werror);
-struct tevent_req *rpccli_dfs_SetInfo2_send(TALLOC_CTX *mem_ctx,
-                                           struct tevent_context *ev,
-                                           struct rpc_pipe_client *cli);
-NTSTATUS rpccli_dfs_SetInfo2_recv(struct tevent_req *req,
-                                 TALLOC_CTX *mem_ctx,
-                                 WERROR *result);
-NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli,
-                            TALLOC_CTX *mem_ctx,
-                            WERROR *werror);
-#endif /* __CLI_NETDFS__ */
diff --git a/librpc/gen_ndr/cli_drsuapi.c b/librpc/gen_ndr/cli_drsuapi.c
deleted file mode 100644 (file)
index 6460589..0000000
+++ /dev/null
@@ -1,3802 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * client auto-generated by pidl. DO NOT MODIFY!
- */
-
-#include "includes.h"
-#include "../librpc/gen_ndr/cli_drsuapi.h"
-
-struct rpccli_drsuapi_DsBind_state {
-       struct drsuapi_DsBind orig;
-       struct drsuapi_DsBind tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsBind_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsBind_send(TALLOC_CTX *mem_ctx,
-                                             struct tevent_context *ev,
-                                             struct rpc_pipe_client *cli,
-                                             struct GUID *_bind_guid /* [in] [unique] */,
-                                             struct drsuapi_DsBindInfoCtr *_bind_info /* [in,out] [unique] */,
-                                             struct policy_handle *_bind_handle /* [out] [ref] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsBind_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsBind_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_guid = _bind_guid;
-       state->orig.in.bind_info = _bind_info;
-
-       /* Out parameters */
-       state->orig.out.bind_info = _bind_info;
-       state->orig.out.bind_handle = _bind_handle;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsBind_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSBIND,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsBind_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsBind_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsBind_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsBind_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       if (state->orig.out.bind_info && state->tmp.out.bind_info) {
-               *state->orig.out.bind_info = *state->tmp.out.bind_info;
-       }
-       *state->orig.out.bind_handle = *state->tmp.out.bind_handle;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsBind_recv(struct tevent_req *req,
-                                   TALLOC_CTX *mem_ctx,
-                                   WERROR *result)
-{
-       struct rpccli_drsuapi_DsBind_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsBind_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsBind(struct rpc_pipe_client *cli,
-                              TALLOC_CTX *mem_ctx,
-                              struct GUID *bind_guid /* [in] [unique] */,
-                              struct drsuapi_DsBindInfoCtr *bind_info /* [in,out] [unique] */,
-                              struct policy_handle *bind_handle /* [out] [ref] */,
-                              WERROR *werror)
-{
-       struct drsuapi_DsBind r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_guid = bind_guid;
-       r.in.bind_info = bind_info;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSBIND,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       if (bind_info && r.out.bind_info) {
-               *bind_info = *r.out.bind_info;
-       }
-       *bind_handle = *r.out.bind_handle;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsUnbind_state {
-       struct drsuapi_DsUnbind orig;
-       struct drsuapi_DsUnbind tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsUnbind_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsUnbind_send(TALLOC_CTX *mem_ctx,
-                                               struct tevent_context *ev,
-                                               struct rpc_pipe_client *cli,
-                                               struct policy_handle *_bind_handle /* [in,out] [ref] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsUnbind_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsUnbind_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-
-       /* Out parameters */
-       state->orig.out.bind_handle = _bind_handle;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsUnbind_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSUNBIND,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsUnbind_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsUnbind_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsUnbind_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsUnbind_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.bind_handle = *state->tmp.out.bind_handle;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsUnbind_recv(struct tevent_req *req,
-                                     TALLOC_CTX *mem_ctx,
-                                     WERROR *result)
-{
-       struct rpccli_drsuapi_DsUnbind_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsUnbind_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsUnbind(struct rpc_pipe_client *cli,
-                                TALLOC_CTX *mem_ctx,
-                                struct policy_handle *bind_handle /* [in,out] [ref] */,
-                                WERROR *werror)
-{
-       struct drsuapi_DsUnbind r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSUNBIND,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *bind_handle = *r.out.bind_handle;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsReplicaSync_state {
-       struct drsuapi_DsReplicaSync orig;
-       struct drsuapi_DsReplicaSync tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsReplicaSync_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsReplicaSync_send(TALLOC_CTX *mem_ctx,
-                                                    struct tevent_context *ev,
-                                                    struct rpc_pipe_client *cli,
-                                                    struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                    uint32_t _level /* [in]  */,
-                                                    union drsuapi_DsReplicaSyncRequest *_req /* [in] [ref,switch_is(level)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsReplicaSync_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsReplicaSync_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSREPLICASYNC,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaSync_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsReplicaSync_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsReplicaSync_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaSync_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaSync_recv(struct tevent_req *req,
-                                          TALLOC_CTX *mem_ctx,
-                                          WERROR *result)
-{
-       struct rpccli_drsuapi_DsReplicaSync_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaSync_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaSync(struct rpc_pipe_client *cli,
-                                     TALLOC_CTX *mem_ctx,
-                                     struct policy_handle *bind_handle /* [in] [ref] */,
-                                     uint32_t level /* [in]  */,
-                                     union drsuapi_DsReplicaSyncRequest *req /* [in] [ref,switch_is(level)] */,
-                                     WERROR *werror)
-{
-       struct drsuapi_DsReplicaSync r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSREPLICASYNC,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsGetNCChanges_state {
-       struct drsuapi_DsGetNCChanges orig;
-       struct drsuapi_DsGetNCChanges tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsGetNCChanges_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsGetNCChanges_send(TALLOC_CTX *mem_ctx,
-                                                     struct tevent_context *ev,
-                                                     struct rpc_pipe_client *cli,
-                                                     struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                     uint32_t _level /* [in]  */,
-                                                     union drsuapi_DsGetNCChangesRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                     uint32_t *_level_out /* [out] [ref] */,
-                                                     union drsuapi_DsGetNCChangesCtr *_ctr /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsGetNCChanges_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsGetNCChanges_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.ctr = _ctr;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsGetNCChanges_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSGETNCCHANGES,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetNCChanges_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsGetNCChanges_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsGetNCChanges_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetNCChanges_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.ctr = *state->tmp.out.ctr;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsGetNCChanges_recv(struct tevent_req *req,
-                                           TALLOC_CTX *mem_ctx,
-                                           WERROR *result)
-{
-       struct rpccli_drsuapi_DsGetNCChanges_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetNCChanges_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client *cli,
-                                      TALLOC_CTX *mem_ctx,
-                                      struct policy_handle *bind_handle /* [in] [ref] */,
-                                      uint32_t level /* [in]  */,
-                                      union drsuapi_DsGetNCChangesRequest *req /* [in] [ref,switch_is(level)] */,
-                                      uint32_t *level_out /* [out] [ref] */,
-                                      union drsuapi_DsGetNCChangesCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
-                                      WERROR *werror)
-{
-       struct drsuapi_DsGetNCChanges r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSGETNCCHANGES,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *ctr = *r.out.ctr;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsReplicaUpdateRefs_state {
-       struct drsuapi_DsReplicaUpdateRefs orig;
-       struct drsuapi_DsReplicaUpdateRefs tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsReplicaUpdateRefs_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsReplicaUpdateRefs_send(TALLOC_CTX *mem_ctx,
-                                                          struct tevent_context *ev,
-                                                          struct rpc_pipe_client *cli,
-                                                          struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                          uint32_t _level /* [in]  */,
-                                                          union drsuapi_DsReplicaUpdateRefsRequest _req /* [in] [switch_is(level)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsReplicaUpdateRefs_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsReplicaUpdateRefs_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSREPLICAUPDATEREFS,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaUpdateRefs_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsReplicaUpdateRefs_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsReplicaUpdateRefs_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaUpdateRefs_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs_recv(struct tevent_req *req,
-                                                TALLOC_CTX *mem_ctx,
-                                                WERROR *result)
-{
-       struct rpccli_drsuapi_DsReplicaUpdateRefs_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaUpdateRefs_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli,
-                                           TALLOC_CTX *mem_ctx,
-                                           struct policy_handle *bind_handle /* [in] [ref] */,
-                                           uint32_t level /* [in]  */,
-                                           union drsuapi_DsReplicaUpdateRefsRequest req /* [in] [switch_is(level)] */,
-                                           WERROR *werror)
-{
-       struct drsuapi_DsReplicaUpdateRefs r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSREPLICAUPDATEREFS,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsReplicaAdd_state {
-       struct drsuapi_DsReplicaAdd orig;
-       struct drsuapi_DsReplicaAdd tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsReplicaAdd_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsReplicaAdd_send(TALLOC_CTX *mem_ctx,
-                                                   struct tevent_context *ev,
-                                                   struct rpc_pipe_client *cli,
-                                                   struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                   uint32_t _level /* [in]  */,
-                                                   union drsuapi_DsReplicaAddRequest _req /* [in] [switch_is(level)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsReplicaAdd_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsReplicaAdd_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSREPLICAADD,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaAdd_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsReplicaAdd_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsReplicaAdd_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaAdd_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaAdd_recv(struct tevent_req *req,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *result)
-{
-       struct rpccli_drsuapi_DsReplicaAdd_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaAdd_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaAdd(struct rpc_pipe_client *cli,
-                                    TALLOC_CTX *mem_ctx,
-                                    struct policy_handle *bind_handle /* [in] [ref] */,
-                                    uint32_t level /* [in]  */,
-                                    union drsuapi_DsReplicaAddRequest req /* [in] [switch_is(level)] */,
-                                    WERROR *werror)
-{
-       struct drsuapi_DsReplicaAdd r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSREPLICAADD,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsReplicaDel_state {
-       struct drsuapi_DsReplicaDel orig;
-       struct drsuapi_DsReplicaDel tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsReplicaDel_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsReplicaDel_send(TALLOC_CTX *mem_ctx,
-                                                   struct tevent_context *ev,
-                                                   struct rpc_pipe_client *cli,
-                                                   struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                   uint32_t _level /* [in]  */,
-                                                   union drsuapi_DsReplicaDelRequest _req /* [in] [switch_is(level)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsReplicaDel_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsReplicaDel_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSREPLICADEL,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaDel_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsReplicaDel_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsReplicaDel_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaDel_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaDel_recv(struct tevent_req *req,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *result)
-{
-       struct rpccli_drsuapi_DsReplicaDel_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaDel_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaDel(struct rpc_pipe_client *cli,
-                                    TALLOC_CTX *mem_ctx,
-                                    struct policy_handle *bind_handle /* [in] [ref] */,
-                                    uint32_t level /* [in]  */,
-                                    union drsuapi_DsReplicaDelRequest req /* [in] [switch_is(level)] */,
-                                    WERROR *werror)
-{
-       struct drsuapi_DsReplicaDel r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSREPLICADEL,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsReplicaMod_state {
-       struct drsuapi_DsReplicaMod orig;
-       struct drsuapi_DsReplicaMod tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsReplicaMod_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsReplicaMod_send(TALLOC_CTX *mem_ctx,
-                                                   struct tevent_context *ev,
-                                                   struct rpc_pipe_client *cli,
-                                                   struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                   uint32_t _level /* [in]  */,
-                                                   union drsuapi_DsReplicaModRequest _req /* [in] [switch_is(level)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsReplicaMod_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsReplicaMod_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSREPLICAMOD,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaMod_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsReplicaMod_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsReplicaMod_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaMod_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaMod_recv(struct tevent_req *req,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *result)
-{
-       struct rpccli_drsuapi_DsReplicaMod_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaMod_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaMod(struct rpc_pipe_client *cli,
-                                    TALLOC_CTX *mem_ctx,
-                                    struct policy_handle *bind_handle /* [in] [ref] */,
-                                    uint32_t level /* [in]  */,
-                                    union drsuapi_DsReplicaModRequest req /* [in] [switch_is(level)] */,
-                                    WERROR *werror)
-{
-       struct drsuapi_DsReplicaMod r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSREPLICAMOD,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_DRSUAPI_VERIFY_NAMES_state {
-       struct DRSUAPI_VERIFY_NAMES orig;
-       struct DRSUAPI_VERIFY_NAMES tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_DRSUAPI_VERIFY_NAMES_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_DRSUAPI_VERIFY_NAMES_send(TALLOC_CTX *mem_ctx,
-                                                   struct tevent_context *ev,
-                                                   struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_DRSUAPI_VERIFY_NAMES_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_DRSUAPI_VERIFY_NAMES_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_VERIFY_NAMES,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_DRSUAPI_VERIFY_NAMES_done, req);
-       return req;
-}
-
-static void rpccli_DRSUAPI_VERIFY_NAMES_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_DRSUAPI_VERIFY_NAMES_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_VERIFY_NAMES_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES_recv(struct tevent_req *req,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *result)
-{
-       struct rpccli_DRSUAPI_VERIFY_NAMES_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_VERIFY_NAMES_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client *cli,
-                                    TALLOC_CTX *mem_ctx,
-                                    WERROR *werror)
-{
-       struct DRSUAPI_VERIFY_NAMES r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_VERIFY_NAMES,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsGetMemberships_state {
-       struct drsuapi_DsGetMemberships orig;
-       struct drsuapi_DsGetMemberships tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsGetMemberships_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsGetMemberships_send(TALLOC_CTX *mem_ctx,
-                                                       struct tevent_context *ev,
-                                                       struct rpc_pipe_client *cli,
-                                                       struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                       uint32_t _level /* [in]  */,
-                                                       union drsuapi_DsGetMembershipsRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                       uint32_t *_level_out /* [out] [ref] */,
-                                                       union drsuapi_DsGetMembershipsCtr *_ctr /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsGetMemberships_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsGetMemberships_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.ctr = _ctr;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsGetMemberships_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSGETMEMBERSHIPS,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetMemberships_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsGetMemberships_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsGetMemberships_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetMemberships_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.ctr = *state->tmp.out.ctr;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsGetMemberships_recv(struct tevent_req *req,
-                                             TALLOC_CTX *mem_ctx,
-                                             WERROR *result)
-{
-       struct rpccli_drsuapi_DsGetMemberships_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetMemberships_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client *cli,
-                                        TALLOC_CTX *mem_ctx,
-                                        struct policy_handle *bind_handle /* [in] [ref] */,
-                                        uint32_t level /* [in]  */,
-                                        union drsuapi_DsGetMembershipsRequest *req /* [in] [ref,switch_is(level)] */,
-                                        uint32_t *level_out /* [out] [ref] */,
-                                        union drsuapi_DsGetMembershipsCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
-                                        WERROR *werror)
-{
-       struct drsuapi_DsGetMemberships r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSGETMEMBERSHIPS,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *ctr = *r.out.ctr;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state {
-       struct DRSUAPI_INTER_DOMAIN_MOVE orig;
-       struct DRSUAPI_INTER_DOMAIN_MOVE tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_DRSUAPI_INTER_DOMAIN_MOVE_send(TALLOC_CTX *mem_ctx,
-                                                        struct tevent_context *ev,
-                                                        struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_INTER_DOMAIN_MOVE,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done, req);
-       return req;
-}
-
-static void rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE_recv(struct tevent_req *req,
-                                              TALLOC_CTX *mem_ctx,
-                                              WERROR *result)
-{
-       struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client *cli,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *werror)
-{
-       struct DRSUAPI_INTER_DOMAIN_MOVE r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_INTER_DOMAIN_MOVE,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsGetNT4ChangeLog_state {
-       struct drsuapi_DsGetNT4ChangeLog orig;
-       struct drsuapi_DsGetNT4ChangeLog tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsGetNT4ChangeLog_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsGetNT4ChangeLog_send(TALLOC_CTX *mem_ctx,
-                                                        struct tevent_context *ev,
-                                                        struct rpc_pipe_client *cli,
-                                                        struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                        uint32_t _level /* [in]  */,
-                                                        union drsuapi_DsGetNT4ChangeLogRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                        uint32_t *_level_out /* [out] [ref] */,
-                                                        union drsuapi_DsGetNT4ChangeLogInfo *_info /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsGetNT4ChangeLog_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsGetNT4ChangeLog_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.info = _info;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsGetNT4ChangeLog_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSGETNT4CHANGELOG,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetNT4ChangeLog_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsGetNT4ChangeLog_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsGetNT4ChangeLog_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetNT4ChangeLog_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.info = *state->tmp.out.info;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog_recv(struct tevent_req *req,
-                                              TALLOC_CTX *mem_ctx,
-                                              WERROR *result)
-{
-       struct rpccli_drsuapi_DsGetNT4ChangeLog_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetNT4ChangeLog_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client *cli,
-                                         TALLOC_CTX *mem_ctx,
-                                         struct policy_handle *bind_handle /* [in] [ref] */,
-                                         uint32_t level /* [in]  */,
-                                         union drsuapi_DsGetNT4ChangeLogRequest *req /* [in] [ref,switch_is(level)] */,
-                                         uint32_t *level_out /* [out] [ref] */,
-                                         union drsuapi_DsGetNT4ChangeLogInfo *info /* [out] [ref,switch_is(*level_out)] */,
-                                         WERROR *werror)
-{
-       struct drsuapi_DsGetNT4ChangeLog r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSGETNT4CHANGELOG,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *info = *r.out.info;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsCrackNames_state {
-       struct drsuapi_DsCrackNames orig;
-       struct drsuapi_DsCrackNames tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsCrackNames_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsCrackNames_send(TALLOC_CTX *mem_ctx,
-                                                   struct tevent_context *ev,
-                                                   struct rpc_pipe_client *cli,
-                                                   struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                   uint32_t _level /* [in]  */,
-                                                   union drsuapi_DsNameRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                   uint32_t *_level_out /* [out] [ref] */,
-                                                   union drsuapi_DsNameCtr *_ctr /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsCrackNames_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsCrackNames_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.ctr = _ctr;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsCrackNames_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSCRACKNAMES,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsCrackNames_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsCrackNames_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsCrackNames_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsCrackNames_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.ctr = *state->tmp.out.ctr;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsCrackNames_recv(struct tevent_req *req,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *result)
-{
-       struct rpccli_drsuapi_DsCrackNames_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsCrackNames_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client *cli,
-                                    TALLOC_CTX *mem_ctx,
-                                    struct policy_handle *bind_handle /* [in] [ref] */,
-                                    uint32_t level /* [in]  */,
-                                    union drsuapi_DsNameRequest *req /* [in] [ref,switch_is(level)] */,
-                                    uint32_t *level_out /* [out] [ref] */,
-                                    union drsuapi_DsNameCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
-                                    WERROR *werror)
-{
-       struct drsuapi_DsCrackNames r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSCRACKNAMES,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *ctr = *r.out.ctr;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsWriteAccountSpn_state {
-       struct drsuapi_DsWriteAccountSpn orig;
-       struct drsuapi_DsWriteAccountSpn tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsWriteAccountSpn_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsWriteAccountSpn_send(TALLOC_CTX *mem_ctx,
-                                                        struct tevent_context *ev,
-                                                        struct rpc_pipe_client *cli,
-                                                        struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                        uint32_t _level /* [in]  */,
-                                                        union drsuapi_DsWriteAccountSpnRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                        uint32_t *_level_out /* [out] [ref] */,
-                                                        union drsuapi_DsWriteAccountSpnResult *_res /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsWriteAccountSpn_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsWriteAccountSpn_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.res = _res;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsWriteAccountSpn_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSWRITEACCOUNTSPN,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsWriteAccountSpn_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsWriteAccountSpn_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsWriteAccountSpn_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsWriteAccountSpn_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.res = *state->tmp.out.res;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsWriteAccountSpn_recv(struct tevent_req *req,
-                                              TALLOC_CTX *mem_ctx,
-                                              WERROR *result)
-{
-       struct rpccli_drsuapi_DsWriteAccountSpn_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsWriteAccountSpn_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client *cli,
-                                         TALLOC_CTX *mem_ctx,
-                                         struct policy_handle *bind_handle /* [in] [ref] */,
-                                         uint32_t level /* [in]  */,
-                                         union drsuapi_DsWriteAccountSpnRequest *req /* [in] [ref,switch_is(level)] */,
-                                         uint32_t *level_out /* [out] [ref] */,
-                                         union drsuapi_DsWriteAccountSpnResult *res /* [out] [ref,switch_is(*level_out)] */,
-                                         WERROR *werror)
-{
-       struct drsuapi_DsWriteAccountSpn r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSWRITEACCOUNTSPN,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *res = *r.out.res;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsRemoveDSServer_state {
-       struct drsuapi_DsRemoveDSServer orig;
-       struct drsuapi_DsRemoveDSServer tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsRemoveDSServer_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsRemoveDSServer_send(TALLOC_CTX *mem_ctx,
-                                                       struct tevent_context *ev,
-                                                       struct rpc_pipe_client *cli,
-                                                       struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                       uint32_t _level /* [in]  */,
-                                                       union drsuapi_DsRemoveDSServerRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                       uint32_t *_level_out /* [out] [ref] */,
-                                                       union drsuapi_DsRemoveDSServerResult *_res /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsRemoveDSServer_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsRemoveDSServer_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.res = _res;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsRemoveDSServer_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSREMOVEDSSERVER,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsRemoveDSServer_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsRemoveDSServer_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsRemoveDSServer_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsRemoveDSServer_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.res = *state->tmp.out.res;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsRemoveDSServer_recv(struct tevent_req *req,
-                                             TALLOC_CTX *mem_ctx,
-                                             WERROR *result)
-{
-       struct rpccli_drsuapi_DsRemoveDSServer_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsRemoveDSServer_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client *cli,
-                                        TALLOC_CTX *mem_ctx,
-                                        struct policy_handle *bind_handle /* [in] [ref] */,
-                                        uint32_t level /* [in]  */,
-                                        union drsuapi_DsRemoveDSServerRequest *req /* [in] [ref,switch_is(level)] */,
-                                        uint32_t *level_out /* [out] [ref] */,
-                                        union drsuapi_DsRemoveDSServerResult *res /* [out] [ref,switch_is(*level_out)] */,
-                                        WERROR *werror)
-{
-       struct drsuapi_DsRemoveDSServer r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSREMOVEDSSERVER,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *res = *r.out.res;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state {
-       struct DRSUAPI_REMOVE_DS_DOMAIN orig;
-       struct DRSUAPI_REMOVE_DS_DOMAIN tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_DRSUAPI_REMOVE_DS_DOMAIN_send(TALLOC_CTX *mem_ctx,
-                                                       struct tevent_context *ev,
-                                                       struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_REMOVE_DS_DOMAIN,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done, req);
-       return req;
-}
-
-static void rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN_recv(struct tevent_req *req,
-                                             TALLOC_CTX *mem_ctx,
-                                             WERROR *result)
-{
-       struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client *cli,
-                                        TALLOC_CTX *mem_ctx,
-                                        WERROR *werror)
-{
-       struct DRSUAPI_REMOVE_DS_DOMAIN r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_REMOVE_DS_DOMAIN,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsGetDomainControllerInfo_state {
-       struct drsuapi_DsGetDomainControllerInfo orig;
-       struct drsuapi_DsGetDomainControllerInfo tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsGetDomainControllerInfo_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsGetDomainControllerInfo_send(TALLOC_CTX *mem_ctx,
-                                                                struct tevent_context *ev,
-                                                                struct rpc_pipe_client *cli,
-                                                                struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                                int32_t _level /* [in]  */,
-                                                                union drsuapi_DsGetDCInfoRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                                int32_t *_level_out /* [out] [ref] */,
-                                                                union drsuapi_DsGetDCInfoCtr *_ctr /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsGetDomainControllerInfo_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsGetDomainControllerInfo_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.ctr = _ctr;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsGetDomainControllerInfo_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetDomainControllerInfo_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsGetDomainControllerInfo_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsGetDomainControllerInfo_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetDomainControllerInfo_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.ctr = *state->tmp.out.ctr;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo_recv(struct tevent_req *req,
-                                                      TALLOC_CTX *mem_ctx,
-                                                      WERROR *result)
-{
-       struct rpccli_drsuapi_DsGetDomainControllerInfo_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetDomainControllerInfo_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client *cli,
-                                                 TALLOC_CTX *mem_ctx,
-                                                 struct policy_handle *bind_handle /* [in] [ref] */,
-                                                 int32_t level /* [in]  */,
-                                                 union drsuapi_DsGetDCInfoRequest *req /* [in] [ref,switch_is(level)] */,
-                                                 int32_t *level_out /* [out] [ref] */,
-                                                 union drsuapi_DsGetDCInfoCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
-                                                 WERROR *werror)
-{
-       struct drsuapi_DsGetDomainControllerInfo r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *ctr = *r.out.ctr;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsAddEntry_state {
-       struct drsuapi_DsAddEntry orig;
-       struct drsuapi_DsAddEntry tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsAddEntry_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsAddEntry_send(TALLOC_CTX *mem_ctx,
-                                                 struct tevent_context *ev,
-                                                 struct rpc_pipe_client *cli,
-                                                 struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                 uint32_t _level /* [in]  */,
-                                                 union drsuapi_DsAddEntryRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                 uint32_t *_level_out /* [out] [ref] */,
-                                                 union drsuapi_DsAddEntryCtr *_ctr /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsAddEntry_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsAddEntry_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.ctr = _ctr;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsAddEntry_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSADDENTRY,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsAddEntry_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsAddEntry_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsAddEntry_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsAddEntry_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.ctr = *state->tmp.out.ctr;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsAddEntry_recv(struct tevent_req *req,
-                                       TALLOC_CTX *mem_ctx,
-                                       WERROR *result)
-{
-       struct rpccli_drsuapi_DsAddEntry_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsAddEntry_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client *cli,
-                                  TALLOC_CTX *mem_ctx,
-                                  struct policy_handle *bind_handle /* [in] [ref] */,
-                                  uint32_t level /* [in]  */,
-                                  union drsuapi_DsAddEntryRequest *req /* [in] [ref,switch_is(level)] */,
-                                  uint32_t *level_out /* [out] [ref] */,
-                                  union drsuapi_DsAddEntryCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
-                                  WERROR *werror)
-{
-       struct drsuapi_DsAddEntry r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSADDENTRY,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *ctr = *r.out.ctr;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsExecuteKCC_state {
-       struct drsuapi_DsExecuteKCC orig;
-       struct drsuapi_DsExecuteKCC tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsExecuteKCC_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsExecuteKCC_send(TALLOC_CTX *mem_ctx,
-                                                   struct tevent_context *ev,
-                                                   struct rpc_pipe_client *cli,
-                                                   struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                   uint32_t _level /* [in]  */,
-                                                   union drsuapi_DsExecuteKCCRequest *_req /* [in] [ref,switch_is(level)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsExecuteKCC_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsExecuteKCC_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSEXECUTEKCC,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsExecuteKCC_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsExecuteKCC_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsExecuteKCC_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsExecuteKCC_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsExecuteKCC_recv(struct tevent_req *req,
-                                         TALLOC_CTX *mem_ctx,
-                                         WERROR *result)
-{
-       struct rpccli_drsuapi_DsExecuteKCC_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsExecuteKCC_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsExecuteKCC(struct rpc_pipe_client *cli,
-                                    TALLOC_CTX *mem_ctx,
-                                    struct policy_handle *bind_handle /* [in] [ref] */,
-                                    uint32_t level /* [in]  */,
-                                    union drsuapi_DsExecuteKCCRequest *req /* [in] [ref,switch_is(level)] */,
-                                    WERROR *werror)
-{
-       struct drsuapi_DsExecuteKCC r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSEXECUTEKCC,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsReplicaGetInfo_state {
-       struct drsuapi_DsReplicaGetInfo orig;
-       struct drsuapi_DsReplicaGetInfo tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsReplicaGetInfo_send(TALLOC_CTX *mem_ctx,
-                                                       struct tevent_context *ev,
-                                                       struct rpc_pipe_client *cli,
-                                                       struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                       enum drsuapi_DsReplicaGetInfoLevel _level /* [in]  */,
-                                                       union drsuapi_DsReplicaGetInfoRequest *_req /* [in] [ref,switch_is(level)] */,
-                                                       enum drsuapi_DsReplicaInfoType *_info_type /* [out] [ref] */,
-                                                       union drsuapi_DsReplicaInfo *_info /* [out] [ref,switch_is(*info_type)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsReplicaGetInfo_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsReplicaGetInfo_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.info_type = _info_type;
-       state->orig.out.info = _info;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsReplicaGetInfo_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSREPLICAGETINFO,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaGetInfo_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsReplicaGetInfo_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaGetInfo_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.info_type = *state->tmp.out.info_type;
-       *state->orig.out.info = *state->tmp.out.info;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaGetInfo_recv(struct tevent_req *req,
-                                             TALLOC_CTX *mem_ctx,
-                                             WERROR *result)
-{
-       struct rpccli_drsuapi_DsReplicaGetInfo_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsReplicaGetInfo_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client *cli,
-                                        TALLOC_CTX *mem_ctx,
-                                        struct policy_handle *bind_handle /* [in] [ref] */,
-                                        enum drsuapi_DsReplicaGetInfoLevel level /* [in]  */,
-                                        union drsuapi_DsReplicaGetInfoRequest *req /* [in] [ref,switch_is(level)] */,
-                                        enum drsuapi_DsReplicaInfoType *info_type /* [out] [ref] */,
-                                        union drsuapi_DsReplicaInfo *info /* [out] [ref,switch_is(*info_type)] */,
-                                        WERROR *werror)
-{
-       struct drsuapi_DsReplicaGetInfo r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSREPLICAGETINFO,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *info_type = *r.out.info_type;
-       *info = *r.out.info;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_DRSUAPI_ADD_SID_HISTORY_state {
-       struct DRSUAPI_ADD_SID_HISTORY orig;
-       struct DRSUAPI_ADD_SID_HISTORY tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_DRSUAPI_ADD_SID_HISTORY_send(TALLOC_CTX *mem_ctx,
-                                                      struct tevent_context *ev,
-                                                      struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_DRSUAPI_ADD_SID_HISTORY_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_DRSUAPI_ADD_SID_HISTORY_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_ADD_SID_HISTORY,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_DRSUAPI_ADD_SID_HISTORY_done, req);
-       return req;
-}
-
-static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_DRSUAPI_ADD_SID_HISTORY_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_ADD_SID_HISTORY_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY_recv(struct tevent_req *req,
-                                            TALLOC_CTX *mem_ctx,
-                                            WERROR *result)
-{
-       struct rpccli_DRSUAPI_ADD_SID_HISTORY_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_ADD_SID_HISTORY_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client *cli,
-                                       TALLOC_CTX *mem_ctx,
-                                       WERROR *werror)
-{
-       struct DRSUAPI_ADD_SID_HISTORY r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_ADD_SID_HISTORY,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_drsuapi_DsGetMemberships2_state {
-       struct drsuapi_DsGetMemberships2 orig;
-       struct drsuapi_DsGetMemberships2 tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_drsuapi_DsGetMemberships2_send(TALLOC_CTX *mem_ctx,
-                                                        struct tevent_context *ev,
-                                                        struct rpc_pipe_client *cli,
-                                                        struct policy_handle *_bind_handle /* [in] [ref] */,
-                                                        uint32_t _level /* [in]  */,
-                                                        union drsuapi_DsGetMemberships2Request *_req /* [in] [ref,switch_is(level)] */,
-                                                        uint32_t *_level_out /* [out] [ref] */,
-                                                        union drsuapi_DsGetMemberships2Ctr *_ctr /* [out] [ref,switch_is(*level_out)] */)
-{
-       struct tevent_req *req;
-       struct rpccli_drsuapi_DsGetMemberships2_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_drsuapi_DsGetMemberships2_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-       state->orig.in.bind_handle = _bind_handle;
-       state->orig.in.level = _level;
-       state->orig.in.req = _req;
-
-       /* Out parameters */
-       state->orig.out.level_out = _level_out;
-       state->orig.out.ctr = _ctr;
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       state->out_mem_ctx = talloc_named_const(state, 0,
-                            "rpccli_drsuapi_DsGetMemberships2_out_memory");
-       if (tevent_req_nomem(state->out_mem_ctx, req)) {
-               return tevent_req_post(req, ev);
-       }
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_DSGETMEMBERSHIPS2,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetMemberships2_done, req);
-       return req;
-}
-
-static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_drsuapi_DsGetMemberships2_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetMemberships2_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-       *state->orig.out.level_out = *state->tmp.out.level_out;
-       *state->orig.out.ctr = *state->tmp.out.ctr;
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_drsuapi_DsGetMemberships2_recv(struct tevent_req *req,
-                                              TALLOC_CTX *mem_ctx,
-                                              WERROR *result)
-{
-       struct rpccli_drsuapi_DsGetMemberships2_state *state = tevent_req_data(
-               req, struct rpccli_drsuapi_DsGetMemberships2_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client *cli,
-                                         TALLOC_CTX *mem_ctx,
-                                         struct policy_handle *bind_handle /* [in] [ref] */,
-                                         uint32_t level /* [in]  */,
-                                         union drsuapi_DsGetMemberships2Request *req /* [in] [ref,switch_is(level)] */,
-                                         uint32_t *level_out /* [out] [ref] */,
-                                         union drsuapi_DsGetMemberships2Ctr *ctr /* [out] [ref,switch_is(*level_out)] */,
-                                         WERROR *werror)
-{
-       struct drsuapi_DsGetMemberships2 r;
-       NTSTATUS status;
-
-       /* In parameters */
-       r.in.bind_handle = bind_handle;
-       r.in.level = level;
-       r.in.req = req;
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_DSGETMEMBERSHIPS2,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-       *level_out = *r.out.level_out;
-       *ctr = *r.out.ctr;
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state {
-       struct DRSUAPI_REPLICA_VERIFY_OBJECTS orig;
-       struct DRSUAPI_REPLICA_VERIFY_OBJECTS tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_send(TALLOC_CTX *mem_ctx,
-                                                             struct tevent_context *ev,
-                                                             struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done, req);
-       return req;
-}
-
-static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_recv(struct tevent_req *req,
-                                                   TALLOC_CTX *mem_ctx,
-                                                   WERROR *result)
-{
-       struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client *cli,
-                                              TALLOC_CTX *mem_ctx,
-                                              WERROR *werror)
-{
-       struct DRSUAPI_REPLICA_VERIFY_OBJECTS r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                               mem_ctx,
-                               &ndr_table_drsuapi,
-                               NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS,
-                               &r);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (NT_STATUS_IS_ERR(status)) {
-               return status;
-       }
-
-       /* Return variables */
-
-       /* Return result */
-       if (werror) {
-               *werror = r.out.result;
-       }
-
-       return werror_to_ntstatus(r.out.result);
-}
-
-struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state {
-       struct DRSUAPI_GET_OBJECT_EXISTENCE orig;
-       struct DRSUAPI_GET_OBJECT_EXISTENCE tmp;
-       TALLOC_CTX *out_mem_ctx;
-       NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
-};
-
-static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req *subreq);
-
-struct tevent_req *rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_send(TALLOC_CTX *mem_ctx,
-                                                           struct tevent_context *ev,
-                                                           struct rpc_pipe_client *cli)
-{
-       struct tevent_req *req;
-       struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state *state;
-       struct tevent_req *subreq;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->out_mem_ctx = NULL;
-       state->dispatch_recv = cli->dispatch_recv;
-
-       /* In parameters */
-
-       /* Out parameters */
-
-       /* Result */
-       ZERO_STRUCT(state->orig.out.result);
-
-       /* make a temporary copy, that we pass to the dispatch function */
-       state->tmp = state->orig;
-
-       subreq = cli->dispatch_send(state, ev, cli,
-                                   &ndr_table_drsuapi,
-                                   NDR_DRSUAPI_GET_OBJECT_EXISTENCE,
-                                   &state->tmp);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(subreq, rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done, req);
-       return req;
-}
-
-static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state);
-       NTSTATUS status;
-       TALLOC_CTX *mem_ctx;
-
-       if (state->out_mem_ctx) {
-               mem_ctx = state->out_mem_ctx;
-       } else {
-               mem_ctx = state;
-       }
-
-       status = state->dispatch_recv(subreq, mem_ctx);
-       TALLOC_FREE(subreq);
-       if (!NT_STATUS_IS_OK(status)) {
-               tevent_req_nterror(req, status);
-               return;
-       }
-
-       /* Copy out parameters */
-
-       /* Copy result */
-       state->orig.out.result = state->tmp.out.result;
-
-       /* Reset temporary structure */
-       ZERO_STRUCT(state->tmp);
-
-       tevent_req_done(req);
-}
-
-NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_recv(struct tevent_req *req,
-                                                 TALLOC_CTX *mem_ctx,
-                                                 WERROR *result)
-{
-       struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state *state = tevent_req_data(
-               req, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       /* Steal possbile out parameters to the callers context */
-       talloc_steal(mem_ctx, state->out_mem_ctx);
-
-       /* Return result */
-       *result = state->orig.out.result;
-
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
-NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client *cli,
-                                            TALLOC_CTX *mem_ctx,
-                                            WERROR *werror)
-{
-       struct DRSUAPI_GET_OBJECT_EXISTENCE r;
-       NTSTATUS status;
-
-       /* In parameters */
-
-       status = cli->dispatch(cli,
-                         &nb