/* frstrans - client functions generated by pidl */
+struct frstrans_BytePipe {
+ struct dcerpc_pipe_handle_connection *pc;
+};
+
+struct frstrans_BytePipe *dcerpc_frstrans_BytePipe_create(TALLOC_CTX *mem_ctx)
+{
+ struct frstrans_BytePipe *p;
+
+ p = talloc_zero(mem_ctx, struct frstrans_BytePipe);
+ if (p == NULL) {
+ return NULL;
+ }
+
+ /* the pipe is disconnected by default */
+ p->pc = dcerpc_pipe_handle_connection_create(p,
+ "frstrans_BytePipe_chunk",
+ sizeof(struct frstrans_BytePipe_chunk));
+ if (p->pc == NULL) {
+ TALLOC_FREE(p);
+ return NULL;
+ }
+
+ return p;
+}
+
+struct dcerpc_frstrans_BytePipe_chunk_push_state {
+ uint8_t dummy;
+};
+
+static void dcerpc_frstrans_BytePipe_chunk_push_done(struct tevent_req *subreq);
+
+struct tevent_req *dcerpc_frstrans_BytePipe_chunk_push_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct frstrans_BytePipe *p,
+ const struct frstrans_BytePipe_chunk *chunk)
+{
+ struct tevent_req *req;
+ struct dcerpc_frstrans_BytePipe_chunk_push_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_frstrans_BytePipe_chunk_push_state);
+ if (req == NULL) {
+ return NULL;
+ }
+
+ subreq = dcerpc_pipe_handle_push_send(state, ev,
+ p->pc, chunk);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, dcerpc_frstrans_BytePipe_chunk_push_done, req);
+
+ return req;
+}
+
+static void dcerpc_frstrans_BytePipe_chunk_push_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req =
+ tevent_req_callback_data(subreq,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = dcerpc_pipe_handle_push_recv(subreq);
+ TALLOC_FREE(subreq);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_frstrans_BytePipe_chunk_push_recv(struct tevent_req *req)
+{
+ struct dcerpc_frstrans_BytePipe_chunk_push_state *state =
+ tevent_req_data(req,
+ struct dcerpc_frstrans_BytePipe_chunk_push_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ /*
+ * We want the tevent_req_data() protection,
+ * but don't need 'state', so just pretend we use it
+ * in order to avoid compiler warnings.
+ */
+ state->dummy = 0;
+ tevent_req_received(req);
+ return status;
+ }
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
+struct dcerpc_frstrans_BytePipe_chunk_pull_state {
+ struct frstrans_BytePipe_chunk *chunk;
+};
+
+static void dcerpc_frstrans_BytePipe_chunk_pull_done(struct tevent_req *subreq);
+
+struct tevent_req *dcerpc_frstrans_BytePipe_chunk_pull_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct frstrans_BytePipe *p)
+{
+ struct tevent_req *req;
+ struct dcerpc_frstrans_BytePipe_chunk_pull_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct dcerpc_frstrans_BytePipe_chunk_pull_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->chunk = talloc_zero(state, struct frstrans_BytePipe_chunk);
+ if (tevent_req_nomem(state->chunk, req)) {
+ return tevent_req_post(req, ev);
+ }
+
+ subreq = dcerpc_pipe_handle_pull_send(state, ev,
+ p->pc, state->chunk, state->chunk);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, dcerpc_frstrans_BytePipe_chunk_pull_done, req);
+
+ return req;
+}
+
+static void dcerpc_frstrans_BytePipe_chunk_pull_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req =
+ tevent_req_callback_data(subreq,
+ struct tevent_req);
+ NTSTATUS status;
+
+ status = dcerpc_pipe_handle_pull_recv(subreq);
+ TALLOC_FREE(subreq);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS dcerpc_frstrans_BytePipe_chunk_pull_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ struct frstrans_BytePipe_chunk **chunk)
+{
+ struct dcerpc_frstrans_BytePipe_chunk_pull_state *state =
+ tevent_req_data(req,
+ struct dcerpc_frstrans_BytePipe_chunk_pull_state);
+ NTSTATUS status;
+
+ if (tevent_req_is_nterror(req, &status)) {
+ tevent_req_received(req);
+ return status;
+ }
+
+ *chunk = talloc_move(mem_ctx, &state->chunk);
+
+ tevent_req_received(req);
+ return NT_STATUS_OK;
+}
+
struct dcerpc_frstrans_CheckConnectivity_r_state {
TALLOC_CTX *out_mem_ctx;
};
extern const struct ndr_interface_table ndr_table_frstrans;
+/* frstrans_BytePipe */
+struct frstrans_BytePipe;
+struct frstrans_BytePipe *dcerpc_frstrans_BytePipe_create(TALLOC_CTX *mem_ctx);
+struct tevent_req *dcerpc_frstrans_BytePipe_chunk_push_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct frstrans_BytePipe *p,
+ const struct frstrans_BytePipe_chunk *chunk);
+NTSTATUS dcerpc_frstrans_BytePipe_chunk_push_recv(struct tevent_req *req);
+struct tevent_req *dcerpc_frstrans_BytePipe_chunk_pull_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct frstrans_BytePipe *p);
+NTSTATUS dcerpc_frstrans_BytePipe_chunk_pull_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ struct frstrans_BytePipe_chunk **chunk);
+
struct tevent_req *dcerpc_frstrans_CheckConnectivity_r_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct dcerpc_binding_handle *h,