};
-struct echo_BytePipeIn {
+struct echo_TestBytePipeIn {
struct {
- uint32_t value;
- struct echo_BytePipe *bp;/* [ref] */
+ uint32_t num_chunks;
+ uint32_t chunk_size;
+ struct echo_BytePipe *in_pipe;/* [ref] */
} in;
struct {
};
+
+struct echo_TestBytePipeOut {
+ struct {
+ uint32_t num_chunks;
+ uint32_t chunk_size;
+ } in;
+
+ struct {
+ struct echo_BytePipe *out_pipe;/* [ref] */
+ uint32_t result;
+ } out;
+
+};
+
+
+struct echo_TestBytePipeInOut {
+ struct {
+ uint32_t num_chunks;
+ uint32_t chunk_size;
+ struct echo_BytePipe *out_pipe;/* [ref] */
+ } in;
+
+ struct {
+ struct echo_BytePipe *out_pipe;/* [ref] */
+ uint32_t result;
+ } out;
+
+};
+
#endif /* _HEADER_rpcecho */
#endif /* _PIDL_HEADER_rpcecho */
ndr->depth--;
}
-static enum ndr_err_code ndr_push_echo_BytePipeIn(struct ndr_push *ndr, int flags, const struct echo_BytePipeIn *r)
+static enum ndr_err_code ndr_push_echo_TestBytePipeIn(struct ndr_push *ndr, int flags, const struct echo_TestBytePipeIn *r)
{
NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
if (flags & NDR_IN) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.value));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_chunks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.chunk_size));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_echo_BytePipeIn(struct ndr_pull *ndr, int flags, struct echo_BytePipeIn *r)
+static enum ndr_err_code ndr_pull_echo_TestBytePipeIn(struct ndr_pull *ndr, int flags, struct echo_TestBytePipeIn *r)
{
NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
if (flags & NDR_IN) {
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.value));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_chunks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.chunk_size));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_echo_BytePipeIn(struct ndr_print *ndr, const char *name, int flags, const struct echo_BytePipeIn *r)
+_PUBLIC_ void ndr_print_echo_TestBytePipeIn(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestBytePipeIn *r)
{
- ndr_print_struct(ndr, name, "echo_BytePipeIn");
+ ndr_print_struct(ndr, name, "echo_TestBytePipeIn");
if (r == NULL) { ndr_print_null(ndr); return; }
ndr->depth++;
if (flags & NDR_SET_VALUES) {
ndr->flags |= LIBNDR_PRINT_SET_VALUES;
}
if (flags & NDR_IN) {
- ndr_print_struct(ndr, "in", "echo_BytePipeIn");
+ ndr_print_struct(ndr, "in", "echo_TestBytePipeIn");
ndr->depth++;
- ndr_print_uint32(ndr, "value", r->in.value);
- ndr_print_ptr(ndr, "bp", r->in.bp);
+ ndr_print_uint32(ndr, "num_chunks", r->in.num_chunks);
+ ndr_print_uint32(ndr, "chunk_size", r->in.chunk_size);
+ ndr_print_ptr(ndr, "in_pipe", r->in.in_pipe);
ndr->depth++;
ndr->depth--;
ndr->depth--;
}
if (flags & NDR_OUT) {
- ndr_print_struct(ndr, "out", "echo_BytePipeIn");
+ ndr_print_struct(ndr, "out", "echo_TestBytePipeIn");
ndr->depth++;
ndr_print_uint32(ndr, "result", r->out.result);
ndr->depth--;
ndr->depth--;
}
-static const struct ndr_interface_call_pipe echo_BytePipeIn_in_pipes[] = {
+static enum ndr_err_code ndr_push_echo_TestBytePipeOut(struct ndr_push *ndr, int flags, const struct echo_TestBytePipeOut *r)
+{
+ NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_chunks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.chunk_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_echo_TestBytePipeOut(struct ndr_pull *ndr, int flags, struct echo_TestBytePipeOut *r)
+{
+ NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_chunks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.chunk_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_echo_TestBytePipeOut(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestBytePipeOut *r)
+{
+ ndr_print_struct(ndr, name, "echo_TestBytePipeOut");
+ if (r == NULL) { ndr_print_null(ndr); return; }
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "echo_TestBytePipeOut");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_chunks", r->in.num_chunks);
+ ndr_print_uint32(ndr, "chunk_size", r->in.chunk_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "echo_TestBytePipeOut");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "out_pipe", r->out.out_pipe);
+ ndr->depth++;
+ ndr->depth--;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_echo_TestBytePipeInOut(struct ndr_push *ndr, int flags, const struct echo_TestBytePipeInOut *r)
+{
+ NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_chunks));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.chunk_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_echo_TestBytePipeInOut(struct ndr_pull *ndr, int flags, struct echo_TestBytePipeInOut *r)
+{
+ NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_chunks));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.chunk_size));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_echo_TestBytePipeInOut(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestBytePipeInOut *r)
+{
+ ndr_print_struct(ndr, name, "echo_TestBytePipeInOut");
+ if (r == NULL) { ndr_print_null(ndr); return; }
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "echo_TestBytePipeInOut");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_chunks", r->in.num_chunks);
+ ndr_print_uint32(ndr, "chunk_size", r->in.chunk_size);
+ ndr_print_ptr(ndr, "out_pipe", r->in.out_pipe);
+ ndr->depth++;
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "echo_TestBytePipeInOut");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "out_pipe", r->out.out_pipe);
+ ndr->depth++;
+ ndr->depth--;
+ ndr_print_uint32(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static const struct ndr_interface_call_pipe echo_TestBytePipeIn_in_pipes[] = {
+ {
+ "in.in_pipe",
+ "echo_BytePipe_chunk",
+ sizeof(struct echo_BytePipe_chunk),
+ (ndr_push_flags_fn_t) ndr_push_echo_BytePipe_chunk,
+ (ndr_pull_flags_fn_t) ndr_pull_echo_BytePipe_chunk,
+ (ndr_print_fn_t) ndr_print_echo_BytePipe_chunk,
+ },
+ { NULL, NULL, 0, NULL, NULL, NULL }
+};
+
+static const struct ndr_interface_call_pipe echo_TestBytePipeOut_out_pipes[] = {
+ {
+ "out.out_pipe",
+ "echo_BytePipe_chunk",
+ sizeof(struct echo_BytePipe_chunk),
+ (ndr_push_flags_fn_t) ndr_push_echo_BytePipe_chunk,
+ (ndr_pull_flags_fn_t) ndr_pull_echo_BytePipe_chunk,
+ (ndr_print_fn_t) ndr_print_echo_BytePipe_chunk,
+ },
+ { NULL, NULL, 0, NULL, NULL, NULL }
+};
+
+static const struct ndr_interface_call_pipe echo_TestBytePipeInOut_in_pipes[] = {
{
- "in.bp",
+ "in.out_pipe",
+ "echo_BytePipe_chunk",
+ sizeof(struct echo_BytePipe_chunk),
+ (ndr_push_flags_fn_t) ndr_push_echo_BytePipe_chunk,
+ (ndr_pull_flags_fn_t) ndr_pull_echo_BytePipe_chunk,
+ (ndr_print_fn_t) ndr_print_echo_BytePipe_chunk,
+ },
+ { NULL, NULL, 0, NULL, NULL, NULL }
+};
+
+static const struct ndr_interface_call_pipe echo_TestBytePipeInOut_out_pipes[] = {
+ {
+ "out.out_pipe",
"echo_BytePipe_chunk",
sizeof(struct echo_BytePipe_chunk),
(ndr_push_flags_fn_t) ndr_push_echo_BytePipe_chunk,
{ 0, NULL },
},
{
- "echo_BytePipeIn",
- sizeof(struct echo_BytePipeIn),
- (ndr_push_flags_fn_t) ndr_push_echo_BytePipeIn,
- (ndr_pull_flags_fn_t) ndr_pull_echo_BytePipeIn,
- (ndr_print_function_t) ndr_print_echo_BytePipeIn,
- { 1, echo_BytePipeIn_in_pipes },
+ "echo_TestBytePipeIn",
+ sizeof(struct echo_TestBytePipeIn),
+ (ndr_push_flags_fn_t) ndr_push_echo_TestBytePipeIn,
+ (ndr_pull_flags_fn_t) ndr_pull_echo_TestBytePipeIn,
+ (ndr_print_function_t) ndr_print_echo_TestBytePipeIn,
+ { 1, echo_TestBytePipeIn_in_pipes },
{ 0, NULL },
},
+ {
+ "echo_TestBytePipeOut",
+ sizeof(struct echo_TestBytePipeOut),
+ (ndr_push_flags_fn_t) ndr_push_echo_TestBytePipeOut,
+ (ndr_pull_flags_fn_t) ndr_pull_echo_TestBytePipeOut,
+ (ndr_print_function_t) ndr_print_echo_TestBytePipeOut,
+ { 0, NULL },
+ { 1, echo_TestBytePipeOut_out_pipes },
+ },
+ {
+ "echo_TestBytePipeInOut",
+ sizeof(struct echo_TestBytePipeInOut),
+ (ndr_push_flags_fn_t) ndr_push_echo_TestBytePipeInOut,
+ (ndr_pull_flags_fn_t) ndr_pull_echo_TestBytePipeInOut,
+ (ndr_print_function_t) ndr_print_echo_TestBytePipeInOut,
+ { 1, echo_TestBytePipeInOut_in_pipes },
+ { 1, echo_TestBytePipeInOut_out_pipes },
+ },
{ NULL, 0, NULL, NULL, NULL }
};
NDR_RPCECHO_VERSION
},
.helpstring = NDR_RPCECHO_HELPSTRING,
- .num_calls = 11,
+ .num_calls = 13,
.calls = rpcecho_calls,
.endpoints = &rpcecho_endpoints,
.authservices = &rpcecho_authservices
#define NDR_ECHO_TESTDOUBLEPOINTER (0x09)
-#define NDR_ECHO_BYTEPIPEIN (0x0a)
+#define NDR_ECHO_TESTBYTEPIPEIN (0x0a)
-#define NDR_RPCECHO_CALL_COUNT (11)
+#define NDR_ECHO_TESTBYTEPIPEOUT (0x0b)
+
+#define NDR_ECHO_TESTBYTEPIPEINOUT (0x0c)
+
+#define NDR_RPCECHO_CALL_COUNT (13)
enum ndr_err_code ndr_push_echo_info1(struct ndr_push *ndr, int ndr_flags, const struct echo_info1 *r);
enum ndr_err_code ndr_pull_echo_info1(struct ndr_pull *ndr, int ndr_flags, struct echo_info1 *r);
void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, const struct echo_info1 *r);
void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestEnum *r);
void ndr_print_echo_TestSurrounding(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestSurrounding *r);
void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestDoublePointer *r);
-void ndr_print_echo_BytePipeIn(struct ndr_print *ndr, const char *name, int flags, const struct echo_BytePipeIn *r);
+void ndr_print_echo_TestBytePipeIn(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestBytePipeIn *r);
+void ndr_print_echo_TestBytePipeOut(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestBytePipeOut *r);
+void ndr_print_echo_TestBytePipeInOut(struct ndr_print *ndr, const char *name, int flags, const struct echo_TestBytePipeInOut *r);
#endif /* _HEADER_NDR_rpcecho */
return NT_STATUS_OK;
}
-struct dcerpc_echo_BytePipeIn_r_state {
+struct dcerpc_echo_TestBytePipeIn_r_state {
struct dcerpc_pipe_handle_connection *in_pipes[1];
struct dcerpc_binding_handle_call_params params;
TALLOC_CTX *out_mem_ctx;
};
-static void dcerpc_echo_BytePipeIn_r_done(struct tevent_req *subreq);
+static void dcerpc_echo_TestBytePipeIn_r_done(struct tevent_req *subreq);
-struct tevent_req *dcerpc_echo_BytePipeIn_r_send(TALLOC_CTX *mem_ctx,
+struct tevent_req *dcerpc_echo_TestBytePipeIn_r_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct dcerpc_binding_handle *h,
- struct echo_BytePipeIn *r)
+ struct echo_TestBytePipeIn *r)
{
struct tevent_req *req;
- struct dcerpc_echo_BytePipeIn_r_state *state;
+ struct dcerpc_echo_TestBytePipeIn_r_state *state;
struct tevent_req *subreq;
req = tevent_req_create(mem_ctx, &state,
- struct dcerpc_echo_BytePipeIn_r_state);
+ struct dcerpc_echo_TestBytePipeIn_r_state);
if (req == NULL) {
return NULL;
}
state->out_mem_ctx = NULL;
- if (r->in.bp == NULL) {
+ if (r->in.in_pipe == NULL) {
tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX);
return tevent_req_post(req, ev);
}
- state->in_pipes[0] = r->in.bp->pc;
+ state->in_pipes[0] = r->in.in_pipe->pc;
state->params.r_mem = state;
state->params.r_ptr = r;
state->params.in.num_pipes = 1;
subreq = dcerpc_binding_handle_call_params_send(state, ev, h,
NULL, &ndr_table_rpcecho,
- NDR_ECHO_BYTEPIPEIN, &state->params);
+ NDR_ECHO_TESTBYTEPIPEIN, &state->params);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
- tevent_req_set_callback(subreq, dcerpc_echo_BytePipeIn_r_done, req);
+ tevent_req_set_callback(subreq, dcerpc_echo_TestBytePipeIn_r_done, req);
return req;
}
-static void dcerpc_echo_BytePipeIn_r_done(struct tevent_req *subreq)
+static void dcerpc_echo_TestBytePipeIn_r_done(struct tevent_req *subreq)
{
struct tevent_req *req =
tevent_req_callback_data(subreq,
tevent_req_done(req);
}
-NTSTATUS dcerpc_echo_BytePipeIn_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
+NTSTATUS dcerpc_echo_TestBytePipeIn_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
{
- struct dcerpc_echo_BytePipeIn_r_state *state =
+ struct dcerpc_echo_TestBytePipeIn_r_state *state =
tevent_req_data(req,
- struct dcerpc_echo_BytePipeIn_r_state);
+ struct dcerpc_echo_TestBytePipeIn_r_state);
NTSTATUS status;
if (tevent_req_is_nterror(req, &status)) {
return NT_STATUS_OK;
}
-struct dcerpc_echo_BytePipeIn_state {
- struct echo_BytePipeIn orig;
- struct echo_BytePipeIn tmp;
+struct dcerpc_echo_TestBytePipeIn_state {
+ struct echo_TestBytePipeIn orig;
+ struct echo_TestBytePipeIn tmp;
TALLOC_CTX *out_mem_ctx;
};
-static void dcerpc_echo_BytePipeIn_done(struct tevent_req *subreq);
+static void dcerpc_echo_TestBytePipeIn_done(struct tevent_req *subreq);
-struct tevent_req *dcerpc_echo_BytePipeIn_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_binding_handle *h,
- uint32_t _value /* [in] */,
- struct echo_BytePipe *_bp /* [in] [ref] */)
+struct tevent_req *dcerpc_echo_TestBytePipeIn_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ uint32_t _num_chunks /* [in] */,
+ uint32_t _chunk_size /* [in] */,
+ struct echo_BytePipe *_in_pipe /* [in] [ref] */)
{
struct tevent_req *req;
- struct dcerpc_echo_BytePipeIn_state *state;
+ struct dcerpc_echo_TestBytePipeIn_state *state;
struct tevent_req *subreq;
req = tevent_req_create(mem_ctx, &state,
- struct dcerpc_echo_BytePipeIn_state);
+ struct dcerpc_echo_TestBytePipeIn_state);
if (req == NULL) {
return NULL;
}
state->out_mem_ctx = NULL;
/* In parameters */
- state->orig.in.value = _value;
- state->orig.in.bp = _bp;
+ state->orig.in.num_chunks = _num_chunks;
+ state->orig.in.chunk_size = _chunk_size;
+ state->orig.in.in_pipe = _in_pipe;
/* Out parameters */
/* make a temporary copy, that we pass to the dispatch function */
state->tmp = state->orig;
- subreq = dcerpc_echo_BytePipeIn_r_send(state, ev, h, &state->tmp);
+ subreq = dcerpc_echo_TestBytePipeIn_r_send(state, ev, h, &state->tmp);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
- tevent_req_set_callback(subreq, dcerpc_echo_BytePipeIn_done, req);
+ tevent_req_set_callback(subreq, dcerpc_echo_TestBytePipeIn_done, req);
return req;
}
-static void dcerpc_echo_BytePipeIn_done(struct tevent_req *subreq)
+static void dcerpc_echo_TestBytePipeIn_done(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
- struct dcerpc_echo_BytePipeIn_state *state = tevent_req_data(
- req, struct dcerpc_echo_BytePipeIn_state);
+ struct dcerpc_echo_TestBytePipeIn_state *state = tevent_req_data(
+ req, struct dcerpc_echo_TestBytePipeIn_state);
NTSTATUS status;
TALLOC_CTX *mem_ctx;
mem_ctx = state;
}
- status = dcerpc_echo_BytePipeIn_r_recv(subreq, mem_ctx);
+ status = dcerpc_echo_TestBytePipeIn_r_recv(subreq, mem_ctx);
TALLOC_FREE(subreq);
if (tevent_req_nterror(req, status)) {
return;
tevent_req_done(req);
}
-NTSTATUS dcerpc_echo_BytePipeIn_recv(struct tevent_req *req,
- TALLOC_CTX *mem_ctx,
- uint32_t *result)
+NTSTATUS dcerpc_echo_TestBytePipeIn_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ uint32_t *result)
+{
+ struct dcerpc_echo_TestBytePipeIn_state *state = tevent_req_data(
+ req, struct dcerpc_echo_TestBytePipeIn_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possible 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;
+}
+
+struct dcerpc_echo_TestBytePipeOut_r_state {
+ struct dcerpc_pipe_handle_connection *out_pipes[1];
+ struct dcerpc_binding_handle_call_params params;
+ TALLOC_CTX *out_mem_ctx;
+};
+
+static void dcerpc_echo_TestBytePipeOut_r_done(struct tevent_req *subreq);
+
+struct tevent_req *dcerpc_echo_TestBytePipeOut_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct echo_TestBytePipeOut *r)
+{
+ struct tevent_req *req;
+ struct dcerpc_echo_TestBytePipeOut_r_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_echo_TestBytePipeOut_r_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ state->out_mem_ctx = NULL;
+
+ if (r->out.out_pipe == NULL) {
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX);
+ return tevent_req_post(req, ev);
+ }
+ state->out_pipes[0] = r->out.out_pipe->pc;
+ state->params.r_mem = state;
+ state->params.r_ptr = r;
+ state->params.in.num_pipes = 0;
+ state->params.in.pipes = NULL;
+ state->params.out.num_pipes = 1;
+ state->params.out.pipes = state->out_pipes;
+
+ subreq = dcerpc_binding_handle_call_params_send(state, ev, h,
+ NULL, &ndr_table_rpcecho,
+ NDR_ECHO_TESTBYTEPIPEOUT, &state->params);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, dcerpc_echo_TestBytePipeOut_r_done, req);
+
+ return req;
+}
+
+static void dcerpc_echo_TestBytePipeOut_r_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req =
+ tevent_req_callback_data(subreq,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = dcerpc_binding_handle_call_params_recv(subreq);
+ TALLOC_FREE(subreq);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_echo_TestBytePipeOut_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
+{
+ struct dcerpc_echo_TestBytePipeOut_r_state *state =
+ tevent_req_data(req,
+ struct dcerpc_echo_TestBytePipeOut_r_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+struct dcerpc_echo_TestBytePipeOut_state {
+ struct echo_TestBytePipeOut orig;
+ struct echo_TestBytePipeOut tmp;
+ TALLOC_CTX *out_mem_ctx;
+};
+
+static void dcerpc_echo_TestBytePipeOut_done(struct tevent_req *subreq);
+
+struct tevent_req *dcerpc_echo_TestBytePipeOut_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ uint32_t _num_chunks /* [in] */,
+ uint32_t _chunk_size /* [in] */,
+ struct echo_BytePipe *_out_pipe /* [out] [ref] */)
+{
+ struct tevent_req *req;
+ struct dcerpc_echo_TestBytePipeOut_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_echo_TestBytePipeOut_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+
+ /* In parameters */
+ state->orig.in.num_chunks = _num_chunks;
+ state->orig.in.chunk_size = _chunk_size;
+
+ /* Out parameters */
+ state->orig.out.out_pipe = _out_pipe;
+
+ /* Result */
+ ZERO_STRUCT(state->orig.out.result);
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = dcerpc_echo_TestBytePipeOut_r_send(state, ev, h, &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, dcerpc_echo_TestBytePipeOut_done, req);
+ return req;
+}
+
+static void dcerpc_echo_TestBytePipeOut_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct dcerpc_echo_TestBytePipeOut_state *state = tevent_req_data(
+ req, struct dcerpc_echo_TestBytePipeOut_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = dcerpc_echo_TestBytePipeOut_r_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+
+ /* Copy out parameters */
+
+ /* Copy result */
+ state->orig.out.result = state->tmp.out.result;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_echo_TestBytePipeOut_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ uint32_t *result)
+{
+ struct dcerpc_echo_TestBytePipeOut_state *state = tevent_req_data(
+ req, struct dcerpc_echo_TestBytePipeOut_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ /* Steal possible 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;
+}
+
+struct dcerpc_echo_TestBytePipeInOut_r_state {
+ struct dcerpc_pipe_handle_connection *in_pipes[1];
+ struct dcerpc_pipe_handle_connection *out_pipes[1];
+ struct dcerpc_binding_handle_call_params params;
+ TALLOC_CTX *out_mem_ctx;
+};
+
+static void dcerpc_echo_TestBytePipeInOut_r_done(struct tevent_req *subreq);
+
+struct tevent_req *dcerpc_echo_TestBytePipeInOut_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct echo_TestBytePipeInOut *r)
+{
+ struct tevent_req *req;
+ struct dcerpc_echo_TestBytePipeInOut_r_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_echo_TestBytePipeInOut_r_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ state->out_mem_ctx = NULL;
+
+ if (r->in.out_pipe == NULL) {
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX);
+ return tevent_req_post(req, ev);
+ }
+ state->in_pipes[0] = r->in.out_pipe->pc;
+ if (r->out.out_pipe == NULL) {
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX);
+ return tevent_req_post(req, ev);
+ }
+ state->out_pipes[0] = r->out.out_pipe->pc;
+ state->params.r_mem = state;
+ state->params.r_ptr = r;
+ state->params.in.num_pipes = 1;
+ state->params.in.pipes = state->in_pipes;
+ state->params.out.num_pipes = 1;
+ state->params.out.pipes = state->out_pipes;
+
+ subreq = dcerpc_binding_handle_call_params_send(state, ev, h,
+ NULL, &ndr_table_rpcecho,
+ NDR_ECHO_TESTBYTEPIPEINOUT, &state->params);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, dcerpc_echo_TestBytePipeInOut_r_done, req);
+
+ return req;
+}
+
+static void dcerpc_echo_TestBytePipeInOut_r_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req =
+ tevent_req_callback_data(subreq,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = dcerpc_binding_handle_call_params_recv(subreq);
+ TALLOC_FREE(subreq);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_echo_TestBytePipeInOut_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
+{
+ struct dcerpc_echo_TestBytePipeInOut_r_state *state =
+ tevent_req_data(req,
+ struct dcerpc_echo_TestBytePipeInOut_r_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ talloc_steal(mem_ctx, state->out_mem_ctx);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+struct dcerpc_echo_TestBytePipeInOut_state {
+ struct echo_TestBytePipeInOut orig;
+ struct echo_TestBytePipeInOut tmp;
+ TALLOC_CTX *out_mem_ctx;
+};
+
+static void dcerpc_echo_TestBytePipeInOut_done(struct tevent_req *subreq);
+
+struct tevent_req *dcerpc_echo_TestBytePipeInOut_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ uint32_t _num_chunks /* [in] */,
+ uint32_t _chunk_size /* [in] */,
+ struct echo_BytePipe *_out_pipe /* [in,out] [ref] */)
+{
+ struct tevent_req *req;
+ struct dcerpc_echo_TestBytePipeInOut_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_echo_TestBytePipeInOut_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+
+ /* In parameters */
+ state->orig.in.num_chunks = _num_chunks;
+ state->orig.in.chunk_size = _chunk_size;
+ state->orig.in.out_pipe = _out_pipe;
+
+ /* Out parameters */
+ state->orig.out.out_pipe = _out_pipe;
+
+ /* Result */
+ ZERO_STRUCT(state->orig.out.result);
+
+ /* make a temporary copy, that we pass to the dispatch function */
+ state->tmp = state->orig;
+
+ subreq = dcerpc_echo_TestBytePipeInOut_r_send(state, ev, h, &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, dcerpc_echo_TestBytePipeInOut_done, req);
+ return req;
+}
+
+static void dcerpc_echo_TestBytePipeInOut_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct dcerpc_echo_TestBytePipeInOut_state *state = tevent_req_data(
+ req, struct dcerpc_echo_TestBytePipeInOut_state);
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+
+ if (state->out_mem_ctx) {
+ mem_ctx = state->out_mem_ctx;
+ } else {
+ mem_ctx = state;
+ }
+
+ status = dcerpc_echo_TestBytePipeInOut_r_recv(subreq, mem_ctx);
+ TALLOC_FREE(subreq);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+
+ /* Copy out parameters */
+
+ /* Copy result */
+ state->orig.out.result = state->tmp.out.result;
+
+ /* Reset temporary structure */
+ ZERO_STRUCT(state->tmp);
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_echo_TestBytePipeInOut_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ uint32_t *result)
{
- struct dcerpc_echo_BytePipeIn_state *state = tevent_req_data(
- req, struct dcerpc_echo_BytePipeIn_state);
+ struct dcerpc_echo_TestBytePipeInOut_state *state = tevent_req_data(
+ req, struct dcerpc_echo_TestBytePipeInOut_state);
NTSTATUS status;
if (tevent_req_is_nterror(req, &status)) {
uint16_t ***_data /* [in] [ref] */,
uint16_t *result);
-struct tevent_req *dcerpc_echo_BytePipeIn_r_send(TALLOC_CTX *mem_ctx,
+struct tevent_req *dcerpc_echo_TestBytePipeIn_r_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct dcerpc_binding_handle *h,
- struct echo_BytePipeIn *r);
-NTSTATUS dcerpc_echo_BytePipeIn_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+ struct echo_TestBytePipeIn *r);
+NTSTATUS dcerpc_echo_TestBytePipeIn_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
/*
* The following function is skipped because
* it uses pipes:
*
- * dcerpc_echo_BytePipeIn_r()
+ * dcerpc_echo_TestBytePipeIn_r()
*/
-struct tevent_req *dcerpc_echo_BytePipeIn_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct dcerpc_binding_handle *h,
- uint32_t _value /* [in] */,
- struct echo_BytePipe *_bp /* [in] [ref] */);
-NTSTATUS dcerpc_echo_BytePipeIn_recv(struct tevent_req *req,
- TALLOC_CTX *mem_ctx,
- uint32_t *result);
+struct tevent_req *dcerpc_echo_TestBytePipeIn_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ uint32_t _num_chunks /* [in] */,
+ uint32_t _chunk_size /* [in] */,
+ struct echo_BytePipe *_in_pipe /* [in] [ref] */);
+NTSTATUS dcerpc_echo_TestBytePipeIn_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ uint32_t *result);
+/*
+ * The following function is skipped because
+ * it uses pipes:
+ *
+ * dcerpc_echo_TestBytePipeIn()
+ */
+
+
+struct tevent_req *dcerpc_echo_TestBytePipeOut_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct echo_TestBytePipeOut *r);
+NTSTATUS dcerpc_echo_TestBytePipeOut_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+/*
+ * The following function is skipped because
+ * it uses pipes:
+ *
+ * dcerpc_echo_TestBytePipeOut_r()
+ */
+
+struct tevent_req *dcerpc_echo_TestBytePipeOut_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ uint32_t _num_chunks /* [in] */,
+ uint32_t _chunk_size /* [in] */,
+ struct echo_BytePipe *_out_pipe /* [out] [ref] */);
+NTSTATUS dcerpc_echo_TestBytePipeOut_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ uint32_t *result);
+/*
+ * The following function is skipped because
+ * it uses pipes:
+ *
+ * dcerpc_echo_TestBytePipeOut()
+ */
+
+
+struct tevent_req *dcerpc_echo_TestBytePipeInOut_r_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ struct echo_TestBytePipeInOut *r);
+NTSTATUS dcerpc_echo_TestBytePipeInOut_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+/*
+ * The following function is skipped because
+ * it uses pipes:
+ *
+ * dcerpc_echo_TestBytePipeInOut_r()
+ */
+
+struct tevent_req *dcerpc_echo_TestBytePipeInOut_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct dcerpc_binding_handle *h,
+ uint32_t _num_chunks /* [in] */,
+ uint32_t _chunk_size /* [in] */,
+ struct echo_BytePipe *_out_pipe /* [in,out] [ref] */);
+NTSTATUS dcerpc_echo_TestBytePipeInOut_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ uint32_t *result);
/*
* The following function is skipped because
* it uses pipes:
*
- * dcerpc_echo_BytePipeIn()
+ * dcerpc_echo_TestBytePipeInOut()
*/
break;
}
case 10: {
- struct echo_BytePipeIn *r2 = (struct echo_BytePipeIn *)r;
+ struct echo_TestBytePipeIn *r2 = (struct echo_TestBytePipeIn *)r;
if (DEBUGLEVEL >= 10) {
- NDR_PRINT_FUNCTION_DEBUG(echo_BytePipeIn, NDR_IN, r2);
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeIn, NDR_IN, r2);
}
- r2->out.result = dcesrv_echo_BytePipeIn(dce_call, mem_ctx, r2);
+ r2->out.result = dcesrv_echo_TestBytePipeIn(dce_call, mem_ctx, r2);
if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
- DEBUG(5,("function echo_BytePipeIn will reply async\n"));
+ DEBUG(5,("function echo_TestBytePipeIn will reply async\n"));
+ }
+ break;
+ }
+ case 11: {
+ struct echo_TestBytePipeOut *r2 = (struct echo_TestBytePipeOut *)r;
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeOut, NDR_IN, r2);
+ }
+ r2->out.result = dcesrv_echo_TestBytePipeOut(dce_call, mem_ctx, r2);
+ if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
+ DEBUG(5,("function echo_TestBytePipeOut will reply async\n"));
+ }
+ break;
+ }
+ case 12: {
+ struct echo_TestBytePipeInOut *r2 = (struct echo_TestBytePipeInOut *)r;
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeInOut, NDR_IN, r2);
+ }
+ r2->out.result = dcesrv_echo_TestBytePipeInOut(dce_call, mem_ctx, r2);
+ if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
+ DEBUG(5,("function echo_TestBytePipeInOut will reply async\n"));
}
break;
}
break;
}
case 10: {
- struct echo_BytePipeIn *r2 = (struct echo_BytePipeIn *)r;
+ struct echo_TestBytePipeIn *r2 = (struct echo_TestBytePipeIn *)r;
+ if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
+ DEBUG(5,("function echo_TestBytePipeIn replied async\n"));
+ }
+ if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeIn, NDR_OUT | NDR_SET_VALUES, r2);
+ }
+ if (dce_call->fault_code != 0) {
+ DEBUG(2,("dcerpc_fault %s in echo_TestBytePipeIn\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
+ }
+ break;
+ }
+ case 11: {
+ struct echo_TestBytePipeOut *r2 = (struct echo_TestBytePipeOut *)r;
+ if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
+ DEBUG(5,("function echo_TestBytePipeOut replied async\n"));
+ }
+ if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeOut, NDR_OUT | NDR_SET_VALUES, r2);
+ }
+ if (dce_call->fault_code != 0) {
+ DEBUG(2,("dcerpc_fault %s in echo_TestBytePipeOut\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
+ }
+ break;
+ }
+ case 12: {
+ struct echo_TestBytePipeInOut *r2 = (struct echo_TestBytePipeInOut *)r;
if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
- DEBUG(5,("function echo_BytePipeIn replied async\n"));
+ DEBUG(5,("function echo_TestBytePipeInOut replied async\n"));
}
if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
- NDR_PRINT_FUNCTION_DEBUG(echo_BytePipeIn, NDR_OUT | NDR_SET_VALUES, r2);
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeInOut, NDR_OUT | NDR_SET_VALUES, r2);
}
if (dce_call->fault_code != 0) {
- DEBUG(2,("dcerpc_fault %s in echo_BytePipeIn\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
+ DEBUG(2,("dcerpc_fault %s in echo_TestBytePipeInOut\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
}
break;
}
return true;
}
-static bool api_echo_BytePipeIn(struct pipes_struct *p)
+static bool api_echo_TestBytePipeIn(struct pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
struct ndr_push *push;
enum ndr_err_code ndr_err;
- struct echo_BytePipeIn *r;
+ struct echo_TestBytePipeIn *r;
- call = &ndr_table_rpcecho.calls[NDR_ECHO_BYTEPIPEIN];
+ call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTBYTEPIPEIN];
- r = talloc(talloc_tos(), struct echo_BytePipeIn);
+ r = talloc(talloc_tos(), struct echo_TestBytePipeIn);
if (r == NULL) {
return false;
}
}
if (DEBUGLEVEL >= 10) {
- NDR_PRINT_FUNCTION_DEBUG(echo_BytePipeIn, NDR_IN, r);
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeIn, NDR_IN, r);
}
- r->out.result = _echo_BytePipeIn(p, r);
+ r->out.result = _echo_TestBytePipeIn(p, r);
if (p->fault_state) {
talloc_free(r);
}
if (DEBUGLEVEL >= 10) {
- NDR_PRINT_FUNCTION_DEBUG(echo_BytePipeIn, NDR_OUT | NDR_SET_VALUES, r);
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeIn, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_echo_TestBytePipeOut(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct echo_TestBytePipeOut *r;
+
+ call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTBYTEPIPEOUT];
+
+ r = talloc(talloc_tos(), struct echo_TestBytePipeOut);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeOut, NDR_IN, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.result = _echo_TestBytePipeOut(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeOut, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_echo_TestBytePipeInOut(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct echo_TestBytePipeInOut *r;
+
+ call = &ndr_table_rpcecho.calls[NDR_ECHO_TESTBYTEPIPEINOUT];
+
+ r = talloc(talloc_tos(), struct echo_TestBytePipeInOut);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeInOut, NDR_IN, r);
+ }
+
+ ZERO_STRUCT(r->out);
+ r->out.out_pipe = r->in.out_pipe;
+ r->out.result = _echo_TestBytePipeInOut(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(echo_TestBytePipeInOut, NDR_OUT | NDR_SET_VALUES, r);
}
push = ndr_push_init_ctx(r);
{"ECHO_TESTENUM", NDR_ECHO_TESTENUM, api_echo_TestEnum},
{"ECHO_TESTSURROUNDING", NDR_ECHO_TESTSURROUNDING, api_echo_TestSurrounding},
{"ECHO_TESTDOUBLEPOINTER", NDR_ECHO_TESTDOUBLEPOINTER, api_echo_TestDoublePointer},
- {"ECHO_BYTEPIPEIN", NDR_ECHO_BYTEPIPEIN, api_echo_BytePipeIn},
+ {"ECHO_TESTBYTEPIPEIN", NDR_ECHO_TESTBYTEPIPEIN, api_echo_TestBytePipeIn},
+ {"ECHO_TESTBYTEPIPEOUT", NDR_ECHO_TESTBYTEPIPEOUT, api_echo_TestBytePipeOut},
+ {"ECHO_TESTBYTEPIPEINOUT", NDR_ECHO_TESTBYTEPIPEINOUT, api_echo_TestBytePipeInOut},
};
void rpcecho_get_pipe_fns(struct api_struct **fns, int *n_fns)
void _echo_TestEnum(struct pipes_struct *p, struct echo_TestEnum *r);
void _echo_TestSurrounding(struct pipes_struct *p, struct echo_TestSurrounding *r);
uint16 _echo_TestDoublePointer(struct pipes_struct *p, struct echo_TestDoublePointer *r);
-uint32 _echo_BytePipeIn(struct pipes_struct *p, struct echo_BytePipeIn *r);
+uint32 _echo_TestBytePipeIn(struct pipes_struct *p, struct echo_TestBytePipeIn *r);
+uint32 _echo_TestBytePipeOut(struct pipes_struct *p, struct echo_TestBytePipeOut *r);
+uint32 _echo_TestBytePipeInOut(struct pipes_struct *p, struct echo_TestBytePipeInOut *r);
void rpcecho_get_pipe_fns(struct api_struct **fns, int *n_fns);
struct rpc_srv_callbacks;
NTSTATUS rpc_rpcecho_init(const struct rpc_srv_callbacks *rpc_srv_cb);
}
ZERO_STRUCT(r->out);
- r->out.byte_pipe = talloc_zero(r, struct frstrans_BytePipe);
- if (r->out.byte_pipe == NULL) {
- talloc_free(r);
- return false;
- }
-
r->out.result = _frstrans_RawGetFileDataAsync(p, r);
if (p->fault_state) {
}
ZERO_STRUCT(r->out);
- r->out.byte_pipe = talloc_zero(r, struct frstrans_BytePipe);
- if (r->out.byte_pipe == NULL) {
- talloc_free(r);
- return false;
- }
-
r->out.result = _frstrans_RdcGetFileDataAsync(p, r);
if (p->fault_state) {