summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-25 13:04:58 +0100
committerGünther Deschner <gd@samba.org>2008-01-25 15:25:12 +0100
commitd7d4f1c132cfa24a96b07ec812c0235b69dacfaa (patch)
treed19986def270003f49b5d89ada102c3c8029c881
parentc19d01fedf9e4df967e5be75ce0437f5397fccf8 (diff)
downloadsamba-d7d4f1c132cfa24a96b07ec812c0235b69dacfaa.tar.gz
samba-d7d4f1c132cfa24a96b07ec812c0235b69dacfaa.tar.bz2
samba-d7d4f1c132cfa24a96b07ec812c0235b69dacfaa.zip
Add generated dssetup code after make idl.
Guenther (This used to be commit 4b3d96be8017a38a6af4ce58ae54a6af005fbe3e)
-rw-r--r--source3/Makefile.in3
-rw-r--r--source3/librpc/gen_ndr/cli_dssetup.c476
-rw-r--r--source3/librpc/gen_ndr/cli_dssetup.h39
-rw-r--r--source3/librpc/gen_ndr/dssetup.h211
-rw-r--r--source3/librpc/gen_ndr/ndr_dssetup.c1084
-rw-r--r--source3/librpc/gen_ndr/ndr_dssetup.h58
-rw-r--r--source3/librpc/gen_ndr/srv_dssetup.c845
-rw-r--r--source3/librpc/gen_ndr/srv_dssetup.h17
8 files changed, 2732 insertions, 1 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 4de96a8138..e30d13e4f5 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1093,7 +1093,8 @@ modules: SHOWFLAGS $(MODULES)
## Perl IDL Compiler
IDL_FILES = unixinfo.idl lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \
srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl \
- epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl
+ epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl \
+ dssetup.idl
idl:
@IDL_FILES="$(IDL_FILES)" CPP="$(CPP)" PERL="$(PERL)" \
diff --git a/source3/librpc/gen_ndr/cli_dssetup.c b/source3/librpc/gen_ndr/cli_dssetup.c
new file mode 100644
index 0000000000..8947d99bb5
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_dssetup.c
@@ -0,0 +1,476 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/cli_dssetup.h"
+
+NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ enum dssetup_DsRoleInfoLevel level,
+ union dssetup_DsRoleInfo *info,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleGetPrimaryDomainInformation r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.level = level;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+ if (info && r.out.info) {
+ *info = *r.out.info;
+ }
+
+ /* Return result */
+ if (werror) {
+ *werror = r.out.result;
+ }
+
+ return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleDnsNameToFlatName r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleDnsNameToFlatName, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDnsNameToFlatName, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleDcAsDc r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsDc, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEDCASDC,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsDc, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleDcAsReplica r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsReplica, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEDCASREPLICA,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsReplica, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleDemoteDc r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleDemoteDc, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEDEMOTEDC,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleGetDcOperationProgress r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationProgress, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleGetDcOperationResults r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationResults, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleCancel(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleCancel r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleCancel, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLECANCEL,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleServerSaveStateForUpgrade r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleUpgradeDownlevelServer r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, &r);
+ }
+
+ 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);
+}
+
+NTSTATUS rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror)
+{
+ struct dssetup_DsRoleAbortDownlevelServerUpgrade r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, &r);
+ }
+
+ status = cli_do_rpc_ndr(cli,
+ mem_ctx,
+ PI_DSSETUP,
+ &ndr_table_dssetup,
+ NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, &r);
+ }
+
+ 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/source3/librpc/gen_ndr/cli_dssetup.h b/source3/librpc/gen_ndr/cli_dssetup.h
new file mode 100644
index 0000000000..b645c26829
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_dssetup.h
@@ -0,0 +1,39 @@
+#include "librpc/gen_ndr/ndr_dssetup.h"
+#ifndef __CLI_DSSETUP__
+#define __CLI_DSSETUP__
+NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ enum dssetup_DsRoleInfoLevel level,
+ union dssetup_DsRoleInfo *info,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleCancel(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+NTSTATUS rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ WERROR *werror);
+#endif /* __CLI_DSSETUP__ */
diff --git a/source3/librpc/gen_ndr/dssetup.h b/source3/librpc/gen_ndr/dssetup.h
new file mode 100644
index 0000000000..d284a63375
--- /dev/null
+++ b/source3/librpc/gen_ndr/dssetup.h
@@ -0,0 +1,211 @@
+/* header auto-generated by pidl */
+
+#include <stdint.h>
+
+#include "librpc/gen_ndr/misc.h"
+#ifndef _HEADER_dssetup
+#define _HEADER_dssetup
+
+enum dssetup_DsRole
+#ifndef USE_UINT_ENUMS
+ {
+ DS_ROLE_STANDALONE_WORKSTATION=0,
+ DS_ROLE_MEMBER_WORKSTATION=1,
+ DS_ROLE_STANDALONE_SERVER=2,
+ DS_ROLE_MEMBER_SERVER=3,
+ DS_ROLE_BACKUP_DC=4,
+ DS_ROLE_PRIMARY_DC=5
+}
+#else
+ { __donnot_use_enum_dssetup_DsRole=0x7FFFFFFF}
+#define DS_ROLE_STANDALONE_WORKSTATION ( 0 )
+#define DS_ROLE_MEMBER_WORKSTATION ( 1 )
+#define DS_ROLE_STANDALONE_SERVER ( 2 )
+#define DS_ROLE_MEMBER_SERVER ( 3 )
+#define DS_ROLE_BACKUP_DC ( 4 )
+#define DS_ROLE_PRIMARY_DC ( 5 )
+#endif
+;
+
+/* bitmap dssetup_DsRoleFlags */
+#define DS_ROLE_PRIMARY_DS_RUNNING ( 0x00000001 )
+#define DS_ROLE_PRIMARY_DS_MIXED_MODE ( 0x00000002 )
+#define DS_ROLE_UPGRADE_IN_PROGRESS ( 0x00000004 )
+#define DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT ( 0x01000000 )
+
+struct dssetup_DsRolePrimaryDomInfoBasic {
+ enum dssetup_DsRole role;
+ uint32_t flags;
+ const char *domain;/* [unique,charset(UTF16)] */
+ const char *dns_domain;/* [unique,charset(UTF16)] */
+ const char *forest;/* [unique,charset(UTF16)] */
+ struct GUID domain_guid;
+};
+
+enum dssetup_DsUpgrade
+#ifndef USE_UINT_ENUMS
+ {
+ DS_ROLE_NOT_UPGRADING=0,
+ DS_ROLE_UPGRADING=1
+}
+#else
+ { __donnot_use_enum_dssetup_DsUpgrade=0x7FFFFFFF}
+#define DS_ROLE_NOT_UPGRADING ( 0 )
+#define DS_ROLE_UPGRADING ( 1 )
+#endif
+;
+
+enum dssetup_DsPrevious
+#ifndef USE_UINT_ENUMS
+ {
+ DS_ROLE_PREVIOUS_UNKNOWN=0,
+ DS_ROLE_PREVIOUS_PRIMARY=1,
+ DS_ROLE_PREVIOUS_BACKUP=2
+}
+#else
+ { __donnot_use_enum_dssetup_DsPrevious=0x7FFFFFFF}
+#define DS_ROLE_PREVIOUS_UNKNOWN ( 0 )
+#define DS_ROLE_PREVIOUS_PRIMARY ( 1 )
+#define DS_ROLE_PREVIOUS_BACKUP ( 2 )
+#endif
+;
+
+struct dssetup_DsRoleUpgradeStatus {
+ enum dssetup_DsUpgrade upgrading;
+ enum dssetup_DsPrevious previous_role;
+};
+
+enum dssetup_DsRoleOp
+#ifndef USE_UINT_ENUMS
+ {
+ DS_ROLE_OP_IDLE=0,
+ DS_ROLE_OP_ACTIVE=1,
+ DS_ROLE_OP_NEEDS_REBOOT=2
+}
+#else
+ { __donnot_use_enum_dssetup_DsRoleOp=0x7FFFFFFF}
+#define DS_ROLE_OP_IDLE ( 0 )
+#define DS_ROLE_OP_ACTIVE ( 1 )
+#define DS_ROLE_OP_NEEDS_REBOOT ( 2 )
+#endif
+;
+
+struct dssetup_DsRoleOpStatus {
+ enum dssetup_DsRoleOp status;
+};
+
+enum dssetup_DsRoleInfoLevel
+#ifndef USE_UINT_ENUMS
+ {
+ DS_ROLE_BASIC_INFORMATION=1,
+ DS_ROLE_UPGRADE_STATUS=2,
+ DS_ROLE_OP_STATUS=3
+}
+#else
+ { __donnot_use_enum_dssetup_DsRoleInfoLevel=0x7FFFFFFF}
+#define DS_ROLE_BASIC_INFORMATION ( 1 )
+#define DS_ROLE_UPGRADE_STATUS ( 2 )
+#define DS_ROLE_OP_STATUS ( 3 )
+#endif
+;
+
+union dssetup_DsRoleInfo {
+ struct dssetup_DsRolePrimaryDomInfoBasic basic;/* [case(DS_ROLE_BASIC_INFORMATION)] */
+ struct dssetup_DsRoleUpgradeStatus upgrade;/* [case(DS_ROLE_UPGRADE_STATUS)] */
+ struct dssetup_DsRoleOpStatus opstatus;/* [case(DS_ROLE_OP_STATUS)] */
+}/* [switch_type(dssetup_DsRoleInfoLevel)] */;
+
+
+struct dssetup_DsRoleGetPrimaryDomainInformation {
+ struct {
+ enum dssetup_DsRoleInfoLevel level;
+ } in;
+
+ struct {
+ union dssetup_DsRoleInfo *info;/* [unique,switch_is(level)] */
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleDnsNameToFlatName {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleDcAsDc {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleDcAsReplica {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleDemoteDc {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleGetDcOperationProgress {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleGetDcOperationResults {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleCancel {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleServerSaveStateForUpgrade {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleUpgradeDownlevelServer {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+
+struct dssetup_DsRoleAbortDownlevelServerUpgrade {
+ struct {
+ WERROR result;
+ } out;
+
+};
+
+#endif /* _HEADER_dssetup */
diff --git a/source3/librpc/gen_ndr/ndr_dssetup.c b/source3/librpc/gen_ndr/ndr_dssetup.c
new file mode 100644
index 0000000000..f089b71cd4
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_dssetup.c
@@ -0,0 +1,1084 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_dssetup.h"
+
+#include "librpc/gen_ndr/ndr_misc.h"
+static enum ndr_err_code ndr_push_dssetup_DsRole(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRole r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRole(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRole *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRole(struct ndr_print *ndr, const char *name, enum dssetup_DsRole r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case DS_ROLE_STANDALONE_WORKSTATION: val = "DS_ROLE_STANDALONE_WORKSTATION"; break;
+ case DS_ROLE_MEMBER_WORKSTATION: val = "DS_ROLE_MEMBER_WORKSTATION"; break;
+ case DS_ROLE_STANDALONE_SERVER: val = "DS_ROLE_STANDALONE_SERVER"; break;
+ case DS_ROLE_MEMBER_SERVER: val = "DS_ROLE_MEMBER_SERVER"; break;
+ case DS_ROLE_BACKUP_DC: val = "DS_ROLE_BACKUP_DC"; break;
+ case DS_ROLE_PRIMARY_DC: val = "DS_ROLE_PRIMARY_DC"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleFlags(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+ ndr_print_uint32(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_PRIMARY_DS_RUNNING", DS_ROLE_PRIMARY_DS_RUNNING, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_PRIMARY_DS_MIXED_MODE", DS_ROLE_PRIMARY_DS_MIXED_MODE, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_UPGRADE_IN_PROGRESS", DS_ROLE_UPGRADE_IN_PROGRESS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT", DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT, r);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRolePrimaryDomInfoBasic *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_dssetup_DsRole(ndr, NDR_SCALARS, r->role));
+ NDR_CHECK(ndr_push_dssetup_DsRoleFlags(ndr, NDR_SCALARS, r->flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->forest));
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->dns_domain) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_domain, ndr_charset_length(r->dns_domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->forest) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->forest, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->forest, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->forest, ndr_charset_length(r->forest, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->domain_guid));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRolePrimaryDomInfoBasic *r)
+{
+ uint32_t _ptr_domain;
+ TALLOC_CTX *_mem_save_domain_0;
+ uint32_t _ptr_dns_domain;
+ TALLOC_CTX *_mem_save_dns_domain_0;
+ uint32_t _ptr_forest;
+ TALLOC_CTX *_mem_save_forest_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_dssetup_DsRole(ndr, NDR_SCALARS, &r->role));
+ NDR_CHECK(ndr_pull_dssetup_DsRoleFlags(ndr, NDR_SCALARS, &r->flags));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
+ if (_ptr_domain) {
+ NDR_PULL_ALLOC(ndr, r->domain);
+ } else {
+ r->domain = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain));
+ if (_ptr_dns_domain) {
+ NDR_PULL_ALLOC(ndr, r->dns_domain);
+ } else {
+ r->dns_domain = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_forest));
+ if (_ptr_forest) {
+ NDR_PULL_ALLOC(ndr, r->forest);
+ } else {
+ r->forest = NULL;
+ }
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->domain) {
+ _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
+ if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
+ }
+ if (r->dns_domain) {
+ _mem_save_dns_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain));
+ if (ndr_get_array_length(ndr, &r->dns_domain) > ndr_get_array_size(ndr, &r->dns_domain)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dns_domain), ndr_get_array_length(ndr, &r->dns_domain));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dns_domain), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain, ndr_get_array_length(ndr, &r->dns_domain), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_0, 0);
+ }
+ if (r->forest) {
+ _mem_save_forest_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->forest, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->forest));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->forest));
+ if (ndr_get_array_length(ndr, &r->forest) > ndr_get_array_size(ndr, &r->forest)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->forest), ndr_get_array_length(ndr, &r->forest));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->forest), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->forest, ndr_get_array_length(ndr, &r->forest), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_forest_0, 0);
+ }
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_print *ndr, const char *name, const struct dssetup_DsRolePrimaryDomInfoBasic *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRolePrimaryDomInfoBasic");
+ ndr->depth++;
+ ndr_print_dssetup_DsRole(ndr, "role", r->role);
+ ndr_print_dssetup_DsRoleFlags(ndr, "flags", r->flags);
+ ndr_print_ptr(ndr, "domain", r->domain);
+ ndr->depth++;
+ if (r->domain) {
+ ndr_print_string(ndr, "domain", r->domain);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "dns_domain", r->dns_domain);
+ ndr->depth++;
+ if (r->dns_domain) {
+ ndr_print_string(ndr, "dns_domain", r->dns_domain);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "forest", r->forest);
+ ndr->depth++;
+ if (r->forest) {
+ ndr_print_string(ndr, "forest", r->forest);
+ }
+ ndr->depth--;
+ ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsUpgrade(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsUpgrade r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsUpgrade(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsUpgrade *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *name, enum dssetup_DsUpgrade r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case DS_ROLE_NOT_UPGRADING: val = "DS_ROLE_NOT_UPGRADING"; break;
+ case DS_ROLE_UPGRADING: val = "DS_ROLE_UPGRADING"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsPrevious(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsPrevious r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsPrevious(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsPrevious *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsPrevious(struct ndr_print *ndr, const char *name, enum dssetup_DsPrevious r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case DS_ROLE_PREVIOUS_UNKNOWN: val = "DS_ROLE_PREVIOUS_UNKNOWN"; break;
+ case DS_ROLE_PREVIOUS_PRIMARY: val = "DS_ROLE_PREVIOUS_PRIMARY"; break;
+ case DS_ROLE_PREVIOUS_BACKUP: val = "DS_ROLE_PREVIOUS_BACKUP"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleUpgradeStatus(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRoleUpgradeStatus *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_dssetup_DsUpgrade(ndr, NDR_SCALARS, r->upgrading));
+ NDR_CHECK(ndr_push_dssetup_DsPrevious(ndr, NDR_SCALARS, r->previous_role));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleUpgradeStatus(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRoleUpgradeStatus *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_dssetup_DsUpgrade(ndr, NDR_SCALARS, &r->upgrading));
+ NDR_CHECK(ndr_pull_dssetup_DsPrevious(ndr, NDR_SCALARS, &r->previous_role));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleUpgradeStatus *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleUpgradeStatus");
+ ndr->depth++;
+ ndr_print_dssetup_DsUpgrade(ndr, "upgrading", r->upgrading);
+ ndr_print_dssetup_DsPrevious(ndr, "previous_role", r->previous_role);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleOp(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRoleOp r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleOp(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRoleOp *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleOp r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case DS_ROLE_OP_IDLE: val = "DS_ROLE_OP_IDLE"; break;
+ case DS_ROLE_OP_ACTIVE: val = "DS_ROLE_OP_ACTIVE"; break;
+ case DS_ROLE_OP_NEEDS_REBOOT: val = "DS_ROLE_OP_NEEDS_REBOOT"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleOpStatus(struct ndr_push *ndr, int ndr_flags, const struct dssetup_DsRoleOpStatus *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 2));
+ NDR_CHECK(ndr_push_dssetup_DsRoleOp(ndr, NDR_SCALARS, r->status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleOpStatus(struct ndr_pull *ndr, int ndr_flags, struct dssetup_DsRoleOpStatus *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_dssetup_DsRoleOp(ndr, NDR_SCALARS, &r->status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleOpStatus *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleOpStatus");
+ ndr->depth++;
+ ndr_print_dssetup_DsRoleOp(ndr, "status", r->status);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleInfoLevel(struct ndr_push *ndr, int ndr_flags, enum dssetup_DsRoleInfoLevel r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum dssetup_DsRoleInfoLevel *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleInfoLevel(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleInfoLevel r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case DS_ROLE_BASIC_INFORMATION: val = "DS_ROLE_BASIC_INFORMATION"; break;
+ case DS_ROLE_UPGRADE_STATUS: val = "DS_ROLE_UPGRADE_STATUS"; break;
+ case DS_ROLE_OP_STATUS: val = "DS_ROLE_OP_STATUS"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleInfo(struct ndr_push *ndr, int ndr_flags, const union dssetup_DsRoleInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case DS_ROLE_BASIC_INFORMATION:
+ NDR_CHECK(ndr_push_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic));
+ break;
+
+ case DS_ROLE_UPGRADE_STATUS:
+ NDR_CHECK(ndr_push_dssetup_DsRoleUpgradeStatus(ndr, NDR_SCALARS, &r->upgrade));
+ break;
+
+ case DS_ROLE_OP_STATUS:
+ NDR_CHECK(ndr_push_dssetup_DsRoleOpStatus(ndr, NDR_SCALARS, &r->opstatus));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case DS_ROLE_BASIC_INFORMATION:
+ NDR_CHECK(ndr_push_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_BUFFERS, &r->basic));
+ break;
+
+ case DS_ROLE_UPGRADE_STATUS:
+ break;
+
+ case DS_ROLE_OP_STATUS:
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleInfo(struct ndr_pull *ndr, int ndr_flags, union dssetup_DsRoleInfo *r)
+{
+ int level;
+ uint16_t _level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+ }
+ switch (level) {
+ case DS_ROLE_BASIC_INFORMATION: {
+ NDR_CHECK(ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_SCALARS, &r->basic));
+ break; }
+
+ case DS_ROLE_UPGRADE_STATUS: {
+ NDR_CHECK(ndr_pull_dssetup_DsRoleUpgradeStatus(ndr, NDR_SCALARS, &r->upgrade));
+ break; }
+
+ case DS_ROLE_OP_STATUS: {
+ NDR_CHECK(ndr_pull_dssetup_DsRoleOpStatus(ndr, NDR_SCALARS, &r->opstatus));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case DS_ROLE_BASIC_INFORMATION:
+ NDR_CHECK(ndr_pull_dssetup_DsRolePrimaryDomInfoBasic(ndr, NDR_BUFFERS, &r->basic));
+ break;
+
+ case DS_ROLE_UPGRADE_STATUS:
+ break;
+
+ case DS_ROLE_OP_STATUS:
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleInfo(struct ndr_print *ndr, const char *name, const union dssetup_DsRoleInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "dssetup_DsRoleInfo");
+ switch (level) {
+ case DS_ROLE_BASIC_INFORMATION:
+ ndr_print_dssetup_DsRolePrimaryDomInfoBasic(ndr, "basic", &r->basic);
+ break;
+
+ case DS_ROLE_UPGRADE_STATUS:
+ ndr_print_dssetup_DsRoleUpgradeStatus(ndr, "upgrade", &r->upgrade);
+ break;
+
+ case DS_ROLE_OP_STATUS:
+ ndr_print_dssetup_DsRoleOpStatus(ndr, "opstatus", &r->opstatus);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_dssetup_DsRoleInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetPrimaryDomainInformation *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_dssetup_DsRoleInfoLevel(ndr, NDR_SCALARS, &r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_dssetup_DsRoleInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleGetPrimaryDomainInformation");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleGetPrimaryDomainInformation");
+ ndr->depth++;
+ ndr_print_dssetup_DsRoleInfoLevel(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleGetPrimaryDomainInformation");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_dssetup_DsRoleInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleDnsNameToFlatName(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleDnsNameToFlatName(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDnsNameToFlatName *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleDnsNameToFlatName(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleDnsNameToFlatName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleDnsNameToFlatName");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleDnsNameToFlatName");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleDcAsDc(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDcAsDc *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleDcAsDc(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDcAsDc *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleDcAsDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsDc *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleDcAsDc");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleDcAsDc");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleDcAsDc");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleDcAsReplica(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDcAsReplica *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleDcAsReplica(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDcAsReplica *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleDcAsReplica(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsReplica *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleDcAsReplica");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleDcAsReplica");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleDcAsReplica");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleDemoteDc(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleDemoteDc *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleDemoteDc(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleDemoteDc *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleDemoteDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDemoteDc *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleDemoteDc");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleDemoteDc");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleDemoteDc");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleGetDcOperationProgress(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleGetDcOperationProgress(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetDcOperationProgress *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationProgress(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleGetDcOperationProgress");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleGetDcOperationProgress");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleGetDcOperationProgress");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleGetDcOperationResults(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleGetDcOperationResults *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleGetDcOperationResults(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleGetDcOperationResults *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleGetDcOperationResults(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationResults *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleGetDcOperationResults");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleGetDcOperationResults");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleGetDcOperationResults");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleCancel(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleCancel *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleCancel(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleCancel *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleCancel(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleCancel *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleCancel");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleCancel");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleCancel");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleServerSaveStateForUpgrade *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleServerSaveStateForUpgrade");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleServerSaveStateForUpgrade");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleServerSaveStateForUpgrade");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleUpgradeDownlevelServer *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleUpgradeDownlevelServer");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleUpgradeDownlevelServer");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleUpgradeDownlevelServer");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_push *ndr, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_pull *ndr, int flags, struct dssetup_DsRoleAbortDownlevelServerUpgrade *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r)
+{
+ ndr_print_struct(ndr, name, "dssetup_DsRoleAbortDownlevelServerUpgrade");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "dssetup_DsRoleAbortDownlevelServerUpgrade");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "dssetup_DsRoleAbortDownlevelServerUpgrade");
+ ndr->depth++;
+ ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static const struct ndr_interface_call dssetup_calls[] = {
+ {
+ "dssetup_DsRoleGetPrimaryDomainInformation",
+ sizeof(struct dssetup_DsRoleGetPrimaryDomainInformation),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetPrimaryDomainInformation,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetPrimaryDomainInformation,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleGetPrimaryDomainInformation,
+ false,
+ },
+ {
+ "dssetup_DsRoleDnsNameToFlatName",
+ sizeof(struct dssetup_DsRoleDnsNameToFlatName),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDnsNameToFlatName,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDnsNameToFlatName,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleDnsNameToFlatName,
+ false,
+ },
+ {
+ "dssetup_DsRoleDcAsDc",
+ sizeof(struct dssetup_DsRoleDcAsDc),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDcAsDc,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDcAsDc,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleDcAsDc,
+ false,
+ },
+ {
+ "dssetup_DsRoleDcAsReplica",
+ sizeof(struct dssetup_DsRoleDcAsReplica),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDcAsReplica,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDcAsReplica,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleDcAsReplica,
+ false,
+ },
+ {
+ "dssetup_DsRoleDemoteDc",
+ sizeof(struct dssetup_DsRoleDemoteDc),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleDemoteDc,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleDemoteDc,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleDemoteDc,
+ false,
+ },
+ {
+ "dssetup_DsRoleGetDcOperationProgress",
+ sizeof(struct dssetup_DsRoleGetDcOperationProgress),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetDcOperationProgress,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetDcOperationProgress,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleGetDcOperationProgress,
+ false,
+ },
+ {
+ "dssetup_DsRoleGetDcOperationResults",
+ sizeof(struct dssetup_DsRoleGetDcOperationResults),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleGetDcOperationResults,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleGetDcOperationResults,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleGetDcOperationResults,
+ false,
+ },
+ {
+ "dssetup_DsRoleCancel",
+ sizeof(struct dssetup_DsRoleCancel),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleCancel,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleCancel,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleCancel,
+ false,
+ },
+ {
+ "dssetup_DsRoleServerSaveStateForUpgrade",
+ sizeof(struct dssetup_DsRoleServerSaveStateForUpgrade),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleServerSaveStateForUpgrade,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleServerSaveStateForUpgrade,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleServerSaveStateForUpgrade,
+ false,
+ },
+ {
+ "dssetup_DsRoleUpgradeDownlevelServer",
+ sizeof(struct dssetup_DsRoleUpgradeDownlevelServer),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleUpgradeDownlevelServer,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleUpgradeDownlevelServer,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleUpgradeDownlevelServer,
+ false,
+ },
+ {
+ "dssetup_DsRoleAbortDownlevelServerUpgrade",
+ sizeof(struct dssetup_DsRoleAbortDownlevelServerUpgrade),
+ (ndr_push_flags_fn_t) ndr_push_dssetup_DsRoleAbortDownlevelServerUpgrade,
+ (ndr_pull_flags_fn_t) ndr_pull_dssetup_DsRoleAbortDownlevelServerUpgrade,
+ (ndr_print_function_t) ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade,
+ false,
+ },
+ { NULL, 0, NULL, NULL, NULL, false }
+};
+
+static const char * const dssetup_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\lsarpc]",
+ "ncacn_np:[\\pipe\\lsass]",
+ "ncacn_ip_tcp:",
+ "ncalrpc:",
+};
+
+static const struct ndr_interface_string_array dssetup_endpoints = {
+ .count = 4,
+ .names = dssetup_endpoint_strings
+};
+
+static const char * const dssetup_authservice_strings[] = {
+ "host",
+};
+
+static const struct ndr_interface_string_array dssetup_authservices = {
+ .count = 4,
+ .names = dssetup_authservice_strings
+};
+
+
+const struct ndr_interface_table ndr_table_dssetup = {
+ .name = "dssetup",
+ .syntax_id = {
+ {0x3919286a,0xb10c,0x11d0,{0x9b,0xa8},{0x00,0xc0,0x4f,0xd9,0x2e,0xf5}},
+ NDR_DSSETUP_VERSION
+ },
+ .helpstring = NDR_DSSETUP_HELPSTRING,
+ .num_calls = 11,
+ .calls = dssetup_calls,
+ .endpoints = &dssetup_endpoints,
+ .authservices = &dssetup_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_dssetup.h b/source3/librpc/gen_ndr/ndr_dssetup.h
new file mode 100644
index 0000000000..103ad116a3
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_dssetup.h
@@ -0,0 +1,58 @@
+/* header auto-generated by pidl */
+
+#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/dssetup.h"
+
+#ifndef _HEADER_NDR_dssetup
+#define _HEADER_NDR_dssetup
+
+#define NDR_DSSETUP_UUID "3919286a-b10c-11d0-9ba8-00c04fd92ef5"
+#define NDR_DSSETUP_VERSION 0.0
+#define NDR_DSSETUP_NAME "dssetup"
+#define NDR_DSSETUP_HELPSTRING "Active Directory Setup"
+extern const struct ndr_interface_table ndr_table_dssetup;
+#define NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION (0x00)
+
+#define NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME (0x01)
+
+#define NDR_DSSETUP_DSROLEDCASDC (0x02)
+
+#define NDR_DSSETUP_DSROLEDCASREPLICA (0x03)
+
+#define NDR_DSSETUP_DSROLEDEMOTEDC (0x04)
+
+#define NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS (0x05)
+
+#define NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS (0x06)
+
+#define NDR_DSSETUP_DSROLECANCEL (0x07)
+
+#define NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE (0x08)
+
+#define NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER (0x09)
+
+#define NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE (0x0a)
+
+#define NDR_DSSETUP_CALL_COUNT (11)
+void ndr_print_dssetup_DsRole(struct ndr_print *ndr, const char *name, enum dssetup_DsRole r);
+void ndr_print_dssetup_DsRoleFlags(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_dssetup_DsRolePrimaryDomInfoBasic(struct ndr_print *ndr, const char *name, const struct dssetup_DsRolePrimaryDomInfoBasic *r);
+void ndr_print_dssetup_DsUpgrade(struct ndr_print *ndr, const char *name, enum dssetup_DsUpgrade r);
+void ndr_print_dssetup_DsPrevious(struct ndr_print *ndr, const char *name, enum dssetup_DsPrevious r);
+void ndr_print_dssetup_DsRoleUpgradeStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleUpgradeStatus *r);
+void ndr_print_dssetup_DsRoleOp(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleOp r);
+void ndr_print_dssetup_DsRoleOpStatus(struct ndr_print *ndr, const char *name, const struct dssetup_DsRoleOpStatus *r);
+void ndr_print_dssetup_DsRoleInfoLevel(struct ndr_print *ndr, const char *name, enum dssetup_DsRoleInfoLevel r);
+void ndr_print_dssetup_DsRoleInfo(struct ndr_print *ndr, const char *name, const union dssetup_DsRoleInfo *r);
+void ndr_print_dssetup_DsRoleGetPrimaryDomainInformation(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetPrimaryDomainInformation *r);
+void ndr_print_dssetup_DsRoleDnsNameToFlatName(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDnsNameToFlatName *r);
+void ndr_print_dssetup_DsRoleDcAsDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsDc *r);
+void ndr_print_dssetup_DsRoleDcAsReplica(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDcAsReplica *r);
+void ndr_print_dssetup_DsRoleDemoteDc(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleDemoteDc *r);
+void ndr_print_dssetup_DsRoleGetDcOperationProgress(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationProgress *r);
+void ndr_print_dssetup_DsRoleGetDcOperationResults(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleGetDcOperationResults *r);
+void ndr_print_dssetup_DsRoleCancel(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleCancel *r);
+void ndr_print_dssetup_DsRoleServerSaveStateForUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleServerSaveStateForUpgrade *r);
+void ndr_print_dssetup_DsRoleUpgradeDownlevelServer(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleUpgradeDownlevelServer *r);
+void ndr_print_dssetup_DsRoleAbortDownlevelServerUpgrade(struct ndr_print *ndr, const char *name, int flags, const struct dssetup_DsRoleAbortDownlevelServerUpgrade *r);
+#endif /* _HEADER_NDR_dssetup */
diff --git a/source3/librpc/gen_ndr/srv_dssetup.c b/source3/librpc/gen_ndr/srv_dssetup.c
new file mode 100644
index 0000000000..9043566718
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_dssetup.c
@@ -0,0 +1,845 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/srv_dssetup.h"
+
+static bool api_dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleGetPrimaryDomainInformation *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION];
+
+ r = talloc(NULL, struct dssetup_DsRoleGetPrimaryDomainInformation);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.info = talloc_zero(r, union dssetup_DsRoleInfo);
+ if (r->out.info == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.result = _dssetup_DsRoleGetPrimaryDomainInformation(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleDnsNameToFlatName(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleDnsNameToFlatName *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME];
+
+ r = talloc(NULL, struct dssetup_DsRoleDnsNameToFlatName);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleDnsNameToFlatName, r);
+ }
+
+ r->out.result = _dssetup_DsRoleDnsNameToFlatName(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDnsNameToFlatName, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleDcAsDc(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleDcAsDc *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDCASDC];
+
+ r = talloc(NULL, struct dssetup_DsRoleDcAsDc);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsDc, r);
+ }
+
+ r->out.result = _dssetup_DsRoleDcAsDc(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsDc, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleDcAsReplica(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleDcAsReplica *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDCASREPLICA];
+
+ r = talloc(NULL, struct dssetup_DsRoleDcAsReplica);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsReplica, r);
+ }
+
+ r->out.result = _dssetup_DsRoleDcAsReplica(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsReplica, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleDemoteDc(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleDemoteDc *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDEMOTEDC];
+
+ r = talloc(NULL, struct dssetup_DsRoleDemoteDc);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleDemoteDc, r);
+ }
+
+ r->out.result = _dssetup_DsRoleDemoteDc(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleGetDcOperationProgress(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleGetDcOperationProgress *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS];
+
+ r = talloc(NULL, struct dssetup_DsRoleGetDcOperationProgress);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationProgress, r);
+ }
+
+ r->out.result = _dssetup_DsRoleGetDcOperationProgress(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleGetDcOperationResults(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleGetDcOperationResults *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS];
+
+ r = talloc(NULL, struct dssetup_DsRoleGetDcOperationResults);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationResults, r);
+ }
+
+ r->out.result = _dssetup_DsRoleGetDcOperationResults(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleCancel(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleCancel *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLECANCEL];
+
+ r = talloc(NULL, struct dssetup_DsRoleCancel);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleCancel, r);
+ }
+
+ r->out.result = _dssetup_DsRoleCancel(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleServerSaveStateForUpgrade *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE];
+
+ r = talloc(NULL, struct dssetup_DsRoleServerSaveStateForUpgrade);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, r);
+ }
+
+ r->out.result = _dssetup_DsRoleServerSaveStateForUpgrade(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleUpgradeDownlevelServer *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER];
+
+ r = talloc(NULL, struct dssetup_DsRoleUpgradeDownlevelServer);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, r);
+ }
+
+ r->out.result = _dssetup_DsRoleUpgradeDownlevelServer(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ DATA_BLOB blob;
+ struct dssetup_DsRoleAbortDownlevelServerUpgrade *r;
+
+ call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE];
+
+ r = talloc(NULL, struct dssetup_DsRoleAbortDownlevelServerUpgrade);
+ if (r == NULL) {
+ return false;
+ }
+
+ if (!prs_data_blob(&p->in_data.data, &blob, r)) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&blob, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, r);
+ }
+
+ r->out.result = _dssetup_DsRoleAbortDownlevelServerUpgrade(p, r);
+
+ if (p->rng_fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ blob = ndr_push_blob(push);
+ if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
+ talloc_free(r);
+ return false;
+ }
+
+ talloc_free(r);
+
+ return true;
+}
+
+
+/* Tables */
+static struct api_struct api_dssetup_cmds[] =
+{
+ {"DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION", NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION, api_dssetup_DsRoleGetPrimaryDomainInformation},
+ {"DSSETUP_DSROLEDNSNAMETOFLATNAME", NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME, api_dssetup_DsRoleDnsNameToFlatName},
+ {"DSSETUP_DSROLEDCASDC", NDR_DSSETUP_DSROLEDCASDC, api_dssetup_DsRoleDcAsDc},
+ {"DSSETUP_DSROLEDCASREPLICA", NDR_DSSETUP_DSROLEDCASREPLICA, api_dssetup_DsRoleDcAsReplica},
+ {"DSSETUP_DSROLEDEMOTEDC", NDR_DSSETUP_DSROLEDEMOTEDC, api_dssetup_DsRoleDemoteDc},
+ {"DSSETUP_DSROLEGETDCOPERATIONPROGRESS", NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS, api_dssetup_DsRoleGetDcOperationProgress},
+ {"DSSETUP_DSROLEGETDCOPERATIONRESULTS", NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS, api_dssetup_DsRoleGetDcOperationResults},
+ {"DSSETUP_DSROLECANCEL", NDR_DSSETUP_DSROLECANCEL, api_dssetup_DsRoleCancel},
+ {"DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE", NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE, api_dssetup_DsRoleServerSaveStateForUpgrade},
+ {"DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER", NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER, api_dssetup_DsRoleUpgradeDownlevelServer},
+ {"DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE", NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE, api_dssetup_DsRoleAbortDownlevelServerUpgrade},
+};
+
+void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_dssetup_cmds;
+ *n_fns = sizeof(api_dssetup_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_dssetup_init(void)
+{
+ return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "dssetup", "dssetup", api_dssetup_cmds, sizeof(api_dssetup_cmds) / sizeof(struct api_struct));
+}
diff --git a/source3/librpc/gen_ndr/srv_dssetup.h b/source3/librpc/gen_ndr/srv_dssetup.h
new file mode 100644
index 0000000000..3233899eac
--- /dev/null
+++ b/source3/librpc/gen_ndr/srv_dssetup.h
@@ -0,0 +1,17 @@
+#include "librpc/gen_ndr/ndr_dssetup.h"
+#ifndef __SRV_DSSETUP__
+#define __SRV_DSSETUP__
+WERROR _dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p, struct dssetup_DsRoleGetPrimaryDomainInformation *r);
+WERROR _dssetup_DsRoleDnsNameToFlatName(pipes_struct *p, struct dssetup_DsRoleDnsNameToFlatName *r);
+WERROR _dssetup_DsRoleDcAsDc(pipes_struct *p, struct dssetup_DsRoleDcAsDc *r);
+WERROR _dssetup_DsRoleDcAsReplica(pipes_struct *p, struct dssetup_DsRoleDcAsReplica *r);
+WERROR _dssetup_DsRoleDemoteDc(pipes_struct *p, struct dssetup_DsRoleDemoteDc *r);
+WERROR _dssetup_DsRoleGetDcOperationProgress(pipes_struct *p, struct dssetup_DsRoleGetDcOperationProgress *r);
+WERROR _dssetup_DsRoleGetDcOperationResults(pipes_struct *p, struct dssetup_DsRoleGetDcOperationResults *r);
+WERROR _dssetup_DsRoleCancel(pipes_struct *p, struct dssetup_DsRoleCancel *r);
+WERROR _dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p, struct dssetup_DsRoleServerSaveStateForUpgrade *r);
+WERROR _dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p, struct dssetup_DsRoleUpgradeDownlevelServer *r);
+WERROR _dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p, struct dssetup_DsRoleAbortDownlevelServerUpgrade *r);
+void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns);
+NTSTATUS rpc_dssetup_init(void);
+#endif /* __SRV_DSSETUP__ */