summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr/cli_echo.c
diff options
context:
space:
mode:
Diffstat (limited to 'librpc/gen_ndr/cli_echo.c')
-rw-r--r--librpc/gen_ndr/cli_echo.c1123
1 files changed, 1123 insertions, 0 deletions
diff --git a/librpc/gen_ndr/cli_echo.c b/librpc/gen_ndr/cli_echo.c
index ff369c7d5a..fd18666e40 100644
--- a/librpc/gen_ndr/cli_echo.c
+++ b/librpc/gen_ndr/cli_echo.c
@@ -6,6 +6,117 @@
#include "includes.h"
#include "../librpc/gen_ndr/cli_echo.h"
+struct rpccli_echo_AddOne_state {
+ struct echo_AddOne orig;
+ struct echo_AddOne tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_AddOne_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_AddOne_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint32_t _in_data /* [in] */,
+ uint32_t *_out_data /* [out] [ref] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_AddOne_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_AddOne_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.in_data = _in_data;
+
+ /* Out parameters */
+ state->orig.out.out_data = _out_data;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_AddOne, &state->orig);
+ }
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_echo_AddOne_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_ADDONE,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_AddOne_done, req);
+ return req;
+}
+
+static void rpccli_echo_AddOne_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_AddOne_state *state = tevent_req_data(
+ req, struct rpccli_echo_AddOne_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ *state->orig.out.out_data = *state->tmp.out.out_data;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_AddOne, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_AddOne_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_echo_AddOne_state *state = tevent_req_data(
+ req, struct rpccli_echo_AddOne_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t in_data /* [in] */,
@@ -46,6 +157,119 @@ NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
+struct rpccli_echo_EchoData_state {
+ struct echo_EchoData orig;
+ struct echo_EchoData tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_EchoData_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_EchoData_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint32_t _len /* [in] */,
+ uint8_t *_in_data /* [in] [size_is(len)] */,
+ uint8_t *_out_data /* [out] [size_is(len)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_EchoData_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_EchoData_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.len = _len;
+ state->orig.in.in_data = _in_data;
+
+ /* Out parameters */
+ state->orig.out.out_data = _out_data;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_EchoData, &state->orig);
+ }
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_echo_EchoData_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_ECHODATA,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_EchoData_done, req);
+ return req;
+}
+
+static void rpccli_echo_EchoData_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_EchoData_state *state = tevent_req_data(
+ req, struct rpccli_echo_EchoData_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ memcpy(state->orig.out.out_data, state->tmp.out.out_data, state->tmp.in.len * sizeof(*state->orig.out.out_data));
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_EchoData, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_EchoData_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_echo_EchoData_state *state = tevent_req_data(
+ req, struct rpccli_echo_EchoData_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t len /* [in] */,
@@ -88,6 +312,110 @@ NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
+struct rpccli_echo_SinkData_state {
+ struct echo_SinkData orig;
+ struct echo_SinkData tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_SinkData_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_SinkData_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint32_t _len /* [in] */,
+ uint8_t *_data /* [in] [size_is(len)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_SinkData_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_SinkData_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.len = _len;
+ state->orig.in.data = _data;
+
+ /* Out parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_SinkData, &state->orig);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_SINKDATA,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_SinkData_done, req);
+ return req;
+}
+
+static void rpccli_echo_SinkData_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_SinkData_state *state = tevent_req_data(
+ req, struct rpccli_echo_SinkData_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_SinkData, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_SinkData_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_echo_SinkData_state *state = tevent_req_data(
+ req, struct rpccli_echo_SinkData_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t len /* [in] */,
@@ -128,6 +456,117 @@ NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
+struct rpccli_echo_SourceData_state {
+ struct echo_SourceData orig;
+ struct echo_SourceData tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_SourceData_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_SourceData_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint32_t _len /* [in] */,
+ uint8_t *_data /* [out] [size_is(len)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_SourceData_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_SourceData_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.len = _len;
+
+ /* Out parameters */
+ state->orig.out.data = _data;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_SourceData, &state->orig);
+ }
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_echo_SourceData_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_SOURCEDATA,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_SourceData_done, req);
+ return req;
+}
+
+static void rpccli_echo_SourceData_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_SourceData_state *state = tevent_req_data(
+ req, struct rpccli_echo_SourceData_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ memcpy(state->orig.out.data, state->tmp.out.data, state->tmp.in.len * sizeof(*state->orig.out.data));
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_SourceData, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_SourceData_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_echo_SourceData_state *state = tevent_req_data(
+ req, struct rpccli_echo_SourceData_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t len /* [in] */,
@@ -168,6 +607,117 @@ NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
+struct rpccli_echo_TestCall_state {
+ struct echo_TestCall orig;
+ struct echo_TestCall tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_TestCall_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_TestCall_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ const char *_s1 /* [in] [ref,charset(UTF16)] */,
+ const char **_s2 /* [out] [ref,charset(UTF16)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_TestCall_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_TestCall_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.s1 = _s1;
+
+ /* Out parameters */
+ state->orig.out.s2 = _s2;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_TestCall, &state->orig);
+ }
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_echo_TestCall_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_TESTCALL,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_TestCall_done, req);
+ return req;
+}
+
+static void rpccli_echo_TestCall_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_TestCall_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestCall_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ *state->orig.out.s2 = *state->tmp.out.s2;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_TestCall, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_TestCall_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_echo_TestCall_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestCall_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_TestCall(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *s1 /* [in] [ref,charset(UTF16)] */,
@@ -208,6 +758,127 @@ NTSTATUS rpccli_echo_TestCall(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
+struct rpccli_echo_TestCall2_state {
+ struct echo_TestCall2 orig;
+ struct echo_TestCall2 tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_TestCall2_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_TestCall2_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t _level /* [in] */,
+ union echo_Info *_info /* [out] [ref,switch_is(level)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_TestCall2_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_TestCall2_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.level = _level;
+
+ /* Out parameters */
+ state->orig.out.info = _info;
+
+ /* Result */
+ ZERO_STRUCT(state->orig.out.result);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_TestCall2, &state->orig);
+ }
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_echo_TestCall2_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_TESTCALL2,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_TestCall2_done, req);
+ return req;
+}
+
+static void rpccli_echo_TestCall2_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_TestCall2_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestCall2_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ *state->orig.out.info = *state->tmp.out.info;
+
+ /* Copy result */
+ state->orig.out.result = state->tmp.out.result;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_TestCall2, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_TestCall2_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ NTSTATUS *result)
+{
+ struct rpccli_echo_TestCall2_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestCall2_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ /* Return result */
+ *result = state->orig.out.result;
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_TestCall2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t level /* [in] */,
@@ -248,6 +919,118 @@ NTSTATUS rpccli_echo_TestCall2(struct rpc_pipe_client *cli,
return r.out.result;
}
+struct rpccli_echo_TestSleep_state {
+ struct echo_TestSleep orig;
+ struct echo_TestSleep tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_TestSleep_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_TestSleep_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint32_t _seconds /* [in] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_TestSleep_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_TestSleep_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.seconds = _seconds;
+
+ /* Out parameters */
+
+ /* Result */
+ ZERO_STRUCT(state->orig.out.result);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_TestSleep, &state->orig);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_TESTSLEEP,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_TestSleep_done, req);
+ return req;
+}
+
+static void rpccli_echo_TestSleep_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_TestSleep_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestSleep_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+
+ /* Copy result */
+ state->orig.out.result = state->tmp.out.result;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_TestSleep, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_TestSleep_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ uint32 *result)
+{
+ struct rpccli_echo_TestSleep_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestSleep_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ /* Return result */
+ *result = state->orig.out.result;
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_TestSleep(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t seconds /* [in] */)
@@ -286,6 +1069,124 @@ NTSTATUS rpccli_echo_TestSleep(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
+struct rpccli_echo_TestEnum_state {
+ struct echo_TestEnum orig;
+ struct echo_TestEnum tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_TestEnum_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_TestEnum_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ enum echo_Enum1 *_foo1 /* [in,out] [ref] */,
+ struct echo_Enum2 *_foo2 /* [in,out] [ref] */,
+ union echo_Enum3 *_foo3 /* [in,out] [ref,switch_is(*foo1)] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_TestEnum_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_TestEnum_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.foo1 = _foo1;
+ state->orig.in.foo2 = _foo2;
+ state->orig.in.foo3 = _foo3;
+
+ /* Out parameters */
+ state->orig.out.foo1 = _foo1;
+ state->orig.out.foo2 = _foo2;
+ state->orig.out.foo3 = _foo3;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_TestEnum, &state->orig);
+ }
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_echo_TestEnum_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_TESTENUM,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_TestEnum_done, req);
+ return req;
+}
+
+static void rpccli_echo_TestEnum_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_TestEnum_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestEnum_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ *state->orig.out.foo1 = *state->tmp.out.foo1;
+ *state->orig.out.foo2 = *state->tmp.out.foo2;
+ *state->orig.out.foo3 = *state->tmp.out.foo3;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_TestEnum, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_TestEnum_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_echo_TestEnum_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestEnum_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_TestEnum(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
enum echo_Enum1 *foo1 /* [in,out] [ref] */,
@@ -331,6 +1232,116 @@ NTSTATUS rpccli_echo_TestEnum(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
+struct rpccli_echo_TestSurrounding_state {
+ struct echo_TestSurrounding orig;
+ struct echo_TestSurrounding tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_TestSurrounding_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_TestSurrounding_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ struct echo_Surrounding *_data /* [in,out] [ref] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_TestSurrounding_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_TestSurrounding_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.data = _data;
+
+ /* Out parameters */
+ state->orig.out.data = _data;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_TestSurrounding, &state->orig);
+ }
+
+ state->out_mem_ctx = talloc_named_const(state, 0,
+ "rpccli_echo_TestSurrounding_out_memory");
+ if (tevent_req_nomem(state->out_mem_ctx, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_TESTSURROUNDING,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_TestSurrounding_done, req);
+ return req;
+}
+
+static void rpccli_echo_TestSurrounding_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_TestSurrounding_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestSurrounding_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+ *state->orig.out.data = *state->tmp.out.data;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_TestSurrounding, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_TestSurrounding_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx)
+{
+ struct rpccli_echo_TestSurrounding_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestSurrounding_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_TestSurrounding(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct echo_Surrounding *data /* [in,out] [ref] */)
@@ -370,6 +1381,118 @@ NTSTATUS rpccli_echo_TestSurrounding(struct rpc_pipe_client *cli,
return NT_STATUS_OK;
}
+struct rpccli_echo_TestDoublePointer_state {
+ struct echo_TestDoublePointer orig;
+ struct echo_TestDoublePointer tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_echo_TestDoublePointer_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_echo_TestDoublePointer_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ uint16_t ***_data /* [in] [ref] */)
+{
+ struct tevent_req *req;
+ struct rpccli_echo_TestDoublePointer_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_echo_TestDoublePointer_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.data = _data;
+
+ /* Out parameters */
+
+ /* Result */
+ ZERO_STRUCT(state->orig.out.result);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(echo_TestDoublePointer, &state->orig);
+ }
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = cli->dispatch_send(state, ev, cli,
+ &ndr_table_rpcecho,
+ NDR_ECHO_TESTDOUBLEPOINTER,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_echo_TestDoublePointer_done, req);
+ return req;
+}
+
+static void rpccli_echo_TestDoublePointer_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_echo_TestDoublePointer_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestDoublePointer_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = state->dispatch_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (!NT_STATUS_IS_OK(status)) {
+ tevent_req_nterror(req, status);
+ return;
+ }
+
+ /* Copy out parameters */
+
+ /* Copy result */
+ state->orig.out.result = state->tmp.out.result;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(echo_TestDoublePointer, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_echo_TestDoublePointer_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ uint16 *result)
+{
+ struct rpccli_echo_TestDoublePointer_state *state = tevent_req_data(
+ req, struct rpccli_echo_TestDoublePointer_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possbile out parameters to the callers context */
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ /* Return result */
+ *result = state->orig.out.result;
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
NTSTATUS rpccli_echo_TestDoublePointer(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint16_t ***data /* [in] [ref] */)