git add -f bin/default/librpc/gen_ndr/*.[ch] bin/default/source*/librpc/gen_ndr/...
authorStefan Metzmacher <metze@samba.org>
Fri, 30 Aug 2013 07:08:44 +0000 (09:08 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jun 2019 11:14:55 +0000 (13:14 +0200)
bin.gen_ndr/default/librpc/gen_ndr/ndr_frstrans.c
bin.gen_ndr/default/librpc/gen_ndr/ndr_frstrans_c.c
bin.gen_ndr/default/librpc/gen_ndr/ndr_frstrans_c.h

index 460a3607d7c3b96442152b33f348a74260f311ae..26fefe26b1027f6bb76be04ba05563445b92fd51 100644 (file)
@@ -232,9 +232,6 @@ static enum ndr_err_code ndr_pull_frstrans_Update(struct ndr_pull *ndr, int ndr_
                        NDR_CHECK(ndr_check_string_terminator(ndr, length_name_0, sizeof(uint16_t)));
                        NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_0, sizeof(uint16_t), CH_UTF16));
                        NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
-                       if (r->name) {
-                               NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, 261));
-                       }
                        NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
                }
                if (ndr_flags & NDR_BUFFERS) {
index d530da06c73a750cb84482c17097f0a1d6cda4d7..82eb527ecc3335aac4050c048c32000ee6806da0 100644 (file)
@@ -8,6 +8,170 @@
 
 /* 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;
 };
index 4055b12b66d6940d267c8dc7d762a3da5b6008c6..e1c122e6382c0d7a0d1d471813ef8246d842c785 100644 (file)
@@ -5,6 +5,21 @@
 
 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,