diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-09-11 20:14:11 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-09-11 20:14:11 +1000 |
commit | bae320e2aac91839fd2c331e1ad719cb1b4de599 (patch) | |
tree | e6d33af165965064d283c6e832848c2020efbbb0 /librpc | |
parent | c6647bfd17539b9cca96e42b6871d16ef2fa728f (diff) | |
download | samba-bae320e2aac91839fd2c331e1ad719cb1b4de599.tar.gz samba-bae320e2aac91839fd2c331e1ad719cb1b4de599.tar.bz2 samba-bae320e2aac91839fd2c331e1ad719cb1b4de599.zip |
s4-idl: added the IDL for the DsReplica* calls
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/gen_ndr/cli_drsuapi.c | 204 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_drsuapi.h | 72 | ||||
-rw-r--r-- | librpc/gen_ndr/drsuapi.h | 77 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_drsuapi.c | 796 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_drsuapi.h | 19 | ||||
-rw-r--r-- | librpc/idl/drsuapi.idl | 76 |
6 files changed, 1076 insertions, 168 deletions
diff --git a/librpc/gen_ndr/cli_drsuapi.c b/librpc/gen_ndr/cli_drsuapi.c index 14c89aa194..43d41eacb0 100644 --- a/librpc/gen_ndr/cli_drsuapi.c +++ b/librpc/gen_ndr/cli_drsuapi.c @@ -852,25 +852,28 @@ NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -struct rpccli_DRSUAPI_REPLICA_ADD_state { - struct DRSUAPI_REPLICA_ADD orig; - struct DRSUAPI_REPLICA_ADD tmp; +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_REPLICA_ADD_done(struct tevent_req *subreq); +static void rpccli_drsuapi_DsReplicaAdd_done(struct tevent_req *subreq); -struct tevent_req *rpccli_DRSUAPI_REPLICA_ADD_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct rpc_pipe_client *cli) +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] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaAddRequest _req /* [in] [switch_is(level)] */) { struct tevent_req *req; - struct rpccli_DRSUAPI_REPLICA_ADD_state *state; + struct rpccli_drsuapi_DsReplicaAdd_state *state; struct tevent_req *subreq; req = tevent_req_create(mem_ctx, &state, - struct rpccli_DRSUAPI_REPLICA_ADD_state); + struct rpccli_drsuapi_DsReplicaAdd_state); if (req == NULL) { return NULL; } @@ -878,6 +881,9 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_ADD_send(TALLOC_CTX *mem_ctx, 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 */ @@ -885,7 +891,7 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_ADD_send(TALLOC_CTX *mem_ctx, ZERO_STRUCT(state->orig.out.result); if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_ADD, &state->orig); + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaAdd, &state->orig); } /* make a temporary copy, that we pass to the dispatch function */ @@ -893,21 +899,21 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_ADD_send(TALLOC_CTX *mem_ctx, subreq = cli->dispatch_send(state, ev, cli, &ndr_table_drsuapi, - NDR_DRSUAPI_REPLICA_ADD, + NDR_DRSUAPI_DSREPLICAADD, &state->tmp); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } - tevent_req_set_callback(subreq, rpccli_DRSUAPI_REPLICA_ADD_done, req); + tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaAdd_done, req); return req; } -static void rpccli_DRSUAPI_REPLICA_ADD_done(struct tevent_req *subreq) +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_REPLICA_ADD_state *state = tevent_req_data( - req, struct rpccli_DRSUAPI_REPLICA_ADD_state); + struct rpccli_drsuapi_DsReplicaAdd_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaAdd_state); NTSTATUS status; TALLOC_CTX *mem_ctx; @@ -933,18 +939,18 @@ static void rpccli_DRSUAPI_REPLICA_ADD_done(struct tevent_req *subreq) ZERO_STRUCT(state->tmp); if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_ADD, &state->orig); + NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaAdd, &state->orig); } tevent_req_done(req); } -NTSTATUS rpccli_DRSUAPI_REPLICA_ADD_recv(struct tevent_req *req, - TALLOC_CTX *mem_ctx, - WERROR *result) +NTSTATUS rpccli_drsuapi_DsReplicaAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) { - struct rpccli_DRSUAPI_REPLICA_ADD_state *state = tevent_req_data( - req, struct rpccli_DRSUAPI_REPLICA_ADD_state); + struct rpccli_drsuapi_DsReplicaAdd_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaAdd_state); NTSTATUS status; if (tevent_req_is_nterror(req, &status)) { @@ -962,23 +968,29 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_ADD_recv(struct tevent_req *req, return NT_STATUS_OK; } -NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror) +NTSTATUS rpccli_drsuapi_DsReplicaAdd(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *bind_handle /* [in] [ref] */, + int32_t level /* [in] */, + union drsuapi_DsReplicaAddRequest req /* [in] [switch_is(level)] */, + WERROR *werror) { - struct DRSUAPI_REPLICA_ADD r; + struct drsuapi_DsReplicaAdd r; NTSTATUS status; /* In parameters */ + r.in.bind_handle = bind_handle; + r.in.level = level; + r.in.req = req; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_ADD, &r); + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaAdd, &r); } status = cli->dispatch(cli, mem_ctx, &ndr_table_drsuapi, - NDR_DRSUAPI_REPLICA_ADD, + NDR_DRSUAPI_DSREPLICAADD, &r); if (!NT_STATUS_IS_OK(status)) { @@ -986,7 +998,7 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_ADD, &r); + NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaAdd, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1003,25 +1015,28 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -struct rpccli_DRSUAPI_REPLICA_DEL_state { - struct DRSUAPI_REPLICA_DEL orig; - struct DRSUAPI_REPLICA_DEL tmp; +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_REPLICA_DEL_done(struct tevent_req *subreq); +static void rpccli_drsuapi_DsReplicaDel_done(struct tevent_req *subreq); -struct tevent_req *rpccli_DRSUAPI_REPLICA_DEL_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct rpc_pipe_client *cli) +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] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaDelRequest _req /* [in] [switch_is(level)] */) { struct tevent_req *req; - struct rpccli_DRSUAPI_REPLICA_DEL_state *state; + struct rpccli_drsuapi_DsReplicaDel_state *state; struct tevent_req *subreq; req = tevent_req_create(mem_ctx, &state, - struct rpccli_DRSUAPI_REPLICA_DEL_state); + struct rpccli_drsuapi_DsReplicaDel_state); if (req == NULL) { return NULL; } @@ -1029,6 +1044,9 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_DEL_send(TALLOC_CTX *mem_ctx, 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 */ @@ -1036,7 +1054,7 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_DEL_send(TALLOC_CTX *mem_ctx, ZERO_STRUCT(state->orig.out.result); if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_DEL, &state->orig); + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaDel, &state->orig); } /* make a temporary copy, that we pass to the dispatch function */ @@ -1044,21 +1062,21 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_DEL_send(TALLOC_CTX *mem_ctx, subreq = cli->dispatch_send(state, ev, cli, &ndr_table_drsuapi, - NDR_DRSUAPI_REPLICA_DEL, + NDR_DRSUAPI_DSREPLICADEL, &state->tmp); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } - tevent_req_set_callback(subreq, rpccli_DRSUAPI_REPLICA_DEL_done, req); + tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaDel_done, req); return req; } -static void rpccli_DRSUAPI_REPLICA_DEL_done(struct tevent_req *subreq) +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_REPLICA_DEL_state *state = tevent_req_data( - req, struct rpccli_DRSUAPI_REPLICA_DEL_state); + struct rpccli_drsuapi_DsReplicaDel_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaDel_state); NTSTATUS status; TALLOC_CTX *mem_ctx; @@ -1084,18 +1102,18 @@ static void rpccli_DRSUAPI_REPLICA_DEL_done(struct tevent_req *subreq) ZERO_STRUCT(state->tmp); if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_DEL, &state->orig); + NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaDel, &state->orig); } tevent_req_done(req); } -NTSTATUS rpccli_DRSUAPI_REPLICA_DEL_recv(struct tevent_req *req, - TALLOC_CTX *mem_ctx, - WERROR *result) +NTSTATUS rpccli_drsuapi_DsReplicaDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) { - struct rpccli_DRSUAPI_REPLICA_DEL_state *state = tevent_req_data( - req, struct rpccli_DRSUAPI_REPLICA_DEL_state); + struct rpccli_drsuapi_DsReplicaDel_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaDel_state); NTSTATUS status; if (tevent_req_is_nterror(req, &status)) { @@ -1113,23 +1131,29 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_DEL_recv(struct tevent_req *req, return NT_STATUS_OK; } -NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror) +NTSTATUS rpccli_drsuapi_DsReplicaDel(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *bind_handle /* [in] [ref] */, + int32_t level /* [in] */, + union drsuapi_DsReplicaDelRequest req /* [in] [switch_is(level)] */, + WERROR *werror) { - struct DRSUAPI_REPLICA_DEL r; + struct drsuapi_DsReplicaDel r; NTSTATUS status; /* In parameters */ + r.in.bind_handle = bind_handle; + r.in.level = level; + r.in.req = req; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_DEL, &r); + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaDel, &r); } status = cli->dispatch(cli, mem_ctx, &ndr_table_drsuapi, - NDR_DRSUAPI_REPLICA_DEL, + NDR_DRSUAPI_DSREPLICADEL, &r); if (!NT_STATUS_IS_OK(status)) { @@ -1137,7 +1161,7 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_DEL, &r); + NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaDel, &r); } if (NT_STATUS_IS_ERR(status)) { @@ -1154,25 +1178,28 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } -struct rpccli_DRSUAPI_REPLICA_MODIFY_state { - struct DRSUAPI_REPLICA_MODIFY orig; - struct DRSUAPI_REPLICA_MODIFY tmp; +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_REPLICA_MODIFY_done(struct tevent_req *subreq); +static void rpccli_drsuapi_DsReplicaMod_done(struct tevent_req *subreq); -struct tevent_req *rpccli_DRSUAPI_REPLICA_MODIFY_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct rpc_pipe_client *cli) +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] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaModRequest _req /* [in] [switch_is(level)] */) { struct tevent_req *req; - struct rpccli_DRSUAPI_REPLICA_MODIFY_state *state; + struct rpccli_drsuapi_DsReplicaMod_state *state; struct tevent_req *subreq; req = tevent_req_create(mem_ctx, &state, - struct rpccli_DRSUAPI_REPLICA_MODIFY_state); + struct rpccli_drsuapi_DsReplicaMod_state); if (req == NULL) { return NULL; } @@ -1180,6 +1207,9 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_MODIFY_send(TALLOC_CTX *mem_ctx, 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 */ @@ -1187,7 +1217,7 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_MODIFY_send(TALLOC_CTX *mem_ctx, ZERO_STRUCT(state->orig.out.result); if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_MODIFY, &state->orig); + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaMod, &state->orig); } /* make a temporary copy, that we pass to the dispatch function */ @@ -1195,21 +1225,21 @@ struct tevent_req *rpccli_DRSUAPI_REPLICA_MODIFY_send(TALLOC_CTX *mem_ctx, subreq = cli->dispatch_send(state, ev, cli, &ndr_table_drsuapi, - NDR_DRSUAPI_REPLICA_MODIFY, + NDR_DRSUAPI_DSREPLICAMOD, &state->tmp); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } - tevent_req_set_callback(subreq, rpccli_DRSUAPI_REPLICA_MODIFY_done, req); + tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaMod_done, req); return req; } -static void rpccli_DRSUAPI_REPLICA_MODIFY_done(struct tevent_req *subreq) +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_REPLICA_MODIFY_state *state = tevent_req_data( - req, struct rpccli_DRSUAPI_REPLICA_MODIFY_state); + struct rpccli_drsuapi_DsReplicaMod_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaMod_state); NTSTATUS status; TALLOC_CTX *mem_ctx; @@ -1235,18 +1265,18 @@ static void rpccli_DRSUAPI_REPLICA_MODIFY_done(struct tevent_req *subreq) ZERO_STRUCT(state->tmp); if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_MODIFY, &state->orig); + NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaMod, &state->orig); } tevent_req_done(req); } -NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY_recv(struct tevent_req *req, - TALLOC_CTX *mem_ctx, - WERROR *result) +NTSTATUS rpccli_drsuapi_DsReplicaMod_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) { - struct rpccli_DRSUAPI_REPLICA_MODIFY_state *state = tevent_req_data( - req, struct rpccli_DRSUAPI_REPLICA_MODIFY_state); + struct rpccli_drsuapi_DsReplicaMod_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaMod_state); NTSTATUS status; if (tevent_req_is_nterror(req, &status)) { @@ -1264,23 +1294,29 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY_recv(struct tevent_req *req, return NT_STATUS_OK; } -NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror) +NTSTATUS rpccli_drsuapi_DsReplicaMod(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *bind_handle /* [in] [ref] */, + int32_t level /* [in] */, + union drsuapi_DsReplicaModRequest req /* [in] [switch_is(level)] */, + WERROR *werror) { - struct DRSUAPI_REPLICA_MODIFY r; + struct drsuapi_DsReplicaMod r; NTSTATUS status; /* In parameters */ + r.in.bind_handle = bind_handle; + r.in.level = level; + r.in.req = req; if (DEBUGLEVEL >= 10) { - NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_MODIFY, &r); + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaMod, &r); } status = cli->dispatch(cli, mem_ctx, &ndr_table_drsuapi, - NDR_DRSUAPI_REPLICA_MODIFY, + NDR_DRSUAPI_DSREPLICAMOD, &r); if (!NT_STATUS_IS_OK(status)) { @@ -1288,7 +1324,7 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli, } if (DEBUGLEVEL >= 10) { - NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_MODIFY, &r); + NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaMod, &r); } if (NT_STATUS_IS_ERR(status)) { diff --git a/librpc/gen_ndr/cli_drsuapi.h b/librpc/gen_ndr/cli_drsuapi.h index 447528110d..0549bdfa7f 100644 --- a/librpc/gen_ndr/cli_drsuapi.h +++ b/librpc/gen_ndr/cli_drsuapi.h @@ -76,33 +76,51 @@ NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli, int32_t level /* [in] */, union drsuapi_DsReplicaUpdateRefsRequest req /* [in] [switch_is(level)] */, WERROR *werror); -struct tevent_req *rpccli_DRSUAPI_REPLICA_ADD_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct rpc_pipe_client *cli); -NTSTATUS rpccli_DRSUAPI_REPLICA_ADD_recv(struct tevent_req *req, - TALLOC_CTX *mem_ctx, - WERROR *result); -NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror); -struct tevent_req *rpccli_DRSUAPI_REPLICA_DEL_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct rpc_pipe_client *cli); -NTSTATUS rpccli_DRSUAPI_REPLICA_DEL_recv(struct tevent_req *req, - TALLOC_CTX *mem_ctx, - WERROR *result); -NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror); -struct tevent_req *rpccli_DRSUAPI_REPLICA_MODIFY_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct rpc_pipe_client *cli); -NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY_recv(struct tevent_req *req, - TALLOC_CTX *mem_ctx, - WERROR *result); -NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - WERROR *werror); +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] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaAddRequest _req /* [in] [switch_is(level)] */); +NTSTATUS rpccli_drsuapi_DsReplicaAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); +NTSTATUS rpccli_drsuapi_DsReplicaAdd(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *bind_handle /* [in] [ref] */, + int32_t level /* [in] */, + union drsuapi_DsReplicaAddRequest req /* [in] [switch_is(level)] */, + WERROR *werror); +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] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaDelRequest _req /* [in] [switch_is(level)] */); +NTSTATUS rpccli_drsuapi_DsReplicaDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); +NTSTATUS rpccli_drsuapi_DsReplicaDel(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *bind_handle /* [in] [ref] */, + int32_t level /* [in] */, + union drsuapi_DsReplicaDelRequest req /* [in] [switch_is(level)] */, + WERROR *werror); +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] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaModRequest _req /* [in] [switch_is(level)] */); +NTSTATUS rpccli_drsuapi_DsReplicaMod_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); +NTSTATUS rpccli_drsuapi_DsReplicaMod(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct policy_handle *bind_handle /* [in] [ref] */, + int32_t level /* [in] */, + union drsuapi_DsReplicaModRequest req /* [in] [switch_is(level)] */, + WERROR *werror); struct tevent_req *rpccli_DRSUAPI_VERIFY_NAMES_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct rpc_pipe_client *cli); diff --git a/librpc/gen_ndr/drsuapi.h b/librpc/gen_ndr/drsuapi.h index b4888a0ff8..b7ebe4cbc6 100644 --- a/librpc/gen_ndr/drsuapi.h +++ b/librpc/gen_ndr/drsuapi.h @@ -684,13 +684,58 @@ union drsuapi_DsReplicaUpdateRefsRequest { #define DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION ( 0x00000001 ) #define DRSUAPI_DS_REPLICA_ADD_WRITEABLE ( 0x00000002 ) +struct drsuapi_DsReplicaAddRequest1 { + struct drsuapi_DsReplicaObjectIdentifier *naming_context;/* [ref] */ + const char *source_dsa_address;/* [unique,charset(UTF16)] */ + uint8_t schedule[84]; + uint32_t options; +}; + +struct drsuapi_DsReplicaAddRequest2 { + struct drsuapi_DsReplicaObjectIdentifier *naming_context;/* [ref] */ + struct drsuapi_DsReplicaObjectIdentifier *source_dsa_dn;/* [unique] */ + struct drsuapi_DsReplicaObjectIdentifier *transport_dn;/* [unique] */ + const char *source_dsa_address;/* [unique,charset(UTF16)] */ + uint8_t schedule[84]; + uint32_t options; +}; + +union drsuapi_DsReplicaAddRequest { + struct drsuapi_DsReplicaAddRequest1 req1;/* [case] */ + struct drsuapi_DsReplicaAddRequest2 req2;/* [case(2)] */ +}/* [switch_type(int32)] */; + /* bitmap drsuapi_DsReplicaDeleteOptions */ -#define DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION ( 0x00000001 ) -#define DRSUAPI_DS_REPLICA_DELETE_WRITEABLE ( 0x00000002 ) +#define DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION ( 0x00000001 ) +#define DRSUAPI_DS_REPLICA_ADD_WRITEABLE ( 0x00000002 ) + +struct drsuapi_DsReplicaDelRequest1 { + struct drsuapi_DsReplicaObjectIdentifier *naming_context;/* [ref] */ + const char *source_dsa_address;/* [unique,charset(UTF16)] */ + uint32_t options; +}; + +union drsuapi_DsReplicaDelRequest { + struct drsuapi_DsReplicaDelRequest1 req1;/* [case] */ +}/* [switch_type(int32)] */; /* bitmap drsuapi_DsReplicaModifyOptions */ -#define DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION ( 0x00000001 ) -#define DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE ( 0x00000002 ) +#define DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION ( 0x00000001 ) +#define DRSUAPI_DS_REPLICA_ADD_WRITEABLE ( 0x00000002 ) + +struct drsuapi_DsReplicaModRequest1 { + struct drsuapi_DsReplicaObjectIdentifier *naming_context;/* [ref] */ + struct GUID source_dra; + const char *source_dra_address;/* [unique,charset(UTF16)] */ + uint8_t schedule[84]; + uint32_t replica_flags; + uint32_t modify_fields; + uint32_t options; +}; + +union drsuapi_DsReplicaModRequest { + struct drsuapi_DsReplicaModRequest1 req1;/* [case] */ +}/* [switch_type(int32)] */; enum drsuapi_DsMembershipType #ifndef USE_UINT_ENUMS @@ -1546,7 +1591,13 @@ struct drsuapi_DsReplicaUpdateRefs { }; -struct DRSUAPI_REPLICA_ADD { +struct drsuapi_DsReplicaAdd { + struct { + struct policy_handle *bind_handle;/* [ref] */ + int32_t level; + union drsuapi_DsReplicaAddRequest req;/* [switch_is(level)] */ + } in; + struct { WERROR result; } out; @@ -1554,7 +1605,13 @@ struct DRSUAPI_REPLICA_ADD { }; -struct DRSUAPI_REPLICA_DEL { +struct drsuapi_DsReplicaDel { + struct { + struct policy_handle *bind_handle;/* [ref] */ + int32_t level; + union drsuapi_DsReplicaDelRequest req;/* [switch_is(level)] */ + } in; + struct { WERROR result; } out; @@ -1562,7 +1619,13 @@ struct DRSUAPI_REPLICA_DEL { }; -struct DRSUAPI_REPLICA_MODIFY { +struct drsuapi_DsReplicaMod { + struct { + struct policy_handle *bind_handle;/* [ref] */ + int32_t level; + union drsuapi_DsReplicaModRequest req;/* [switch_is(level)] */ + } in; + struct { WERROR result; } out; diff --git a/librpc/gen_ndr/ndr_drsuapi.c b/librpc/gen_ndr/ndr_drsuapi.c index 32bc879f44..466f9c32e1 100644 --- a/librpc/gen_ndr/ndr_drsuapi.c +++ b/librpc/gen_ndr/ndr_drsuapi.c @@ -3702,6 +3702,323 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddOptions(struct ndr_print *ndr, const ndr->depth--; } +static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAddRequest1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + if (r->naming_context == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); + NDR_CHECK(ndr_push_drsuapi_DsReplicaAddOptions(ndr, NDR_SCALARS, r->options)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); + if (r->source_dsa_address) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_address, ndr_charset_length(r->source_dsa_address, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAddRequest1 *r) +{ + uint32_t _ptr_naming_context; + TALLOC_CTX *_mem_save_naming_context_0; + uint32_t _ptr_source_dsa_address; + TALLOC_CTX *_mem_save_source_dsa_address_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context)); + if (_ptr_naming_context) { + NDR_PULL_ALLOC(ndr, r->naming_context); + } else { + r->naming_context = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address)); + if (_ptr_source_dsa_address) { + NDR_PULL_ALLOC(ndr, r->source_dsa_address); + } else { + r->source_dsa_address = NULL; + } + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddOptions(ndr, NDR_SCALARS, &r->options)); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0); + if (r->source_dsa_address) { + _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address)); + if (ndr_get_array_length(ndr, &r->source_dsa_address) > ndr_get_array_size(ndr, &r->source_dsa_address)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->source_dsa_address), ndr_get_array_length(ndr, &r->source_dsa_address)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->source_dsa_address), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, ndr_get_array_length(ndr, &r->source_dsa_address), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest1 *r) +{ + ndr_print_struct(ndr, name, "drsuapi_DsReplicaAddRequest1"); + ndr->depth++; + ndr_print_ptr(ndr, "naming_context", r->naming_context); + ndr->depth++; + ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context); + ndr->depth--; + ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address); + ndr->depth++; + if (r->source_dsa_address) { + ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address); + } + ndr->depth--; + ndr_print_array_uint8(ndr, "schedule", r->schedule, 84); + ndr_print_drsuapi_DsReplicaAddOptions(ndr, "options", r->options); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest2(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAddRequest2 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + if (r->naming_context == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_dn)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport_dn)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); + NDR_CHECK(ndr_push_drsuapi_DsReplicaAddOptions(ndr, NDR_SCALARS, r->options)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); + if (r->source_dsa_dn) { + NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->source_dsa_dn)); + } + if (r->transport_dn) { + NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->transport_dn)); + } + if (r->source_dsa_address) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_address, ndr_charset_length(r->source_dsa_address, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest2(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAddRequest2 *r) +{ + uint32_t _ptr_naming_context; + TALLOC_CTX *_mem_save_naming_context_0; + uint32_t _ptr_source_dsa_dn; + TALLOC_CTX *_mem_save_source_dsa_dn_0; + uint32_t _ptr_transport_dn; + TALLOC_CTX *_mem_save_transport_dn_0; + uint32_t _ptr_source_dsa_address; + TALLOC_CTX *_mem_save_source_dsa_address_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context)); + if (_ptr_naming_context) { + NDR_PULL_ALLOC(ndr, r->naming_context); + } else { + r->naming_context = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_dn)); + if (_ptr_source_dsa_dn) { + NDR_PULL_ALLOC(ndr, r->source_dsa_dn); + } else { + r->source_dsa_dn = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport_dn)); + if (_ptr_transport_dn) { + NDR_PULL_ALLOC(ndr, r->transport_dn); + } else { + r->transport_dn = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address)); + if (_ptr_source_dsa_address) { + NDR_PULL_ALLOC(ndr, r->source_dsa_address); + } else { + r->source_dsa_address = NULL; + } + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddOptions(ndr, NDR_SCALARS, &r->options)); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0); + if (r->source_dsa_dn) { + _mem_save_source_dsa_dn_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_dn, 0); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->source_dsa_dn)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_dn_0, 0); + } + if (r->transport_dn) { + _mem_save_transport_dn_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->transport_dn, 0); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->transport_dn)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_dn_0, 0); + } + if (r->source_dsa_address) { + _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address)); + if (ndr_get_array_length(ndr, &r->source_dsa_address) > ndr_get_array_size(ndr, &r->source_dsa_address)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->source_dsa_address), ndr_get_array_length(ndr, &r->source_dsa_address)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->source_dsa_address), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, ndr_get_array_length(ndr, &r->source_dsa_address), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest2 *r) +{ + ndr_print_struct(ndr, name, "drsuapi_DsReplicaAddRequest2"); + ndr->depth++; + ndr_print_ptr(ndr, "naming_context", r->naming_context); + ndr->depth++; + ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context); + ndr->depth--; + ndr_print_ptr(ndr, "source_dsa_dn", r->source_dsa_dn); + ndr->depth++; + if (r->source_dsa_dn) { + ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "source_dsa_dn", r->source_dsa_dn); + } + ndr->depth--; + ndr_print_ptr(ndr, "transport_dn", r->transport_dn); + ndr->depth++; + if (r->transport_dn) { + ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "transport_dn", r->transport_dn); + } + ndr->depth--; + ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address); + ndr->depth++; + if (r->source_dsa_address) { + ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address); + } + ndr->depth--; + ndr_print_array_uint8(ndr, "schedule", r->schedule, 84); + ndr_print_drsuapi_DsReplicaAddOptions(ndr, "options", r->options); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsReplicaAddRequest *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: { + NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1)); + break; } + + case 2: { + NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr, NDR_SCALARS, &r->req2)); + break; } + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_BUFFERS, &r->req1)); + break; + + case 2: + NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr, NDR_BUFFERS, &r->req2)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsReplicaAddRequest *r) +{ + int level; + int32_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1)); + break; } + + case 2: { + NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr, NDR_SCALARS, &r->req2)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_BUFFERS, &r->req1)); + break; + + case 2: + NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr, NDR_BUFFERS, &r->req2)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaAddRequest *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "drsuapi_DsReplicaAddRequest"); + switch (level) { + case 1: + ndr_print_drsuapi_DsReplicaAddRequest1(ndr, "req1", &r->req1); + break; + + case 2: + ndr_print_drsuapi_DsReplicaAddRequest2(ndr, "req2", &r->req2); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + static enum ndr_err_code ndr_push_drsuapi_DsReplicaDeleteOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -3720,11 +4037,170 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaDeleteOptions(struct ndr_print *ndr, co { ndr_print_uint32(ndr, name, r); ndr->depth++; - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_DELETE_WRITEABLE", DRSUAPI_DS_REPLICA_DELETE_WRITEABLE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_WRITEABLE", DRSUAPI_DS_REPLICA_ADD_WRITEABLE, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaDelRequest1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + if (r->naming_context == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address)); + NDR_CHECK(ndr_push_drsuapi_DsReplicaDeleteOptions(ndr, NDR_SCALARS, r->options)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); + if (r->source_dsa_address) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_address, ndr_charset_length(r->source_dsa_address, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaDelRequest1 *r) +{ + uint32_t _ptr_naming_context; + TALLOC_CTX *_mem_save_naming_context_0; + uint32_t _ptr_source_dsa_address; + TALLOC_CTX *_mem_save_source_dsa_address_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context)); + if (_ptr_naming_context) { + NDR_PULL_ALLOC(ndr, r->naming_context); + } else { + r->naming_context = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address)); + if (_ptr_source_dsa_address) { + NDR_PULL_ALLOC(ndr, r->source_dsa_address); + } else { + r->source_dsa_address = NULL; + } + NDR_CHECK(ndr_pull_drsuapi_DsReplicaDeleteOptions(ndr, NDR_SCALARS, &r->options)); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0); + if (r->source_dsa_address) { + _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address)); + if (ndr_get_array_length(ndr, &r->source_dsa_address) > ndr_get_array_size(ndr, &r->source_dsa_address)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->source_dsa_address), ndr_get_array_length(ndr, &r->source_dsa_address)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->source_dsa_address), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, ndr_get_array_length(ndr, &r->source_dsa_address), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsReplicaDelRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaDelRequest1 *r) +{ + ndr_print_struct(ndr, name, "drsuapi_DsReplicaDelRequest1"); + ndr->depth++; + ndr_print_ptr(ndr, "naming_context", r->naming_context); + ndr->depth++; + ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context); + ndr->depth--; + ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address); + ndr->depth++; + if (r->source_dsa_address) { + ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address); + } + ndr->depth--; + ndr_print_drsuapi_DsReplicaDeleteOptions(ndr, "options", r->options); ndr->depth--; } +static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsReplicaDelRequest *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: { + NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1)); + break; } + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_BUFFERS, &r->req1)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsReplicaDelRequest *r) +{ + int level; + int32_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_BUFFERS, &r->req1)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsReplicaDelRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaDelRequest *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "drsuapi_DsReplicaDelRequest"); + switch (level) { + case 1: + ndr_print_drsuapi_DsReplicaDelRequest1(ndr, "req1", &r->req1); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + static enum ndr_err_code ndr_push_drsuapi_DsReplicaModifyOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -3743,11 +4219,182 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaModifyOptions(struct ndr_print *ndr, co { ndr_print_uint32(ndr, name, r); ndr->depth++; - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION, r); - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE", DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_ADD_WRITEABLE", DRSUAPI_DS_REPLICA_ADD_WRITEABLE, r); + ndr->depth--; +} + +static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaModRequest1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 4)); + if (r->naming_context == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_ref_ptr(ndr)); + NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dra)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dra_address)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->replica_flags)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->modify_fields)); + NDR_CHECK(ndr_push_drsuapi_DsReplicaModifyOptions(ndr, NDR_SCALARS, r->options)); + } + if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); + if (r->source_dra_address) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->source_dra_address, CH_UTF16))); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->source_dra_address, CH_UTF16))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dra_address, ndr_charset_length(r->source_dra_address, CH_UTF16), sizeof(uint16_t), CH_UTF16)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaModRequest1 *r) +{ + uint32_t _ptr_naming_context; + TALLOC_CTX *_mem_save_naming_context_0; + uint32_t _ptr_source_dra_address; + TALLOC_CTX *_mem_save_source_dra_address_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context)); + if (_ptr_naming_context) { + NDR_PULL_ALLOC(ndr, r->naming_context); + } else { + r->naming_context = NULL; + } + NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dra)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dra_address)); + if (_ptr_source_dra_address) { + NDR_PULL_ALLOC(ndr, r->source_dra_address); + } else { + r->source_dra_address = NULL; + } + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, 84)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->replica_flags)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->modify_fields)); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaModifyOptions(ndr, NDR_SCALARS, &r->options)); + } + if (ndr_flags & NDR_BUFFERS) { + _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0); + if (r->source_dra_address) { + _mem_save_source_dra_address_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->source_dra_address, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dra_address)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dra_address)); + if (ndr_get_array_length(ndr, &r->source_dra_address) > ndr_get_array_size(ndr, &r->source_dra_address)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->source_dra_address), ndr_get_array_length(ndr, &r->source_dra_address)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->source_dra_address), sizeof(uint16_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dra_address, ndr_get_array_length(ndr, &r->source_dra_address), sizeof(uint16_t), CH_UTF16)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dra_address_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsReplicaModRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaModRequest1 *r) +{ + ndr_print_struct(ndr, name, "drsuapi_DsReplicaModRequest1"); + ndr->depth++; + ndr_print_ptr(ndr, "naming_context", r->naming_context); + ndr->depth++; + ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context); + ndr->depth--; + ndr_print_GUID(ndr, "source_dra", &r->source_dra); + ndr_print_ptr(ndr, "source_dra_address", r->source_dra_address); + ndr->depth++; + if (r->source_dra_address) { + ndr_print_string(ndr, "source_dra_address", r->source_dra_address); + } + ndr->depth--; + ndr_print_array_uint8(ndr, "schedule", r->schedule, 84); + ndr_print_uint32(ndr, "replica_flags", r->replica_flags); + ndr_print_uint32(ndr, "modify_fields", r->modify_fields); + ndr_print_drsuapi_DsReplicaModifyOptions(ndr, "options", r->options); ndr->depth--; } +static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsReplicaModRequest *r) +{ + if (ndr_flags & NDR_SCALARS) { + int level = ndr_push_get_switch_value(ndr, r); + NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, level)); + switch (level) { + case 1: { + NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1)); + break; } + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + if (ndr_flags & NDR_BUFFERS) { + int level = ndr_push_get_switch_value(ndr, r); + switch (level) { + case 1: + NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_BUFFERS, &r->req1)); + break; + + default: + return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsReplicaModRequest *r) +{ + int level; + int32_t _level; + level = ndr_pull_get_switch_value(ndr, r); + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &_level)); + if (_level != level) { + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__); + } + switch (level) { + case 1: { + NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1)); + break; } + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + if (ndr_flags & NDR_BUFFERS) { + switch (level) { + case 1: + NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_BUFFERS, &r->req1)); + break; + + default: + return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsReplicaModRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaModRequest *r) +{ + int level; + level = ndr_print_get_switch_value(ndr, r); + ndr_print_union(ndr, name, level, "drsuapi_DsReplicaModRequest"); + switch (level) { + case 1: + ndr_print_drsuapi_DsReplicaModRequest1(ndr, "req1", &r->req1); + break; + + default: + ndr_print_bad_level(ndr, name, level); + } +} + static enum ndr_err_code ndr_push_drsuapi_DsMembershipType(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsMembershipType r) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); @@ -12689,9 +13336,16 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefs(struct ndr_print *ndr, const ndr->depth--; } -static enum ndr_err_code ndr_push_DRSUAPI_REPLICA_ADD(struct ndr_push *ndr, int flags, const struct DRSUAPI_REPLICA_ADD *r) +static enum ndr_err_code ndr_push_drsuapi_DsReplicaAdd(struct ndr_push *ndr, int flags, const struct drsuapi_DsReplicaAdd *r) { if (flags & NDR_IN) { + if (r->in.bind_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle)); + NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level)); + NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -12699,9 +13353,20 @@ static enum ndr_err_code ndr_push_DRSUAPI_REPLICA_ADD(struct ndr_push *ndr, int return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_DRSUAPI_REPLICA_ADD(struct ndr_pull *ndr, int flags, struct DRSUAPI_REPLICA_ADD *r) +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAdd(struct ndr_pull *ndr, int flags, struct drsuapi_DsReplicaAdd *r) { + TALLOC_CTX *_mem_save_bind_handle_0; if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.bind_handle); + } + _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level)); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -12709,20 +13374,27 @@ static enum ndr_err_code ndr_pull_DRSUAPI_REPLICA_ADD(struct ndr_pull *ndr, int return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_DRSUAPI_REPLICA_ADD(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_REPLICA_ADD *r) +_PUBLIC_ void ndr_print_drsuapi_DsReplicaAdd(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaAdd *r) { - ndr_print_struct(ndr, name, "DRSUAPI_REPLICA_ADD"); + ndr_print_struct(ndr, name, "drsuapi_DsReplicaAdd"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "DRSUAPI_REPLICA_ADD"); + ndr_print_struct(ndr, "in", "drsuapi_DsReplicaAdd"); ndr->depth++; + ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle); + ndr->depth++; + ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle); + ndr->depth--; + ndr_print_int32(ndr, "level", r->in.level); + ndr_print_set_switch_value(ndr, &r->in.req, r->in.level); + ndr_print_drsuapi_DsReplicaAddRequest(ndr, "req", &r->in.req); ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "DRSUAPI_REPLICA_ADD"); + ndr_print_struct(ndr, "out", "drsuapi_DsReplicaAdd"); ndr->depth++; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -12730,9 +13402,16 @@ _PUBLIC_ void ndr_print_DRSUAPI_REPLICA_ADD(struct ndr_print *ndr, const char *n ndr->depth--; } -static enum ndr_err_code ndr_push_DRSUAPI_REPLICA_DEL(struct ndr_push *ndr, int flags, const struct DRSUAPI_REPLICA_DEL *r) +static enum ndr_err_code ndr_push_drsuapi_DsReplicaDel(struct ndr_push *ndr, int flags, const struct drsuapi_DsReplicaDel *r) { if (flags & NDR_IN) { + if (r->in.bind_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle)); + NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level)); + NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -12740,9 +13419,20 @@ static enum ndr_err_code ndr_push_DRSUAPI_REPLICA_DEL(struct ndr_push *ndr, int return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_DRSUAPI_REPLICA_DEL(struct ndr_pull *ndr, int flags, struct DRSUAPI_REPLICA_DEL *r) +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDel(struct ndr_pull *ndr, int flags, struct drsuapi_DsReplicaDel *r) { + TALLOC_CTX *_mem_save_bind_handle_0; if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.bind_handle); + } + _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level)); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -12750,20 +13440,27 @@ static enum ndr_err_code ndr_pull_DRSUAPI_REPLICA_DEL(struct ndr_pull *ndr, int return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_DRSUAPI_REPLICA_DEL(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_REPLICA_DEL *r) +_PUBLIC_ void ndr_print_drsuapi_DsReplicaDel(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaDel *r) { - ndr_print_struct(ndr, name, "DRSUAPI_REPLICA_DEL"); + ndr_print_struct(ndr, name, "drsuapi_DsReplicaDel"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "DRSUAPI_REPLICA_DEL"); + ndr_print_struct(ndr, "in", "drsuapi_DsReplicaDel"); + ndr->depth++; + ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle); ndr->depth++; + ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle); + ndr->depth--; + ndr_print_int32(ndr, "level", r->in.level); + ndr_print_set_switch_value(ndr, &r->in.req, r->in.level); + ndr_print_drsuapi_DsReplicaDelRequest(ndr, "req", &r->in.req); ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "DRSUAPI_REPLICA_DEL"); + ndr_print_struct(ndr, "out", "drsuapi_DsReplicaDel"); ndr->depth++; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -12771,9 +13468,16 @@ _PUBLIC_ void ndr_print_DRSUAPI_REPLICA_DEL(struct ndr_print *ndr, const char *n ndr->depth--; } -static enum ndr_err_code ndr_push_DRSUAPI_REPLICA_MODIFY(struct ndr_push *ndr, int flags, const struct DRSUAPI_REPLICA_MODIFY *r) +static enum ndr_err_code ndr_push_drsuapi_DsReplicaMod(struct ndr_push *ndr, int flags, const struct drsuapi_DsReplicaMod *r) { if (flags & NDR_IN) { + if (r->in.bind_handle == NULL) { + return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); + } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle)); + NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->in.level)); + NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level)); + NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -12781,9 +13485,20 @@ static enum ndr_err_code ndr_push_DRSUAPI_REPLICA_MODIFY(struct ndr_push *ndr, i return NDR_ERR_SUCCESS; } -static enum ndr_err_code ndr_pull_DRSUAPI_REPLICA_MODIFY(struct ndr_pull *ndr, int flags, struct DRSUAPI_REPLICA_MODIFY *r) +static enum ndr_err_code ndr_pull_drsuapi_DsReplicaMod(struct ndr_pull *ndr, int flags, struct drsuapi_DsReplicaMod *r) { + TALLOC_CTX *_mem_save_bind_handle_0; if (flags & NDR_IN) { + if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_PULL_ALLOC(ndr, r->in.bind_handle); + } + _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->in.level)); + NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level)); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); @@ -12791,20 +13506,27 @@ static enum ndr_err_code ndr_pull_DRSUAPI_REPLICA_MODIFY(struct ndr_pull *ndr, i return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_DRSUAPI_REPLICA_MODIFY(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_REPLICA_MODIFY *r) +_PUBLIC_ void ndr_print_drsuapi_DsReplicaMod(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaMod *r) { - ndr_print_struct(ndr, name, "DRSUAPI_REPLICA_MODIFY"); + ndr_print_struct(ndr, name, "drsuapi_DsReplicaMod"); ndr->depth++; if (flags & NDR_SET_VALUES) { ndr->flags |= LIBNDR_PRINT_SET_VALUES; } if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "DRSUAPI_REPLICA_MODIFY"); + ndr_print_struct(ndr, "in", "drsuapi_DsReplicaMod"); + ndr->depth++; + ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle); ndr->depth++; + ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle); + ndr->depth--; + ndr_print_int32(ndr, "level", r->in.level); + ndr_print_set_switch_value(ndr, &r->in.req, r->in.level); + ndr_print_drsuapi_DsReplicaModRequest(ndr, "req", &r->in.req); ndr->depth--; } if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "DRSUAPI_REPLICA_MODIFY"); + ndr_print_struct(ndr, "out", "drsuapi_DsReplicaMod"); ndr->depth++; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -14341,27 +15063,27 @@ static const struct ndr_interface_call drsuapi_calls[] = { false, }, { - "DRSUAPI_REPLICA_ADD", - sizeof(struct DRSUAPI_REPLICA_ADD), - (ndr_push_flags_fn_t) ndr_push_DRSUAPI_REPLICA_ADD, - (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_REPLICA_ADD, - (ndr_print_function_t) ndr_print_DRSUAPI_REPLICA_ADD, + "drsuapi_DsReplicaAdd", + sizeof(struct drsuapi_DsReplicaAdd), + (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaAdd, + (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaAdd, + (ndr_print_function_t) ndr_print_drsuapi_DsReplicaAdd, false, }, { - "DRSUAPI_REPLICA_DEL", - sizeof(struct DRSUAPI_REPLICA_DEL), - (ndr_push_flags_fn_t) ndr_push_DRSUAPI_REPLICA_DEL, - (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_REPLICA_DEL, - (ndr_print_function_t) ndr_print_DRSUAPI_REPLICA_DEL, + "drsuapi_DsReplicaDel", + sizeof(struct drsuapi_DsReplicaDel), + (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaDel, + (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaDel, + (ndr_print_function_t) ndr_print_drsuapi_DsReplicaDel, false, }, { - "DRSUAPI_REPLICA_MODIFY", - sizeof(struct DRSUAPI_REPLICA_MODIFY), - (ndr_push_flags_fn_t) ndr_push_DRSUAPI_REPLICA_MODIFY, - (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_REPLICA_MODIFY, - (ndr_print_function_t) ndr_print_DRSUAPI_REPLICA_MODIFY, + "drsuapi_DsReplicaMod", + sizeof(struct drsuapi_DsReplicaMod), + (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaMod, + (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaMod, + (ndr_print_function_t) ndr_print_drsuapi_DsReplicaMod, false, }, { diff --git a/librpc/gen_ndr/ndr_drsuapi.h b/librpc/gen_ndr/ndr_drsuapi.h index f7cb768ccc..c4634b3788 100644 --- a/librpc/gen_ndr/ndr_drsuapi.h +++ b/librpc/gen_ndr/ndr_drsuapi.h @@ -22,11 +22,11 @@ extern const struct ndr_interface_table ndr_table_drsuapi; #define NDR_DRSUAPI_DSREPLICAUPDATEREFS (0x04) -#define NDR_DRSUAPI_REPLICA_ADD (0x05) +#define NDR_DRSUAPI_DSREPLICAADD (0x05) -#define NDR_DRSUAPI_REPLICA_DEL (0x06) +#define NDR_DRSUAPI_DSREPLICADEL (0x06) -#define NDR_DRSUAPI_REPLICA_MODIFY (0x07) +#define NDR_DRSUAPI_DSREPLICAMOD (0x07) #define NDR_DRSUAPI_VERIFY_NAMES (0x08) @@ -174,8 +174,15 @@ void ndr_print_drsuapi_DsReplicaUpdateRefsOptions(struct ndr_print *ndr, const c void ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaUpdateRefsRequest1 *r); void ndr_print_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaUpdateRefsRequest *r); void ndr_print_drsuapi_DsReplicaAddOptions(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_drsuapi_DsReplicaAddRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest1 *r); +void ndr_print_drsuapi_DsReplicaAddRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest2 *r); +void ndr_print_drsuapi_DsReplicaAddRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaAddRequest *r); void ndr_print_drsuapi_DsReplicaDeleteOptions(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_drsuapi_DsReplicaDelRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaDelRequest1 *r); +void ndr_print_drsuapi_DsReplicaDelRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaDelRequest *r); void ndr_print_drsuapi_DsReplicaModifyOptions(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_drsuapi_DsReplicaModRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaModRequest1 *r); +void ndr_print_drsuapi_DsReplicaModRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaModRequest *r); void ndr_print_drsuapi_DsMembershipType(struct ndr_print *ndr, const char *name, enum drsuapi_DsMembershipType r); void ndr_print_drsuapi_DsGetMembershipsCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsCtr1 *r); void ndr_print_drsuapi_DsGetMembershipsCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsCtr *r); @@ -276,9 +283,9 @@ void ndr_print_drsuapi_DsUnbind(struct ndr_print *ndr, const char *name, int fla void ndr_print_drsuapi_DsReplicaSync(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaSync *r); void ndr_print_drsuapi_DsGetNCChanges(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsGetNCChanges *r); void ndr_print_drsuapi_DsReplicaUpdateRefs(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaUpdateRefs *r); -void ndr_print_DRSUAPI_REPLICA_ADD(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_REPLICA_ADD *r); -void ndr_print_DRSUAPI_REPLICA_DEL(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_REPLICA_DEL *r); -void ndr_print_DRSUAPI_REPLICA_MODIFY(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_REPLICA_MODIFY *r); +void ndr_print_drsuapi_DsReplicaAdd(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaAdd *r); +void ndr_print_drsuapi_DsReplicaDel(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaDel *r); +void ndr_print_drsuapi_DsReplicaMod(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsReplicaMod *r); void ndr_print_DRSUAPI_VERIFY_NAMES(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_VERIFY_NAMES *r); void ndr_print_drsuapi_DsGetMemberships(struct ndr_print *ndr, const char *name, int flags, const struct drsuapi_DsGetMemberships *r); void ndr_print_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_print *ndr, const char *name, int flags, const struct DRSUAPI_INTER_DOMAIN_MOVE *r); diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl index e5d25362bf..4ca7e568f3 100644 --- a/librpc/idl/drsuapi.idl +++ b/librpc/idl/drsuapi.idl @@ -751,26 +751,88 @@ interface drsuapi /* TODO ... */ } drsuapi_DsReplicaAddOptions; - [todo] WERROR DRSUAPI_REPLICA_ADD(); + + typedef struct { + [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; + [charset(UTF16),string] uint16 *source_dsa_address; + uint8 schedule[84]; + drsuapi_DsReplicaAddOptions options; + } drsuapi_DsReplicaAddRequest1; + + typedef struct { + [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; + drsuapi_DsReplicaObjectIdentifier *source_dsa_dn; + drsuapi_DsReplicaObjectIdentifier *transport_dn; + [charset(UTF16),string] uint16 *source_dsa_address; + uint8 schedule[84]; + drsuapi_DsReplicaAddOptions options; + } drsuapi_DsReplicaAddRequest2; + + typedef [switch_type(int32)] union { + [case(1)] drsuapi_DsReplicaAddRequest1 req1; + [case(2)] drsuapi_DsReplicaAddRequest2 req2; + } drsuapi_DsReplicaAddRequest; + + WERROR drsuapi_DsReplicaAdd( + [in] policy_handle *bind_handle, + [in] int32 level, + [in,switch_is(level)] drsuapi_DsReplicaAddRequest req + ); + /*****************/ /* Function 0x06 */ typedef bitmap { - DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION = 0x00000001, - DRSUAPI_DS_REPLICA_DELETE_WRITEABLE = 0x00000002 + DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION = 0x00000001, + DRSUAPI_DS_REPLICA_ADD_WRITEABLE = 0x00000002 /* TODO ... */ } drsuapi_DsReplicaDeleteOptions; - [todo] WERROR DRSUAPI_REPLICA_DEL(); + + typedef struct { + [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; + [charset(UTF16),string] uint16 *source_dsa_address; + drsuapi_DsReplicaDeleteOptions options; + } drsuapi_DsReplicaDelRequest1; + + typedef [switch_type(int32)] union { + [case(1)] drsuapi_DsReplicaDelRequest1 req1; + } drsuapi_DsReplicaDelRequest; + + WERROR drsuapi_DsReplicaDel( + [in] policy_handle *bind_handle, + [in] int32 level, + [in,switch_is(level)] drsuapi_DsReplicaDelRequest req + ); /*****************/ /* Function 0x07 */ typedef bitmap { - DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION = 0x00000001, - DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE = 0x00000002 + DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION = 0x00000001, + DRSUAPI_DS_REPLICA_ADD_WRITEABLE = 0x00000002 + /* TODO ... */ } drsuapi_DsReplicaModifyOptions; - [todo] WERROR DRSUAPI_REPLICA_MODIFY(); + + typedef struct { + [ref] drsuapi_DsReplicaObjectIdentifier *naming_context; + GUID source_dra; + [charset(UTF16),string] uint16 *source_dra_address; + uint8 schedule[84]; + uint32 replica_flags; + uint32 modify_fields; + drsuapi_DsReplicaModifyOptions options; + } drsuapi_DsReplicaModRequest1; + + typedef [switch_type(int32)] union { + [case(1)] drsuapi_DsReplicaModRequest1 req1; + } drsuapi_DsReplicaModRequest; + + WERROR drsuapi_DsReplicaMod( + [in] policy_handle *bind_handle, + [in] int32 level, + [in,switch_is(level)] drsuapi_DsReplicaModRequest req + ); /*****************/ /* Function 0x08 */ |