LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_clusapi_c.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 0 16382 0.0 %
Date: 2021-09-23 10:06:22 Functions: 0 1472 0.0 %

          Line data    Source code
       1             : /* client functions auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include <tevent.h>
       5             : #include "lib/util/tevent_ntstatus.h"
       6             : #include "bin/default/librpc/gen_ndr/ndr_clusapi.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_clusapi_c.h"
       8             : 
       9             : /* clusapi - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_clusapi_OpenCluster_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_clusapi_OpenCluster_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_clusapi_OpenCluster_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct clusapi_OpenCluster *r)
      21             : {
      22             :         struct tevent_req *req;
      23             :         struct dcerpc_clusapi_OpenCluster_r_state *state;
      24             :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_clusapi_OpenCluster_r_state);
      28           0 :         if (req == NULL) {
      29           0 :                 return NULL;
      30             :         }
      31             : 
      32           0 :         state->out_mem_ctx = talloc_new(state);
      33           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
      34           0 :                 return tevent_req_post(req, ev);
      35             :         }
      36             : 
      37           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
      38             :                         NULL, &ndr_table_clusapi,
      39           0 :                         NDR_CLUSAPI_OPENCLUSTER, state->out_mem_ctx, r);
      40           0 :         if (tevent_req_nomem(subreq, req)) {
      41           0 :                 return tevent_req_post(req, ev);
      42             :         }
      43           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OpenCluster_r_done, req);
      44             : 
      45           0 :         return req;
      46             : }
      47             : 
      48           0 : static void dcerpc_clusapi_OpenCluster_r_done(struct tevent_req *subreq)
      49             : {
      50           0 :         struct tevent_req *req =
      51           0 :                 tevent_req_callback_data(subreq,
      52             :                 struct tevent_req);
      53             :         NTSTATUS status;
      54             : 
      55           0 :         status = dcerpc_binding_handle_call_recv(subreq);
      56           0 :         TALLOC_FREE(subreq);
      57           0 :         if (tevent_req_nterror(req, status)) {
      58           0 :                 return;
      59             :         }
      60             : 
      61           0 :         tevent_req_done(req);
      62             : }
      63             : 
      64           0 : NTSTATUS dcerpc_clusapi_OpenCluster_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_clusapi_OpenCluster_r_state *state =
      67           0 :                 tevent_req_data(req,
      68             :                 struct dcerpc_clusapi_OpenCluster_r_state);
      69             :         NTSTATUS status;
      70             : 
      71           0 :         if (tevent_req_is_nterror(req, &status)) {
      72           0 :                 tevent_req_received(req);
      73           0 :                 return status;
      74             :         }
      75             : 
      76           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      77             : 
      78           0 :         tevent_req_received(req);
      79           0 :         return NT_STATUS_OK;
      80             : }
      81             : 
      82           0 : NTSTATUS dcerpc_clusapi_OpenCluster_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_OpenCluster *r)
      83             : {
      84             :         NTSTATUS status;
      85             : 
      86           0 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_clusapi,
      88             :                         NDR_CLUSAPI_OPENCLUSTER, mem_ctx, r);
      89             : 
      90           0 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_clusapi_OpenCluster_state {
      94             :         struct clusapi_OpenCluster orig;
      95             :         struct clusapi_OpenCluster tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_clusapi_OpenCluster_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_clusapi_OpenCluster_send(TALLOC_CTX *mem_ctx,
     102             :                                                    struct tevent_context *ev,
     103             :                                                    struct dcerpc_binding_handle *h,
     104             :                                                    WERROR *_Status /* [out] [ref] */,
     105             :                                                    struct policy_handle *_Cluster /* [out] [ref] */)
     106             : {
     107             :         struct tevent_req *req;
     108             :         struct dcerpc_clusapi_OpenCluster_state *state;
     109             :         struct tevent_req *subreq;
     110             : 
     111           0 :         req = tevent_req_create(mem_ctx, &state,
     112             :                                 struct dcerpc_clusapi_OpenCluster_state);
     113           0 :         if (req == NULL) {
     114           0 :                 return NULL;
     115             :         }
     116           0 :         state->out_mem_ctx = NULL;
     117             : 
     118             :         /* In parameters */
     119             : 
     120             :         /* Out parameters */
     121           0 :         state->orig.out.Status = _Status;
     122           0 :         state->orig.out.Cluster = _Cluster;
     123             : 
     124           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     125             :                              "dcerpc_clusapi_OpenCluster_out_memory");
     126           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     127           0 :                 return tevent_req_post(req, ev);
     128             :         }
     129             : 
     130             :         /* make a temporary copy, that we pass to the dispatch function */
     131           0 :         state->tmp = state->orig;
     132             : 
     133           0 :         subreq = dcerpc_clusapi_OpenCluster_r_send(state, ev, h, &state->tmp);
     134           0 :         if (tevent_req_nomem(subreq, req)) {
     135           0 :                 return tevent_req_post(req, ev);
     136             :         }
     137           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OpenCluster_done, req);
     138           0 :         return req;
     139             : }
     140             : 
     141           0 : static void dcerpc_clusapi_OpenCluster_done(struct tevent_req *subreq)
     142             : {
     143           0 :         struct tevent_req *req = tevent_req_callback_data(
     144             :                 subreq, struct tevent_req);
     145           0 :         struct dcerpc_clusapi_OpenCluster_state *state = tevent_req_data(
     146             :                 req, struct dcerpc_clusapi_OpenCluster_state);
     147             :         NTSTATUS status;
     148             :         TALLOC_CTX *mem_ctx;
     149             : 
     150           0 :         if (state->out_mem_ctx) {
     151           0 :                 mem_ctx = state->out_mem_ctx;
     152             :         } else {
     153           0 :                 mem_ctx = state;
     154             :         }
     155             : 
     156           0 :         status = dcerpc_clusapi_OpenCluster_r_recv(subreq, mem_ctx);
     157           0 :         TALLOC_FREE(subreq);
     158           0 :         if (tevent_req_nterror(req, status)) {
     159           0 :                 return;
     160             :         }
     161             : 
     162             :         /* Copy out parameters */
     163           0 :         *state->orig.out.Status = *state->tmp.out.Status;
     164           0 :         *state->orig.out.Cluster = *state->tmp.out.Cluster;
     165             : 
     166             :         /* Reset temporary structure */
     167           0 :         NDR_ZERO_STRUCT(state->tmp);
     168             : 
     169           0 :         tevent_req_done(req);
     170             : }
     171             : 
     172           0 : NTSTATUS dcerpc_clusapi_OpenCluster_recv(struct tevent_req *req,
     173             :                                          TALLOC_CTX *mem_ctx)
     174             : {
     175           0 :         struct dcerpc_clusapi_OpenCluster_state *state = tevent_req_data(
     176             :                 req, struct dcerpc_clusapi_OpenCluster_state);
     177             :         NTSTATUS status;
     178             : 
     179           0 :         if (tevent_req_is_nterror(req, &status)) {
     180           0 :                 tevent_req_received(req);
     181           0 :                 return status;
     182             :         }
     183             : 
     184             :         /* Steal possible out parameters to the callers context */
     185           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     186             : 
     187           0 :         tevent_req_received(req);
     188           0 :         return NT_STATUS_OK;
     189             : }
     190             : 
     191           0 : NTSTATUS dcerpc_clusapi_OpenCluster(struct dcerpc_binding_handle *h,
     192             :                                     TALLOC_CTX *mem_ctx,
     193             :                                     WERROR *_Status /* [out] [ref] */,
     194             :                                     struct policy_handle *_Cluster /* [out] [ref] */)
     195             : {
     196             :         struct clusapi_OpenCluster r;
     197             :         NTSTATUS status;
     198             : 
     199             :         /* In parameters */
     200             : 
     201             :         /* Out parameters */
     202           0 :         r.out.Status = _Status;
     203           0 :         r.out.Cluster = _Cluster;
     204             : 
     205           0 :         status = dcerpc_clusapi_OpenCluster_r(h, mem_ctx, &r);
     206           0 :         if (!NT_STATUS_IS_OK(status)) {
     207           0 :                 return status;
     208             :         }
     209             : 
     210             :         /* Return variables */
     211           0 :         *_Status = *r.out.Status;
     212           0 :         *_Cluster = *r.out.Cluster;
     213             : 
     214             :         /* Return result */
     215             : 
     216           0 :         return NT_STATUS_OK;
     217             : }
     218             : 
     219             : struct dcerpc_clusapi_CloseCluster_r_state {
     220             :         TALLOC_CTX *out_mem_ctx;
     221             : };
     222             : 
     223             : static void dcerpc_clusapi_CloseCluster_r_done(struct tevent_req *subreq);
     224             : 
     225           0 : struct tevent_req *dcerpc_clusapi_CloseCluster_r_send(TALLOC_CTX *mem_ctx,
     226             :         struct tevent_context *ev,
     227             :         struct dcerpc_binding_handle *h,
     228             :         struct clusapi_CloseCluster *r)
     229             : {
     230             :         struct tevent_req *req;
     231             :         struct dcerpc_clusapi_CloseCluster_r_state *state;
     232             :         struct tevent_req *subreq;
     233             : 
     234           0 :         req = tevent_req_create(mem_ctx, &state,
     235             :                                 struct dcerpc_clusapi_CloseCluster_r_state);
     236           0 :         if (req == NULL) {
     237           0 :                 return NULL;
     238             :         }
     239             : 
     240           0 :         state->out_mem_ctx = talloc_new(state);
     241           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     242           0 :                 return tevent_req_post(req, ev);
     243             :         }
     244             : 
     245           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     246             :                         NULL, &ndr_table_clusapi,
     247           0 :                         NDR_CLUSAPI_CLOSECLUSTER, state->out_mem_ctx, r);
     248           0 :         if (tevent_req_nomem(subreq, req)) {
     249           0 :                 return tevent_req_post(req, ev);
     250             :         }
     251           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CloseCluster_r_done, req);
     252             : 
     253           0 :         return req;
     254             : }
     255             : 
     256           0 : static void dcerpc_clusapi_CloseCluster_r_done(struct tevent_req *subreq)
     257             : {
     258           0 :         struct tevent_req *req =
     259           0 :                 tevent_req_callback_data(subreq,
     260             :                 struct tevent_req);
     261             :         NTSTATUS status;
     262             : 
     263           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     264           0 :         TALLOC_FREE(subreq);
     265           0 :         if (tevent_req_nterror(req, status)) {
     266           0 :                 return;
     267             :         }
     268             : 
     269           0 :         tevent_req_done(req);
     270             : }
     271             : 
     272           0 : NTSTATUS dcerpc_clusapi_CloseCluster_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     273             : {
     274           0 :         struct dcerpc_clusapi_CloseCluster_r_state *state =
     275           0 :                 tevent_req_data(req,
     276             :                 struct dcerpc_clusapi_CloseCluster_r_state);
     277             :         NTSTATUS status;
     278             : 
     279           0 :         if (tevent_req_is_nterror(req, &status)) {
     280           0 :                 tevent_req_received(req);
     281           0 :                 return status;
     282             :         }
     283             : 
     284           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     285             : 
     286           0 :         tevent_req_received(req);
     287           0 :         return NT_STATUS_OK;
     288             : }
     289             : 
     290           0 : NTSTATUS dcerpc_clusapi_CloseCluster_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CloseCluster *r)
     291             : {
     292             :         NTSTATUS status;
     293             : 
     294           0 :         status = dcerpc_binding_handle_call(h,
     295             :                         NULL, &ndr_table_clusapi,
     296             :                         NDR_CLUSAPI_CLOSECLUSTER, mem_ctx, r);
     297             : 
     298           0 :         return status;
     299             : }
     300             : 
     301             : struct dcerpc_clusapi_CloseCluster_state {
     302             :         struct clusapi_CloseCluster orig;
     303             :         struct clusapi_CloseCluster tmp;
     304             :         TALLOC_CTX *out_mem_ctx;
     305             : };
     306             : 
     307             : static void dcerpc_clusapi_CloseCluster_done(struct tevent_req *subreq);
     308             : 
     309           0 : struct tevent_req *dcerpc_clusapi_CloseCluster_send(TALLOC_CTX *mem_ctx,
     310             :                                                     struct tevent_context *ev,
     311             :                                                     struct dcerpc_binding_handle *h,
     312             :                                                     struct policy_handle *_Cluster /* [in,out] [ref] */)
     313             : {
     314             :         struct tevent_req *req;
     315             :         struct dcerpc_clusapi_CloseCluster_state *state;
     316             :         struct tevent_req *subreq;
     317             : 
     318           0 :         req = tevent_req_create(mem_ctx, &state,
     319             :                                 struct dcerpc_clusapi_CloseCluster_state);
     320           0 :         if (req == NULL) {
     321           0 :                 return NULL;
     322             :         }
     323           0 :         state->out_mem_ctx = NULL;
     324             : 
     325             :         /* In parameters */
     326           0 :         state->orig.in.Cluster = _Cluster;
     327             : 
     328             :         /* Out parameters */
     329           0 :         state->orig.out.Cluster = _Cluster;
     330             : 
     331             :         /* Result */
     332           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     333             : 
     334           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     335             :                              "dcerpc_clusapi_CloseCluster_out_memory");
     336           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     337           0 :                 return tevent_req_post(req, ev);
     338             :         }
     339             : 
     340             :         /* make a temporary copy, that we pass to the dispatch function */
     341           0 :         state->tmp = state->orig;
     342             : 
     343           0 :         subreq = dcerpc_clusapi_CloseCluster_r_send(state, ev, h, &state->tmp);
     344           0 :         if (tevent_req_nomem(subreq, req)) {
     345           0 :                 return tevent_req_post(req, ev);
     346             :         }
     347           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CloseCluster_done, req);
     348           0 :         return req;
     349             : }
     350             : 
     351           0 : static void dcerpc_clusapi_CloseCluster_done(struct tevent_req *subreq)
     352             : {
     353           0 :         struct tevent_req *req = tevent_req_callback_data(
     354             :                 subreq, struct tevent_req);
     355           0 :         struct dcerpc_clusapi_CloseCluster_state *state = tevent_req_data(
     356             :                 req, struct dcerpc_clusapi_CloseCluster_state);
     357             :         NTSTATUS status;
     358             :         TALLOC_CTX *mem_ctx;
     359             : 
     360           0 :         if (state->out_mem_ctx) {
     361           0 :                 mem_ctx = state->out_mem_ctx;
     362             :         } else {
     363           0 :                 mem_ctx = state;
     364             :         }
     365             : 
     366           0 :         status = dcerpc_clusapi_CloseCluster_r_recv(subreq, mem_ctx);
     367           0 :         TALLOC_FREE(subreq);
     368           0 :         if (tevent_req_nterror(req, status)) {
     369           0 :                 return;
     370             :         }
     371             : 
     372             :         /* Copy out parameters */
     373           0 :         *state->orig.out.Cluster = *state->tmp.out.Cluster;
     374             : 
     375             :         /* Copy result */
     376           0 :         state->orig.out.result = state->tmp.out.result;
     377             : 
     378             :         /* Reset temporary structure */
     379           0 :         NDR_ZERO_STRUCT(state->tmp);
     380             : 
     381           0 :         tevent_req_done(req);
     382             : }
     383             : 
     384           0 : NTSTATUS dcerpc_clusapi_CloseCluster_recv(struct tevent_req *req,
     385             :                                           TALLOC_CTX *mem_ctx,
     386             :                                           WERROR *result)
     387             : {
     388           0 :         struct dcerpc_clusapi_CloseCluster_state *state = tevent_req_data(
     389             :                 req, struct dcerpc_clusapi_CloseCluster_state);
     390             :         NTSTATUS status;
     391             : 
     392           0 :         if (tevent_req_is_nterror(req, &status)) {
     393           0 :                 tevent_req_received(req);
     394           0 :                 return status;
     395             :         }
     396             : 
     397             :         /* Steal possible out parameters to the callers context */
     398           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     399             : 
     400             :         /* Return result */
     401           0 :         *result = state->orig.out.result;
     402             : 
     403           0 :         tevent_req_received(req);
     404           0 :         return NT_STATUS_OK;
     405             : }
     406             : 
     407           0 : NTSTATUS dcerpc_clusapi_CloseCluster(struct dcerpc_binding_handle *h,
     408             :                                      TALLOC_CTX *mem_ctx,
     409             :                                      struct policy_handle *_Cluster /* [in,out] [ref] */,
     410             :                                      WERROR *result)
     411             : {
     412             :         struct clusapi_CloseCluster r;
     413             :         NTSTATUS status;
     414             : 
     415             :         /* In parameters */
     416           0 :         r.in.Cluster = _Cluster;
     417             : 
     418             :         /* Out parameters */
     419           0 :         r.out.Cluster = _Cluster;
     420             : 
     421             :         /* Result */
     422           0 :         NDR_ZERO_STRUCT(r.out.result);
     423             : 
     424           0 :         status = dcerpc_clusapi_CloseCluster_r(h, mem_ctx, &r);
     425           0 :         if (!NT_STATUS_IS_OK(status)) {
     426           0 :                 return status;
     427             :         }
     428             : 
     429             :         /* Return variables */
     430           0 :         *_Cluster = *r.out.Cluster;
     431             : 
     432             :         /* Return result */
     433           0 :         *result = r.out.result;
     434             : 
     435           0 :         return NT_STATUS_OK;
     436             : }
     437             : 
     438             : struct dcerpc_clusapi_SetClusterName_r_state {
     439             :         TALLOC_CTX *out_mem_ctx;
     440             : };
     441             : 
     442             : static void dcerpc_clusapi_SetClusterName_r_done(struct tevent_req *subreq);
     443             : 
     444           0 : struct tevent_req *dcerpc_clusapi_SetClusterName_r_send(TALLOC_CTX *mem_ctx,
     445             :         struct tevent_context *ev,
     446             :         struct dcerpc_binding_handle *h,
     447             :         struct clusapi_SetClusterName *r)
     448             : {
     449             :         struct tevent_req *req;
     450             :         struct dcerpc_clusapi_SetClusterName_r_state *state;
     451             :         struct tevent_req *subreq;
     452             : 
     453           0 :         req = tevent_req_create(mem_ctx, &state,
     454             :                                 struct dcerpc_clusapi_SetClusterName_r_state);
     455           0 :         if (req == NULL) {
     456           0 :                 return NULL;
     457             :         }
     458             : 
     459           0 :         state->out_mem_ctx = talloc_new(state);
     460           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     461           0 :                 return tevent_req_post(req, ev);
     462             :         }
     463             : 
     464           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     465             :                         NULL, &ndr_table_clusapi,
     466           0 :                         NDR_CLUSAPI_SETCLUSTERNAME, state->out_mem_ctx, r);
     467           0 :         if (tevent_req_nomem(subreq, req)) {
     468           0 :                 return tevent_req_post(req, ev);
     469             :         }
     470           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetClusterName_r_done, req);
     471             : 
     472           0 :         return req;
     473             : }
     474             : 
     475           0 : static void dcerpc_clusapi_SetClusterName_r_done(struct tevent_req *subreq)
     476             : {
     477           0 :         struct tevent_req *req =
     478           0 :                 tevent_req_callback_data(subreq,
     479             :                 struct tevent_req);
     480             :         NTSTATUS status;
     481             : 
     482           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     483           0 :         TALLOC_FREE(subreq);
     484           0 :         if (tevent_req_nterror(req, status)) {
     485           0 :                 return;
     486             :         }
     487             : 
     488           0 :         tevent_req_done(req);
     489             : }
     490             : 
     491           0 : NTSTATUS dcerpc_clusapi_SetClusterName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     492             : {
     493           0 :         struct dcerpc_clusapi_SetClusterName_r_state *state =
     494           0 :                 tevent_req_data(req,
     495             :                 struct dcerpc_clusapi_SetClusterName_r_state);
     496             :         NTSTATUS status;
     497             : 
     498           0 :         if (tevent_req_is_nterror(req, &status)) {
     499           0 :                 tevent_req_received(req);
     500           0 :                 return status;
     501             :         }
     502             : 
     503           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     504             : 
     505           0 :         tevent_req_received(req);
     506           0 :         return NT_STATUS_OK;
     507             : }
     508             : 
     509           0 : NTSTATUS dcerpc_clusapi_SetClusterName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_SetClusterName *r)
     510             : {
     511             :         NTSTATUS status;
     512             : 
     513           0 :         status = dcerpc_binding_handle_call(h,
     514             :                         NULL, &ndr_table_clusapi,
     515             :                         NDR_CLUSAPI_SETCLUSTERNAME, mem_ctx, r);
     516             : 
     517           0 :         return status;
     518             : }
     519             : 
     520             : struct dcerpc_clusapi_SetClusterName_state {
     521             :         struct clusapi_SetClusterName orig;
     522             :         struct clusapi_SetClusterName tmp;
     523             :         TALLOC_CTX *out_mem_ctx;
     524             : };
     525             : 
     526             : static void dcerpc_clusapi_SetClusterName_done(struct tevent_req *subreq);
     527             : 
     528           0 : struct tevent_req *dcerpc_clusapi_SetClusterName_send(TALLOC_CTX *mem_ctx,
     529             :                                                       struct tevent_context *ev,
     530             :                                                       struct dcerpc_binding_handle *h,
     531             :                                                       const char *_NewClusterName /* [in] [charset(UTF16),ref] */,
     532             :                                                       WERROR *_rpc_status /* [out] [ref] */)
     533             : {
     534             :         struct tevent_req *req;
     535             :         struct dcerpc_clusapi_SetClusterName_state *state;
     536             :         struct tevent_req *subreq;
     537             : 
     538           0 :         req = tevent_req_create(mem_ctx, &state,
     539             :                                 struct dcerpc_clusapi_SetClusterName_state);
     540           0 :         if (req == NULL) {
     541           0 :                 return NULL;
     542             :         }
     543           0 :         state->out_mem_ctx = NULL;
     544             : 
     545             :         /* In parameters */
     546           0 :         state->orig.in.NewClusterName = _NewClusterName;
     547             : 
     548             :         /* Out parameters */
     549           0 :         state->orig.out.rpc_status = _rpc_status;
     550             : 
     551             :         /* Result */
     552           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     553             : 
     554           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     555             :                              "dcerpc_clusapi_SetClusterName_out_memory");
     556           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     557           0 :                 return tevent_req_post(req, ev);
     558             :         }
     559             : 
     560             :         /* make a temporary copy, that we pass to the dispatch function */
     561           0 :         state->tmp = state->orig;
     562             : 
     563           0 :         subreq = dcerpc_clusapi_SetClusterName_r_send(state, ev, h, &state->tmp);
     564           0 :         if (tevent_req_nomem(subreq, req)) {
     565           0 :                 return tevent_req_post(req, ev);
     566             :         }
     567           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetClusterName_done, req);
     568           0 :         return req;
     569             : }
     570             : 
     571           0 : static void dcerpc_clusapi_SetClusterName_done(struct tevent_req *subreq)
     572             : {
     573           0 :         struct tevent_req *req = tevent_req_callback_data(
     574             :                 subreq, struct tevent_req);
     575           0 :         struct dcerpc_clusapi_SetClusterName_state *state = tevent_req_data(
     576             :                 req, struct dcerpc_clusapi_SetClusterName_state);
     577             :         NTSTATUS status;
     578             :         TALLOC_CTX *mem_ctx;
     579             : 
     580           0 :         if (state->out_mem_ctx) {
     581           0 :                 mem_ctx = state->out_mem_ctx;
     582             :         } else {
     583           0 :                 mem_ctx = state;
     584             :         }
     585             : 
     586           0 :         status = dcerpc_clusapi_SetClusterName_r_recv(subreq, mem_ctx);
     587           0 :         TALLOC_FREE(subreq);
     588           0 :         if (tevent_req_nterror(req, status)) {
     589           0 :                 return;
     590             :         }
     591             : 
     592             :         /* Copy out parameters */
     593           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
     594             : 
     595             :         /* Copy result */
     596           0 :         state->orig.out.result = state->tmp.out.result;
     597             : 
     598             :         /* Reset temporary structure */
     599           0 :         NDR_ZERO_STRUCT(state->tmp);
     600             : 
     601           0 :         tevent_req_done(req);
     602             : }
     603             : 
     604           0 : NTSTATUS dcerpc_clusapi_SetClusterName_recv(struct tevent_req *req,
     605             :                                             TALLOC_CTX *mem_ctx,
     606             :                                             WERROR *result)
     607             : {
     608           0 :         struct dcerpc_clusapi_SetClusterName_state *state = tevent_req_data(
     609             :                 req, struct dcerpc_clusapi_SetClusterName_state);
     610             :         NTSTATUS status;
     611             : 
     612           0 :         if (tevent_req_is_nterror(req, &status)) {
     613           0 :                 tevent_req_received(req);
     614           0 :                 return status;
     615             :         }
     616             : 
     617             :         /* Steal possible out parameters to the callers context */
     618           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     619             : 
     620             :         /* Return result */
     621           0 :         *result = state->orig.out.result;
     622             : 
     623           0 :         tevent_req_received(req);
     624           0 :         return NT_STATUS_OK;
     625             : }
     626             : 
     627           0 : NTSTATUS dcerpc_clusapi_SetClusterName(struct dcerpc_binding_handle *h,
     628             :                                        TALLOC_CTX *mem_ctx,
     629             :                                        const char *_NewClusterName /* [in] [charset(UTF16),ref] */,
     630             :                                        WERROR *_rpc_status /* [out] [ref] */,
     631             :                                        WERROR *result)
     632             : {
     633             :         struct clusapi_SetClusterName r;
     634             :         NTSTATUS status;
     635             : 
     636             :         /* In parameters */
     637           0 :         r.in.NewClusterName = _NewClusterName;
     638             : 
     639             :         /* Out parameters */
     640           0 :         r.out.rpc_status = _rpc_status;
     641             : 
     642             :         /* Result */
     643           0 :         NDR_ZERO_STRUCT(r.out.result);
     644             : 
     645           0 :         status = dcerpc_clusapi_SetClusterName_r(h, mem_ctx, &r);
     646           0 :         if (!NT_STATUS_IS_OK(status)) {
     647           0 :                 return status;
     648             :         }
     649             : 
     650             :         /* Return variables */
     651           0 :         *_rpc_status = *r.out.rpc_status;
     652             : 
     653             :         /* Return result */
     654           0 :         *result = r.out.result;
     655             : 
     656           0 :         return NT_STATUS_OK;
     657             : }
     658             : 
     659             : struct dcerpc_clusapi_GetClusterName_r_state {
     660             :         TALLOC_CTX *out_mem_ctx;
     661             : };
     662             : 
     663             : static void dcerpc_clusapi_GetClusterName_r_done(struct tevent_req *subreq);
     664             : 
     665           0 : struct tevent_req *dcerpc_clusapi_GetClusterName_r_send(TALLOC_CTX *mem_ctx,
     666             :         struct tevent_context *ev,
     667             :         struct dcerpc_binding_handle *h,
     668             :         struct clusapi_GetClusterName *r)
     669             : {
     670             :         struct tevent_req *req;
     671             :         struct dcerpc_clusapi_GetClusterName_r_state *state;
     672             :         struct tevent_req *subreq;
     673             : 
     674           0 :         req = tevent_req_create(mem_ctx, &state,
     675             :                                 struct dcerpc_clusapi_GetClusterName_r_state);
     676           0 :         if (req == NULL) {
     677           0 :                 return NULL;
     678             :         }
     679             : 
     680           0 :         state->out_mem_ctx = talloc_new(state);
     681           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     682           0 :                 return tevent_req_post(req, ev);
     683             :         }
     684             : 
     685           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     686             :                         NULL, &ndr_table_clusapi,
     687           0 :                         NDR_CLUSAPI_GETCLUSTERNAME, state->out_mem_ctx, r);
     688           0 :         if (tevent_req_nomem(subreq, req)) {
     689           0 :                 return tevent_req_post(req, ev);
     690             :         }
     691           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetClusterName_r_done, req);
     692             : 
     693           0 :         return req;
     694             : }
     695             : 
     696           0 : static void dcerpc_clusapi_GetClusterName_r_done(struct tevent_req *subreq)
     697             : {
     698           0 :         struct tevent_req *req =
     699           0 :                 tevent_req_callback_data(subreq,
     700             :                 struct tevent_req);
     701             :         NTSTATUS status;
     702             : 
     703           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     704           0 :         TALLOC_FREE(subreq);
     705           0 :         if (tevent_req_nterror(req, status)) {
     706           0 :                 return;
     707             :         }
     708             : 
     709           0 :         tevent_req_done(req);
     710             : }
     711             : 
     712           0 : NTSTATUS dcerpc_clusapi_GetClusterName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     713             : {
     714           0 :         struct dcerpc_clusapi_GetClusterName_r_state *state =
     715           0 :                 tevent_req_data(req,
     716             :                 struct dcerpc_clusapi_GetClusterName_r_state);
     717             :         NTSTATUS status;
     718             : 
     719           0 :         if (tevent_req_is_nterror(req, &status)) {
     720           0 :                 tevent_req_received(req);
     721           0 :                 return status;
     722             :         }
     723             : 
     724           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     725             : 
     726           0 :         tevent_req_received(req);
     727           0 :         return NT_STATUS_OK;
     728             : }
     729             : 
     730           0 : NTSTATUS dcerpc_clusapi_GetClusterName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetClusterName *r)
     731             : {
     732             :         NTSTATUS status;
     733             : 
     734           0 :         status = dcerpc_binding_handle_call(h,
     735             :                         NULL, &ndr_table_clusapi,
     736             :                         NDR_CLUSAPI_GETCLUSTERNAME, mem_ctx, r);
     737             : 
     738           0 :         return status;
     739             : }
     740             : 
     741             : struct dcerpc_clusapi_GetClusterName_state {
     742             :         struct clusapi_GetClusterName orig;
     743             :         struct clusapi_GetClusterName tmp;
     744             :         TALLOC_CTX *out_mem_ctx;
     745             : };
     746             : 
     747             : static void dcerpc_clusapi_GetClusterName_done(struct tevent_req *subreq);
     748             : 
     749           0 : struct tevent_req *dcerpc_clusapi_GetClusterName_send(TALLOC_CTX *mem_ctx,
     750             :                                                       struct tevent_context *ev,
     751             :                                                       struct dcerpc_binding_handle *h,
     752             :                                                       const char **_ClusterName /* [out] [charset(UTF16),ref] */,
     753             :                                                       const char **_NodeName /* [out] [charset(UTF16),ref] */)
     754             : {
     755             :         struct tevent_req *req;
     756             :         struct dcerpc_clusapi_GetClusterName_state *state;
     757             :         struct tevent_req *subreq;
     758             : 
     759           0 :         req = tevent_req_create(mem_ctx, &state,
     760             :                                 struct dcerpc_clusapi_GetClusterName_state);
     761           0 :         if (req == NULL) {
     762           0 :                 return NULL;
     763             :         }
     764           0 :         state->out_mem_ctx = NULL;
     765             : 
     766             :         /* In parameters */
     767             : 
     768             :         /* Out parameters */
     769           0 :         state->orig.out.ClusterName = _ClusterName;
     770           0 :         state->orig.out.NodeName = _NodeName;
     771             : 
     772             :         /* Result */
     773           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     774             : 
     775           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     776             :                              "dcerpc_clusapi_GetClusterName_out_memory");
     777           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     778           0 :                 return tevent_req_post(req, ev);
     779             :         }
     780             : 
     781             :         /* make a temporary copy, that we pass to the dispatch function */
     782           0 :         state->tmp = state->orig;
     783             : 
     784           0 :         subreq = dcerpc_clusapi_GetClusterName_r_send(state, ev, h, &state->tmp);
     785           0 :         if (tevent_req_nomem(subreq, req)) {
     786           0 :                 return tevent_req_post(req, ev);
     787             :         }
     788           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetClusterName_done, req);
     789           0 :         return req;
     790             : }
     791             : 
     792           0 : static void dcerpc_clusapi_GetClusterName_done(struct tevent_req *subreq)
     793             : {
     794           0 :         struct tevent_req *req = tevent_req_callback_data(
     795             :                 subreq, struct tevent_req);
     796           0 :         struct dcerpc_clusapi_GetClusterName_state *state = tevent_req_data(
     797             :                 req, struct dcerpc_clusapi_GetClusterName_state);
     798             :         NTSTATUS status;
     799             :         TALLOC_CTX *mem_ctx;
     800             : 
     801           0 :         if (state->out_mem_ctx) {
     802           0 :                 mem_ctx = state->out_mem_ctx;
     803             :         } else {
     804           0 :                 mem_ctx = state;
     805             :         }
     806             : 
     807           0 :         status = dcerpc_clusapi_GetClusterName_r_recv(subreq, mem_ctx);
     808           0 :         TALLOC_FREE(subreq);
     809           0 :         if (tevent_req_nterror(req, status)) {
     810           0 :                 return;
     811             :         }
     812             : 
     813             :         /* Copy out parameters */
     814           0 :         *state->orig.out.ClusterName = *state->tmp.out.ClusterName;
     815           0 :         *state->orig.out.NodeName = *state->tmp.out.NodeName;
     816             : 
     817             :         /* Copy result */
     818           0 :         state->orig.out.result = state->tmp.out.result;
     819             : 
     820             :         /* Reset temporary structure */
     821           0 :         NDR_ZERO_STRUCT(state->tmp);
     822             : 
     823           0 :         tevent_req_done(req);
     824             : }
     825             : 
     826           0 : NTSTATUS dcerpc_clusapi_GetClusterName_recv(struct tevent_req *req,
     827             :                                             TALLOC_CTX *mem_ctx,
     828             :                                             WERROR *result)
     829             : {
     830           0 :         struct dcerpc_clusapi_GetClusterName_state *state = tevent_req_data(
     831             :                 req, struct dcerpc_clusapi_GetClusterName_state);
     832             :         NTSTATUS status;
     833             : 
     834           0 :         if (tevent_req_is_nterror(req, &status)) {
     835           0 :                 tevent_req_received(req);
     836           0 :                 return status;
     837             :         }
     838             : 
     839             :         /* Steal possible out parameters to the callers context */
     840           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     841             : 
     842             :         /* Return result */
     843           0 :         *result = state->orig.out.result;
     844             : 
     845           0 :         tevent_req_received(req);
     846           0 :         return NT_STATUS_OK;
     847             : }
     848             : 
     849           0 : NTSTATUS dcerpc_clusapi_GetClusterName(struct dcerpc_binding_handle *h,
     850             :                                        TALLOC_CTX *mem_ctx,
     851             :                                        const char **_ClusterName /* [out] [charset(UTF16),ref] */,
     852             :                                        const char **_NodeName /* [out] [charset(UTF16),ref] */,
     853             :                                        WERROR *result)
     854             : {
     855             :         struct clusapi_GetClusterName r;
     856             :         NTSTATUS status;
     857             : 
     858             :         /* In parameters */
     859             : 
     860             :         /* Out parameters */
     861           0 :         r.out.ClusterName = _ClusterName;
     862           0 :         r.out.NodeName = _NodeName;
     863             : 
     864             :         /* Result */
     865           0 :         NDR_ZERO_STRUCT(r.out.result);
     866             : 
     867           0 :         status = dcerpc_clusapi_GetClusterName_r(h, mem_ctx, &r);
     868           0 :         if (!NT_STATUS_IS_OK(status)) {
     869           0 :                 return status;
     870             :         }
     871             : 
     872             :         /* Return variables */
     873           0 :         *_ClusterName = *r.out.ClusterName;
     874           0 :         *_NodeName = *r.out.NodeName;
     875             : 
     876             :         /* Return result */
     877           0 :         *result = r.out.result;
     878             : 
     879           0 :         return NT_STATUS_OK;
     880             : }
     881             : 
     882             : struct dcerpc_clusapi_GetClusterVersion_r_state {
     883             :         TALLOC_CTX *out_mem_ctx;
     884             : };
     885             : 
     886             : static void dcerpc_clusapi_GetClusterVersion_r_done(struct tevent_req *subreq);
     887             : 
     888           0 : struct tevent_req *dcerpc_clusapi_GetClusterVersion_r_send(TALLOC_CTX *mem_ctx,
     889             :         struct tevent_context *ev,
     890             :         struct dcerpc_binding_handle *h,
     891             :         struct clusapi_GetClusterVersion *r)
     892             : {
     893             :         struct tevent_req *req;
     894             :         struct dcerpc_clusapi_GetClusterVersion_r_state *state;
     895             :         struct tevent_req *subreq;
     896             : 
     897           0 :         req = tevent_req_create(mem_ctx, &state,
     898             :                                 struct dcerpc_clusapi_GetClusterVersion_r_state);
     899           0 :         if (req == NULL) {
     900           0 :                 return NULL;
     901             :         }
     902             : 
     903           0 :         state->out_mem_ctx = talloc_new(state);
     904           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     905           0 :                 return tevent_req_post(req, ev);
     906             :         }
     907             : 
     908           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     909             :                         NULL, &ndr_table_clusapi,
     910           0 :                         NDR_CLUSAPI_GETCLUSTERVERSION, state->out_mem_ctx, r);
     911           0 :         if (tevent_req_nomem(subreq, req)) {
     912           0 :                 return tevent_req_post(req, ev);
     913             :         }
     914           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetClusterVersion_r_done, req);
     915             : 
     916           0 :         return req;
     917             : }
     918             : 
     919           0 : static void dcerpc_clusapi_GetClusterVersion_r_done(struct tevent_req *subreq)
     920             : {
     921           0 :         struct tevent_req *req =
     922           0 :                 tevent_req_callback_data(subreq,
     923             :                 struct tevent_req);
     924             :         NTSTATUS status;
     925             : 
     926           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     927           0 :         TALLOC_FREE(subreq);
     928           0 :         if (tevent_req_nterror(req, status)) {
     929           0 :                 return;
     930             :         }
     931             : 
     932           0 :         tevent_req_done(req);
     933             : }
     934             : 
     935           0 : NTSTATUS dcerpc_clusapi_GetClusterVersion_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     936             : {
     937           0 :         struct dcerpc_clusapi_GetClusterVersion_r_state *state =
     938           0 :                 tevent_req_data(req,
     939             :                 struct dcerpc_clusapi_GetClusterVersion_r_state);
     940             :         NTSTATUS status;
     941             : 
     942           0 :         if (tevent_req_is_nterror(req, &status)) {
     943           0 :                 tevent_req_received(req);
     944           0 :                 return status;
     945             :         }
     946             : 
     947           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     948             : 
     949           0 :         tevent_req_received(req);
     950           0 :         return NT_STATUS_OK;
     951             : }
     952             : 
     953           0 : NTSTATUS dcerpc_clusapi_GetClusterVersion_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetClusterVersion *r)
     954             : {
     955             :         NTSTATUS status;
     956             : 
     957           0 :         status = dcerpc_binding_handle_call(h,
     958             :                         NULL, &ndr_table_clusapi,
     959             :                         NDR_CLUSAPI_GETCLUSTERVERSION, mem_ctx, r);
     960             : 
     961           0 :         return status;
     962             : }
     963             : 
     964             : struct dcerpc_clusapi_GetClusterVersion_state {
     965             :         struct clusapi_GetClusterVersion orig;
     966             :         struct clusapi_GetClusterVersion tmp;
     967             :         TALLOC_CTX *out_mem_ctx;
     968             : };
     969             : 
     970             : static void dcerpc_clusapi_GetClusterVersion_done(struct tevent_req *subreq);
     971             : 
     972           0 : struct tevent_req *dcerpc_clusapi_GetClusterVersion_send(TALLOC_CTX *mem_ctx,
     973             :                                                          struct tevent_context *ev,
     974             :                                                          struct dcerpc_binding_handle *h,
     975             :                                                          uint16_t *_lpwMajorVersion /* [out] [ref] */,
     976             :                                                          uint16_t *_lpwMinorVersion /* [out] [ref] */,
     977             :                                                          uint16_t *_lpwBuildNumber /* [out] [ref] */,
     978             :                                                          const char **_lpszVendorId /* [out] [charset(UTF16),ref] */,
     979             :                                                          const char **_lpszCSDVersion /* [out] [charset(UTF16),ref] */)
     980             : {
     981             :         struct tevent_req *req;
     982             :         struct dcerpc_clusapi_GetClusterVersion_state *state;
     983             :         struct tevent_req *subreq;
     984             : 
     985           0 :         req = tevent_req_create(mem_ctx, &state,
     986             :                                 struct dcerpc_clusapi_GetClusterVersion_state);
     987           0 :         if (req == NULL) {
     988           0 :                 return NULL;
     989             :         }
     990           0 :         state->out_mem_ctx = NULL;
     991             : 
     992             :         /* In parameters */
     993             : 
     994             :         /* Out parameters */
     995           0 :         state->orig.out.lpwMajorVersion = _lpwMajorVersion;
     996           0 :         state->orig.out.lpwMinorVersion = _lpwMinorVersion;
     997           0 :         state->orig.out.lpwBuildNumber = _lpwBuildNumber;
     998           0 :         state->orig.out.lpszVendorId = _lpszVendorId;
     999           0 :         state->orig.out.lpszCSDVersion = _lpszCSDVersion;
    1000             : 
    1001             :         /* Result */
    1002           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1003             : 
    1004           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1005             :                              "dcerpc_clusapi_GetClusterVersion_out_memory");
    1006           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1007           0 :                 return tevent_req_post(req, ev);
    1008             :         }
    1009             : 
    1010             :         /* make a temporary copy, that we pass to the dispatch function */
    1011           0 :         state->tmp = state->orig;
    1012             : 
    1013           0 :         subreq = dcerpc_clusapi_GetClusterVersion_r_send(state, ev, h, &state->tmp);
    1014           0 :         if (tevent_req_nomem(subreq, req)) {
    1015           0 :                 return tevent_req_post(req, ev);
    1016             :         }
    1017           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetClusterVersion_done, req);
    1018           0 :         return req;
    1019             : }
    1020             : 
    1021           0 : static void dcerpc_clusapi_GetClusterVersion_done(struct tevent_req *subreq)
    1022             : {
    1023           0 :         struct tevent_req *req = tevent_req_callback_data(
    1024             :                 subreq, struct tevent_req);
    1025           0 :         struct dcerpc_clusapi_GetClusterVersion_state *state = tevent_req_data(
    1026             :                 req, struct dcerpc_clusapi_GetClusterVersion_state);
    1027             :         NTSTATUS status;
    1028             :         TALLOC_CTX *mem_ctx;
    1029             : 
    1030           0 :         if (state->out_mem_ctx) {
    1031           0 :                 mem_ctx = state->out_mem_ctx;
    1032             :         } else {
    1033           0 :                 mem_ctx = state;
    1034             :         }
    1035             : 
    1036           0 :         status = dcerpc_clusapi_GetClusterVersion_r_recv(subreq, mem_ctx);
    1037           0 :         TALLOC_FREE(subreq);
    1038           0 :         if (tevent_req_nterror(req, status)) {
    1039           0 :                 return;
    1040             :         }
    1041             : 
    1042             :         /* Copy out parameters */
    1043           0 :         *state->orig.out.lpwMajorVersion = *state->tmp.out.lpwMajorVersion;
    1044           0 :         *state->orig.out.lpwMinorVersion = *state->tmp.out.lpwMinorVersion;
    1045           0 :         *state->orig.out.lpwBuildNumber = *state->tmp.out.lpwBuildNumber;
    1046           0 :         *state->orig.out.lpszVendorId = *state->tmp.out.lpszVendorId;
    1047           0 :         *state->orig.out.lpszCSDVersion = *state->tmp.out.lpszCSDVersion;
    1048             : 
    1049             :         /* Copy result */
    1050           0 :         state->orig.out.result = state->tmp.out.result;
    1051             : 
    1052             :         /* Reset temporary structure */
    1053           0 :         NDR_ZERO_STRUCT(state->tmp);
    1054             : 
    1055           0 :         tevent_req_done(req);
    1056             : }
    1057             : 
    1058           0 : NTSTATUS dcerpc_clusapi_GetClusterVersion_recv(struct tevent_req *req,
    1059             :                                                TALLOC_CTX *mem_ctx,
    1060             :                                                WERROR *result)
    1061             : {
    1062           0 :         struct dcerpc_clusapi_GetClusterVersion_state *state = tevent_req_data(
    1063             :                 req, struct dcerpc_clusapi_GetClusterVersion_state);
    1064             :         NTSTATUS status;
    1065             : 
    1066           0 :         if (tevent_req_is_nterror(req, &status)) {
    1067           0 :                 tevent_req_received(req);
    1068           0 :                 return status;
    1069             :         }
    1070             : 
    1071             :         /* Steal possible out parameters to the callers context */
    1072           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1073             : 
    1074             :         /* Return result */
    1075           0 :         *result = state->orig.out.result;
    1076             : 
    1077           0 :         tevent_req_received(req);
    1078           0 :         return NT_STATUS_OK;
    1079             : }
    1080             : 
    1081           0 : NTSTATUS dcerpc_clusapi_GetClusterVersion(struct dcerpc_binding_handle *h,
    1082             :                                           TALLOC_CTX *mem_ctx,
    1083             :                                           uint16_t *_lpwMajorVersion /* [out] [ref] */,
    1084             :                                           uint16_t *_lpwMinorVersion /* [out] [ref] */,
    1085             :                                           uint16_t *_lpwBuildNumber /* [out] [ref] */,
    1086             :                                           const char **_lpszVendorId /* [out] [charset(UTF16),ref] */,
    1087             :                                           const char **_lpszCSDVersion /* [out] [charset(UTF16),ref] */,
    1088             :                                           WERROR *result)
    1089             : {
    1090             :         struct clusapi_GetClusterVersion r;
    1091             :         NTSTATUS status;
    1092             : 
    1093             :         /* In parameters */
    1094             : 
    1095             :         /* Out parameters */
    1096           0 :         r.out.lpwMajorVersion = _lpwMajorVersion;
    1097           0 :         r.out.lpwMinorVersion = _lpwMinorVersion;
    1098           0 :         r.out.lpwBuildNumber = _lpwBuildNumber;
    1099           0 :         r.out.lpszVendorId = _lpszVendorId;
    1100           0 :         r.out.lpszCSDVersion = _lpszCSDVersion;
    1101             : 
    1102             :         /* Result */
    1103           0 :         NDR_ZERO_STRUCT(r.out.result);
    1104             : 
    1105           0 :         status = dcerpc_clusapi_GetClusterVersion_r(h, mem_ctx, &r);
    1106           0 :         if (!NT_STATUS_IS_OK(status)) {
    1107           0 :                 return status;
    1108             :         }
    1109             : 
    1110             :         /* Return variables */
    1111           0 :         *_lpwMajorVersion = *r.out.lpwMajorVersion;
    1112           0 :         *_lpwMinorVersion = *r.out.lpwMinorVersion;
    1113           0 :         *_lpwBuildNumber = *r.out.lpwBuildNumber;
    1114           0 :         *_lpszVendorId = *r.out.lpszVendorId;
    1115           0 :         *_lpszCSDVersion = *r.out.lpszCSDVersion;
    1116             : 
    1117             :         /* Return result */
    1118           0 :         *result = r.out.result;
    1119             : 
    1120           0 :         return NT_STATUS_OK;
    1121             : }
    1122             : 
    1123             : struct dcerpc_clusapi_GetQuorumResource_r_state {
    1124             :         TALLOC_CTX *out_mem_ctx;
    1125             : };
    1126             : 
    1127             : static void dcerpc_clusapi_GetQuorumResource_r_done(struct tevent_req *subreq);
    1128             : 
    1129           0 : struct tevent_req *dcerpc_clusapi_GetQuorumResource_r_send(TALLOC_CTX *mem_ctx,
    1130             :         struct tevent_context *ev,
    1131             :         struct dcerpc_binding_handle *h,
    1132             :         struct clusapi_GetQuorumResource *r)
    1133             : {
    1134             :         struct tevent_req *req;
    1135             :         struct dcerpc_clusapi_GetQuorumResource_r_state *state;
    1136             :         struct tevent_req *subreq;
    1137             : 
    1138           0 :         req = tevent_req_create(mem_ctx, &state,
    1139             :                                 struct dcerpc_clusapi_GetQuorumResource_r_state);
    1140           0 :         if (req == NULL) {
    1141           0 :                 return NULL;
    1142             :         }
    1143             : 
    1144           0 :         state->out_mem_ctx = talloc_new(state);
    1145           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1146           0 :                 return tevent_req_post(req, ev);
    1147             :         }
    1148             : 
    1149           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1150             :                         NULL, &ndr_table_clusapi,
    1151           0 :                         NDR_CLUSAPI_GETQUORUMRESOURCE, state->out_mem_ctx, r);
    1152           0 :         if (tevent_req_nomem(subreq, req)) {
    1153           0 :                 return tevent_req_post(req, ev);
    1154             :         }
    1155           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetQuorumResource_r_done, req);
    1156             : 
    1157           0 :         return req;
    1158             : }
    1159             : 
    1160           0 : static void dcerpc_clusapi_GetQuorumResource_r_done(struct tevent_req *subreq)
    1161             : {
    1162           0 :         struct tevent_req *req =
    1163           0 :                 tevent_req_callback_data(subreq,
    1164             :                 struct tevent_req);
    1165             :         NTSTATUS status;
    1166             : 
    1167           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1168           0 :         TALLOC_FREE(subreq);
    1169           0 :         if (tevent_req_nterror(req, status)) {
    1170           0 :                 return;
    1171             :         }
    1172             : 
    1173           0 :         tevent_req_done(req);
    1174             : }
    1175             : 
    1176           0 : NTSTATUS dcerpc_clusapi_GetQuorumResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1177             : {
    1178           0 :         struct dcerpc_clusapi_GetQuorumResource_r_state *state =
    1179           0 :                 tevent_req_data(req,
    1180             :                 struct dcerpc_clusapi_GetQuorumResource_r_state);
    1181             :         NTSTATUS status;
    1182             : 
    1183           0 :         if (tevent_req_is_nterror(req, &status)) {
    1184           0 :                 tevent_req_received(req);
    1185           0 :                 return status;
    1186             :         }
    1187             : 
    1188           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1189             : 
    1190           0 :         tevent_req_received(req);
    1191           0 :         return NT_STATUS_OK;
    1192             : }
    1193             : 
    1194           0 : NTSTATUS dcerpc_clusapi_GetQuorumResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetQuorumResource *r)
    1195             : {
    1196             :         NTSTATUS status;
    1197             : 
    1198           0 :         status = dcerpc_binding_handle_call(h,
    1199             :                         NULL, &ndr_table_clusapi,
    1200             :                         NDR_CLUSAPI_GETQUORUMRESOURCE, mem_ctx, r);
    1201             : 
    1202           0 :         return status;
    1203             : }
    1204             : 
    1205             : struct dcerpc_clusapi_GetQuorumResource_state {
    1206             :         struct clusapi_GetQuorumResource orig;
    1207             :         struct clusapi_GetQuorumResource tmp;
    1208             :         TALLOC_CTX *out_mem_ctx;
    1209             : };
    1210             : 
    1211             : static void dcerpc_clusapi_GetQuorumResource_done(struct tevent_req *subreq);
    1212             : 
    1213           0 : struct tevent_req *dcerpc_clusapi_GetQuorumResource_send(TALLOC_CTX *mem_ctx,
    1214             :                                                          struct tevent_context *ev,
    1215             :                                                          struct dcerpc_binding_handle *h,
    1216             :                                                          const char **_lpszResourceName /* [out] [charset(UTF16),ref] */,
    1217             :                                                          const char **_lpszDeviceName /* [out] [charset(UTF16),ref] */,
    1218             :                                                          uint32_t *_pdwMaxQuorumLogSize /* [out] [ref] */,
    1219             :                                                          WERROR *_rpc_status /* [out] [ref] */)
    1220             : {
    1221             :         struct tevent_req *req;
    1222             :         struct dcerpc_clusapi_GetQuorumResource_state *state;
    1223             :         struct tevent_req *subreq;
    1224             : 
    1225           0 :         req = tevent_req_create(mem_ctx, &state,
    1226             :                                 struct dcerpc_clusapi_GetQuorumResource_state);
    1227           0 :         if (req == NULL) {
    1228           0 :                 return NULL;
    1229             :         }
    1230           0 :         state->out_mem_ctx = NULL;
    1231             : 
    1232             :         /* In parameters */
    1233             : 
    1234             :         /* Out parameters */
    1235           0 :         state->orig.out.lpszResourceName = _lpszResourceName;
    1236           0 :         state->orig.out.lpszDeviceName = _lpszDeviceName;
    1237           0 :         state->orig.out.pdwMaxQuorumLogSize = _pdwMaxQuorumLogSize;
    1238           0 :         state->orig.out.rpc_status = _rpc_status;
    1239             : 
    1240             :         /* Result */
    1241           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1242             : 
    1243           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1244             :                              "dcerpc_clusapi_GetQuorumResource_out_memory");
    1245           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1246           0 :                 return tevent_req_post(req, ev);
    1247             :         }
    1248             : 
    1249             :         /* make a temporary copy, that we pass to the dispatch function */
    1250           0 :         state->tmp = state->orig;
    1251             : 
    1252           0 :         subreq = dcerpc_clusapi_GetQuorumResource_r_send(state, ev, h, &state->tmp);
    1253           0 :         if (tevent_req_nomem(subreq, req)) {
    1254           0 :                 return tevent_req_post(req, ev);
    1255             :         }
    1256           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetQuorumResource_done, req);
    1257           0 :         return req;
    1258             : }
    1259             : 
    1260           0 : static void dcerpc_clusapi_GetQuorumResource_done(struct tevent_req *subreq)
    1261             : {
    1262           0 :         struct tevent_req *req = tevent_req_callback_data(
    1263             :                 subreq, struct tevent_req);
    1264           0 :         struct dcerpc_clusapi_GetQuorumResource_state *state = tevent_req_data(
    1265             :                 req, struct dcerpc_clusapi_GetQuorumResource_state);
    1266             :         NTSTATUS status;
    1267             :         TALLOC_CTX *mem_ctx;
    1268             : 
    1269           0 :         if (state->out_mem_ctx) {
    1270           0 :                 mem_ctx = state->out_mem_ctx;
    1271             :         } else {
    1272           0 :                 mem_ctx = state;
    1273             :         }
    1274             : 
    1275           0 :         status = dcerpc_clusapi_GetQuorumResource_r_recv(subreq, mem_ctx);
    1276           0 :         TALLOC_FREE(subreq);
    1277           0 :         if (tevent_req_nterror(req, status)) {
    1278           0 :                 return;
    1279             :         }
    1280             : 
    1281             :         /* Copy out parameters */
    1282           0 :         *state->orig.out.lpszResourceName = *state->tmp.out.lpszResourceName;
    1283           0 :         *state->orig.out.lpszDeviceName = *state->tmp.out.lpszDeviceName;
    1284           0 :         *state->orig.out.pdwMaxQuorumLogSize = *state->tmp.out.pdwMaxQuorumLogSize;
    1285           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    1286             : 
    1287             :         /* Copy result */
    1288           0 :         state->orig.out.result = state->tmp.out.result;
    1289             : 
    1290             :         /* Reset temporary structure */
    1291           0 :         NDR_ZERO_STRUCT(state->tmp);
    1292             : 
    1293           0 :         tevent_req_done(req);
    1294             : }
    1295             : 
    1296           0 : NTSTATUS dcerpc_clusapi_GetQuorumResource_recv(struct tevent_req *req,
    1297             :                                                TALLOC_CTX *mem_ctx,
    1298             :                                                WERROR *result)
    1299             : {
    1300           0 :         struct dcerpc_clusapi_GetQuorumResource_state *state = tevent_req_data(
    1301             :                 req, struct dcerpc_clusapi_GetQuorumResource_state);
    1302             :         NTSTATUS status;
    1303             : 
    1304           0 :         if (tevent_req_is_nterror(req, &status)) {
    1305           0 :                 tevent_req_received(req);
    1306           0 :                 return status;
    1307             :         }
    1308             : 
    1309             :         /* Steal possible out parameters to the callers context */
    1310           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1311             : 
    1312             :         /* Return result */
    1313           0 :         *result = state->orig.out.result;
    1314             : 
    1315           0 :         tevent_req_received(req);
    1316           0 :         return NT_STATUS_OK;
    1317             : }
    1318             : 
    1319           0 : NTSTATUS dcerpc_clusapi_GetQuorumResource(struct dcerpc_binding_handle *h,
    1320             :                                           TALLOC_CTX *mem_ctx,
    1321             :                                           const char **_lpszResourceName /* [out] [charset(UTF16),ref] */,
    1322             :                                           const char **_lpszDeviceName /* [out] [charset(UTF16),ref] */,
    1323             :                                           uint32_t *_pdwMaxQuorumLogSize /* [out] [ref] */,
    1324             :                                           WERROR *_rpc_status /* [out] [ref] */,
    1325             :                                           WERROR *result)
    1326             : {
    1327             :         struct clusapi_GetQuorumResource r;
    1328             :         NTSTATUS status;
    1329             : 
    1330             :         /* In parameters */
    1331             : 
    1332             :         /* Out parameters */
    1333           0 :         r.out.lpszResourceName = _lpszResourceName;
    1334           0 :         r.out.lpszDeviceName = _lpszDeviceName;
    1335           0 :         r.out.pdwMaxQuorumLogSize = _pdwMaxQuorumLogSize;
    1336           0 :         r.out.rpc_status = _rpc_status;
    1337             : 
    1338             :         /* Result */
    1339           0 :         NDR_ZERO_STRUCT(r.out.result);
    1340             : 
    1341           0 :         status = dcerpc_clusapi_GetQuorumResource_r(h, mem_ctx, &r);
    1342           0 :         if (!NT_STATUS_IS_OK(status)) {
    1343           0 :                 return status;
    1344             :         }
    1345             : 
    1346             :         /* Return variables */
    1347           0 :         *_lpszResourceName = *r.out.lpszResourceName;
    1348           0 :         *_lpszDeviceName = *r.out.lpszDeviceName;
    1349           0 :         *_pdwMaxQuorumLogSize = *r.out.pdwMaxQuorumLogSize;
    1350           0 :         *_rpc_status = *r.out.rpc_status;
    1351             : 
    1352             :         /* Return result */
    1353           0 :         *result = r.out.result;
    1354             : 
    1355           0 :         return NT_STATUS_OK;
    1356             : }
    1357             : 
    1358             : struct dcerpc_clusapi_SetQuorumResource_r_state {
    1359             :         TALLOC_CTX *out_mem_ctx;
    1360             : };
    1361             : 
    1362             : static void dcerpc_clusapi_SetQuorumResource_r_done(struct tevent_req *subreq);
    1363             : 
    1364           0 : struct tevent_req *dcerpc_clusapi_SetQuorumResource_r_send(TALLOC_CTX *mem_ctx,
    1365             :         struct tevent_context *ev,
    1366             :         struct dcerpc_binding_handle *h,
    1367             :         struct clusapi_SetQuorumResource *r)
    1368             : {
    1369             :         struct tevent_req *req;
    1370             :         struct dcerpc_clusapi_SetQuorumResource_r_state *state;
    1371             :         struct tevent_req *subreq;
    1372             : 
    1373           0 :         req = tevent_req_create(mem_ctx, &state,
    1374             :                                 struct dcerpc_clusapi_SetQuorumResource_r_state);
    1375           0 :         if (req == NULL) {
    1376           0 :                 return NULL;
    1377             :         }
    1378             : 
    1379           0 :         state->out_mem_ctx = talloc_new(state);
    1380           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1381           0 :                 return tevent_req_post(req, ev);
    1382             :         }
    1383             : 
    1384           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1385             :                         NULL, &ndr_table_clusapi,
    1386           0 :                         NDR_CLUSAPI_SETQUORUMRESOURCE, state->out_mem_ctx, r);
    1387           0 :         if (tevent_req_nomem(subreq, req)) {
    1388           0 :                 return tevent_req_post(req, ev);
    1389             :         }
    1390           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetQuorumResource_r_done, req);
    1391             : 
    1392           0 :         return req;
    1393             : }
    1394             : 
    1395           0 : static void dcerpc_clusapi_SetQuorumResource_r_done(struct tevent_req *subreq)
    1396             : {
    1397           0 :         struct tevent_req *req =
    1398           0 :                 tevent_req_callback_data(subreq,
    1399             :                 struct tevent_req);
    1400             :         NTSTATUS status;
    1401             : 
    1402           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1403           0 :         TALLOC_FREE(subreq);
    1404           0 :         if (tevent_req_nterror(req, status)) {
    1405           0 :                 return;
    1406             :         }
    1407             : 
    1408           0 :         tevent_req_done(req);
    1409             : }
    1410             : 
    1411           0 : NTSTATUS dcerpc_clusapi_SetQuorumResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1412             : {
    1413           0 :         struct dcerpc_clusapi_SetQuorumResource_r_state *state =
    1414           0 :                 tevent_req_data(req,
    1415             :                 struct dcerpc_clusapi_SetQuorumResource_r_state);
    1416             :         NTSTATUS status;
    1417             : 
    1418           0 :         if (tevent_req_is_nterror(req, &status)) {
    1419           0 :                 tevent_req_received(req);
    1420           0 :                 return status;
    1421             :         }
    1422             : 
    1423           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1424             : 
    1425           0 :         tevent_req_received(req);
    1426           0 :         return NT_STATUS_OK;
    1427             : }
    1428             : 
    1429           0 : NTSTATUS dcerpc_clusapi_SetQuorumResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_SetQuorumResource *r)
    1430             : {
    1431             :         NTSTATUS status;
    1432             : 
    1433           0 :         status = dcerpc_binding_handle_call(h,
    1434             :                         NULL, &ndr_table_clusapi,
    1435             :                         NDR_CLUSAPI_SETQUORUMRESOURCE, mem_ctx, r);
    1436             : 
    1437           0 :         return status;
    1438             : }
    1439             : 
    1440             : struct dcerpc_clusapi_SetQuorumResource_state {
    1441             :         struct clusapi_SetQuorumResource orig;
    1442             :         struct clusapi_SetQuorumResource tmp;
    1443             :         TALLOC_CTX *out_mem_ctx;
    1444             : };
    1445             : 
    1446             : static void dcerpc_clusapi_SetQuorumResource_done(struct tevent_req *subreq);
    1447             : 
    1448           0 : struct tevent_req *dcerpc_clusapi_SetQuorumResource_send(TALLOC_CTX *mem_ctx,
    1449             :                                                          struct tevent_context *ev,
    1450             :                                                          struct dcerpc_binding_handle *h,
    1451             :                                                          struct policy_handle _hResource /* [in]  */,
    1452             :                                                          const char *_lpszDeviceName /* [in] [charset(UTF16),ref] */,
    1453             :                                                          uint32_t _dwMaxQuorumLogSize /* [in]  */,
    1454             :                                                          WERROR *_rpc_status /* [out] [ref] */)
    1455             : {
    1456             :         struct tevent_req *req;
    1457             :         struct dcerpc_clusapi_SetQuorumResource_state *state;
    1458             :         struct tevent_req *subreq;
    1459             : 
    1460           0 :         req = tevent_req_create(mem_ctx, &state,
    1461             :                                 struct dcerpc_clusapi_SetQuorumResource_state);
    1462           0 :         if (req == NULL) {
    1463           0 :                 return NULL;
    1464             :         }
    1465           0 :         state->out_mem_ctx = NULL;
    1466             : 
    1467             :         /* In parameters */
    1468           0 :         state->orig.in.hResource = _hResource;
    1469           0 :         state->orig.in.lpszDeviceName = _lpszDeviceName;
    1470           0 :         state->orig.in.dwMaxQuorumLogSize = _dwMaxQuorumLogSize;
    1471             : 
    1472             :         /* Out parameters */
    1473           0 :         state->orig.out.rpc_status = _rpc_status;
    1474             : 
    1475             :         /* Result */
    1476           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1477             : 
    1478           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1479             :                              "dcerpc_clusapi_SetQuorumResource_out_memory");
    1480           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1481           0 :                 return tevent_req_post(req, ev);
    1482             :         }
    1483             : 
    1484             :         /* make a temporary copy, that we pass to the dispatch function */
    1485           0 :         state->tmp = state->orig;
    1486             : 
    1487           0 :         subreq = dcerpc_clusapi_SetQuorumResource_r_send(state, ev, h, &state->tmp);
    1488           0 :         if (tevent_req_nomem(subreq, req)) {
    1489           0 :                 return tevent_req_post(req, ev);
    1490             :         }
    1491           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetQuorumResource_done, req);
    1492           0 :         return req;
    1493             : }
    1494             : 
    1495           0 : static void dcerpc_clusapi_SetQuorumResource_done(struct tevent_req *subreq)
    1496             : {
    1497           0 :         struct tevent_req *req = tevent_req_callback_data(
    1498             :                 subreq, struct tevent_req);
    1499           0 :         struct dcerpc_clusapi_SetQuorumResource_state *state = tevent_req_data(
    1500             :                 req, struct dcerpc_clusapi_SetQuorumResource_state);
    1501             :         NTSTATUS status;
    1502             :         TALLOC_CTX *mem_ctx;
    1503             : 
    1504           0 :         if (state->out_mem_ctx) {
    1505           0 :                 mem_ctx = state->out_mem_ctx;
    1506             :         } else {
    1507           0 :                 mem_ctx = state;
    1508             :         }
    1509             : 
    1510           0 :         status = dcerpc_clusapi_SetQuorumResource_r_recv(subreq, mem_ctx);
    1511           0 :         TALLOC_FREE(subreq);
    1512           0 :         if (tevent_req_nterror(req, status)) {
    1513           0 :                 return;
    1514             :         }
    1515             : 
    1516             :         /* Copy out parameters */
    1517           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    1518             : 
    1519             :         /* Copy result */
    1520           0 :         state->orig.out.result = state->tmp.out.result;
    1521             : 
    1522             :         /* Reset temporary structure */
    1523           0 :         NDR_ZERO_STRUCT(state->tmp);
    1524             : 
    1525           0 :         tevent_req_done(req);
    1526             : }
    1527             : 
    1528           0 : NTSTATUS dcerpc_clusapi_SetQuorumResource_recv(struct tevent_req *req,
    1529             :                                                TALLOC_CTX *mem_ctx,
    1530             :                                                WERROR *result)
    1531             : {
    1532           0 :         struct dcerpc_clusapi_SetQuorumResource_state *state = tevent_req_data(
    1533             :                 req, struct dcerpc_clusapi_SetQuorumResource_state);
    1534             :         NTSTATUS status;
    1535             : 
    1536           0 :         if (tevent_req_is_nterror(req, &status)) {
    1537           0 :                 tevent_req_received(req);
    1538           0 :                 return status;
    1539             :         }
    1540             : 
    1541             :         /* Steal possible out parameters to the callers context */
    1542           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1543             : 
    1544             :         /* Return result */
    1545           0 :         *result = state->orig.out.result;
    1546             : 
    1547           0 :         tevent_req_received(req);
    1548           0 :         return NT_STATUS_OK;
    1549             : }
    1550             : 
    1551           0 : NTSTATUS dcerpc_clusapi_SetQuorumResource(struct dcerpc_binding_handle *h,
    1552             :                                           TALLOC_CTX *mem_ctx,
    1553             :                                           struct policy_handle _hResource /* [in]  */,
    1554             :                                           const char *_lpszDeviceName /* [in] [charset(UTF16),ref] */,
    1555             :                                           uint32_t _dwMaxQuorumLogSize /* [in]  */,
    1556             :                                           WERROR *_rpc_status /* [out] [ref] */,
    1557             :                                           WERROR *result)
    1558             : {
    1559             :         struct clusapi_SetQuorumResource r;
    1560             :         NTSTATUS status;
    1561             : 
    1562             :         /* In parameters */
    1563           0 :         r.in.hResource = _hResource;
    1564           0 :         r.in.lpszDeviceName = _lpszDeviceName;
    1565           0 :         r.in.dwMaxQuorumLogSize = _dwMaxQuorumLogSize;
    1566             : 
    1567             :         /* Out parameters */
    1568           0 :         r.out.rpc_status = _rpc_status;
    1569             : 
    1570             :         /* Result */
    1571           0 :         NDR_ZERO_STRUCT(r.out.result);
    1572             : 
    1573           0 :         status = dcerpc_clusapi_SetQuorumResource_r(h, mem_ctx, &r);
    1574           0 :         if (!NT_STATUS_IS_OK(status)) {
    1575           0 :                 return status;
    1576             :         }
    1577             : 
    1578             :         /* Return variables */
    1579           0 :         *_rpc_status = *r.out.rpc_status;
    1580             : 
    1581             :         /* Return result */
    1582           0 :         *result = r.out.result;
    1583             : 
    1584           0 :         return NT_STATUS_OK;
    1585             : }
    1586             : 
    1587             : struct dcerpc_clusapi_CreateEnum_r_state {
    1588             :         TALLOC_CTX *out_mem_ctx;
    1589             : };
    1590             : 
    1591             : static void dcerpc_clusapi_CreateEnum_r_done(struct tevent_req *subreq);
    1592             : 
    1593           0 : struct tevent_req *dcerpc_clusapi_CreateEnum_r_send(TALLOC_CTX *mem_ctx,
    1594             :         struct tevent_context *ev,
    1595             :         struct dcerpc_binding_handle *h,
    1596             :         struct clusapi_CreateEnum *r)
    1597             : {
    1598             :         struct tevent_req *req;
    1599             :         struct dcerpc_clusapi_CreateEnum_r_state *state;
    1600             :         struct tevent_req *subreq;
    1601             : 
    1602           0 :         req = tevent_req_create(mem_ctx, &state,
    1603             :                                 struct dcerpc_clusapi_CreateEnum_r_state);
    1604           0 :         if (req == NULL) {
    1605           0 :                 return NULL;
    1606             :         }
    1607             : 
    1608           0 :         state->out_mem_ctx = talloc_new(state);
    1609           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1610           0 :                 return tevent_req_post(req, ev);
    1611             :         }
    1612             : 
    1613           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1614             :                         NULL, &ndr_table_clusapi,
    1615           0 :                         NDR_CLUSAPI_CREATEENUM, state->out_mem_ctx, r);
    1616           0 :         if (tevent_req_nomem(subreq, req)) {
    1617           0 :                 return tevent_req_post(req, ev);
    1618             :         }
    1619           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateEnum_r_done, req);
    1620             : 
    1621           0 :         return req;
    1622             : }
    1623             : 
    1624           0 : static void dcerpc_clusapi_CreateEnum_r_done(struct tevent_req *subreq)
    1625             : {
    1626           0 :         struct tevent_req *req =
    1627           0 :                 tevent_req_callback_data(subreq,
    1628             :                 struct tevent_req);
    1629             :         NTSTATUS status;
    1630             : 
    1631           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1632           0 :         TALLOC_FREE(subreq);
    1633           0 :         if (tevent_req_nterror(req, status)) {
    1634           0 :                 return;
    1635             :         }
    1636             : 
    1637           0 :         tevent_req_done(req);
    1638             : }
    1639             : 
    1640           0 : NTSTATUS dcerpc_clusapi_CreateEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1641             : {
    1642           0 :         struct dcerpc_clusapi_CreateEnum_r_state *state =
    1643           0 :                 tevent_req_data(req,
    1644             :                 struct dcerpc_clusapi_CreateEnum_r_state);
    1645             :         NTSTATUS status;
    1646             : 
    1647           0 :         if (tevent_req_is_nterror(req, &status)) {
    1648           0 :                 tevent_req_received(req);
    1649           0 :                 return status;
    1650             :         }
    1651             : 
    1652           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1653             : 
    1654           0 :         tevent_req_received(req);
    1655           0 :         return NT_STATUS_OK;
    1656             : }
    1657             : 
    1658           0 : NTSTATUS dcerpc_clusapi_CreateEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CreateEnum *r)
    1659             : {
    1660             :         NTSTATUS status;
    1661             : 
    1662           0 :         status = dcerpc_binding_handle_call(h,
    1663             :                         NULL, &ndr_table_clusapi,
    1664             :                         NDR_CLUSAPI_CREATEENUM, mem_ctx, r);
    1665             : 
    1666           0 :         return status;
    1667             : }
    1668             : 
    1669             : struct dcerpc_clusapi_CreateEnum_state {
    1670             :         struct clusapi_CreateEnum orig;
    1671             :         struct clusapi_CreateEnum tmp;
    1672             :         TALLOC_CTX *out_mem_ctx;
    1673             : };
    1674             : 
    1675             : static void dcerpc_clusapi_CreateEnum_done(struct tevent_req *subreq);
    1676             : 
    1677           0 : struct tevent_req *dcerpc_clusapi_CreateEnum_send(TALLOC_CTX *mem_ctx,
    1678             :                                                   struct tevent_context *ev,
    1679             :                                                   struct dcerpc_binding_handle *h,
    1680             :                                                   uint32_t _dwType /* [in]  */,
    1681             :                                                   struct ENUM_LIST **_ReturnEnum /* [out] [ref] */,
    1682             :                                                   WERROR *_rpc_status /* [out] [ref] */)
    1683             : {
    1684             :         struct tevent_req *req;
    1685             :         struct dcerpc_clusapi_CreateEnum_state *state;
    1686             :         struct tevent_req *subreq;
    1687             : 
    1688           0 :         req = tevent_req_create(mem_ctx, &state,
    1689             :                                 struct dcerpc_clusapi_CreateEnum_state);
    1690           0 :         if (req == NULL) {
    1691           0 :                 return NULL;
    1692             :         }
    1693           0 :         state->out_mem_ctx = NULL;
    1694             : 
    1695             :         /* In parameters */
    1696           0 :         state->orig.in.dwType = _dwType;
    1697             : 
    1698             :         /* Out parameters */
    1699           0 :         state->orig.out.ReturnEnum = _ReturnEnum;
    1700           0 :         state->orig.out.rpc_status = _rpc_status;
    1701             : 
    1702             :         /* Result */
    1703           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1704             : 
    1705           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1706             :                              "dcerpc_clusapi_CreateEnum_out_memory");
    1707           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1708           0 :                 return tevent_req_post(req, ev);
    1709             :         }
    1710             : 
    1711             :         /* make a temporary copy, that we pass to the dispatch function */
    1712           0 :         state->tmp = state->orig;
    1713             : 
    1714           0 :         subreq = dcerpc_clusapi_CreateEnum_r_send(state, ev, h, &state->tmp);
    1715           0 :         if (tevent_req_nomem(subreq, req)) {
    1716           0 :                 return tevent_req_post(req, ev);
    1717             :         }
    1718           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateEnum_done, req);
    1719           0 :         return req;
    1720             : }
    1721             : 
    1722           0 : static void dcerpc_clusapi_CreateEnum_done(struct tevent_req *subreq)
    1723             : {
    1724           0 :         struct tevent_req *req = tevent_req_callback_data(
    1725             :                 subreq, struct tevent_req);
    1726           0 :         struct dcerpc_clusapi_CreateEnum_state *state = tevent_req_data(
    1727             :                 req, struct dcerpc_clusapi_CreateEnum_state);
    1728             :         NTSTATUS status;
    1729             :         TALLOC_CTX *mem_ctx;
    1730             : 
    1731           0 :         if (state->out_mem_ctx) {
    1732           0 :                 mem_ctx = state->out_mem_ctx;
    1733             :         } else {
    1734           0 :                 mem_ctx = state;
    1735             :         }
    1736             : 
    1737           0 :         status = dcerpc_clusapi_CreateEnum_r_recv(subreq, mem_ctx);
    1738           0 :         TALLOC_FREE(subreq);
    1739           0 :         if (tevent_req_nterror(req, status)) {
    1740           0 :                 return;
    1741             :         }
    1742             : 
    1743             :         /* Copy out parameters */
    1744           0 :         *state->orig.out.ReturnEnum = *state->tmp.out.ReturnEnum;
    1745           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    1746             : 
    1747             :         /* Copy result */
    1748           0 :         state->orig.out.result = state->tmp.out.result;
    1749             : 
    1750             :         /* Reset temporary structure */
    1751           0 :         NDR_ZERO_STRUCT(state->tmp);
    1752             : 
    1753           0 :         tevent_req_done(req);
    1754             : }
    1755             : 
    1756           0 : NTSTATUS dcerpc_clusapi_CreateEnum_recv(struct tevent_req *req,
    1757             :                                         TALLOC_CTX *mem_ctx,
    1758             :                                         WERROR *result)
    1759             : {
    1760           0 :         struct dcerpc_clusapi_CreateEnum_state *state = tevent_req_data(
    1761             :                 req, struct dcerpc_clusapi_CreateEnum_state);
    1762             :         NTSTATUS status;
    1763             : 
    1764           0 :         if (tevent_req_is_nterror(req, &status)) {
    1765           0 :                 tevent_req_received(req);
    1766           0 :                 return status;
    1767             :         }
    1768             : 
    1769             :         /* Steal possible out parameters to the callers context */
    1770           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1771             : 
    1772             :         /* Return result */
    1773           0 :         *result = state->orig.out.result;
    1774             : 
    1775           0 :         tevent_req_received(req);
    1776           0 :         return NT_STATUS_OK;
    1777             : }
    1778             : 
    1779           0 : NTSTATUS dcerpc_clusapi_CreateEnum(struct dcerpc_binding_handle *h,
    1780             :                                    TALLOC_CTX *mem_ctx,
    1781             :                                    uint32_t _dwType /* [in]  */,
    1782             :                                    struct ENUM_LIST **_ReturnEnum /* [out] [ref] */,
    1783             :                                    WERROR *_rpc_status /* [out] [ref] */,
    1784             :                                    WERROR *result)
    1785             : {
    1786             :         struct clusapi_CreateEnum r;
    1787             :         NTSTATUS status;
    1788             : 
    1789             :         /* In parameters */
    1790           0 :         r.in.dwType = _dwType;
    1791             : 
    1792             :         /* Out parameters */
    1793           0 :         r.out.ReturnEnum = _ReturnEnum;
    1794           0 :         r.out.rpc_status = _rpc_status;
    1795             : 
    1796             :         /* Result */
    1797           0 :         NDR_ZERO_STRUCT(r.out.result);
    1798             : 
    1799           0 :         status = dcerpc_clusapi_CreateEnum_r(h, mem_ctx, &r);
    1800           0 :         if (!NT_STATUS_IS_OK(status)) {
    1801           0 :                 return status;
    1802             :         }
    1803             : 
    1804             :         /* Return variables */
    1805           0 :         *_ReturnEnum = *r.out.ReturnEnum;
    1806           0 :         *_rpc_status = *r.out.rpc_status;
    1807             : 
    1808             :         /* Return result */
    1809           0 :         *result = r.out.result;
    1810             : 
    1811           0 :         return NT_STATUS_OK;
    1812             : }
    1813             : 
    1814             : struct dcerpc_clusapi_OpenResource_r_state {
    1815             :         TALLOC_CTX *out_mem_ctx;
    1816             : };
    1817             : 
    1818             : static void dcerpc_clusapi_OpenResource_r_done(struct tevent_req *subreq);
    1819             : 
    1820           0 : struct tevent_req *dcerpc_clusapi_OpenResource_r_send(TALLOC_CTX *mem_ctx,
    1821             :         struct tevent_context *ev,
    1822             :         struct dcerpc_binding_handle *h,
    1823             :         struct clusapi_OpenResource *r)
    1824             : {
    1825             :         struct tevent_req *req;
    1826             :         struct dcerpc_clusapi_OpenResource_r_state *state;
    1827             :         struct tevent_req *subreq;
    1828             : 
    1829           0 :         req = tevent_req_create(mem_ctx, &state,
    1830             :                                 struct dcerpc_clusapi_OpenResource_r_state);
    1831           0 :         if (req == NULL) {
    1832           0 :                 return NULL;
    1833             :         }
    1834             : 
    1835           0 :         state->out_mem_ctx = talloc_new(state);
    1836           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1837           0 :                 return tevent_req_post(req, ev);
    1838             :         }
    1839             : 
    1840           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1841             :                         NULL, &ndr_table_clusapi,
    1842           0 :                         NDR_CLUSAPI_OPENRESOURCE, state->out_mem_ctx, r);
    1843           0 :         if (tevent_req_nomem(subreq, req)) {
    1844           0 :                 return tevent_req_post(req, ev);
    1845             :         }
    1846           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OpenResource_r_done, req);
    1847             : 
    1848           0 :         return req;
    1849             : }
    1850             : 
    1851           0 : static void dcerpc_clusapi_OpenResource_r_done(struct tevent_req *subreq)
    1852             : {
    1853           0 :         struct tevent_req *req =
    1854           0 :                 tevent_req_callback_data(subreq,
    1855             :                 struct tevent_req);
    1856             :         NTSTATUS status;
    1857             : 
    1858           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1859           0 :         TALLOC_FREE(subreq);
    1860           0 :         if (tevent_req_nterror(req, status)) {
    1861           0 :                 return;
    1862             :         }
    1863             : 
    1864           0 :         tevent_req_done(req);
    1865             : }
    1866             : 
    1867           0 : NTSTATUS dcerpc_clusapi_OpenResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1868             : {
    1869           0 :         struct dcerpc_clusapi_OpenResource_r_state *state =
    1870           0 :                 tevent_req_data(req,
    1871             :                 struct dcerpc_clusapi_OpenResource_r_state);
    1872             :         NTSTATUS status;
    1873             : 
    1874           0 :         if (tevent_req_is_nterror(req, &status)) {
    1875           0 :                 tevent_req_received(req);
    1876           0 :                 return status;
    1877             :         }
    1878             : 
    1879           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1880             : 
    1881           0 :         tevent_req_received(req);
    1882           0 :         return NT_STATUS_OK;
    1883             : }
    1884             : 
    1885           0 : NTSTATUS dcerpc_clusapi_OpenResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_OpenResource *r)
    1886             : {
    1887             :         NTSTATUS status;
    1888             : 
    1889           0 :         status = dcerpc_binding_handle_call(h,
    1890             :                         NULL, &ndr_table_clusapi,
    1891             :                         NDR_CLUSAPI_OPENRESOURCE, mem_ctx, r);
    1892             : 
    1893           0 :         return status;
    1894             : }
    1895             : 
    1896             : struct dcerpc_clusapi_OpenResource_state {
    1897             :         struct clusapi_OpenResource orig;
    1898             :         struct clusapi_OpenResource tmp;
    1899             :         TALLOC_CTX *out_mem_ctx;
    1900             : };
    1901             : 
    1902             : static void dcerpc_clusapi_OpenResource_done(struct tevent_req *subreq);
    1903             : 
    1904           0 : struct tevent_req *dcerpc_clusapi_OpenResource_send(TALLOC_CTX *mem_ctx,
    1905             :                                                     struct tevent_context *ev,
    1906             :                                                     struct dcerpc_binding_handle *h,
    1907             :                                                     const char *_lpszResourceName /* [in] [charset(UTF16),ref] */,
    1908             :                                                     WERROR *_Status /* [out] [ref] */,
    1909             :                                                     WERROR *_rpc_status /* [out] [ref] */,
    1910             :                                                     struct policy_handle *_hResource /* [out] [ref] */)
    1911             : {
    1912             :         struct tevent_req *req;
    1913             :         struct dcerpc_clusapi_OpenResource_state *state;
    1914             :         struct tevent_req *subreq;
    1915             : 
    1916           0 :         req = tevent_req_create(mem_ctx, &state,
    1917             :                                 struct dcerpc_clusapi_OpenResource_state);
    1918           0 :         if (req == NULL) {
    1919           0 :                 return NULL;
    1920             :         }
    1921           0 :         state->out_mem_ctx = NULL;
    1922             : 
    1923             :         /* In parameters */
    1924           0 :         state->orig.in.lpszResourceName = _lpszResourceName;
    1925             : 
    1926             :         /* Out parameters */
    1927           0 :         state->orig.out.Status = _Status;
    1928           0 :         state->orig.out.rpc_status = _rpc_status;
    1929           0 :         state->orig.out.hResource = _hResource;
    1930             : 
    1931           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1932             :                              "dcerpc_clusapi_OpenResource_out_memory");
    1933           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1934           0 :                 return tevent_req_post(req, ev);
    1935             :         }
    1936             : 
    1937             :         /* make a temporary copy, that we pass to the dispatch function */
    1938           0 :         state->tmp = state->orig;
    1939             : 
    1940           0 :         subreq = dcerpc_clusapi_OpenResource_r_send(state, ev, h, &state->tmp);
    1941           0 :         if (tevent_req_nomem(subreq, req)) {
    1942           0 :                 return tevent_req_post(req, ev);
    1943             :         }
    1944           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OpenResource_done, req);
    1945           0 :         return req;
    1946             : }
    1947             : 
    1948           0 : static void dcerpc_clusapi_OpenResource_done(struct tevent_req *subreq)
    1949             : {
    1950           0 :         struct tevent_req *req = tevent_req_callback_data(
    1951             :                 subreq, struct tevent_req);
    1952           0 :         struct dcerpc_clusapi_OpenResource_state *state = tevent_req_data(
    1953             :                 req, struct dcerpc_clusapi_OpenResource_state);
    1954             :         NTSTATUS status;
    1955             :         TALLOC_CTX *mem_ctx;
    1956             : 
    1957           0 :         if (state->out_mem_ctx) {
    1958           0 :                 mem_ctx = state->out_mem_ctx;
    1959             :         } else {
    1960           0 :                 mem_ctx = state;
    1961             :         }
    1962             : 
    1963           0 :         status = dcerpc_clusapi_OpenResource_r_recv(subreq, mem_ctx);
    1964           0 :         TALLOC_FREE(subreq);
    1965           0 :         if (tevent_req_nterror(req, status)) {
    1966           0 :                 return;
    1967             :         }
    1968             : 
    1969             :         /* Copy out parameters */
    1970           0 :         *state->orig.out.Status = *state->tmp.out.Status;
    1971           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    1972           0 :         *state->orig.out.hResource = *state->tmp.out.hResource;
    1973             : 
    1974             :         /* Reset temporary structure */
    1975           0 :         NDR_ZERO_STRUCT(state->tmp);
    1976             : 
    1977           0 :         tevent_req_done(req);
    1978             : }
    1979             : 
    1980           0 : NTSTATUS dcerpc_clusapi_OpenResource_recv(struct tevent_req *req,
    1981             :                                           TALLOC_CTX *mem_ctx)
    1982             : {
    1983           0 :         struct dcerpc_clusapi_OpenResource_state *state = tevent_req_data(
    1984             :                 req, struct dcerpc_clusapi_OpenResource_state);
    1985             :         NTSTATUS status;
    1986             : 
    1987           0 :         if (tevent_req_is_nterror(req, &status)) {
    1988           0 :                 tevent_req_received(req);
    1989           0 :                 return status;
    1990             :         }
    1991             : 
    1992             :         /* Steal possible out parameters to the callers context */
    1993           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1994             : 
    1995           0 :         tevent_req_received(req);
    1996           0 :         return NT_STATUS_OK;
    1997             : }
    1998             : 
    1999           0 : NTSTATUS dcerpc_clusapi_OpenResource(struct dcerpc_binding_handle *h,
    2000             :                                      TALLOC_CTX *mem_ctx,
    2001             :                                      const char *_lpszResourceName /* [in] [charset(UTF16),ref] */,
    2002             :                                      WERROR *_Status /* [out] [ref] */,
    2003             :                                      WERROR *_rpc_status /* [out] [ref] */,
    2004             :                                      struct policy_handle *_hResource /* [out] [ref] */)
    2005             : {
    2006             :         struct clusapi_OpenResource r;
    2007             :         NTSTATUS status;
    2008             : 
    2009             :         /* In parameters */
    2010           0 :         r.in.lpszResourceName = _lpszResourceName;
    2011             : 
    2012             :         /* Out parameters */
    2013           0 :         r.out.Status = _Status;
    2014           0 :         r.out.rpc_status = _rpc_status;
    2015           0 :         r.out.hResource = _hResource;
    2016             : 
    2017           0 :         status = dcerpc_clusapi_OpenResource_r(h, mem_ctx, &r);
    2018           0 :         if (!NT_STATUS_IS_OK(status)) {
    2019           0 :                 return status;
    2020             :         }
    2021             : 
    2022             :         /* Return variables */
    2023           0 :         *_Status = *r.out.Status;
    2024           0 :         *_rpc_status = *r.out.rpc_status;
    2025           0 :         *_hResource = *r.out.hResource;
    2026             : 
    2027             :         /* Return result */
    2028             : 
    2029           0 :         return NT_STATUS_OK;
    2030             : }
    2031             : 
    2032             : struct dcerpc_clusapi_CreateResource_r_state {
    2033             :         TALLOC_CTX *out_mem_ctx;
    2034             : };
    2035             : 
    2036             : static void dcerpc_clusapi_CreateResource_r_done(struct tevent_req *subreq);
    2037             : 
    2038           0 : struct tevent_req *dcerpc_clusapi_CreateResource_r_send(TALLOC_CTX *mem_ctx,
    2039             :         struct tevent_context *ev,
    2040             :         struct dcerpc_binding_handle *h,
    2041             :         struct clusapi_CreateResource *r)
    2042             : {
    2043             :         struct tevent_req *req;
    2044             :         struct dcerpc_clusapi_CreateResource_r_state *state;
    2045             :         struct tevent_req *subreq;
    2046             : 
    2047           0 :         req = tevent_req_create(mem_ctx, &state,
    2048             :                                 struct dcerpc_clusapi_CreateResource_r_state);
    2049           0 :         if (req == NULL) {
    2050           0 :                 return NULL;
    2051             :         }
    2052             : 
    2053           0 :         state->out_mem_ctx = talloc_new(state);
    2054           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2055           0 :                 return tevent_req_post(req, ev);
    2056             :         }
    2057             : 
    2058           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2059             :                         NULL, &ndr_table_clusapi,
    2060           0 :                         NDR_CLUSAPI_CREATERESOURCE, state->out_mem_ctx, r);
    2061           0 :         if (tevent_req_nomem(subreq, req)) {
    2062           0 :                 return tevent_req_post(req, ev);
    2063             :         }
    2064           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateResource_r_done, req);
    2065             : 
    2066           0 :         return req;
    2067             : }
    2068             : 
    2069           0 : static void dcerpc_clusapi_CreateResource_r_done(struct tevent_req *subreq)
    2070             : {
    2071           0 :         struct tevent_req *req =
    2072           0 :                 tevent_req_callback_data(subreq,
    2073             :                 struct tevent_req);
    2074             :         NTSTATUS status;
    2075             : 
    2076           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2077           0 :         TALLOC_FREE(subreq);
    2078           0 :         if (tevent_req_nterror(req, status)) {
    2079           0 :                 return;
    2080             :         }
    2081             : 
    2082           0 :         tevent_req_done(req);
    2083             : }
    2084             : 
    2085           0 : NTSTATUS dcerpc_clusapi_CreateResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2086             : {
    2087           0 :         struct dcerpc_clusapi_CreateResource_r_state *state =
    2088           0 :                 tevent_req_data(req,
    2089             :                 struct dcerpc_clusapi_CreateResource_r_state);
    2090             :         NTSTATUS status;
    2091             : 
    2092           0 :         if (tevent_req_is_nterror(req, &status)) {
    2093           0 :                 tevent_req_received(req);
    2094           0 :                 return status;
    2095             :         }
    2096             : 
    2097           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2098             : 
    2099           0 :         tevent_req_received(req);
    2100           0 :         return NT_STATUS_OK;
    2101             : }
    2102             : 
    2103           0 : NTSTATUS dcerpc_clusapi_CreateResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CreateResource *r)
    2104             : {
    2105             :         NTSTATUS status;
    2106             : 
    2107           0 :         status = dcerpc_binding_handle_call(h,
    2108             :                         NULL, &ndr_table_clusapi,
    2109             :                         NDR_CLUSAPI_CREATERESOURCE, mem_ctx, r);
    2110             : 
    2111           0 :         return status;
    2112             : }
    2113             : 
    2114             : struct dcerpc_clusapi_CreateResource_state {
    2115             :         struct clusapi_CreateResource orig;
    2116             :         struct clusapi_CreateResource tmp;
    2117             :         TALLOC_CTX *out_mem_ctx;
    2118             : };
    2119             : 
    2120             : static void dcerpc_clusapi_CreateResource_done(struct tevent_req *subreq);
    2121             : 
    2122           0 : struct tevent_req *dcerpc_clusapi_CreateResource_send(TALLOC_CTX *mem_ctx,
    2123             :                                                       struct tevent_context *ev,
    2124             :                                                       struct dcerpc_binding_handle *h,
    2125             :                                                       struct policy_handle _hGroup /* [in]  */,
    2126             :                                                       const char *_lpszResourceName /* [in] [charset(UTF16),ref] */,
    2127             :                                                       const char *_lpszResourceType /* [in] [charset(UTF16),ref] */,
    2128             :                                                       enum clusapi_CreateResourceFlags _dwFlags /* [in]  */,
    2129             :                                                       WERROR *_Status /* [out] [ref] */,
    2130             :                                                       WERROR *_rpc_status /* [out] [ref] */,
    2131             :                                                       struct policy_handle *_hResource /* [out] [ref] */)
    2132             : {
    2133             :         struct tevent_req *req;
    2134             :         struct dcerpc_clusapi_CreateResource_state *state;
    2135             :         struct tevent_req *subreq;
    2136             : 
    2137           0 :         req = tevent_req_create(mem_ctx, &state,
    2138             :                                 struct dcerpc_clusapi_CreateResource_state);
    2139           0 :         if (req == NULL) {
    2140           0 :                 return NULL;
    2141             :         }
    2142           0 :         state->out_mem_ctx = NULL;
    2143             : 
    2144             :         /* In parameters */
    2145           0 :         state->orig.in.hGroup = _hGroup;
    2146           0 :         state->orig.in.lpszResourceName = _lpszResourceName;
    2147           0 :         state->orig.in.lpszResourceType = _lpszResourceType;
    2148           0 :         state->orig.in.dwFlags = _dwFlags;
    2149             : 
    2150             :         /* Out parameters */
    2151           0 :         state->orig.out.Status = _Status;
    2152           0 :         state->orig.out.rpc_status = _rpc_status;
    2153           0 :         state->orig.out.hResource = _hResource;
    2154             : 
    2155           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2156             :                              "dcerpc_clusapi_CreateResource_out_memory");
    2157           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2158           0 :                 return tevent_req_post(req, ev);
    2159             :         }
    2160             : 
    2161             :         /* make a temporary copy, that we pass to the dispatch function */
    2162           0 :         state->tmp = state->orig;
    2163             : 
    2164           0 :         subreq = dcerpc_clusapi_CreateResource_r_send(state, ev, h, &state->tmp);
    2165           0 :         if (tevent_req_nomem(subreq, req)) {
    2166           0 :                 return tevent_req_post(req, ev);
    2167             :         }
    2168           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateResource_done, req);
    2169           0 :         return req;
    2170             : }
    2171             : 
    2172           0 : static void dcerpc_clusapi_CreateResource_done(struct tevent_req *subreq)
    2173             : {
    2174           0 :         struct tevent_req *req = tevent_req_callback_data(
    2175             :                 subreq, struct tevent_req);
    2176           0 :         struct dcerpc_clusapi_CreateResource_state *state = tevent_req_data(
    2177             :                 req, struct dcerpc_clusapi_CreateResource_state);
    2178             :         NTSTATUS status;
    2179             :         TALLOC_CTX *mem_ctx;
    2180             : 
    2181           0 :         if (state->out_mem_ctx) {
    2182           0 :                 mem_ctx = state->out_mem_ctx;
    2183             :         } else {
    2184           0 :                 mem_ctx = state;
    2185             :         }
    2186             : 
    2187           0 :         status = dcerpc_clusapi_CreateResource_r_recv(subreq, mem_ctx);
    2188           0 :         TALLOC_FREE(subreq);
    2189           0 :         if (tevent_req_nterror(req, status)) {
    2190           0 :                 return;
    2191             :         }
    2192             : 
    2193             :         /* Copy out parameters */
    2194           0 :         *state->orig.out.Status = *state->tmp.out.Status;
    2195           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    2196           0 :         *state->orig.out.hResource = *state->tmp.out.hResource;
    2197             : 
    2198             :         /* Reset temporary structure */
    2199           0 :         NDR_ZERO_STRUCT(state->tmp);
    2200             : 
    2201           0 :         tevent_req_done(req);
    2202             : }
    2203             : 
    2204           0 : NTSTATUS dcerpc_clusapi_CreateResource_recv(struct tevent_req *req,
    2205             :                                             TALLOC_CTX *mem_ctx)
    2206             : {
    2207           0 :         struct dcerpc_clusapi_CreateResource_state *state = tevent_req_data(
    2208             :                 req, struct dcerpc_clusapi_CreateResource_state);
    2209             :         NTSTATUS status;
    2210             : 
    2211           0 :         if (tevent_req_is_nterror(req, &status)) {
    2212           0 :                 tevent_req_received(req);
    2213           0 :                 return status;
    2214             :         }
    2215             : 
    2216             :         /* Steal possible out parameters to the callers context */
    2217           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2218             : 
    2219           0 :         tevent_req_received(req);
    2220           0 :         return NT_STATUS_OK;
    2221             : }
    2222             : 
    2223           0 : NTSTATUS dcerpc_clusapi_CreateResource(struct dcerpc_binding_handle *h,
    2224             :                                        TALLOC_CTX *mem_ctx,
    2225             :                                        struct policy_handle _hGroup /* [in]  */,
    2226             :                                        const char *_lpszResourceName /* [in] [charset(UTF16),ref] */,
    2227             :                                        const char *_lpszResourceType /* [in] [charset(UTF16),ref] */,
    2228             :                                        enum clusapi_CreateResourceFlags _dwFlags /* [in]  */,
    2229             :                                        WERROR *_Status /* [out] [ref] */,
    2230             :                                        WERROR *_rpc_status /* [out] [ref] */,
    2231             :                                        struct policy_handle *_hResource /* [out] [ref] */)
    2232             : {
    2233             :         struct clusapi_CreateResource r;
    2234             :         NTSTATUS status;
    2235             : 
    2236             :         /* In parameters */
    2237           0 :         r.in.hGroup = _hGroup;
    2238           0 :         r.in.lpszResourceName = _lpszResourceName;
    2239           0 :         r.in.lpszResourceType = _lpszResourceType;
    2240           0 :         r.in.dwFlags = _dwFlags;
    2241             : 
    2242             :         /* Out parameters */
    2243           0 :         r.out.Status = _Status;
    2244           0 :         r.out.rpc_status = _rpc_status;
    2245           0 :         r.out.hResource = _hResource;
    2246             : 
    2247           0 :         status = dcerpc_clusapi_CreateResource_r(h, mem_ctx, &r);
    2248           0 :         if (!NT_STATUS_IS_OK(status)) {
    2249           0 :                 return status;
    2250             :         }
    2251             : 
    2252             :         /* Return variables */
    2253           0 :         *_Status = *r.out.Status;
    2254           0 :         *_rpc_status = *r.out.rpc_status;
    2255           0 :         *_hResource = *r.out.hResource;
    2256             : 
    2257             :         /* Return result */
    2258             : 
    2259           0 :         return NT_STATUS_OK;
    2260             : }
    2261             : 
    2262             : struct dcerpc_clusapi_DeleteResource_r_state {
    2263             :         TALLOC_CTX *out_mem_ctx;
    2264             : };
    2265             : 
    2266             : static void dcerpc_clusapi_DeleteResource_r_done(struct tevent_req *subreq);
    2267             : 
    2268           0 : struct tevent_req *dcerpc_clusapi_DeleteResource_r_send(TALLOC_CTX *mem_ctx,
    2269             :         struct tevent_context *ev,
    2270             :         struct dcerpc_binding_handle *h,
    2271             :         struct clusapi_DeleteResource *r)
    2272             : {
    2273             :         struct tevent_req *req;
    2274             :         struct dcerpc_clusapi_DeleteResource_r_state *state;
    2275             :         struct tevent_req *subreq;
    2276             : 
    2277           0 :         req = tevent_req_create(mem_ctx, &state,
    2278             :                                 struct dcerpc_clusapi_DeleteResource_r_state);
    2279           0 :         if (req == NULL) {
    2280           0 :                 return NULL;
    2281             :         }
    2282             : 
    2283           0 :         state->out_mem_ctx = talloc_new(state);
    2284           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2285           0 :                 return tevent_req_post(req, ev);
    2286             :         }
    2287             : 
    2288           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2289             :                         NULL, &ndr_table_clusapi,
    2290           0 :                         NDR_CLUSAPI_DELETERESOURCE, state->out_mem_ctx, r);
    2291           0 :         if (tevent_req_nomem(subreq, req)) {
    2292           0 :                 return tevent_req_post(req, ev);
    2293             :         }
    2294           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteResource_r_done, req);
    2295             : 
    2296           0 :         return req;
    2297             : }
    2298             : 
    2299           0 : static void dcerpc_clusapi_DeleteResource_r_done(struct tevent_req *subreq)
    2300             : {
    2301           0 :         struct tevent_req *req =
    2302           0 :                 tevent_req_callback_data(subreq,
    2303             :                 struct tevent_req);
    2304             :         NTSTATUS status;
    2305             : 
    2306           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2307           0 :         TALLOC_FREE(subreq);
    2308           0 :         if (tevent_req_nterror(req, status)) {
    2309           0 :                 return;
    2310             :         }
    2311             : 
    2312           0 :         tevent_req_done(req);
    2313             : }
    2314             : 
    2315           0 : NTSTATUS dcerpc_clusapi_DeleteResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2316             : {
    2317           0 :         struct dcerpc_clusapi_DeleteResource_r_state *state =
    2318           0 :                 tevent_req_data(req,
    2319             :                 struct dcerpc_clusapi_DeleteResource_r_state);
    2320             :         NTSTATUS status;
    2321             : 
    2322           0 :         if (tevent_req_is_nterror(req, &status)) {
    2323           0 :                 tevent_req_received(req);
    2324           0 :                 return status;
    2325             :         }
    2326             : 
    2327           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2328             : 
    2329           0 :         tevent_req_received(req);
    2330           0 :         return NT_STATUS_OK;
    2331             : }
    2332             : 
    2333           0 : NTSTATUS dcerpc_clusapi_DeleteResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_DeleteResource *r)
    2334             : {
    2335             :         NTSTATUS status;
    2336             : 
    2337           0 :         status = dcerpc_binding_handle_call(h,
    2338             :                         NULL, &ndr_table_clusapi,
    2339             :                         NDR_CLUSAPI_DELETERESOURCE, mem_ctx, r);
    2340             : 
    2341           0 :         return status;
    2342             : }
    2343             : 
    2344             : struct dcerpc_clusapi_DeleteResource_state {
    2345             :         struct clusapi_DeleteResource orig;
    2346             :         struct clusapi_DeleteResource tmp;
    2347             :         TALLOC_CTX *out_mem_ctx;
    2348             : };
    2349             : 
    2350             : static void dcerpc_clusapi_DeleteResource_done(struct tevent_req *subreq);
    2351             : 
    2352           0 : struct tevent_req *dcerpc_clusapi_DeleteResource_send(TALLOC_CTX *mem_ctx,
    2353             :                                                       struct tevent_context *ev,
    2354             :                                                       struct dcerpc_binding_handle *h,
    2355             :                                                       struct policy_handle _hResource /* [in]  */,
    2356             :                                                       WERROR *_rpc_status /* [out] [ref] */)
    2357             : {
    2358             :         struct tevent_req *req;
    2359             :         struct dcerpc_clusapi_DeleteResource_state *state;
    2360             :         struct tevent_req *subreq;
    2361             : 
    2362           0 :         req = tevent_req_create(mem_ctx, &state,
    2363             :                                 struct dcerpc_clusapi_DeleteResource_state);
    2364           0 :         if (req == NULL) {
    2365           0 :                 return NULL;
    2366             :         }
    2367           0 :         state->out_mem_ctx = NULL;
    2368             : 
    2369             :         /* In parameters */
    2370           0 :         state->orig.in.hResource = _hResource;
    2371             : 
    2372             :         /* Out parameters */
    2373           0 :         state->orig.out.rpc_status = _rpc_status;
    2374             : 
    2375             :         /* Result */
    2376           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2377             : 
    2378           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2379             :                              "dcerpc_clusapi_DeleteResource_out_memory");
    2380           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2381           0 :                 return tevent_req_post(req, ev);
    2382             :         }
    2383             : 
    2384             :         /* make a temporary copy, that we pass to the dispatch function */
    2385           0 :         state->tmp = state->orig;
    2386             : 
    2387           0 :         subreq = dcerpc_clusapi_DeleteResource_r_send(state, ev, h, &state->tmp);
    2388           0 :         if (tevent_req_nomem(subreq, req)) {
    2389           0 :                 return tevent_req_post(req, ev);
    2390             :         }
    2391           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteResource_done, req);
    2392           0 :         return req;
    2393             : }
    2394             : 
    2395           0 : static void dcerpc_clusapi_DeleteResource_done(struct tevent_req *subreq)
    2396             : {
    2397           0 :         struct tevent_req *req = tevent_req_callback_data(
    2398             :                 subreq, struct tevent_req);
    2399           0 :         struct dcerpc_clusapi_DeleteResource_state *state = tevent_req_data(
    2400             :                 req, struct dcerpc_clusapi_DeleteResource_state);
    2401             :         NTSTATUS status;
    2402             :         TALLOC_CTX *mem_ctx;
    2403             : 
    2404           0 :         if (state->out_mem_ctx) {
    2405           0 :                 mem_ctx = state->out_mem_ctx;
    2406             :         } else {
    2407           0 :                 mem_ctx = state;
    2408             :         }
    2409             : 
    2410           0 :         status = dcerpc_clusapi_DeleteResource_r_recv(subreq, mem_ctx);
    2411           0 :         TALLOC_FREE(subreq);
    2412           0 :         if (tevent_req_nterror(req, status)) {
    2413           0 :                 return;
    2414             :         }
    2415             : 
    2416             :         /* Copy out parameters */
    2417           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    2418             : 
    2419             :         /* Copy result */
    2420           0 :         state->orig.out.result = state->tmp.out.result;
    2421             : 
    2422             :         /* Reset temporary structure */
    2423           0 :         NDR_ZERO_STRUCT(state->tmp);
    2424             : 
    2425           0 :         tevent_req_done(req);
    2426             : }
    2427             : 
    2428           0 : NTSTATUS dcerpc_clusapi_DeleteResource_recv(struct tevent_req *req,
    2429             :                                             TALLOC_CTX *mem_ctx,
    2430             :                                             WERROR *result)
    2431             : {
    2432           0 :         struct dcerpc_clusapi_DeleteResource_state *state = tevent_req_data(
    2433             :                 req, struct dcerpc_clusapi_DeleteResource_state);
    2434             :         NTSTATUS status;
    2435             : 
    2436           0 :         if (tevent_req_is_nterror(req, &status)) {
    2437           0 :                 tevent_req_received(req);
    2438           0 :                 return status;
    2439             :         }
    2440             : 
    2441             :         /* Steal possible out parameters to the callers context */
    2442           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2443             : 
    2444             :         /* Return result */
    2445           0 :         *result = state->orig.out.result;
    2446             : 
    2447           0 :         tevent_req_received(req);
    2448           0 :         return NT_STATUS_OK;
    2449             : }
    2450             : 
    2451           0 : NTSTATUS dcerpc_clusapi_DeleteResource(struct dcerpc_binding_handle *h,
    2452             :                                        TALLOC_CTX *mem_ctx,
    2453             :                                        struct policy_handle _hResource /* [in]  */,
    2454             :                                        WERROR *_rpc_status /* [out] [ref] */,
    2455             :                                        WERROR *result)
    2456             : {
    2457             :         struct clusapi_DeleteResource r;
    2458             :         NTSTATUS status;
    2459             : 
    2460             :         /* In parameters */
    2461           0 :         r.in.hResource = _hResource;
    2462             : 
    2463             :         /* Out parameters */
    2464           0 :         r.out.rpc_status = _rpc_status;
    2465             : 
    2466             :         /* Result */
    2467           0 :         NDR_ZERO_STRUCT(r.out.result);
    2468             : 
    2469           0 :         status = dcerpc_clusapi_DeleteResource_r(h, mem_ctx, &r);
    2470           0 :         if (!NT_STATUS_IS_OK(status)) {
    2471           0 :                 return status;
    2472             :         }
    2473             : 
    2474             :         /* Return variables */
    2475           0 :         *_rpc_status = *r.out.rpc_status;
    2476             : 
    2477             :         /* Return result */
    2478           0 :         *result = r.out.result;
    2479             : 
    2480           0 :         return NT_STATUS_OK;
    2481             : }
    2482             : 
    2483             : struct dcerpc_clusapi_CloseResource_r_state {
    2484             :         TALLOC_CTX *out_mem_ctx;
    2485             : };
    2486             : 
    2487             : static void dcerpc_clusapi_CloseResource_r_done(struct tevent_req *subreq);
    2488             : 
    2489           0 : struct tevent_req *dcerpc_clusapi_CloseResource_r_send(TALLOC_CTX *mem_ctx,
    2490             :         struct tevent_context *ev,
    2491             :         struct dcerpc_binding_handle *h,
    2492             :         struct clusapi_CloseResource *r)
    2493             : {
    2494             :         struct tevent_req *req;
    2495             :         struct dcerpc_clusapi_CloseResource_r_state *state;
    2496             :         struct tevent_req *subreq;
    2497             : 
    2498           0 :         req = tevent_req_create(mem_ctx, &state,
    2499             :                                 struct dcerpc_clusapi_CloseResource_r_state);
    2500           0 :         if (req == NULL) {
    2501           0 :                 return NULL;
    2502             :         }
    2503             : 
    2504           0 :         state->out_mem_ctx = talloc_new(state);
    2505           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2506           0 :                 return tevent_req_post(req, ev);
    2507             :         }
    2508             : 
    2509           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2510             :                         NULL, &ndr_table_clusapi,
    2511           0 :                         NDR_CLUSAPI_CLOSERESOURCE, state->out_mem_ctx, r);
    2512           0 :         if (tevent_req_nomem(subreq, req)) {
    2513           0 :                 return tevent_req_post(req, ev);
    2514             :         }
    2515           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CloseResource_r_done, req);
    2516             : 
    2517           0 :         return req;
    2518             : }
    2519             : 
    2520           0 : static void dcerpc_clusapi_CloseResource_r_done(struct tevent_req *subreq)
    2521             : {
    2522           0 :         struct tevent_req *req =
    2523           0 :                 tevent_req_callback_data(subreq,
    2524             :                 struct tevent_req);
    2525             :         NTSTATUS status;
    2526             : 
    2527           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2528           0 :         TALLOC_FREE(subreq);
    2529           0 :         if (tevent_req_nterror(req, status)) {
    2530           0 :                 return;
    2531             :         }
    2532             : 
    2533           0 :         tevent_req_done(req);
    2534             : }
    2535             : 
    2536           0 : NTSTATUS dcerpc_clusapi_CloseResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2537             : {
    2538           0 :         struct dcerpc_clusapi_CloseResource_r_state *state =
    2539           0 :                 tevent_req_data(req,
    2540             :                 struct dcerpc_clusapi_CloseResource_r_state);
    2541             :         NTSTATUS status;
    2542             : 
    2543           0 :         if (tevent_req_is_nterror(req, &status)) {
    2544           0 :                 tevent_req_received(req);
    2545           0 :                 return status;
    2546             :         }
    2547             : 
    2548           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2549             : 
    2550           0 :         tevent_req_received(req);
    2551           0 :         return NT_STATUS_OK;
    2552             : }
    2553             : 
    2554           0 : NTSTATUS dcerpc_clusapi_CloseResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CloseResource *r)
    2555             : {
    2556             :         NTSTATUS status;
    2557             : 
    2558           0 :         status = dcerpc_binding_handle_call(h,
    2559             :                         NULL, &ndr_table_clusapi,
    2560             :                         NDR_CLUSAPI_CLOSERESOURCE, mem_ctx, r);
    2561             : 
    2562           0 :         return status;
    2563             : }
    2564             : 
    2565             : struct dcerpc_clusapi_CloseResource_state {
    2566             :         struct clusapi_CloseResource orig;
    2567             :         struct clusapi_CloseResource tmp;
    2568             :         TALLOC_CTX *out_mem_ctx;
    2569             : };
    2570             : 
    2571             : static void dcerpc_clusapi_CloseResource_done(struct tevent_req *subreq);
    2572             : 
    2573           0 : struct tevent_req *dcerpc_clusapi_CloseResource_send(TALLOC_CTX *mem_ctx,
    2574             :                                                      struct tevent_context *ev,
    2575             :                                                      struct dcerpc_binding_handle *h,
    2576             :                                                      struct policy_handle *_Resource /* [in,out] [ref] */)
    2577             : {
    2578             :         struct tevent_req *req;
    2579             :         struct dcerpc_clusapi_CloseResource_state *state;
    2580             :         struct tevent_req *subreq;
    2581             : 
    2582           0 :         req = tevent_req_create(mem_ctx, &state,
    2583             :                                 struct dcerpc_clusapi_CloseResource_state);
    2584           0 :         if (req == NULL) {
    2585           0 :                 return NULL;
    2586             :         }
    2587           0 :         state->out_mem_ctx = NULL;
    2588             : 
    2589             :         /* In parameters */
    2590           0 :         state->orig.in.Resource = _Resource;
    2591             : 
    2592             :         /* Out parameters */
    2593           0 :         state->orig.out.Resource = _Resource;
    2594             : 
    2595             :         /* Result */
    2596           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2597             : 
    2598           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2599             :                              "dcerpc_clusapi_CloseResource_out_memory");
    2600           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2601           0 :                 return tevent_req_post(req, ev);
    2602             :         }
    2603             : 
    2604             :         /* make a temporary copy, that we pass to the dispatch function */
    2605           0 :         state->tmp = state->orig;
    2606             : 
    2607           0 :         subreq = dcerpc_clusapi_CloseResource_r_send(state, ev, h, &state->tmp);
    2608           0 :         if (tevent_req_nomem(subreq, req)) {
    2609           0 :                 return tevent_req_post(req, ev);
    2610             :         }
    2611           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CloseResource_done, req);
    2612           0 :         return req;
    2613             : }
    2614             : 
    2615           0 : static void dcerpc_clusapi_CloseResource_done(struct tevent_req *subreq)
    2616             : {
    2617           0 :         struct tevent_req *req = tevent_req_callback_data(
    2618             :                 subreq, struct tevent_req);
    2619           0 :         struct dcerpc_clusapi_CloseResource_state *state = tevent_req_data(
    2620             :                 req, struct dcerpc_clusapi_CloseResource_state);
    2621             :         NTSTATUS status;
    2622             :         TALLOC_CTX *mem_ctx;
    2623             : 
    2624           0 :         if (state->out_mem_ctx) {
    2625           0 :                 mem_ctx = state->out_mem_ctx;
    2626             :         } else {
    2627           0 :                 mem_ctx = state;
    2628             :         }
    2629             : 
    2630           0 :         status = dcerpc_clusapi_CloseResource_r_recv(subreq, mem_ctx);
    2631           0 :         TALLOC_FREE(subreq);
    2632           0 :         if (tevent_req_nterror(req, status)) {
    2633           0 :                 return;
    2634             :         }
    2635             : 
    2636             :         /* Copy out parameters */
    2637           0 :         *state->orig.out.Resource = *state->tmp.out.Resource;
    2638             : 
    2639             :         /* Copy result */
    2640           0 :         state->orig.out.result = state->tmp.out.result;
    2641             : 
    2642             :         /* Reset temporary structure */
    2643           0 :         NDR_ZERO_STRUCT(state->tmp);
    2644             : 
    2645           0 :         tevent_req_done(req);
    2646             : }
    2647             : 
    2648           0 : NTSTATUS dcerpc_clusapi_CloseResource_recv(struct tevent_req *req,
    2649             :                                            TALLOC_CTX *mem_ctx,
    2650             :                                            WERROR *result)
    2651             : {
    2652           0 :         struct dcerpc_clusapi_CloseResource_state *state = tevent_req_data(
    2653             :                 req, struct dcerpc_clusapi_CloseResource_state);
    2654             :         NTSTATUS status;
    2655             : 
    2656           0 :         if (tevent_req_is_nterror(req, &status)) {
    2657           0 :                 tevent_req_received(req);
    2658           0 :                 return status;
    2659             :         }
    2660             : 
    2661             :         /* Steal possible out parameters to the callers context */
    2662           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2663             : 
    2664             :         /* Return result */
    2665           0 :         *result = state->orig.out.result;
    2666             : 
    2667           0 :         tevent_req_received(req);
    2668           0 :         return NT_STATUS_OK;
    2669             : }
    2670             : 
    2671           0 : NTSTATUS dcerpc_clusapi_CloseResource(struct dcerpc_binding_handle *h,
    2672             :                                       TALLOC_CTX *mem_ctx,
    2673             :                                       struct policy_handle *_Resource /* [in,out] [ref] */,
    2674             :                                       WERROR *result)
    2675             : {
    2676             :         struct clusapi_CloseResource r;
    2677             :         NTSTATUS status;
    2678             : 
    2679             :         /* In parameters */
    2680           0 :         r.in.Resource = _Resource;
    2681             : 
    2682             :         /* Out parameters */
    2683           0 :         r.out.Resource = _Resource;
    2684             : 
    2685             :         /* Result */
    2686           0 :         NDR_ZERO_STRUCT(r.out.result);
    2687             : 
    2688           0 :         status = dcerpc_clusapi_CloseResource_r(h, mem_ctx, &r);
    2689           0 :         if (!NT_STATUS_IS_OK(status)) {
    2690           0 :                 return status;
    2691             :         }
    2692             : 
    2693             :         /* Return variables */
    2694           0 :         *_Resource = *r.out.Resource;
    2695             : 
    2696             :         /* Return result */
    2697           0 :         *result = r.out.result;
    2698             : 
    2699           0 :         return NT_STATUS_OK;
    2700             : }
    2701             : 
    2702             : struct dcerpc_clusapi_GetResourceState_r_state {
    2703             :         TALLOC_CTX *out_mem_ctx;
    2704             : };
    2705             : 
    2706             : static void dcerpc_clusapi_GetResourceState_r_done(struct tevent_req *subreq);
    2707             : 
    2708           0 : struct tevent_req *dcerpc_clusapi_GetResourceState_r_send(TALLOC_CTX *mem_ctx,
    2709             :         struct tevent_context *ev,
    2710             :         struct dcerpc_binding_handle *h,
    2711             :         struct clusapi_GetResourceState *r)
    2712             : {
    2713             :         struct tevent_req *req;
    2714             :         struct dcerpc_clusapi_GetResourceState_r_state *state;
    2715             :         struct tevent_req *subreq;
    2716             : 
    2717           0 :         req = tevent_req_create(mem_ctx, &state,
    2718             :                                 struct dcerpc_clusapi_GetResourceState_r_state);
    2719           0 :         if (req == NULL) {
    2720           0 :                 return NULL;
    2721             :         }
    2722             : 
    2723           0 :         state->out_mem_ctx = talloc_new(state);
    2724           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2725           0 :                 return tevent_req_post(req, ev);
    2726             :         }
    2727             : 
    2728           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2729             :                         NULL, &ndr_table_clusapi,
    2730           0 :                         NDR_CLUSAPI_GETRESOURCESTATE, state->out_mem_ctx, r);
    2731           0 :         if (tevent_req_nomem(subreq, req)) {
    2732           0 :                 return tevent_req_post(req, ev);
    2733             :         }
    2734           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetResourceState_r_done, req);
    2735             : 
    2736           0 :         return req;
    2737             : }
    2738             : 
    2739           0 : static void dcerpc_clusapi_GetResourceState_r_done(struct tevent_req *subreq)
    2740             : {
    2741           0 :         struct tevent_req *req =
    2742           0 :                 tevent_req_callback_data(subreq,
    2743             :                 struct tevent_req);
    2744             :         NTSTATUS status;
    2745             : 
    2746           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2747           0 :         TALLOC_FREE(subreq);
    2748           0 :         if (tevent_req_nterror(req, status)) {
    2749           0 :                 return;
    2750             :         }
    2751             : 
    2752           0 :         tevent_req_done(req);
    2753             : }
    2754             : 
    2755           0 : NTSTATUS dcerpc_clusapi_GetResourceState_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2756             : {
    2757           0 :         struct dcerpc_clusapi_GetResourceState_r_state *state =
    2758           0 :                 tevent_req_data(req,
    2759             :                 struct dcerpc_clusapi_GetResourceState_r_state);
    2760             :         NTSTATUS status;
    2761             : 
    2762           0 :         if (tevent_req_is_nterror(req, &status)) {
    2763           0 :                 tevent_req_received(req);
    2764           0 :                 return status;
    2765             :         }
    2766             : 
    2767           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2768             : 
    2769           0 :         tevent_req_received(req);
    2770           0 :         return NT_STATUS_OK;
    2771             : }
    2772             : 
    2773           0 : NTSTATUS dcerpc_clusapi_GetResourceState_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetResourceState *r)
    2774             : {
    2775             :         NTSTATUS status;
    2776             : 
    2777           0 :         status = dcerpc_binding_handle_call(h,
    2778             :                         NULL, &ndr_table_clusapi,
    2779             :                         NDR_CLUSAPI_GETRESOURCESTATE, mem_ctx, r);
    2780             : 
    2781           0 :         return status;
    2782             : }
    2783             : 
    2784             : struct dcerpc_clusapi_GetResourceState_state {
    2785             :         struct clusapi_GetResourceState orig;
    2786             :         struct clusapi_GetResourceState tmp;
    2787             :         TALLOC_CTX *out_mem_ctx;
    2788             : };
    2789             : 
    2790             : static void dcerpc_clusapi_GetResourceState_done(struct tevent_req *subreq);
    2791             : 
    2792           0 : struct tevent_req *dcerpc_clusapi_GetResourceState_send(TALLOC_CTX *mem_ctx,
    2793             :                                                         struct tevent_context *ev,
    2794             :                                                         struct dcerpc_binding_handle *h,
    2795             :                                                         struct policy_handle _hResource /* [in]  */,
    2796             :                                                         enum clusapi_ClusterResourceState *_State /* [out] [ref] */,
    2797             :                                                         const char **_NodeName /* [out] [charset(UTF16),ref] */,
    2798             :                                                         const char **_GroupName /* [out] [charset(UTF16),ref] */,
    2799             :                                                         WERROR *_rpc_status /* [out] [ref] */)
    2800             : {
    2801             :         struct tevent_req *req;
    2802             :         struct dcerpc_clusapi_GetResourceState_state *state;
    2803             :         struct tevent_req *subreq;
    2804             : 
    2805           0 :         req = tevent_req_create(mem_ctx, &state,
    2806             :                                 struct dcerpc_clusapi_GetResourceState_state);
    2807           0 :         if (req == NULL) {
    2808           0 :                 return NULL;
    2809             :         }
    2810           0 :         state->out_mem_ctx = NULL;
    2811             : 
    2812             :         /* In parameters */
    2813           0 :         state->orig.in.hResource = _hResource;
    2814             : 
    2815             :         /* Out parameters */
    2816           0 :         state->orig.out.State = _State;
    2817           0 :         state->orig.out.NodeName = _NodeName;
    2818           0 :         state->orig.out.GroupName = _GroupName;
    2819           0 :         state->orig.out.rpc_status = _rpc_status;
    2820             : 
    2821             :         /* Result */
    2822           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2823             : 
    2824           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2825             :                              "dcerpc_clusapi_GetResourceState_out_memory");
    2826           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2827           0 :                 return tevent_req_post(req, ev);
    2828             :         }
    2829             : 
    2830             :         /* make a temporary copy, that we pass to the dispatch function */
    2831           0 :         state->tmp = state->orig;
    2832             : 
    2833           0 :         subreq = dcerpc_clusapi_GetResourceState_r_send(state, ev, h, &state->tmp);
    2834           0 :         if (tevent_req_nomem(subreq, req)) {
    2835           0 :                 return tevent_req_post(req, ev);
    2836             :         }
    2837           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetResourceState_done, req);
    2838           0 :         return req;
    2839             : }
    2840             : 
    2841           0 : static void dcerpc_clusapi_GetResourceState_done(struct tevent_req *subreq)
    2842             : {
    2843           0 :         struct tevent_req *req = tevent_req_callback_data(
    2844             :                 subreq, struct tevent_req);
    2845           0 :         struct dcerpc_clusapi_GetResourceState_state *state = tevent_req_data(
    2846             :                 req, struct dcerpc_clusapi_GetResourceState_state);
    2847             :         NTSTATUS status;
    2848             :         TALLOC_CTX *mem_ctx;
    2849             : 
    2850           0 :         if (state->out_mem_ctx) {
    2851           0 :                 mem_ctx = state->out_mem_ctx;
    2852             :         } else {
    2853           0 :                 mem_ctx = state;
    2854             :         }
    2855             : 
    2856           0 :         status = dcerpc_clusapi_GetResourceState_r_recv(subreq, mem_ctx);
    2857           0 :         TALLOC_FREE(subreq);
    2858           0 :         if (tevent_req_nterror(req, status)) {
    2859           0 :                 return;
    2860             :         }
    2861             : 
    2862             :         /* Copy out parameters */
    2863           0 :         *state->orig.out.State = *state->tmp.out.State;
    2864           0 :         *state->orig.out.NodeName = *state->tmp.out.NodeName;
    2865           0 :         *state->orig.out.GroupName = *state->tmp.out.GroupName;
    2866           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    2867             : 
    2868             :         /* Copy result */
    2869           0 :         state->orig.out.result = state->tmp.out.result;
    2870             : 
    2871             :         /* Reset temporary structure */
    2872           0 :         NDR_ZERO_STRUCT(state->tmp);
    2873             : 
    2874           0 :         tevent_req_done(req);
    2875             : }
    2876             : 
    2877           0 : NTSTATUS dcerpc_clusapi_GetResourceState_recv(struct tevent_req *req,
    2878             :                                               TALLOC_CTX *mem_ctx,
    2879             :                                               WERROR *result)
    2880             : {
    2881           0 :         struct dcerpc_clusapi_GetResourceState_state *state = tevent_req_data(
    2882             :                 req, struct dcerpc_clusapi_GetResourceState_state);
    2883             :         NTSTATUS status;
    2884             : 
    2885           0 :         if (tevent_req_is_nterror(req, &status)) {
    2886           0 :                 tevent_req_received(req);
    2887           0 :                 return status;
    2888             :         }
    2889             : 
    2890             :         /* Steal possible out parameters to the callers context */
    2891           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2892             : 
    2893             :         /* Return result */
    2894           0 :         *result = state->orig.out.result;
    2895             : 
    2896           0 :         tevent_req_received(req);
    2897           0 :         return NT_STATUS_OK;
    2898             : }
    2899             : 
    2900           0 : NTSTATUS dcerpc_clusapi_GetResourceState(struct dcerpc_binding_handle *h,
    2901             :                                          TALLOC_CTX *mem_ctx,
    2902             :                                          struct policy_handle _hResource /* [in]  */,
    2903             :                                          enum clusapi_ClusterResourceState *_State /* [out] [ref] */,
    2904             :                                          const char **_NodeName /* [out] [charset(UTF16),ref] */,
    2905             :                                          const char **_GroupName /* [out] [charset(UTF16),ref] */,
    2906             :                                          WERROR *_rpc_status /* [out] [ref] */,
    2907             :                                          WERROR *result)
    2908             : {
    2909             :         struct clusapi_GetResourceState r;
    2910             :         NTSTATUS status;
    2911             : 
    2912             :         /* In parameters */
    2913           0 :         r.in.hResource = _hResource;
    2914             : 
    2915             :         /* Out parameters */
    2916           0 :         r.out.State = _State;
    2917           0 :         r.out.NodeName = _NodeName;
    2918           0 :         r.out.GroupName = _GroupName;
    2919           0 :         r.out.rpc_status = _rpc_status;
    2920             : 
    2921             :         /* Result */
    2922           0 :         NDR_ZERO_STRUCT(r.out.result);
    2923             : 
    2924           0 :         status = dcerpc_clusapi_GetResourceState_r(h, mem_ctx, &r);
    2925           0 :         if (!NT_STATUS_IS_OK(status)) {
    2926           0 :                 return status;
    2927             :         }
    2928             : 
    2929             :         /* Return variables */
    2930           0 :         *_State = *r.out.State;
    2931           0 :         *_NodeName = *r.out.NodeName;
    2932           0 :         *_GroupName = *r.out.GroupName;
    2933           0 :         *_rpc_status = *r.out.rpc_status;
    2934             : 
    2935             :         /* Return result */
    2936           0 :         *result = r.out.result;
    2937             : 
    2938           0 :         return NT_STATUS_OK;
    2939             : }
    2940             : 
    2941             : struct dcerpc_clusapi_SetResourceName_r_state {
    2942             :         TALLOC_CTX *out_mem_ctx;
    2943             : };
    2944             : 
    2945             : static void dcerpc_clusapi_SetResourceName_r_done(struct tevent_req *subreq);
    2946             : 
    2947           0 : struct tevent_req *dcerpc_clusapi_SetResourceName_r_send(TALLOC_CTX *mem_ctx,
    2948             :         struct tevent_context *ev,
    2949             :         struct dcerpc_binding_handle *h,
    2950             :         struct clusapi_SetResourceName *r)
    2951             : {
    2952             :         struct tevent_req *req;
    2953             :         struct dcerpc_clusapi_SetResourceName_r_state *state;
    2954             :         struct tevent_req *subreq;
    2955             : 
    2956           0 :         req = tevent_req_create(mem_ctx, &state,
    2957             :                                 struct dcerpc_clusapi_SetResourceName_r_state);
    2958           0 :         if (req == NULL) {
    2959           0 :                 return NULL;
    2960             :         }
    2961             : 
    2962           0 :         state->out_mem_ctx = talloc_new(state);
    2963           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2964           0 :                 return tevent_req_post(req, ev);
    2965             :         }
    2966             : 
    2967           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2968             :                         NULL, &ndr_table_clusapi,
    2969           0 :                         NDR_CLUSAPI_SETRESOURCENAME, state->out_mem_ctx, r);
    2970           0 :         if (tevent_req_nomem(subreq, req)) {
    2971           0 :                 return tevent_req_post(req, ev);
    2972             :         }
    2973           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetResourceName_r_done, req);
    2974             : 
    2975           0 :         return req;
    2976             : }
    2977             : 
    2978           0 : static void dcerpc_clusapi_SetResourceName_r_done(struct tevent_req *subreq)
    2979             : {
    2980           0 :         struct tevent_req *req =
    2981           0 :                 tevent_req_callback_data(subreq,
    2982             :                 struct tevent_req);
    2983             :         NTSTATUS status;
    2984             : 
    2985           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2986           0 :         TALLOC_FREE(subreq);
    2987           0 :         if (tevent_req_nterror(req, status)) {
    2988           0 :                 return;
    2989             :         }
    2990             : 
    2991           0 :         tevent_req_done(req);
    2992             : }
    2993             : 
    2994           0 : NTSTATUS dcerpc_clusapi_SetResourceName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2995             : {
    2996           0 :         struct dcerpc_clusapi_SetResourceName_r_state *state =
    2997           0 :                 tevent_req_data(req,
    2998             :                 struct dcerpc_clusapi_SetResourceName_r_state);
    2999             :         NTSTATUS status;
    3000             : 
    3001           0 :         if (tevent_req_is_nterror(req, &status)) {
    3002           0 :                 tevent_req_received(req);
    3003           0 :                 return status;
    3004             :         }
    3005             : 
    3006           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3007             : 
    3008           0 :         tevent_req_received(req);
    3009           0 :         return NT_STATUS_OK;
    3010             : }
    3011             : 
    3012           0 : NTSTATUS dcerpc_clusapi_SetResourceName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_SetResourceName *r)
    3013             : {
    3014             :         NTSTATUS status;
    3015             : 
    3016           0 :         status = dcerpc_binding_handle_call(h,
    3017             :                         NULL, &ndr_table_clusapi,
    3018             :                         NDR_CLUSAPI_SETRESOURCENAME, mem_ctx, r);
    3019             : 
    3020           0 :         return status;
    3021             : }
    3022             : 
    3023             : struct dcerpc_clusapi_SetResourceName_state {
    3024             :         struct clusapi_SetResourceName orig;
    3025             :         struct clusapi_SetResourceName tmp;
    3026             :         TALLOC_CTX *out_mem_ctx;
    3027             : };
    3028             : 
    3029             : static void dcerpc_clusapi_SetResourceName_done(struct tevent_req *subreq);
    3030             : 
    3031           0 : struct tevent_req *dcerpc_clusapi_SetResourceName_send(TALLOC_CTX *mem_ctx,
    3032             :                                                        struct tevent_context *ev,
    3033             :                                                        struct dcerpc_binding_handle *h,
    3034             :                                                        struct policy_handle _hResource /* [in]  */,
    3035             :                                                        const char *_lpszResourceName /* [in] [charset(UTF16),ref] */,
    3036             :                                                        WERROR *_rpc_status /* [out] [ref] */)
    3037             : {
    3038             :         struct tevent_req *req;
    3039             :         struct dcerpc_clusapi_SetResourceName_state *state;
    3040             :         struct tevent_req *subreq;
    3041             : 
    3042           0 :         req = tevent_req_create(mem_ctx, &state,
    3043             :                                 struct dcerpc_clusapi_SetResourceName_state);
    3044           0 :         if (req == NULL) {
    3045           0 :                 return NULL;
    3046             :         }
    3047           0 :         state->out_mem_ctx = NULL;
    3048             : 
    3049             :         /* In parameters */
    3050           0 :         state->orig.in.hResource = _hResource;
    3051           0 :         state->orig.in.lpszResourceName = _lpszResourceName;
    3052             : 
    3053             :         /* Out parameters */
    3054           0 :         state->orig.out.rpc_status = _rpc_status;
    3055             : 
    3056             :         /* Result */
    3057           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3058             : 
    3059           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3060             :                              "dcerpc_clusapi_SetResourceName_out_memory");
    3061           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3062           0 :                 return tevent_req_post(req, ev);
    3063             :         }
    3064             : 
    3065             :         /* make a temporary copy, that we pass to the dispatch function */
    3066           0 :         state->tmp = state->orig;
    3067             : 
    3068           0 :         subreq = dcerpc_clusapi_SetResourceName_r_send(state, ev, h, &state->tmp);
    3069           0 :         if (tevent_req_nomem(subreq, req)) {
    3070           0 :                 return tevent_req_post(req, ev);
    3071             :         }
    3072           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetResourceName_done, req);
    3073           0 :         return req;
    3074             : }
    3075             : 
    3076           0 : static void dcerpc_clusapi_SetResourceName_done(struct tevent_req *subreq)
    3077             : {
    3078           0 :         struct tevent_req *req = tevent_req_callback_data(
    3079             :                 subreq, struct tevent_req);
    3080           0 :         struct dcerpc_clusapi_SetResourceName_state *state = tevent_req_data(
    3081             :                 req, struct dcerpc_clusapi_SetResourceName_state);
    3082             :         NTSTATUS status;
    3083             :         TALLOC_CTX *mem_ctx;
    3084             : 
    3085           0 :         if (state->out_mem_ctx) {
    3086           0 :                 mem_ctx = state->out_mem_ctx;
    3087             :         } else {
    3088           0 :                 mem_ctx = state;
    3089             :         }
    3090             : 
    3091           0 :         status = dcerpc_clusapi_SetResourceName_r_recv(subreq, mem_ctx);
    3092           0 :         TALLOC_FREE(subreq);
    3093           0 :         if (tevent_req_nterror(req, status)) {
    3094           0 :                 return;
    3095             :         }
    3096             : 
    3097             :         /* Copy out parameters */
    3098           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    3099             : 
    3100             :         /* Copy result */
    3101           0 :         state->orig.out.result = state->tmp.out.result;
    3102             : 
    3103             :         /* Reset temporary structure */
    3104           0 :         NDR_ZERO_STRUCT(state->tmp);
    3105             : 
    3106           0 :         tevent_req_done(req);
    3107             : }
    3108             : 
    3109           0 : NTSTATUS dcerpc_clusapi_SetResourceName_recv(struct tevent_req *req,
    3110             :                                              TALLOC_CTX *mem_ctx,
    3111             :                                              WERROR *result)
    3112             : {
    3113           0 :         struct dcerpc_clusapi_SetResourceName_state *state = tevent_req_data(
    3114             :                 req, struct dcerpc_clusapi_SetResourceName_state);
    3115             :         NTSTATUS status;
    3116             : 
    3117           0 :         if (tevent_req_is_nterror(req, &status)) {
    3118           0 :                 tevent_req_received(req);
    3119           0 :                 return status;
    3120             :         }
    3121             : 
    3122             :         /* Steal possible out parameters to the callers context */
    3123           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3124             : 
    3125             :         /* Return result */
    3126           0 :         *result = state->orig.out.result;
    3127             : 
    3128           0 :         tevent_req_received(req);
    3129           0 :         return NT_STATUS_OK;
    3130             : }
    3131             : 
    3132           0 : NTSTATUS dcerpc_clusapi_SetResourceName(struct dcerpc_binding_handle *h,
    3133             :                                         TALLOC_CTX *mem_ctx,
    3134             :                                         struct policy_handle _hResource /* [in]  */,
    3135             :                                         const char *_lpszResourceName /* [in] [charset(UTF16),ref] */,
    3136             :                                         WERROR *_rpc_status /* [out] [ref] */,
    3137             :                                         WERROR *result)
    3138             : {
    3139             :         struct clusapi_SetResourceName r;
    3140             :         NTSTATUS status;
    3141             : 
    3142             :         /* In parameters */
    3143           0 :         r.in.hResource = _hResource;
    3144           0 :         r.in.lpszResourceName = _lpszResourceName;
    3145             : 
    3146             :         /* Out parameters */
    3147           0 :         r.out.rpc_status = _rpc_status;
    3148             : 
    3149             :         /* Result */
    3150           0 :         NDR_ZERO_STRUCT(r.out.result);
    3151             : 
    3152           0 :         status = dcerpc_clusapi_SetResourceName_r(h, mem_ctx, &r);
    3153           0 :         if (!NT_STATUS_IS_OK(status)) {
    3154           0 :                 return status;
    3155             :         }
    3156             : 
    3157             :         /* Return variables */
    3158           0 :         *_rpc_status = *r.out.rpc_status;
    3159             : 
    3160             :         /* Return result */
    3161           0 :         *result = r.out.result;
    3162             : 
    3163           0 :         return NT_STATUS_OK;
    3164             : }
    3165             : 
    3166             : struct dcerpc_clusapi_GetResourceId_r_state {
    3167             :         TALLOC_CTX *out_mem_ctx;
    3168             : };
    3169             : 
    3170             : static void dcerpc_clusapi_GetResourceId_r_done(struct tevent_req *subreq);
    3171             : 
    3172           0 : struct tevent_req *dcerpc_clusapi_GetResourceId_r_send(TALLOC_CTX *mem_ctx,
    3173             :         struct tevent_context *ev,
    3174             :         struct dcerpc_binding_handle *h,
    3175             :         struct clusapi_GetResourceId *r)
    3176             : {
    3177             :         struct tevent_req *req;
    3178             :         struct dcerpc_clusapi_GetResourceId_r_state *state;
    3179             :         struct tevent_req *subreq;
    3180             : 
    3181           0 :         req = tevent_req_create(mem_ctx, &state,
    3182             :                                 struct dcerpc_clusapi_GetResourceId_r_state);
    3183           0 :         if (req == NULL) {
    3184           0 :                 return NULL;
    3185             :         }
    3186             : 
    3187           0 :         state->out_mem_ctx = talloc_new(state);
    3188           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3189           0 :                 return tevent_req_post(req, ev);
    3190             :         }
    3191             : 
    3192           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3193             :                         NULL, &ndr_table_clusapi,
    3194           0 :                         NDR_CLUSAPI_GETRESOURCEID, state->out_mem_ctx, r);
    3195           0 :         if (tevent_req_nomem(subreq, req)) {
    3196           0 :                 return tevent_req_post(req, ev);
    3197             :         }
    3198           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetResourceId_r_done, req);
    3199             : 
    3200           0 :         return req;
    3201             : }
    3202             : 
    3203           0 : static void dcerpc_clusapi_GetResourceId_r_done(struct tevent_req *subreq)
    3204             : {
    3205           0 :         struct tevent_req *req =
    3206           0 :                 tevent_req_callback_data(subreq,
    3207             :                 struct tevent_req);
    3208             :         NTSTATUS status;
    3209             : 
    3210           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3211           0 :         TALLOC_FREE(subreq);
    3212           0 :         if (tevent_req_nterror(req, status)) {
    3213           0 :                 return;
    3214             :         }
    3215             : 
    3216           0 :         tevent_req_done(req);
    3217             : }
    3218             : 
    3219           0 : NTSTATUS dcerpc_clusapi_GetResourceId_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3220             : {
    3221           0 :         struct dcerpc_clusapi_GetResourceId_r_state *state =
    3222           0 :                 tevent_req_data(req,
    3223             :                 struct dcerpc_clusapi_GetResourceId_r_state);
    3224             :         NTSTATUS status;
    3225             : 
    3226           0 :         if (tevent_req_is_nterror(req, &status)) {
    3227           0 :                 tevent_req_received(req);
    3228           0 :                 return status;
    3229             :         }
    3230             : 
    3231           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3232             : 
    3233           0 :         tevent_req_received(req);
    3234           0 :         return NT_STATUS_OK;
    3235             : }
    3236             : 
    3237           0 : NTSTATUS dcerpc_clusapi_GetResourceId_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetResourceId *r)
    3238             : {
    3239             :         NTSTATUS status;
    3240             : 
    3241           0 :         status = dcerpc_binding_handle_call(h,
    3242             :                         NULL, &ndr_table_clusapi,
    3243             :                         NDR_CLUSAPI_GETRESOURCEID, mem_ctx, r);
    3244             : 
    3245           0 :         return status;
    3246             : }
    3247             : 
    3248             : struct dcerpc_clusapi_GetResourceId_state {
    3249             :         struct clusapi_GetResourceId orig;
    3250             :         struct clusapi_GetResourceId tmp;
    3251             :         TALLOC_CTX *out_mem_ctx;
    3252             : };
    3253             : 
    3254             : static void dcerpc_clusapi_GetResourceId_done(struct tevent_req *subreq);
    3255             : 
    3256           0 : struct tevent_req *dcerpc_clusapi_GetResourceId_send(TALLOC_CTX *mem_ctx,
    3257             :                                                      struct tevent_context *ev,
    3258             :                                                      struct dcerpc_binding_handle *h,
    3259             :                                                      struct policy_handle _hResource /* [in]  */,
    3260             :                                                      const char **_pGuid /* [out] [charset(UTF16),ref] */,
    3261             :                                                      WERROR *_rpc_status /* [out] [ref] */)
    3262             : {
    3263             :         struct tevent_req *req;
    3264             :         struct dcerpc_clusapi_GetResourceId_state *state;
    3265             :         struct tevent_req *subreq;
    3266             : 
    3267           0 :         req = tevent_req_create(mem_ctx, &state,
    3268             :                                 struct dcerpc_clusapi_GetResourceId_state);
    3269           0 :         if (req == NULL) {
    3270           0 :                 return NULL;
    3271             :         }
    3272           0 :         state->out_mem_ctx = NULL;
    3273             : 
    3274             :         /* In parameters */
    3275           0 :         state->orig.in.hResource = _hResource;
    3276             : 
    3277             :         /* Out parameters */
    3278           0 :         state->orig.out.pGuid = _pGuid;
    3279           0 :         state->orig.out.rpc_status = _rpc_status;
    3280             : 
    3281             :         /* Result */
    3282           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3283             : 
    3284           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3285             :                              "dcerpc_clusapi_GetResourceId_out_memory");
    3286           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3287           0 :                 return tevent_req_post(req, ev);
    3288             :         }
    3289             : 
    3290             :         /* make a temporary copy, that we pass to the dispatch function */
    3291           0 :         state->tmp = state->orig;
    3292             : 
    3293           0 :         subreq = dcerpc_clusapi_GetResourceId_r_send(state, ev, h, &state->tmp);
    3294           0 :         if (tevent_req_nomem(subreq, req)) {
    3295           0 :                 return tevent_req_post(req, ev);
    3296             :         }
    3297           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetResourceId_done, req);
    3298           0 :         return req;
    3299             : }
    3300             : 
    3301           0 : static void dcerpc_clusapi_GetResourceId_done(struct tevent_req *subreq)
    3302             : {
    3303           0 :         struct tevent_req *req = tevent_req_callback_data(
    3304             :                 subreq, struct tevent_req);
    3305           0 :         struct dcerpc_clusapi_GetResourceId_state *state = tevent_req_data(
    3306             :                 req, struct dcerpc_clusapi_GetResourceId_state);
    3307             :         NTSTATUS status;
    3308             :         TALLOC_CTX *mem_ctx;
    3309             : 
    3310           0 :         if (state->out_mem_ctx) {
    3311           0 :                 mem_ctx = state->out_mem_ctx;
    3312             :         } else {
    3313           0 :                 mem_ctx = state;
    3314             :         }
    3315             : 
    3316           0 :         status = dcerpc_clusapi_GetResourceId_r_recv(subreq, mem_ctx);
    3317           0 :         TALLOC_FREE(subreq);
    3318           0 :         if (tevent_req_nterror(req, status)) {
    3319           0 :                 return;
    3320             :         }
    3321             : 
    3322             :         /* Copy out parameters */
    3323           0 :         *state->orig.out.pGuid = *state->tmp.out.pGuid;
    3324           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    3325             : 
    3326             :         /* Copy result */
    3327           0 :         state->orig.out.result = state->tmp.out.result;
    3328             : 
    3329             :         /* Reset temporary structure */
    3330           0 :         NDR_ZERO_STRUCT(state->tmp);
    3331             : 
    3332           0 :         tevent_req_done(req);
    3333             : }
    3334             : 
    3335           0 : NTSTATUS dcerpc_clusapi_GetResourceId_recv(struct tevent_req *req,
    3336             :                                            TALLOC_CTX *mem_ctx,
    3337             :                                            WERROR *result)
    3338             : {
    3339           0 :         struct dcerpc_clusapi_GetResourceId_state *state = tevent_req_data(
    3340             :                 req, struct dcerpc_clusapi_GetResourceId_state);
    3341             :         NTSTATUS status;
    3342             : 
    3343           0 :         if (tevent_req_is_nterror(req, &status)) {
    3344           0 :                 tevent_req_received(req);
    3345           0 :                 return status;
    3346             :         }
    3347             : 
    3348             :         /* Steal possible out parameters to the callers context */
    3349           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3350             : 
    3351             :         /* Return result */
    3352           0 :         *result = state->orig.out.result;
    3353             : 
    3354           0 :         tevent_req_received(req);
    3355           0 :         return NT_STATUS_OK;
    3356             : }
    3357             : 
    3358           0 : NTSTATUS dcerpc_clusapi_GetResourceId(struct dcerpc_binding_handle *h,
    3359             :                                       TALLOC_CTX *mem_ctx,
    3360             :                                       struct policy_handle _hResource /* [in]  */,
    3361             :                                       const char **_pGuid /* [out] [charset(UTF16),ref] */,
    3362             :                                       WERROR *_rpc_status /* [out] [ref] */,
    3363             :                                       WERROR *result)
    3364             : {
    3365             :         struct clusapi_GetResourceId r;
    3366             :         NTSTATUS status;
    3367             : 
    3368             :         /* In parameters */
    3369           0 :         r.in.hResource = _hResource;
    3370             : 
    3371             :         /* Out parameters */
    3372           0 :         r.out.pGuid = _pGuid;
    3373           0 :         r.out.rpc_status = _rpc_status;
    3374             : 
    3375             :         /* Result */
    3376           0 :         NDR_ZERO_STRUCT(r.out.result);
    3377             : 
    3378           0 :         status = dcerpc_clusapi_GetResourceId_r(h, mem_ctx, &r);
    3379           0 :         if (!NT_STATUS_IS_OK(status)) {
    3380           0 :                 return status;
    3381             :         }
    3382             : 
    3383             :         /* Return variables */
    3384           0 :         *_pGuid = *r.out.pGuid;
    3385           0 :         *_rpc_status = *r.out.rpc_status;
    3386             : 
    3387             :         /* Return result */
    3388           0 :         *result = r.out.result;
    3389             : 
    3390           0 :         return NT_STATUS_OK;
    3391             : }
    3392             : 
    3393             : struct dcerpc_clusapi_GetResourceType_r_state {
    3394             :         TALLOC_CTX *out_mem_ctx;
    3395             : };
    3396             : 
    3397             : static void dcerpc_clusapi_GetResourceType_r_done(struct tevent_req *subreq);
    3398             : 
    3399           0 : struct tevent_req *dcerpc_clusapi_GetResourceType_r_send(TALLOC_CTX *mem_ctx,
    3400             :         struct tevent_context *ev,
    3401             :         struct dcerpc_binding_handle *h,
    3402             :         struct clusapi_GetResourceType *r)
    3403             : {
    3404             :         struct tevent_req *req;
    3405             :         struct dcerpc_clusapi_GetResourceType_r_state *state;
    3406             :         struct tevent_req *subreq;
    3407             : 
    3408           0 :         req = tevent_req_create(mem_ctx, &state,
    3409             :                                 struct dcerpc_clusapi_GetResourceType_r_state);
    3410           0 :         if (req == NULL) {
    3411           0 :                 return NULL;
    3412             :         }
    3413             : 
    3414           0 :         state->out_mem_ctx = talloc_new(state);
    3415           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3416           0 :                 return tevent_req_post(req, ev);
    3417             :         }
    3418             : 
    3419           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3420             :                         NULL, &ndr_table_clusapi,
    3421           0 :                         NDR_CLUSAPI_GETRESOURCETYPE, state->out_mem_ctx, r);
    3422           0 :         if (tevent_req_nomem(subreq, req)) {
    3423           0 :                 return tevent_req_post(req, ev);
    3424             :         }
    3425           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetResourceType_r_done, req);
    3426             : 
    3427           0 :         return req;
    3428             : }
    3429             : 
    3430           0 : static void dcerpc_clusapi_GetResourceType_r_done(struct tevent_req *subreq)
    3431             : {
    3432           0 :         struct tevent_req *req =
    3433           0 :                 tevent_req_callback_data(subreq,
    3434             :                 struct tevent_req);
    3435             :         NTSTATUS status;
    3436             : 
    3437           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3438           0 :         TALLOC_FREE(subreq);
    3439           0 :         if (tevent_req_nterror(req, status)) {
    3440           0 :                 return;
    3441             :         }
    3442             : 
    3443           0 :         tevent_req_done(req);
    3444             : }
    3445             : 
    3446           0 : NTSTATUS dcerpc_clusapi_GetResourceType_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3447             : {
    3448           0 :         struct dcerpc_clusapi_GetResourceType_r_state *state =
    3449           0 :                 tevent_req_data(req,
    3450             :                 struct dcerpc_clusapi_GetResourceType_r_state);
    3451             :         NTSTATUS status;
    3452             : 
    3453           0 :         if (tevent_req_is_nterror(req, &status)) {
    3454           0 :                 tevent_req_received(req);
    3455           0 :                 return status;
    3456             :         }
    3457             : 
    3458           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3459             : 
    3460           0 :         tevent_req_received(req);
    3461           0 :         return NT_STATUS_OK;
    3462             : }
    3463             : 
    3464           0 : NTSTATUS dcerpc_clusapi_GetResourceType_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetResourceType *r)
    3465             : {
    3466             :         NTSTATUS status;
    3467             : 
    3468           0 :         status = dcerpc_binding_handle_call(h,
    3469             :                         NULL, &ndr_table_clusapi,
    3470             :                         NDR_CLUSAPI_GETRESOURCETYPE, mem_ctx, r);
    3471             : 
    3472           0 :         return status;
    3473             : }
    3474             : 
    3475             : struct dcerpc_clusapi_GetResourceType_state {
    3476             :         struct clusapi_GetResourceType orig;
    3477             :         struct clusapi_GetResourceType tmp;
    3478             :         TALLOC_CTX *out_mem_ctx;
    3479             : };
    3480             : 
    3481             : static void dcerpc_clusapi_GetResourceType_done(struct tevent_req *subreq);
    3482             : 
    3483           0 : struct tevent_req *dcerpc_clusapi_GetResourceType_send(TALLOC_CTX *mem_ctx,
    3484             :                                                        struct tevent_context *ev,
    3485             :                                                        struct dcerpc_binding_handle *h,
    3486             :                                                        struct policy_handle _hResource /* [in]  */,
    3487             :                                                        const char **_lpszResourceType /* [out] [charset(UTF16),ref] */,
    3488             :                                                        WERROR *_rpc_status /* [out] [ref] */)
    3489             : {
    3490             :         struct tevent_req *req;
    3491             :         struct dcerpc_clusapi_GetResourceType_state *state;
    3492             :         struct tevent_req *subreq;
    3493             : 
    3494           0 :         req = tevent_req_create(mem_ctx, &state,
    3495             :                                 struct dcerpc_clusapi_GetResourceType_state);
    3496           0 :         if (req == NULL) {
    3497           0 :                 return NULL;
    3498             :         }
    3499           0 :         state->out_mem_ctx = NULL;
    3500             : 
    3501             :         /* In parameters */
    3502           0 :         state->orig.in.hResource = _hResource;
    3503             : 
    3504             :         /* Out parameters */
    3505           0 :         state->orig.out.lpszResourceType = _lpszResourceType;
    3506           0 :         state->orig.out.rpc_status = _rpc_status;
    3507             : 
    3508             :         /* Result */
    3509           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3510             : 
    3511           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3512             :                              "dcerpc_clusapi_GetResourceType_out_memory");
    3513           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3514           0 :                 return tevent_req_post(req, ev);
    3515             :         }
    3516             : 
    3517             :         /* make a temporary copy, that we pass to the dispatch function */
    3518           0 :         state->tmp = state->orig;
    3519             : 
    3520           0 :         subreq = dcerpc_clusapi_GetResourceType_r_send(state, ev, h, &state->tmp);
    3521           0 :         if (tevent_req_nomem(subreq, req)) {
    3522           0 :                 return tevent_req_post(req, ev);
    3523             :         }
    3524           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetResourceType_done, req);
    3525           0 :         return req;
    3526             : }
    3527             : 
    3528           0 : static void dcerpc_clusapi_GetResourceType_done(struct tevent_req *subreq)
    3529             : {
    3530           0 :         struct tevent_req *req = tevent_req_callback_data(
    3531             :                 subreq, struct tevent_req);
    3532           0 :         struct dcerpc_clusapi_GetResourceType_state *state = tevent_req_data(
    3533             :                 req, struct dcerpc_clusapi_GetResourceType_state);
    3534             :         NTSTATUS status;
    3535             :         TALLOC_CTX *mem_ctx;
    3536             : 
    3537           0 :         if (state->out_mem_ctx) {
    3538           0 :                 mem_ctx = state->out_mem_ctx;
    3539             :         } else {
    3540           0 :                 mem_ctx = state;
    3541             :         }
    3542             : 
    3543           0 :         status = dcerpc_clusapi_GetResourceType_r_recv(subreq, mem_ctx);
    3544           0 :         TALLOC_FREE(subreq);
    3545           0 :         if (tevent_req_nterror(req, status)) {
    3546           0 :                 return;
    3547             :         }
    3548             : 
    3549             :         /* Copy out parameters */
    3550           0 :         *state->orig.out.lpszResourceType = *state->tmp.out.lpszResourceType;
    3551           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    3552             : 
    3553             :         /* Copy result */
    3554           0 :         state->orig.out.result = state->tmp.out.result;
    3555             : 
    3556             :         /* Reset temporary structure */
    3557           0 :         NDR_ZERO_STRUCT(state->tmp);
    3558             : 
    3559           0 :         tevent_req_done(req);
    3560             : }
    3561             : 
    3562           0 : NTSTATUS dcerpc_clusapi_GetResourceType_recv(struct tevent_req *req,
    3563             :                                              TALLOC_CTX *mem_ctx,
    3564             :                                              WERROR *result)
    3565             : {
    3566           0 :         struct dcerpc_clusapi_GetResourceType_state *state = tevent_req_data(
    3567             :                 req, struct dcerpc_clusapi_GetResourceType_state);
    3568             :         NTSTATUS status;
    3569             : 
    3570           0 :         if (tevent_req_is_nterror(req, &status)) {
    3571           0 :                 tevent_req_received(req);
    3572           0 :                 return status;
    3573             :         }
    3574             : 
    3575             :         /* Steal possible out parameters to the callers context */
    3576           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3577             : 
    3578             :         /* Return result */
    3579           0 :         *result = state->orig.out.result;
    3580             : 
    3581           0 :         tevent_req_received(req);
    3582           0 :         return NT_STATUS_OK;
    3583             : }
    3584             : 
    3585           0 : NTSTATUS dcerpc_clusapi_GetResourceType(struct dcerpc_binding_handle *h,
    3586             :                                         TALLOC_CTX *mem_ctx,
    3587             :                                         struct policy_handle _hResource /* [in]  */,
    3588             :                                         const char **_lpszResourceType /* [out] [charset(UTF16),ref] */,
    3589             :                                         WERROR *_rpc_status /* [out] [ref] */,
    3590             :                                         WERROR *result)
    3591             : {
    3592             :         struct clusapi_GetResourceType r;
    3593             :         NTSTATUS status;
    3594             : 
    3595             :         /* In parameters */
    3596           0 :         r.in.hResource = _hResource;
    3597             : 
    3598             :         /* Out parameters */
    3599           0 :         r.out.lpszResourceType = _lpszResourceType;
    3600           0 :         r.out.rpc_status = _rpc_status;
    3601             : 
    3602             :         /* Result */
    3603           0 :         NDR_ZERO_STRUCT(r.out.result);
    3604             : 
    3605           0 :         status = dcerpc_clusapi_GetResourceType_r(h, mem_ctx, &r);
    3606           0 :         if (!NT_STATUS_IS_OK(status)) {
    3607           0 :                 return status;
    3608             :         }
    3609             : 
    3610             :         /* Return variables */
    3611           0 :         *_lpszResourceType = *r.out.lpszResourceType;
    3612           0 :         *_rpc_status = *r.out.rpc_status;
    3613             : 
    3614             :         /* Return result */
    3615           0 :         *result = r.out.result;
    3616             : 
    3617           0 :         return NT_STATUS_OK;
    3618             : }
    3619             : 
    3620             : struct dcerpc_clusapi_FailResource_r_state {
    3621             :         TALLOC_CTX *out_mem_ctx;
    3622             : };
    3623             : 
    3624             : static void dcerpc_clusapi_FailResource_r_done(struct tevent_req *subreq);
    3625             : 
    3626           0 : struct tevent_req *dcerpc_clusapi_FailResource_r_send(TALLOC_CTX *mem_ctx,
    3627             :         struct tevent_context *ev,
    3628             :         struct dcerpc_binding_handle *h,
    3629             :         struct clusapi_FailResource *r)
    3630             : {
    3631             :         struct tevent_req *req;
    3632             :         struct dcerpc_clusapi_FailResource_r_state *state;
    3633             :         struct tevent_req *subreq;
    3634             : 
    3635           0 :         req = tevent_req_create(mem_ctx, &state,
    3636             :                                 struct dcerpc_clusapi_FailResource_r_state);
    3637           0 :         if (req == NULL) {
    3638           0 :                 return NULL;
    3639             :         }
    3640             : 
    3641           0 :         state->out_mem_ctx = talloc_new(state);
    3642           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3643           0 :                 return tevent_req_post(req, ev);
    3644             :         }
    3645             : 
    3646           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3647             :                         NULL, &ndr_table_clusapi,
    3648           0 :                         NDR_CLUSAPI_FAILRESOURCE, state->out_mem_ctx, r);
    3649           0 :         if (tevent_req_nomem(subreq, req)) {
    3650           0 :                 return tevent_req_post(req, ev);
    3651             :         }
    3652           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_FailResource_r_done, req);
    3653             : 
    3654           0 :         return req;
    3655             : }
    3656             : 
    3657           0 : static void dcerpc_clusapi_FailResource_r_done(struct tevent_req *subreq)
    3658             : {
    3659           0 :         struct tevent_req *req =
    3660           0 :                 tevent_req_callback_data(subreq,
    3661             :                 struct tevent_req);
    3662             :         NTSTATUS status;
    3663             : 
    3664           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3665           0 :         TALLOC_FREE(subreq);
    3666           0 :         if (tevent_req_nterror(req, status)) {
    3667           0 :                 return;
    3668             :         }
    3669             : 
    3670           0 :         tevent_req_done(req);
    3671             : }
    3672             : 
    3673           0 : NTSTATUS dcerpc_clusapi_FailResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3674             : {
    3675           0 :         struct dcerpc_clusapi_FailResource_r_state *state =
    3676           0 :                 tevent_req_data(req,
    3677             :                 struct dcerpc_clusapi_FailResource_r_state);
    3678             :         NTSTATUS status;
    3679             : 
    3680           0 :         if (tevent_req_is_nterror(req, &status)) {
    3681           0 :                 tevent_req_received(req);
    3682           0 :                 return status;
    3683             :         }
    3684             : 
    3685           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3686             : 
    3687           0 :         tevent_req_received(req);
    3688           0 :         return NT_STATUS_OK;
    3689             : }
    3690             : 
    3691           0 : NTSTATUS dcerpc_clusapi_FailResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_FailResource *r)
    3692             : {
    3693             :         NTSTATUS status;
    3694             : 
    3695           0 :         status = dcerpc_binding_handle_call(h,
    3696             :                         NULL, &ndr_table_clusapi,
    3697             :                         NDR_CLUSAPI_FAILRESOURCE, mem_ctx, r);
    3698             : 
    3699           0 :         return status;
    3700             : }
    3701             : 
    3702             : struct dcerpc_clusapi_FailResource_state {
    3703             :         struct clusapi_FailResource orig;
    3704             :         struct clusapi_FailResource tmp;
    3705             :         TALLOC_CTX *out_mem_ctx;
    3706             : };
    3707             : 
    3708             : static void dcerpc_clusapi_FailResource_done(struct tevent_req *subreq);
    3709             : 
    3710           0 : struct tevent_req *dcerpc_clusapi_FailResource_send(TALLOC_CTX *mem_ctx,
    3711             :                                                     struct tevent_context *ev,
    3712             :                                                     struct dcerpc_binding_handle *h,
    3713             :                                                     struct policy_handle _hResource /* [in]  */,
    3714             :                                                     WERROR *_rpc_status /* [out] [ref] */)
    3715             : {
    3716             :         struct tevent_req *req;
    3717             :         struct dcerpc_clusapi_FailResource_state *state;
    3718             :         struct tevent_req *subreq;
    3719             : 
    3720           0 :         req = tevent_req_create(mem_ctx, &state,
    3721             :                                 struct dcerpc_clusapi_FailResource_state);
    3722           0 :         if (req == NULL) {
    3723           0 :                 return NULL;
    3724             :         }
    3725           0 :         state->out_mem_ctx = NULL;
    3726             : 
    3727             :         /* In parameters */
    3728           0 :         state->orig.in.hResource = _hResource;
    3729             : 
    3730             :         /* Out parameters */
    3731           0 :         state->orig.out.rpc_status = _rpc_status;
    3732             : 
    3733             :         /* Result */
    3734           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3735             : 
    3736           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3737             :                              "dcerpc_clusapi_FailResource_out_memory");
    3738           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3739           0 :                 return tevent_req_post(req, ev);
    3740             :         }
    3741             : 
    3742             :         /* make a temporary copy, that we pass to the dispatch function */
    3743           0 :         state->tmp = state->orig;
    3744             : 
    3745           0 :         subreq = dcerpc_clusapi_FailResource_r_send(state, ev, h, &state->tmp);
    3746           0 :         if (tevent_req_nomem(subreq, req)) {
    3747           0 :                 return tevent_req_post(req, ev);
    3748             :         }
    3749           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_FailResource_done, req);
    3750           0 :         return req;
    3751             : }
    3752             : 
    3753           0 : static void dcerpc_clusapi_FailResource_done(struct tevent_req *subreq)
    3754             : {
    3755           0 :         struct tevent_req *req = tevent_req_callback_data(
    3756             :                 subreq, struct tevent_req);
    3757           0 :         struct dcerpc_clusapi_FailResource_state *state = tevent_req_data(
    3758             :                 req, struct dcerpc_clusapi_FailResource_state);
    3759             :         NTSTATUS status;
    3760             :         TALLOC_CTX *mem_ctx;
    3761             : 
    3762           0 :         if (state->out_mem_ctx) {
    3763           0 :                 mem_ctx = state->out_mem_ctx;
    3764             :         } else {
    3765           0 :                 mem_ctx = state;
    3766             :         }
    3767             : 
    3768           0 :         status = dcerpc_clusapi_FailResource_r_recv(subreq, mem_ctx);
    3769           0 :         TALLOC_FREE(subreq);
    3770           0 :         if (tevent_req_nterror(req, status)) {
    3771           0 :                 return;
    3772             :         }
    3773             : 
    3774             :         /* Copy out parameters */
    3775           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    3776             : 
    3777             :         /* Copy result */
    3778           0 :         state->orig.out.result = state->tmp.out.result;
    3779             : 
    3780             :         /* Reset temporary structure */
    3781           0 :         NDR_ZERO_STRUCT(state->tmp);
    3782             : 
    3783           0 :         tevent_req_done(req);
    3784             : }
    3785             : 
    3786           0 : NTSTATUS dcerpc_clusapi_FailResource_recv(struct tevent_req *req,
    3787             :                                           TALLOC_CTX *mem_ctx,
    3788             :                                           WERROR *result)
    3789             : {
    3790           0 :         struct dcerpc_clusapi_FailResource_state *state = tevent_req_data(
    3791             :                 req, struct dcerpc_clusapi_FailResource_state);
    3792             :         NTSTATUS status;
    3793             : 
    3794           0 :         if (tevent_req_is_nterror(req, &status)) {
    3795           0 :                 tevent_req_received(req);
    3796           0 :                 return status;
    3797             :         }
    3798             : 
    3799             :         /* Steal possible out parameters to the callers context */
    3800           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3801             : 
    3802             :         /* Return result */
    3803           0 :         *result = state->orig.out.result;
    3804             : 
    3805           0 :         tevent_req_received(req);
    3806           0 :         return NT_STATUS_OK;
    3807             : }
    3808             : 
    3809           0 : NTSTATUS dcerpc_clusapi_FailResource(struct dcerpc_binding_handle *h,
    3810             :                                      TALLOC_CTX *mem_ctx,
    3811             :                                      struct policy_handle _hResource /* [in]  */,
    3812             :                                      WERROR *_rpc_status /* [out] [ref] */,
    3813             :                                      WERROR *result)
    3814             : {
    3815             :         struct clusapi_FailResource r;
    3816             :         NTSTATUS status;
    3817             : 
    3818             :         /* In parameters */
    3819           0 :         r.in.hResource = _hResource;
    3820             : 
    3821             :         /* Out parameters */
    3822           0 :         r.out.rpc_status = _rpc_status;
    3823             : 
    3824             :         /* Result */
    3825           0 :         NDR_ZERO_STRUCT(r.out.result);
    3826             : 
    3827           0 :         status = dcerpc_clusapi_FailResource_r(h, mem_ctx, &r);
    3828           0 :         if (!NT_STATUS_IS_OK(status)) {
    3829           0 :                 return status;
    3830             :         }
    3831             : 
    3832             :         /* Return variables */
    3833           0 :         *_rpc_status = *r.out.rpc_status;
    3834             : 
    3835             :         /* Return result */
    3836           0 :         *result = r.out.result;
    3837             : 
    3838           0 :         return NT_STATUS_OK;
    3839             : }
    3840             : 
    3841             : struct dcerpc_clusapi_OnlineResource_r_state {
    3842             :         TALLOC_CTX *out_mem_ctx;
    3843             : };
    3844             : 
    3845             : static void dcerpc_clusapi_OnlineResource_r_done(struct tevent_req *subreq);
    3846             : 
    3847           0 : struct tevent_req *dcerpc_clusapi_OnlineResource_r_send(TALLOC_CTX *mem_ctx,
    3848             :         struct tevent_context *ev,
    3849             :         struct dcerpc_binding_handle *h,
    3850             :         struct clusapi_OnlineResource *r)
    3851             : {
    3852             :         struct tevent_req *req;
    3853             :         struct dcerpc_clusapi_OnlineResource_r_state *state;
    3854             :         struct tevent_req *subreq;
    3855             : 
    3856           0 :         req = tevent_req_create(mem_ctx, &state,
    3857             :                                 struct dcerpc_clusapi_OnlineResource_r_state);
    3858           0 :         if (req == NULL) {
    3859           0 :                 return NULL;
    3860             :         }
    3861             : 
    3862           0 :         state->out_mem_ctx = talloc_new(state);
    3863           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3864           0 :                 return tevent_req_post(req, ev);
    3865             :         }
    3866             : 
    3867           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3868             :                         NULL, &ndr_table_clusapi,
    3869           0 :                         NDR_CLUSAPI_ONLINERESOURCE, state->out_mem_ctx, r);
    3870           0 :         if (tevent_req_nomem(subreq, req)) {
    3871           0 :                 return tevent_req_post(req, ev);
    3872             :         }
    3873           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OnlineResource_r_done, req);
    3874             : 
    3875           0 :         return req;
    3876             : }
    3877             : 
    3878           0 : static void dcerpc_clusapi_OnlineResource_r_done(struct tevent_req *subreq)
    3879             : {
    3880           0 :         struct tevent_req *req =
    3881           0 :                 tevent_req_callback_data(subreq,
    3882             :                 struct tevent_req);
    3883             :         NTSTATUS status;
    3884             : 
    3885           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3886           0 :         TALLOC_FREE(subreq);
    3887           0 :         if (tevent_req_nterror(req, status)) {
    3888           0 :                 return;
    3889             :         }
    3890             : 
    3891           0 :         tevent_req_done(req);
    3892             : }
    3893             : 
    3894           0 : NTSTATUS dcerpc_clusapi_OnlineResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3895             : {
    3896           0 :         struct dcerpc_clusapi_OnlineResource_r_state *state =
    3897           0 :                 tevent_req_data(req,
    3898             :                 struct dcerpc_clusapi_OnlineResource_r_state);
    3899             :         NTSTATUS status;
    3900             : 
    3901           0 :         if (tevent_req_is_nterror(req, &status)) {
    3902           0 :                 tevent_req_received(req);
    3903           0 :                 return status;
    3904             :         }
    3905             : 
    3906           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3907             : 
    3908           0 :         tevent_req_received(req);
    3909           0 :         return NT_STATUS_OK;
    3910             : }
    3911             : 
    3912           0 : NTSTATUS dcerpc_clusapi_OnlineResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_OnlineResource *r)
    3913             : {
    3914             :         NTSTATUS status;
    3915             : 
    3916           0 :         status = dcerpc_binding_handle_call(h,
    3917             :                         NULL, &ndr_table_clusapi,
    3918             :                         NDR_CLUSAPI_ONLINERESOURCE, mem_ctx, r);
    3919             : 
    3920           0 :         return status;
    3921             : }
    3922             : 
    3923             : struct dcerpc_clusapi_OnlineResource_state {
    3924             :         struct clusapi_OnlineResource orig;
    3925             :         struct clusapi_OnlineResource tmp;
    3926             :         TALLOC_CTX *out_mem_ctx;
    3927             : };
    3928             : 
    3929             : static void dcerpc_clusapi_OnlineResource_done(struct tevent_req *subreq);
    3930             : 
    3931           0 : struct tevent_req *dcerpc_clusapi_OnlineResource_send(TALLOC_CTX *mem_ctx,
    3932             :                                                       struct tevent_context *ev,
    3933             :                                                       struct dcerpc_binding_handle *h,
    3934             :                                                       struct policy_handle _hResource /* [in]  */,
    3935             :                                                       WERROR *_rpc_status /* [out] [ref] */)
    3936             : {
    3937             :         struct tevent_req *req;
    3938             :         struct dcerpc_clusapi_OnlineResource_state *state;
    3939             :         struct tevent_req *subreq;
    3940             : 
    3941           0 :         req = tevent_req_create(mem_ctx, &state,
    3942             :                                 struct dcerpc_clusapi_OnlineResource_state);
    3943           0 :         if (req == NULL) {
    3944           0 :                 return NULL;
    3945             :         }
    3946           0 :         state->out_mem_ctx = NULL;
    3947             : 
    3948             :         /* In parameters */
    3949           0 :         state->orig.in.hResource = _hResource;
    3950             : 
    3951             :         /* Out parameters */
    3952           0 :         state->orig.out.rpc_status = _rpc_status;
    3953             : 
    3954             :         /* Result */
    3955           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3956             : 
    3957           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3958             :                              "dcerpc_clusapi_OnlineResource_out_memory");
    3959           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3960           0 :                 return tevent_req_post(req, ev);
    3961             :         }
    3962             : 
    3963             :         /* make a temporary copy, that we pass to the dispatch function */
    3964           0 :         state->tmp = state->orig;
    3965             : 
    3966           0 :         subreq = dcerpc_clusapi_OnlineResource_r_send(state, ev, h, &state->tmp);
    3967           0 :         if (tevent_req_nomem(subreq, req)) {
    3968           0 :                 return tevent_req_post(req, ev);
    3969             :         }
    3970           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OnlineResource_done, req);
    3971           0 :         return req;
    3972             : }
    3973             : 
    3974           0 : static void dcerpc_clusapi_OnlineResource_done(struct tevent_req *subreq)
    3975             : {
    3976           0 :         struct tevent_req *req = tevent_req_callback_data(
    3977             :                 subreq, struct tevent_req);
    3978           0 :         struct dcerpc_clusapi_OnlineResource_state *state = tevent_req_data(
    3979             :                 req, struct dcerpc_clusapi_OnlineResource_state);
    3980             :         NTSTATUS status;
    3981             :         TALLOC_CTX *mem_ctx;
    3982             : 
    3983           0 :         if (state->out_mem_ctx) {
    3984           0 :                 mem_ctx = state->out_mem_ctx;
    3985             :         } else {
    3986           0 :                 mem_ctx = state;
    3987             :         }
    3988             : 
    3989           0 :         status = dcerpc_clusapi_OnlineResource_r_recv(subreq, mem_ctx);
    3990           0 :         TALLOC_FREE(subreq);
    3991           0 :         if (tevent_req_nterror(req, status)) {
    3992           0 :                 return;
    3993             :         }
    3994             : 
    3995             :         /* Copy out parameters */
    3996           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    3997             : 
    3998             :         /* Copy result */
    3999           0 :         state->orig.out.result = state->tmp.out.result;
    4000             : 
    4001             :         /* Reset temporary structure */
    4002           0 :         NDR_ZERO_STRUCT(state->tmp);
    4003             : 
    4004           0 :         tevent_req_done(req);
    4005             : }
    4006             : 
    4007           0 : NTSTATUS dcerpc_clusapi_OnlineResource_recv(struct tevent_req *req,
    4008             :                                             TALLOC_CTX *mem_ctx,
    4009             :                                             WERROR *result)
    4010             : {
    4011           0 :         struct dcerpc_clusapi_OnlineResource_state *state = tevent_req_data(
    4012             :                 req, struct dcerpc_clusapi_OnlineResource_state);
    4013             :         NTSTATUS status;
    4014             : 
    4015           0 :         if (tevent_req_is_nterror(req, &status)) {
    4016           0 :                 tevent_req_received(req);
    4017           0 :                 return status;
    4018             :         }
    4019             : 
    4020             :         /* Steal possible out parameters to the callers context */
    4021           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4022             : 
    4023             :         /* Return result */
    4024           0 :         *result = state->orig.out.result;
    4025             : 
    4026           0 :         tevent_req_received(req);
    4027           0 :         return NT_STATUS_OK;
    4028             : }
    4029             : 
    4030           0 : NTSTATUS dcerpc_clusapi_OnlineResource(struct dcerpc_binding_handle *h,
    4031             :                                        TALLOC_CTX *mem_ctx,
    4032             :                                        struct policy_handle _hResource /* [in]  */,
    4033             :                                        WERROR *_rpc_status /* [out] [ref] */,
    4034             :                                        WERROR *result)
    4035             : {
    4036             :         struct clusapi_OnlineResource r;
    4037             :         NTSTATUS status;
    4038             : 
    4039             :         /* In parameters */
    4040           0 :         r.in.hResource = _hResource;
    4041             : 
    4042             :         /* Out parameters */
    4043           0 :         r.out.rpc_status = _rpc_status;
    4044             : 
    4045             :         /* Result */
    4046           0 :         NDR_ZERO_STRUCT(r.out.result);
    4047             : 
    4048           0 :         status = dcerpc_clusapi_OnlineResource_r(h, mem_ctx, &r);
    4049           0 :         if (!NT_STATUS_IS_OK(status)) {
    4050           0 :                 return status;
    4051             :         }
    4052             : 
    4053             :         /* Return variables */
    4054           0 :         *_rpc_status = *r.out.rpc_status;
    4055             : 
    4056             :         /* Return result */
    4057           0 :         *result = r.out.result;
    4058             : 
    4059           0 :         return NT_STATUS_OK;
    4060             : }
    4061             : 
    4062             : struct dcerpc_clusapi_OfflineResource_r_state {
    4063             :         TALLOC_CTX *out_mem_ctx;
    4064             : };
    4065             : 
    4066             : static void dcerpc_clusapi_OfflineResource_r_done(struct tevent_req *subreq);
    4067             : 
    4068           0 : struct tevent_req *dcerpc_clusapi_OfflineResource_r_send(TALLOC_CTX *mem_ctx,
    4069             :         struct tevent_context *ev,
    4070             :         struct dcerpc_binding_handle *h,
    4071             :         struct clusapi_OfflineResource *r)
    4072             : {
    4073             :         struct tevent_req *req;
    4074             :         struct dcerpc_clusapi_OfflineResource_r_state *state;
    4075             :         struct tevent_req *subreq;
    4076             : 
    4077           0 :         req = tevent_req_create(mem_ctx, &state,
    4078             :                                 struct dcerpc_clusapi_OfflineResource_r_state);
    4079           0 :         if (req == NULL) {
    4080           0 :                 return NULL;
    4081             :         }
    4082             : 
    4083           0 :         state->out_mem_ctx = talloc_new(state);
    4084           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4085           0 :                 return tevent_req_post(req, ev);
    4086             :         }
    4087             : 
    4088           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4089             :                         NULL, &ndr_table_clusapi,
    4090           0 :                         NDR_CLUSAPI_OFFLINERESOURCE, state->out_mem_ctx, r);
    4091           0 :         if (tevent_req_nomem(subreq, req)) {
    4092           0 :                 return tevent_req_post(req, ev);
    4093             :         }
    4094           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OfflineResource_r_done, req);
    4095             : 
    4096           0 :         return req;
    4097             : }
    4098             : 
    4099           0 : static void dcerpc_clusapi_OfflineResource_r_done(struct tevent_req *subreq)
    4100             : {
    4101           0 :         struct tevent_req *req =
    4102           0 :                 tevent_req_callback_data(subreq,
    4103             :                 struct tevent_req);
    4104             :         NTSTATUS status;
    4105             : 
    4106           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4107           0 :         TALLOC_FREE(subreq);
    4108           0 :         if (tevent_req_nterror(req, status)) {
    4109           0 :                 return;
    4110             :         }
    4111             : 
    4112           0 :         tevent_req_done(req);
    4113             : }
    4114             : 
    4115           0 : NTSTATUS dcerpc_clusapi_OfflineResource_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4116             : {
    4117           0 :         struct dcerpc_clusapi_OfflineResource_r_state *state =
    4118           0 :                 tevent_req_data(req,
    4119             :                 struct dcerpc_clusapi_OfflineResource_r_state);
    4120             :         NTSTATUS status;
    4121             : 
    4122           0 :         if (tevent_req_is_nterror(req, &status)) {
    4123           0 :                 tevent_req_received(req);
    4124           0 :                 return status;
    4125             :         }
    4126             : 
    4127           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4128             : 
    4129           0 :         tevent_req_received(req);
    4130           0 :         return NT_STATUS_OK;
    4131             : }
    4132             : 
    4133           0 : NTSTATUS dcerpc_clusapi_OfflineResource_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_OfflineResource *r)
    4134             : {
    4135             :         NTSTATUS status;
    4136             : 
    4137           0 :         status = dcerpc_binding_handle_call(h,
    4138             :                         NULL, &ndr_table_clusapi,
    4139             :                         NDR_CLUSAPI_OFFLINERESOURCE, mem_ctx, r);
    4140             : 
    4141           0 :         return status;
    4142             : }
    4143             : 
    4144             : struct dcerpc_clusapi_OfflineResource_state {
    4145             :         struct clusapi_OfflineResource orig;
    4146             :         struct clusapi_OfflineResource tmp;
    4147             :         TALLOC_CTX *out_mem_ctx;
    4148             : };
    4149             : 
    4150             : static void dcerpc_clusapi_OfflineResource_done(struct tevent_req *subreq);
    4151             : 
    4152           0 : struct tevent_req *dcerpc_clusapi_OfflineResource_send(TALLOC_CTX *mem_ctx,
    4153             :                                                        struct tevent_context *ev,
    4154             :                                                        struct dcerpc_binding_handle *h,
    4155             :                                                        struct policy_handle _hResource /* [in]  */,
    4156             :                                                        WERROR *_rpc_status /* [out] [ref] */)
    4157             : {
    4158             :         struct tevent_req *req;
    4159             :         struct dcerpc_clusapi_OfflineResource_state *state;
    4160             :         struct tevent_req *subreq;
    4161             : 
    4162           0 :         req = tevent_req_create(mem_ctx, &state,
    4163             :                                 struct dcerpc_clusapi_OfflineResource_state);
    4164           0 :         if (req == NULL) {
    4165           0 :                 return NULL;
    4166             :         }
    4167           0 :         state->out_mem_ctx = NULL;
    4168             : 
    4169             :         /* In parameters */
    4170           0 :         state->orig.in.hResource = _hResource;
    4171             : 
    4172             :         /* Out parameters */
    4173           0 :         state->orig.out.rpc_status = _rpc_status;
    4174             : 
    4175             :         /* Result */
    4176           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4177             : 
    4178           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4179             :                              "dcerpc_clusapi_OfflineResource_out_memory");
    4180           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4181           0 :                 return tevent_req_post(req, ev);
    4182             :         }
    4183             : 
    4184             :         /* make a temporary copy, that we pass to the dispatch function */
    4185           0 :         state->tmp = state->orig;
    4186             : 
    4187           0 :         subreq = dcerpc_clusapi_OfflineResource_r_send(state, ev, h, &state->tmp);
    4188           0 :         if (tevent_req_nomem(subreq, req)) {
    4189           0 :                 return tevent_req_post(req, ev);
    4190             :         }
    4191           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OfflineResource_done, req);
    4192           0 :         return req;
    4193             : }
    4194             : 
    4195           0 : static void dcerpc_clusapi_OfflineResource_done(struct tevent_req *subreq)
    4196             : {
    4197           0 :         struct tevent_req *req = tevent_req_callback_data(
    4198             :                 subreq, struct tevent_req);
    4199           0 :         struct dcerpc_clusapi_OfflineResource_state *state = tevent_req_data(
    4200             :                 req, struct dcerpc_clusapi_OfflineResource_state);
    4201             :         NTSTATUS status;
    4202             :         TALLOC_CTX *mem_ctx;
    4203             : 
    4204           0 :         if (state->out_mem_ctx) {
    4205           0 :                 mem_ctx = state->out_mem_ctx;
    4206             :         } else {
    4207           0 :                 mem_ctx = state;
    4208             :         }
    4209             : 
    4210           0 :         status = dcerpc_clusapi_OfflineResource_r_recv(subreq, mem_ctx);
    4211           0 :         TALLOC_FREE(subreq);
    4212           0 :         if (tevent_req_nterror(req, status)) {
    4213           0 :                 return;
    4214             :         }
    4215             : 
    4216             :         /* Copy out parameters */
    4217           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    4218             : 
    4219             :         /* Copy result */
    4220           0 :         state->orig.out.result = state->tmp.out.result;
    4221             : 
    4222             :         /* Reset temporary structure */
    4223           0 :         NDR_ZERO_STRUCT(state->tmp);
    4224             : 
    4225           0 :         tevent_req_done(req);
    4226             : }
    4227             : 
    4228           0 : NTSTATUS dcerpc_clusapi_OfflineResource_recv(struct tevent_req *req,
    4229             :                                              TALLOC_CTX *mem_ctx,
    4230             :                                              WERROR *result)
    4231             : {
    4232           0 :         struct dcerpc_clusapi_OfflineResource_state *state = tevent_req_data(
    4233             :                 req, struct dcerpc_clusapi_OfflineResource_state);
    4234             :         NTSTATUS status;
    4235             : 
    4236           0 :         if (tevent_req_is_nterror(req, &status)) {
    4237           0 :                 tevent_req_received(req);
    4238           0 :                 return status;
    4239             :         }
    4240             : 
    4241             :         /* Steal possible out parameters to the callers context */
    4242           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4243             : 
    4244             :         /* Return result */
    4245           0 :         *result = state->orig.out.result;
    4246             : 
    4247           0 :         tevent_req_received(req);
    4248           0 :         return NT_STATUS_OK;
    4249             : }
    4250             : 
    4251           0 : NTSTATUS dcerpc_clusapi_OfflineResource(struct dcerpc_binding_handle *h,
    4252             :                                         TALLOC_CTX *mem_ctx,
    4253             :                                         struct policy_handle _hResource /* [in]  */,
    4254             :                                         WERROR *_rpc_status /* [out] [ref] */,
    4255             :                                         WERROR *result)
    4256             : {
    4257             :         struct clusapi_OfflineResource r;
    4258             :         NTSTATUS status;
    4259             : 
    4260             :         /* In parameters */
    4261           0 :         r.in.hResource = _hResource;
    4262             : 
    4263             :         /* Out parameters */
    4264           0 :         r.out.rpc_status = _rpc_status;
    4265             : 
    4266             :         /* Result */
    4267           0 :         NDR_ZERO_STRUCT(r.out.result);
    4268             : 
    4269           0 :         status = dcerpc_clusapi_OfflineResource_r(h, mem_ctx, &r);
    4270           0 :         if (!NT_STATUS_IS_OK(status)) {
    4271           0 :                 return status;
    4272             :         }
    4273             : 
    4274             :         /* Return variables */
    4275           0 :         *_rpc_status = *r.out.rpc_status;
    4276             : 
    4277             :         /* Return result */
    4278           0 :         *result = r.out.result;
    4279             : 
    4280           0 :         return NT_STATUS_OK;
    4281             : }
    4282             : 
    4283             : struct dcerpc_clusapi_AddResourceDependency_r_state {
    4284             :         TALLOC_CTX *out_mem_ctx;
    4285             : };
    4286             : 
    4287             : static void dcerpc_clusapi_AddResourceDependency_r_done(struct tevent_req *subreq);
    4288             : 
    4289           0 : struct tevent_req *dcerpc_clusapi_AddResourceDependency_r_send(TALLOC_CTX *mem_ctx,
    4290             :         struct tevent_context *ev,
    4291             :         struct dcerpc_binding_handle *h,
    4292             :         struct clusapi_AddResourceDependency *r)
    4293             : {
    4294             :         struct tevent_req *req;
    4295             :         struct dcerpc_clusapi_AddResourceDependency_r_state *state;
    4296             :         struct tevent_req *subreq;
    4297             : 
    4298           0 :         req = tevent_req_create(mem_ctx, &state,
    4299             :                                 struct dcerpc_clusapi_AddResourceDependency_r_state);
    4300           0 :         if (req == NULL) {
    4301           0 :                 return NULL;
    4302             :         }
    4303             : 
    4304           0 :         state->out_mem_ctx = talloc_new(state);
    4305           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4306           0 :                 return tevent_req_post(req, ev);
    4307             :         }
    4308             : 
    4309           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4310             :                         NULL, &ndr_table_clusapi,
    4311           0 :                         NDR_CLUSAPI_ADDRESOURCEDEPENDENCY, state->out_mem_ctx, r);
    4312           0 :         if (tevent_req_nomem(subreq, req)) {
    4313           0 :                 return tevent_req_post(req, ev);
    4314             :         }
    4315           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_AddResourceDependency_r_done, req);
    4316             : 
    4317           0 :         return req;
    4318             : }
    4319             : 
    4320           0 : static void dcerpc_clusapi_AddResourceDependency_r_done(struct tevent_req *subreq)
    4321             : {
    4322           0 :         struct tevent_req *req =
    4323           0 :                 tevent_req_callback_data(subreq,
    4324             :                 struct tevent_req);
    4325             :         NTSTATUS status;
    4326             : 
    4327           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4328           0 :         TALLOC_FREE(subreq);
    4329           0 :         if (tevent_req_nterror(req, status)) {
    4330           0 :                 return;
    4331             :         }
    4332             : 
    4333           0 :         tevent_req_done(req);
    4334             : }
    4335             : 
    4336           0 : NTSTATUS dcerpc_clusapi_AddResourceDependency_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4337             : {
    4338           0 :         struct dcerpc_clusapi_AddResourceDependency_r_state *state =
    4339           0 :                 tevent_req_data(req,
    4340             :                 struct dcerpc_clusapi_AddResourceDependency_r_state);
    4341             :         NTSTATUS status;
    4342             : 
    4343           0 :         if (tevent_req_is_nterror(req, &status)) {
    4344           0 :                 tevent_req_received(req);
    4345           0 :                 return status;
    4346             :         }
    4347             : 
    4348           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4349             : 
    4350           0 :         tevent_req_received(req);
    4351           0 :         return NT_STATUS_OK;
    4352             : }
    4353             : 
    4354           0 : NTSTATUS dcerpc_clusapi_AddResourceDependency_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_AddResourceDependency *r)
    4355             : {
    4356             :         NTSTATUS status;
    4357             : 
    4358           0 :         status = dcerpc_binding_handle_call(h,
    4359             :                         NULL, &ndr_table_clusapi,
    4360             :                         NDR_CLUSAPI_ADDRESOURCEDEPENDENCY, mem_ctx, r);
    4361             : 
    4362           0 :         return status;
    4363             : }
    4364             : 
    4365             : struct dcerpc_clusapi_AddResourceDependency_state {
    4366             :         struct clusapi_AddResourceDependency orig;
    4367             :         struct clusapi_AddResourceDependency tmp;
    4368             :         TALLOC_CTX *out_mem_ctx;
    4369             : };
    4370             : 
    4371             : static void dcerpc_clusapi_AddResourceDependency_done(struct tevent_req *subreq);
    4372             : 
    4373           0 : struct tevent_req *dcerpc_clusapi_AddResourceDependency_send(TALLOC_CTX *mem_ctx,
    4374             :                                                              struct tevent_context *ev,
    4375             :                                                              struct dcerpc_binding_handle *h,
    4376             :                                                              struct policy_handle _hResource /* [in]  */,
    4377             :                                                              struct policy_handle _hDependsOn /* [in]  */,
    4378             :                                                              WERROR *_rpc_status /* [out] [ref] */)
    4379             : {
    4380             :         struct tevent_req *req;
    4381             :         struct dcerpc_clusapi_AddResourceDependency_state *state;
    4382             :         struct tevent_req *subreq;
    4383             : 
    4384           0 :         req = tevent_req_create(mem_ctx, &state,
    4385             :                                 struct dcerpc_clusapi_AddResourceDependency_state);
    4386           0 :         if (req == NULL) {
    4387           0 :                 return NULL;
    4388             :         }
    4389           0 :         state->out_mem_ctx = NULL;
    4390             : 
    4391             :         /* In parameters */
    4392           0 :         state->orig.in.hResource = _hResource;
    4393           0 :         state->orig.in.hDependsOn = _hDependsOn;
    4394             : 
    4395             :         /* Out parameters */
    4396           0 :         state->orig.out.rpc_status = _rpc_status;
    4397             : 
    4398             :         /* Result */
    4399           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4400             : 
    4401           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4402             :                              "dcerpc_clusapi_AddResourceDependency_out_memory");
    4403           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4404           0 :                 return tevent_req_post(req, ev);
    4405             :         }
    4406             : 
    4407             :         /* make a temporary copy, that we pass to the dispatch function */
    4408           0 :         state->tmp = state->orig;
    4409             : 
    4410           0 :         subreq = dcerpc_clusapi_AddResourceDependency_r_send(state, ev, h, &state->tmp);
    4411           0 :         if (tevent_req_nomem(subreq, req)) {
    4412           0 :                 return tevent_req_post(req, ev);
    4413             :         }
    4414           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_AddResourceDependency_done, req);
    4415           0 :         return req;
    4416             : }
    4417             : 
    4418           0 : static void dcerpc_clusapi_AddResourceDependency_done(struct tevent_req *subreq)
    4419             : {
    4420           0 :         struct tevent_req *req = tevent_req_callback_data(
    4421             :                 subreq, struct tevent_req);
    4422           0 :         struct dcerpc_clusapi_AddResourceDependency_state *state = tevent_req_data(
    4423             :                 req, struct dcerpc_clusapi_AddResourceDependency_state);
    4424             :         NTSTATUS status;
    4425             :         TALLOC_CTX *mem_ctx;
    4426             : 
    4427           0 :         if (state->out_mem_ctx) {
    4428           0 :                 mem_ctx = state->out_mem_ctx;
    4429             :         } else {
    4430           0 :                 mem_ctx = state;
    4431             :         }
    4432             : 
    4433           0 :         status = dcerpc_clusapi_AddResourceDependency_r_recv(subreq, mem_ctx);
    4434           0 :         TALLOC_FREE(subreq);
    4435           0 :         if (tevent_req_nterror(req, status)) {
    4436           0 :                 return;
    4437             :         }
    4438             : 
    4439             :         /* Copy out parameters */
    4440           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    4441             : 
    4442             :         /* Copy result */
    4443           0 :         state->orig.out.result = state->tmp.out.result;
    4444             : 
    4445             :         /* Reset temporary structure */
    4446           0 :         NDR_ZERO_STRUCT(state->tmp);
    4447             : 
    4448           0 :         tevent_req_done(req);
    4449             : }
    4450             : 
    4451           0 : NTSTATUS dcerpc_clusapi_AddResourceDependency_recv(struct tevent_req *req,
    4452             :                                                    TALLOC_CTX *mem_ctx,
    4453             :                                                    WERROR *result)
    4454             : {
    4455           0 :         struct dcerpc_clusapi_AddResourceDependency_state *state = tevent_req_data(
    4456             :                 req, struct dcerpc_clusapi_AddResourceDependency_state);
    4457             :         NTSTATUS status;
    4458             : 
    4459           0 :         if (tevent_req_is_nterror(req, &status)) {
    4460           0 :                 tevent_req_received(req);
    4461           0 :                 return status;
    4462             :         }
    4463             : 
    4464             :         /* Steal possible out parameters to the callers context */
    4465           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4466             : 
    4467             :         /* Return result */
    4468           0 :         *result = state->orig.out.result;
    4469             : 
    4470           0 :         tevent_req_received(req);
    4471           0 :         return NT_STATUS_OK;
    4472             : }
    4473             : 
    4474           0 : NTSTATUS dcerpc_clusapi_AddResourceDependency(struct dcerpc_binding_handle *h,
    4475             :                                               TALLOC_CTX *mem_ctx,
    4476             :                                               struct policy_handle _hResource /* [in]  */,
    4477             :                                               struct policy_handle _hDependsOn /* [in]  */,
    4478             :                                               WERROR *_rpc_status /* [out] [ref] */,
    4479             :                                               WERROR *result)
    4480             : {
    4481             :         struct clusapi_AddResourceDependency r;
    4482             :         NTSTATUS status;
    4483             : 
    4484             :         /* In parameters */
    4485           0 :         r.in.hResource = _hResource;
    4486           0 :         r.in.hDependsOn = _hDependsOn;
    4487             : 
    4488             :         /* Out parameters */
    4489           0 :         r.out.rpc_status = _rpc_status;
    4490             : 
    4491             :         /* Result */
    4492           0 :         NDR_ZERO_STRUCT(r.out.result);
    4493             : 
    4494           0 :         status = dcerpc_clusapi_AddResourceDependency_r(h, mem_ctx, &r);
    4495           0 :         if (!NT_STATUS_IS_OK(status)) {
    4496           0 :                 return status;
    4497             :         }
    4498             : 
    4499             :         /* Return variables */
    4500           0 :         *_rpc_status = *r.out.rpc_status;
    4501             : 
    4502             :         /* Return result */
    4503           0 :         *result = r.out.result;
    4504             : 
    4505           0 :         return NT_STATUS_OK;
    4506             : }
    4507             : 
    4508             : struct dcerpc_clusapi_RemoveResourceDependency_r_state {
    4509             :         TALLOC_CTX *out_mem_ctx;
    4510             : };
    4511             : 
    4512             : static void dcerpc_clusapi_RemoveResourceDependency_r_done(struct tevent_req *subreq);
    4513             : 
    4514           0 : struct tevent_req *dcerpc_clusapi_RemoveResourceDependency_r_send(TALLOC_CTX *mem_ctx,
    4515             :         struct tevent_context *ev,
    4516             :         struct dcerpc_binding_handle *h,
    4517             :         struct clusapi_RemoveResourceDependency *r)
    4518             : {
    4519             :         struct tevent_req *req;
    4520             :         struct dcerpc_clusapi_RemoveResourceDependency_r_state *state;
    4521             :         struct tevent_req *subreq;
    4522             : 
    4523           0 :         req = tevent_req_create(mem_ctx, &state,
    4524             :                                 struct dcerpc_clusapi_RemoveResourceDependency_r_state);
    4525           0 :         if (req == NULL) {
    4526           0 :                 return NULL;
    4527             :         }
    4528             : 
    4529           0 :         state->out_mem_ctx = talloc_new(state);
    4530           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4531           0 :                 return tevent_req_post(req, ev);
    4532             :         }
    4533             : 
    4534           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4535             :                         NULL, &ndr_table_clusapi,
    4536           0 :                         NDR_CLUSAPI_REMOVERESOURCEDEPENDENCY, state->out_mem_ctx, r);
    4537           0 :         if (tevent_req_nomem(subreq, req)) {
    4538           0 :                 return tevent_req_post(req, ev);
    4539             :         }
    4540           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_RemoveResourceDependency_r_done, req);
    4541             : 
    4542           0 :         return req;
    4543             : }
    4544             : 
    4545           0 : static void dcerpc_clusapi_RemoveResourceDependency_r_done(struct tevent_req *subreq)
    4546             : {
    4547           0 :         struct tevent_req *req =
    4548           0 :                 tevent_req_callback_data(subreq,
    4549             :                 struct tevent_req);
    4550             :         NTSTATUS status;
    4551             : 
    4552           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4553           0 :         TALLOC_FREE(subreq);
    4554           0 :         if (tevent_req_nterror(req, status)) {
    4555           0 :                 return;
    4556             :         }
    4557             : 
    4558           0 :         tevent_req_done(req);
    4559             : }
    4560             : 
    4561           0 : NTSTATUS dcerpc_clusapi_RemoveResourceDependency_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4562             : {
    4563           0 :         struct dcerpc_clusapi_RemoveResourceDependency_r_state *state =
    4564           0 :                 tevent_req_data(req,
    4565             :                 struct dcerpc_clusapi_RemoveResourceDependency_r_state);
    4566             :         NTSTATUS status;
    4567             : 
    4568           0 :         if (tevent_req_is_nterror(req, &status)) {
    4569           0 :                 tevent_req_received(req);
    4570           0 :                 return status;
    4571             :         }
    4572             : 
    4573           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4574             : 
    4575           0 :         tevent_req_received(req);
    4576           0 :         return NT_STATUS_OK;
    4577             : }
    4578             : 
    4579           0 : NTSTATUS dcerpc_clusapi_RemoveResourceDependency_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_RemoveResourceDependency *r)
    4580             : {
    4581             :         NTSTATUS status;
    4582             : 
    4583           0 :         status = dcerpc_binding_handle_call(h,
    4584             :                         NULL, &ndr_table_clusapi,
    4585             :                         NDR_CLUSAPI_REMOVERESOURCEDEPENDENCY, mem_ctx, r);
    4586             : 
    4587           0 :         return status;
    4588             : }
    4589             : 
    4590             : struct dcerpc_clusapi_RemoveResourceDependency_state {
    4591             :         struct clusapi_RemoveResourceDependency orig;
    4592             :         struct clusapi_RemoveResourceDependency tmp;
    4593             :         TALLOC_CTX *out_mem_ctx;
    4594             : };
    4595             : 
    4596             : static void dcerpc_clusapi_RemoveResourceDependency_done(struct tevent_req *subreq);
    4597             : 
    4598           0 : struct tevent_req *dcerpc_clusapi_RemoveResourceDependency_send(TALLOC_CTX *mem_ctx,
    4599             :                                                                 struct tevent_context *ev,
    4600             :                                                                 struct dcerpc_binding_handle *h,
    4601             :                                                                 struct policy_handle _hResource /* [in]  */,
    4602             :                                                                 struct policy_handle _hDependsOn /* [in]  */,
    4603             :                                                                 WERROR *_rpc_status /* [out] [ref] */)
    4604             : {
    4605             :         struct tevent_req *req;
    4606             :         struct dcerpc_clusapi_RemoveResourceDependency_state *state;
    4607             :         struct tevent_req *subreq;
    4608             : 
    4609           0 :         req = tevent_req_create(mem_ctx, &state,
    4610             :                                 struct dcerpc_clusapi_RemoveResourceDependency_state);
    4611           0 :         if (req == NULL) {
    4612           0 :                 return NULL;
    4613             :         }
    4614           0 :         state->out_mem_ctx = NULL;
    4615             : 
    4616             :         /* In parameters */
    4617           0 :         state->orig.in.hResource = _hResource;
    4618           0 :         state->orig.in.hDependsOn = _hDependsOn;
    4619             : 
    4620             :         /* Out parameters */
    4621           0 :         state->orig.out.rpc_status = _rpc_status;
    4622             : 
    4623             :         /* Result */
    4624           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4625             : 
    4626           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4627             :                              "dcerpc_clusapi_RemoveResourceDependency_out_memory");
    4628           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4629           0 :                 return tevent_req_post(req, ev);
    4630             :         }
    4631             : 
    4632             :         /* make a temporary copy, that we pass to the dispatch function */
    4633           0 :         state->tmp = state->orig;
    4634             : 
    4635           0 :         subreq = dcerpc_clusapi_RemoveResourceDependency_r_send(state, ev, h, &state->tmp);
    4636           0 :         if (tevent_req_nomem(subreq, req)) {
    4637           0 :                 return tevent_req_post(req, ev);
    4638             :         }
    4639           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_RemoveResourceDependency_done, req);
    4640           0 :         return req;
    4641             : }
    4642             : 
    4643           0 : static void dcerpc_clusapi_RemoveResourceDependency_done(struct tevent_req *subreq)
    4644             : {
    4645           0 :         struct tevent_req *req = tevent_req_callback_data(
    4646             :                 subreq, struct tevent_req);
    4647           0 :         struct dcerpc_clusapi_RemoveResourceDependency_state *state = tevent_req_data(
    4648             :                 req, struct dcerpc_clusapi_RemoveResourceDependency_state);
    4649             :         NTSTATUS status;
    4650             :         TALLOC_CTX *mem_ctx;
    4651             : 
    4652           0 :         if (state->out_mem_ctx) {
    4653           0 :                 mem_ctx = state->out_mem_ctx;
    4654             :         } else {
    4655           0 :                 mem_ctx = state;
    4656             :         }
    4657             : 
    4658           0 :         status = dcerpc_clusapi_RemoveResourceDependency_r_recv(subreq, mem_ctx);
    4659           0 :         TALLOC_FREE(subreq);
    4660           0 :         if (tevent_req_nterror(req, status)) {
    4661           0 :                 return;
    4662             :         }
    4663             : 
    4664             :         /* Copy out parameters */
    4665           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    4666             : 
    4667             :         /* Copy result */
    4668           0 :         state->orig.out.result = state->tmp.out.result;
    4669             : 
    4670             :         /* Reset temporary structure */
    4671           0 :         NDR_ZERO_STRUCT(state->tmp);
    4672             : 
    4673           0 :         tevent_req_done(req);
    4674             : }
    4675             : 
    4676           0 : NTSTATUS dcerpc_clusapi_RemoveResourceDependency_recv(struct tevent_req *req,
    4677             :                                                       TALLOC_CTX *mem_ctx,
    4678             :                                                       WERROR *result)
    4679             : {
    4680           0 :         struct dcerpc_clusapi_RemoveResourceDependency_state *state = tevent_req_data(
    4681             :                 req, struct dcerpc_clusapi_RemoveResourceDependency_state);
    4682             :         NTSTATUS status;
    4683             : 
    4684           0 :         if (tevent_req_is_nterror(req, &status)) {
    4685           0 :                 tevent_req_received(req);
    4686           0 :                 return status;
    4687             :         }
    4688             : 
    4689             :         /* Steal possible out parameters to the callers context */
    4690           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4691             : 
    4692             :         /* Return result */
    4693           0 :         *result = state->orig.out.result;
    4694             : 
    4695           0 :         tevent_req_received(req);
    4696           0 :         return NT_STATUS_OK;
    4697             : }
    4698             : 
    4699           0 : NTSTATUS dcerpc_clusapi_RemoveResourceDependency(struct dcerpc_binding_handle *h,
    4700             :                                                  TALLOC_CTX *mem_ctx,
    4701             :                                                  struct policy_handle _hResource /* [in]  */,
    4702             :                                                  struct policy_handle _hDependsOn /* [in]  */,
    4703             :                                                  WERROR *_rpc_status /* [out] [ref] */,
    4704             :                                                  WERROR *result)
    4705             : {
    4706             :         struct clusapi_RemoveResourceDependency r;
    4707             :         NTSTATUS status;
    4708             : 
    4709             :         /* In parameters */
    4710           0 :         r.in.hResource = _hResource;
    4711           0 :         r.in.hDependsOn = _hDependsOn;
    4712             : 
    4713             :         /* Out parameters */
    4714           0 :         r.out.rpc_status = _rpc_status;
    4715             : 
    4716             :         /* Result */
    4717           0 :         NDR_ZERO_STRUCT(r.out.result);
    4718             : 
    4719           0 :         status = dcerpc_clusapi_RemoveResourceDependency_r(h, mem_ctx, &r);
    4720           0 :         if (!NT_STATUS_IS_OK(status)) {
    4721           0 :                 return status;
    4722             :         }
    4723             : 
    4724             :         /* Return variables */
    4725           0 :         *_rpc_status = *r.out.rpc_status;
    4726             : 
    4727             :         /* Return result */
    4728           0 :         *result = r.out.result;
    4729             : 
    4730           0 :         return NT_STATUS_OK;
    4731             : }
    4732             : 
    4733             : struct dcerpc_clusapi_CanResourceBeDependent_r_state {
    4734             :         TALLOC_CTX *out_mem_ctx;
    4735             : };
    4736             : 
    4737             : static void dcerpc_clusapi_CanResourceBeDependent_r_done(struct tevent_req *subreq);
    4738             : 
    4739           0 : struct tevent_req *dcerpc_clusapi_CanResourceBeDependent_r_send(TALLOC_CTX *mem_ctx,
    4740             :         struct tevent_context *ev,
    4741             :         struct dcerpc_binding_handle *h,
    4742             :         struct clusapi_CanResourceBeDependent *r)
    4743             : {
    4744             :         struct tevent_req *req;
    4745             :         struct dcerpc_clusapi_CanResourceBeDependent_r_state *state;
    4746             :         struct tevent_req *subreq;
    4747             : 
    4748           0 :         req = tevent_req_create(mem_ctx, &state,
    4749             :                                 struct dcerpc_clusapi_CanResourceBeDependent_r_state);
    4750           0 :         if (req == NULL) {
    4751           0 :                 return NULL;
    4752             :         }
    4753             : 
    4754           0 :         state->out_mem_ctx = talloc_new(state);
    4755           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4756           0 :                 return tevent_req_post(req, ev);
    4757             :         }
    4758             : 
    4759           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4760             :                         NULL, &ndr_table_clusapi,
    4761           0 :                         NDR_CLUSAPI_CANRESOURCEBEDEPENDENT, state->out_mem_ctx, r);
    4762           0 :         if (tevent_req_nomem(subreq, req)) {
    4763           0 :                 return tevent_req_post(req, ev);
    4764             :         }
    4765           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CanResourceBeDependent_r_done, req);
    4766             : 
    4767           0 :         return req;
    4768             : }
    4769             : 
    4770           0 : static void dcerpc_clusapi_CanResourceBeDependent_r_done(struct tevent_req *subreq)
    4771             : {
    4772           0 :         struct tevent_req *req =
    4773           0 :                 tevent_req_callback_data(subreq,
    4774             :                 struct tevent_req);
    4775             :         NTSTATUS status;
    4776             : 
    4777           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4778           0 :         TALLOC_FREE(subreq);
    4779           0 :         if (tevent_req_nterror(req, status)) {
    4780           0 :                 return;
    4781             :         }
    4782             : 
    4783           0 :         tevent_req_done(req);
    4784             : }
    4785             : 
    4786           0 : NTSTATUS dcerpc_clusapi_CanResourceBeDependent_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4787             : {
    4788           0 :         struct dcerpc_clusapi_CanResourceBeDependent_r_state *state =
    4789           0 :                 tevent_req_data(req,
    4790             :                 struct dcerpc_clusapi_CanResourceBeDependent_r_state);
    4791             :         NTSTATUS status;
    4792             : 
    4793           0 :         if (tevent_req_is_nterror(req, &status)) {
    4794           0 :                 tevent_req_received(req);
    4795           0 :                 return status;
    4796             :         }
    4797             : 
    4798           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4799             : 
    4800           0 :         tevent_req_received(req);
    4801           0 :         return NT_STATUS_OK;
    4802             : }
    4803             : 
    4804           0 : NTSTATUS dcerpc_clusapi_CanResourceBeDependent_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CanResourceBeDependent *r)
    4805             : {
    4806             :         NTSTATUS status;
    4807             : 
    4808           0 :         status = dcerpc_binding_handle_call(h,
    4809             :                         NULL, &ndr_table_clusapi,
    4810             :                         NDR_CLUSAPI_CANRESOURCEBEDEPENDENT, mem_ctx, r);
    4811             : 
    4812           0 :         return status;
    4813             : }
    4814             : 
    4815             : struct dcerpc_clusapi_CanResourceBeDependent_state {
    4816             :         struct clusapi_CanResourceBeDependent orig;
    4817             :         struct clusapi_CanResourceBeDependent tmp;
    4818             :         TALLOC_CTX *out_mem_ctx;
    4819             : };
    4820             : 
    4821             : static void dcerpc_clusapi_CanResourceBeDependent_done(struct tevent_req *subreq);
    4822             : 
    4823           0 : struct tevent_req *dcerpc_clusapi_CanResourceBeDependent_send(TALLOC_CTX *mem_ctx,
    4824             :                                                               struct tevent_context *ev,
    4825             :                                                               struct dcerpc_binding_handle *h,
    4826             :                                                               struct policy_handle _hResource /* [in]  */,
    4827             :                                                               struct policy_handle _hResourceDependent /* [in]  */,
    4828             :                                                               WERROR *_rpc_status /* [out] [ref] */)
    4829             : {
    4830             :         struct tevent_req *req;
    4831             :         struct dcerpc_clusapi_CanResourceBeDependent_state *state;
    4832             :         struct tevent_req *subreq;
    4833             : 
    4834           0 :         req = tevent_req_create(mem_ctx, &state,
    4835             :                                 struct dcerpc_clusapi_CanResourceBeDependent_state);
    4836           0 :         if (req == NULL) {
    4837           0 :                 return NULL;
    4838             :         }
    4839           0 :         state->out_mem_ctx = NULL;
    4840             : 
    4841             :         /* In parameters */
    4842           0 :         state->orig.in.hResource = _hResource;
    4843           0 :         state->orig.in.hResourceDependent = _hResourceDependent;
    4844             : 
    4845             :         /* Out parameters */
    4846           0 :         state->orig.out.rpc_status = _rpc_status;
    4847             : 
    4848             :         /* Result */
    4849           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4850             : 
    4851           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4852             :                              "dcerpc_clusapi_CanResourceBeDependent_out_memory");
    4853           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4854           0 :                 return tevent_req_post(req, ev);
    4855             :         }
    4856             : 
    4857             :         /* make a temporary copy, that we pass to the dispatch function */
    4858           0 :         state->tmp = state->orig;
    4859             : 
    4860           0 :         subreq = dcerpc_clusapi_CanResourceBeDependent_r_send(state, ev, h, &state->tmp);
    4861           0 :         if (tevent_req_nomem(subreq, req)) {
    4862           0 :                 return tevent_req_post(req, ev);
    4863             :         }
    4864           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CanResourceBeDependent_done, req);
    4865           0 :         return req;
    4866             : }
    4867             : 
    4868           0 : static void dcerpc_clusapi_CanResourceBeDependent_done(struct tevent_req *subreq)
    4869             : {
    4870           0 :         struct tevent_req *req = tevent_req_callback_data(
    4871             :                 subreq, struct tevent_req);
    4872           0 :         struct dcerpc_clusapi_CanResourceBeDependent_state *state = tevent_req_data(
    4873             :                 req, struct dcerpc_clusapi_CanResourceBeDependent_state);
    4874             :         NTSTATUS status;
    4875             :         TALLOC_CTX *mem_ctx;
    4876             : 
    4877           0 :         if (state->out_mem_ctx) {
    4878           0 :                 mem_ctx = state->out_mem_ctx;
    4879             :         } else {
    4880           0 :                 mem_ctx = state;
    4881             :         }
    4882             : 
    4883           0 :         status = dcerpc_clusapi_CanResourceBeDependent_r_recv(subreq, mem_ctx);
    4884           0 :         TALLOC_FREE(subreq);
    4885           0 :         if (tevent_req_nterror(req, status)) {
    4886           0 :                 return;
    4887             :         }
    4888             : 
    4889             :         /* Copy out parameters */
    4890           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    4891             : 
    4892             :         /* Copy result */
    4893           0 :         state->orig.out.result = state->tmp.out.result;
    4894             : 
    4895             :         /* Reset temporary structure */
    4896           0 :         NDR_ZERO_STRUCT(state->tmp);
    4897             : 
    4898           0 :         tevent_req_done(req);
    4899             : }
    4900             : 
    4901           0 : NTSTATUS dcerpc_clusapi_CanResourceBeDependent_recv(struct tevent_req *req,
    4902             :                                                     TALLOC_CTX *mem_ctx,
    4903             :                                                     WERROR *result)
    4904             : {
    4905           0 :         struct dcerpc_clusapi_CanResourceBeDependent_state *state = tevent_req_data(
    4906             :                 req, struct dcerpc_clusapi_CanResourceBeDependent_state);
    4907             :         NTSTATUS status;
    4908             : 
    4909           0 :         if (tevent_req_is_nterror(req, &status)) {
    4910           0 :                 tevent_req_received(req);
    4911           0 :                 return status;
    4912             :         }
    4913             : 
    4914             :         /* Steal possible out parameters to the callers context */
    4915           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4916             : 
    4917             :         /* Return result */
    4918           0 :         *result = state->orig.out.result;
    4919             : 
    4920           0 :         tevent_req_received(req);
    4921           0 :         return NT_STATUS_OK;
    4922             : }
    4923             : 
    4924           0 : NTSTATUS dcerpc_clusapi_CanResourceBeDependent(struct dcerpc_binding_handle *h,
    4925             :                                                TALLOC_CTX *mem_ctx,
    4926             :                                                struct policy_handle _hResource /* [in]  */,
    4927             :                                                struct policy_handle _hResourceDependent /* [in]  */,
    4928             :                                                WERROR *_rpc_status /* [out] [ref] */,
    4929             :                                                WERROR *result)
    4930             : {
    4931             :         struct clusapi_CanResourceBeDependent r;
    4932             :         NTSTATUS status;
    4933             : 
    4934             :         /* In parameters */
    4935           0 :         r.in.hResource = _hResource;
    4936           0 :         r.in.hResourceDependent = _hResourceDependent;
    4937             : 
    4938             :         /* Out parameters */
    4939           0 :         r.out.rpc_status = _rpc_status;
    4940             : 
    4941             :         /* Result */
    4942           0 :         NDR_ZERO_STRUCT(r.out.result);
    4943             : 
    4944           0 :         status = dcerpc_clusapi_CanResourceBeDependent_r(h, mem_ctx, &r);
    4945           0 :         if (!NT_STATUS_IS_OK(status)) {
    4946           0 :                 return status;
    4947             :         }
    4948             : 
    4949             :         /* Return variables */
    4950           0 :         *_rpc_status = *r.out.rpc_status;
    4951             : 
    4952             :         /* Return result */
    4953           0 :         *result = r.out.result;
    4954             : 
    4955           0 :         return NT_STATUS_OK;
    4956             : }
    4957             : 
    4958             : struct dcerpc_clusapi_CreateResEnum_r_state {
    4959             :         TALLOC_CTX *out_mem_ctx;
    4960             : };
    4961             : 
    4962             : static void dcerpc_clusapi_CreateResEnum_r_done(struct tevent_req *subreq);
    4963             : 
    4964           0 : struct tevent_req *dcerpc_clusapi_CreateResEnum_r_send(TALLOC_CTX *mem_ctx,
    4965             :         struct tevent_context *ev,
    4966             :         struct dcerpc_binding_handle *h,
    4967             :         struct clusapi_CreateResEnum *r)
    4968             : {
    4969             :         struct tevent_req *req;
    4970             :         struct dcerpc_clusapi_CreateResEnum_r_state *state;
    4971             :         struct tevent_req *subreq;
    4972             : 
    4973           0 :         req = tevent_req_create(mem_ctx, &state,
    4974             :                                 struct dcerpc_clusapi_CreateResEnum_r_state);
    4975           0 :         if (req == NULL) {
    4976           0 :                 return NULL;
    4977             :         }
    4978             : 
    4979           0 :         state->out_mem_ctx = talloc_new(state);
    4980           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4981           0 :                 return tevent_req_post(req, ev);
    4982             :         }
    4983             : 
    4984           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4985             :                         NULL, &ndr_table_clusapi,
    4986           0 :                         NDR_CLUSAPI_CREATERESENUM, state->out_mem_ctx, r);
    4987           0 :         if (tevent_req_nomem(subreq, req)) {
    4988           0 :                 return tevent_req_post(req, ev);
    4989             :         }
    4990           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateResEnum_r_done, req);
    4991             : 
    4992           0 :         return req;
    4993             : }
    4994             : 
    4995           0 : static void dcerpc_clusapi_CreateResEnum_r_done(struct tevent_req *subreq)
    4996             : {
    4997           0 :         struct tevent_req *req =
    4998           0 :                 tevent_req_callback_data(subreq,
    4999             :                 struct tevent_req);
    5000             :         NTSTATUS status;
    5001             : 
    5002           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5003           0 :         TALLOC_FREE(subreq);
    5004           0 :         if (tevent_req_nterror(req, status)) {
    5005           0 :                 return;
    5006             :         }
    5007             : 
    5008           0 :         tevent_req_done(req);
    5009             : }
    5010             : 
    5011           0 : NTSTATUS dcerpc_clusapi_CreateResEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5012             : {
    5013           0 :         struct dcerpc_clusapi_CreateResEnum_r_state *state =
    5014           0 :                 tevent_req_data(req,
    5015             :                 struct dcerpc_clusapi_CreateResEnum_r_state);
    5016             :         NTSTATUS status;
    5017             : 
    5018           0 :         if (tevent_req_is_nterror(req, &status)) {
    5019           0 :                 tevent_req_received(req);
    5020           0 :                 return status;
    5021             :         }
    5022             : 
    5023           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5024             : 
    5025           0 :         tevent_req_received(req);
    5026           0 :         return NT_STATUS_OK;
    5027             : }
    5028             : 
    5029           0 : NTSTATUS dcerpc_clusapi_CreateResEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CreateResEnum *r)
    5030             : {
    5031             :         NTSTATUS status;
    5032             : 
    5033           0 :         status = dcerpc_binding_handle_call(h,
    5034             :                         NULL, &ndr_table_clusapi,
    5035             :                         NDR_CLUSAPI_CREATERESENUM, mem_ctx, r);
    5036             : 
    5037           0 :         return status;
    5038             : }
    5039             : 
    5040             : struct dcerpc_clusapi_CreateResEnum_state {
    5041             :         struct clusapi_CreateResEnum orig;
    5042             :         struct clusapi_CreateResEnum tmp;
    5043             :         TALLOC_CTX *out_mem_ctx;
    5044             : };
    5045             : 
    5046             : static void dcerpc_clusapi_CreateResEnum_done(struct tevent_req *subreq);
    5047             : 
    5048           0 : struct tevent_req *dcerpc_clusapi_CreateResEnum_send(TALLOC_CTX *mem_ctx,
    5049             :                                                      struct tevent_context *ev,
    5050             :                                                      struct dcerpc_binding_handle *h,
    5051             :                                                      struct policy_handle _hResource /* [in]  */,
    5052             :                                                      uint32_t _dwType /* [in]  */,
    5053             :                                                      struct ENUM_LIST **_ReturnEnum /* [out] [ref] */,
    5054             :                                                      WERROR *_rpc_status /* [out] [ref] */)
    5055             : {
    5056             :         struct tevent_req *req;
    5057             :         struct dcerpc_clusapi_CreateResEnum_state *state;
    5058             :         struct tevent_req *subreq;
    5059             : 
    5060           0 :         req = tevent_req_create(mem_ctx, &state,
    5061             :                                 struct dcerpc_clusapi_CreateResEnum_state);
    5062           0 :         if (req == NULL) {
    5063           0 :                 return NULL;
    5064             :         }
    5065           0 :         state->out_mem_ctx = NULL;
    5066             : 
    5067             :         /* In parameters */
    5068           0 :         state->orig.in.hResource = _hResource;
    5069           0 :         state->orig.in.dwType = _dwType;
    5070             : 
    5071             :         /* Out parameters */
    5072           0 :         state->orig.out.ReturnEnum = _ReturnEnum;
    5073           0 :         state->orig.out.rpc_status = _rpc_status;
    5074             : 
    5075             :         /* Result */
    5076           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5077             : 
    5078           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5079             :                              "dcerpc_clusapi_CreateResEnum_out_memory");
    5080           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5081           0 :                 return tevent_req_post(req, ev);
    5082             :         }
    5083             : 
    5084             :         /* make a temporary copy, that we pass to the dispatch function */
    5085           0 :         state->tmp = state->orig;
    5086             : 
    5087           0 :         subreq = dcerpc_clusapi_CreateResEnum_r_send(state, ev, h, &state->tmp);
    5088           0 :         if (tevent_req_nomem(subreq, req)) {
    5089           0 :                 return tevent_req_post(req, ev);
    5090             :         }
    5091           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateResEnum_done, req);
    5092           0 :         return req;
    5093             : }
    5094             : 
    5095           0 : static void dcerpc_clusapi_CreateResEnum_done(struct tevent_req *subreq)
    5096             : {
    5097           0 :         struct tevent_req *req = tevent_req_callback_data(
    5098             :                 subreq, struct tevent_req);
    5099           0 :         struct dcerpc_clusapi_CreateResEnum_state *state = tevent_req_data(
    5100             :                 req, struct dcerpc_clusapi_CreateResEnum_state);
    5101             :         NTSTATUS status;
    5102             :         TALLOC_CTX *mem_ctx;
    5103             : 
    5104           0 :         if (state->out_mem_ctx) {
    5105           0 :                 mem_ctx = state->out_mem_ctx;
    5106             :         } else {
    5107           0 :                 mem_ctx = state;
    5108             :         }
    5109             : 
    5110           0 :         status = dcerpc_clusapi_CreateResEnum_r_recv(subreq, mem_ctx);
    5111           0 :         TALLOC_FREE(subreq);
    5112           0 :         if (tevent_req_nterror(req, status)) {
    5113           0 :                 return;
    5114             :         }
    5115             : 
    5116             :         /* Copy out parameters */
    5117           0 :         *state->orig.out.ReturnEnum = *state->tmp.out.ReturnEnum;
    5118           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    5119             : 
    5120             :         /* Copy result */
    5121           0 :         state->orig.out.result = state->tmp.out.result;
    5122             : 
    5123             :         /* Reset temporary structure */
    5124           0 :         NDR_ZERO_STRUCT(state->tmp);
    5125             : 
    5126           0 :         tevent_req_done(req);
    5127             : }
    5128             : 
    5129           0 : NTSTATUS dcerpc_clusapi_CreateResEnum_recv(struct tevent_req *req,
    5130             :                                            TALLOC_CTX *mem_ctx,
    5131             :                                            WERROR *result)
    5132             : {
    5133           0 :         struct dcerpc_clusapi_CreateResEnum_state *state = tevent_req_data(
    5134             :                 req, struct dcerpc_clusapi_CreateResEnum_state);
    5135             :         NTSTATUS status;
    5136             : 
    5137           0 :         if (tevent_req_is_nterror(req, &status)) {
    5138           0 :                 tevent_req_received(req);
    5139           0 :                 return status;
    5140             :         }
    5141             : 
    5142             :         /* Steal possible out parameters to the callers context */
    5143           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5144             : 
    5145             :         /* Return result */
    5146           0 :         *result = state->orig.out.result;
    5147             : 
    5148           0 :         tevent_req_received(req);
    5149           0 :         return NT_STATUS_OK;
    5150             : }
    5151             : 
    5152           0 : NTSTATUS dcerpc_clusapi_CreateResEnum(struct dcerpc_binding_handle *h,
    5153             :                                       TALLOC_CTX *mem_ctx,
    5154             :                                       struct policy_handle _hResource /* [in]  */,
    5155             :                                       uint32_t _dwType /* [in]  */,
    5156             :                                       struct ENUM_LIST **_ReturnEnum /* [out] [ref] */,
    5157             :                                       WERROR *_rpc_status /* [out] [ref] */,
    5158             :                                       WERROR *result)
    5159             : {
    5160             :         struct clusapi_CreateResEnum r;
    5161             :         NTSTATUS status;
    5162             : 
    5163             :         /* In parameters */
    5164           0 :         r.in.hResource = _hResource;
    5165           0 :         r.in.dwType = _dwType;
    5166             : 
    5167             :         /* Out parameters */
    5168           0 :         r.out.ReturnEnum = _ReturnEnum;
    5169           0 :         r.out.rpc_status = _rpc_status;
    5170             : 
    5171             :         /* Result */
    5172           0 :         NDR_ZERO_STRUCT(r.out.result);
    5173             : 
    5174           0 :         status = dcerpc_clusapi_CreateResEnum_r(h, mem_ctx, &r);
    5175           0 :         if (!NT_STATUS_IS_OK(status)) {
    5176           0 :                 return status;
    5177             :         }
    5178             : 
    5179             :         /* Return variables */
    5180           0 :         *_ReturnEnum = *r.out.ReturnEnum;
    5181           0 :         *_rpc_status = *r.out.rpc_status;
    5182             : 
    5183             :         /* Return result */
    5184           0 :         *result = r.out.result;
    5185             : 
    5186           0 :         return NT_STATUS_OK;
    5187             : }
    5188             : 
    5189             : struct dcerpc_clusapi_AddResourceNode_r_state {
    5190             :         TALLOC_CTX *out_mem_ctx;
    5191             : };
    5192             : 
    5193             : static void dcerpc_clusapi_AddResourceNode_r_done(struct tevent_req *subreq);
    5194             : 
    5195           0 : struct tevent_req *dcerpc_clusapi_AddResourceNode_r_send(TALLOC_CTX *mem_ctx,
    5196             :         struct tevent_context *ev,
    5197             :         struct dcerpc_binding_handle *h,
    5198             :         struct clusapi_AddResourceNode *r)
    5199             : {
    5200             :         struct tevent_req *req;
    5201             :         struct dcerpc_clusapi_AddResourceNode_r_state *state;
    5202             :         struct tevent_req *subreq;
    5203             : 
    5204           0 :         req = tevent_req_create(mem_ctx, &state,
    5205             :                                 struct dcerpc_clusapi_AddResourceNode_r_state);
    5206           0 :         if (req == NULL) {
    5207           0 :                 return NULL;
    5208             :         }
    5209             : 
    5210           0 :         state->out_mem_ctx = talloc_new(state);
    5211           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5212           0 :                 return tevent_req_post(req, ev);
    5213             :         }
    5214             : 
    5215           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5216             :                         NULL, &ndr_table_clusapi,
    5217           0 :                         NDR_CLUSAPI_ADDRESOURCENODE, state->out_mem_ctx, r);
    5218           0 :         if (tevent_req_nomem(subreq, req)) {
    5219           0 :                 return tevent_req_post(req, ev);
    5220             :         }
    5221           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_AddResourceNode_r_done, req);
    5222             : 
    5223           0 :         return req;
    5224             : }
    5225             : 
    5226           0 : static void dcerpc_clusapi_AddResourceNode_r_done(struct tevent_req *subreq)
    5227             : {
    5228           0 :         struct tevent_req *req =
    5229           0 :                 tevent_req_callback_data(subreq,
    5230             :                 struct tevent_req);
    5231             :         NTSTATUS status;
    5232             : 
    5233           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5234           0 :         TALLOC_FREE(subreq);
    5235           0 :         if (tevent_req_nterror(req, status)) {
    5236           0 :                 return;
    5237             :         }
    5238             : 
    5239           0 :         tevent_req_done(req);
    5240             : }
    5241             : 
    5242           0 : NTSTATUS dcerpc_clusapi_AddResourceNode_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5243             : {
    5244           0 :         struct dcerpc_clusapi_AddResourceNode_r_state *state =
    5245           0 :                 tevent_req_data(req,
    5246             :                 struct dcerpc_clusapi_AddResourceNode_r_state);
    5247             :         NTSTATUS status;
    5248             : 
    5249           0 :         if (tevent_req_is_nterror(req, &status)) {
    5250           0 :                 tevent_req_received(req);
    5251           0 :                 return status;
    5252             :         }
    5253             : 
    5254           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5255             : 
    5256           0 :         tevent_req_received(req);
    5257           0 :         return NT_STATUS_OK;
    5258             : }
    5259             : 
    5260           0 : NTSTATUS dcerpc_clusapi_AddResourceNode_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_AddResourceNode *r)
    5261             : {
    5262             :         NTSTATUS status;
    5263             : 
    5264           0 :         status = dcerpc_binding_handle_call(h,
    5265             :                         NULL, &ndr_table_clusapi,
    5266             :                         NDR_CLUSAPI_ADDRESOURCENODE, mem_ctx, r);
    5267             : 
    5268           0 :         return status;
    5269             : }
    5270             : 
    5271             : struct dcerpc_clusapi_AddResourceNode_state {
    5272             :         struct clusapi_AddResourceNode orig;
    5273             :         struct clusapi_AddResourceNode tmp;
    5274             :         TALLOC_CTX *out_mem_ctx;
    5275             : };
    5276             : 
    5277             : static void dcerpc_clusapi_AddResourceNode_done(struct tevent_req *subreq);
    5278             : 
    5279           0 : struct tevent_req *dcerpc_clusapi_AddResourceNode_send(TALLOC_CTX *mem_ctx,
    5280             :                                                        struct tevent_context *ev,
    5281             :                                                        struct dcerpc_binding_handle *h,
    5282             :                                                        struct policy_handle _hResource /* [in]  */,
    5283             :                                                        struct policy_handle _hNode /* [in]  */,
    5284             :                                                        WERROR *_rpc_status /* [out] [ref] */)
    5285             : {
    5286             :         struct tevent_req *req;
    5287             :         struct dcerpc_clusapi_AddResourceNode_state *state;
    5288             :         struct tevent_req *subreq;
    5289             : 
    5290           0 :         req = tevent_req_create(mem_ctx, &state,
    5291             :                                 struct dcerpc_clusapi_AddResourceNode_state);
    5292           0 :         if (req == NULL) {
    5293           0 :                 return NULL;
    5294             :         }
    5295           0 :         state->out_mem_ctx = NULL;
    5296             : 
    5297             :         /* In parameters */
    5298           0 :         state->orig.in.hResource = _hResource;
    5299           0 :         state->orig.in.hNode = _hNode;
    5300             : 
    5301             :         /* Out parameters */
    5302           0 :         state->orig.out.rpc_status = _rpc_status;
    5303             : 
    5304             :         /* Result */
    5305           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5306             : 
    5307           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5308             :                              "dcerpc_clusapi_AddResourceNode_out_memory");
    5309           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5310           0 :                 return tevent_req_post(req, ev);
    5311             :         }
    5312             : 
    5313             :         /* make a temporary copy, that we pass to the dispatch function */
    5314           0 :         state->tmp = state->orig;
    5315             : 
    5316           0 :         subreq = dcerpc_clusapi_AddResourceNode_r_send(state, ev, h, &state->tmp);
    5317           0 :         if (tevent_req_nomem(subreq, req)) {
    5318           0 :                 return tevent_req_post(req, ev);
    5319             :         }
    5320           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_AddResourceNode_done, req);
    5321           0 :         return req;
    5322             : }
    5323             : 
    5324           0 : static void dcerpc_clusapi_AddResourceNode_done(struct tevent_req *subreq)
    5325             : {
    5326           0 :         struct tevent_req *req = tevent_req_callback_data(
    5327             :                 subreq, struct tevent_req);
    5328           0 :         struct dcerpc_clusapi_AddResourceNode_state *state = tevent_req_data(
    5329             :                 req, struct dcerpc_clusapi_AddResourceNode_state);
    5330             :         NTSTATUS status;
    5331             :         TALLOC_CTX *mem_ctx;
    5332             : 
    5333           0 :         if (state->out_mem_ctx) {
    5334           0 :                 mem_ctx = state->out_mem_ctx;
    5335             :         } else {
    5336           0 :                 mem_ctx = state;
    5337             :         }
    5338             : 
    5339           0 :         status = dcerpc_clusapi_AddResourceNode_r_recv(subreq, mem_ctx);
    5340           0 :         TALLOC_FREE(subreq);
    5341           0 :         if (tevent_req_nterror(req, status)) {
    5342           0 :                 return;
    5343             :         }
    5344             : 
    5345             :         /* Copy out parameters */
    5346           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    5347             : 
    5348             :         /* Copy result */
    5349           0 :         state->orig.out.result = state->tmp.out.result;
    5350             : 
    5351             :         /* Reset temporary structure */
    5352           0 :         NDR_ZERO_STRUCT(state->tmp);
    5353             : 
    5354           0 :         tevent_req_done(req);
    5355             : }
    5356             : 
    5357           0 : NTSTATUS dcerpc_clusapi_AddResourceNode_recv(struct tevent_req *req,
    5358             :                                              TALLOC_CTX *mem_ctx,
    5359             :                                              WERROR *result)
    5360             : {
    5361           0 :         struct dcerpc_clusapi_AddResourceNode_state *state = tevent_req_data(
    5362             :                 req, struct dcerpc_clusapi_AddResourceNode_state);
    5363             :         NTSTATUS status;
    5364             : 
    5365           0 :         if (tevent_req_is_nterror(req, &status)) {
    5366           0 :                 tevent_req_received(req);
    5367           0 :                 return status;
    5368             :         }
    5369             : 
    5370             :         /* Steal possible out parameters to the callers context */
    5371           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5372             : 
    5373             :         /* Return result */
    5374           0 :         *result = state->orig.out.result;
    5375             : 
    5376           0 :         tevent_req_received(req);
    5377           0 :         return NT_STATUS_OK;
    5378             : }
    5379             : 
    5380           0 : NTSTATUS dcerpc_clusapi_AddResourceNode(struct dcerpc_binding_handle *h,
    5381             :                                         TALLOC_CTX *mem_ctx,
    5382             :                                         struct policy_handle _hResource /* [in]  */,
    5383             :                                         struct policy_handle _hNode /* [in]  */,
    5384             :                                         WERROR *_rpc_status /* [out] [ref] */,
    5385             :                                         WERROR *result)
    5386             : {
    5387             :         struct clusapi_AddResourceNode r;
    5388             :         NTSTATUS status;
    5389             : 
    5390             :         /* In parameters */
    5391           0 :         r.in.hResource = _hResource;
    5392           0 :         r.in.hNode = _hNode;
    5393             : 
    5394             :         /* Out parameters */
    5395           0 :         r.out.rpc_status = _rpc_status;
    5396             : 
    5397             :         /* Result */
    5398           0 :         NDR_ZERO_STRUCT(r.out.result);
    5399             : 
    5400           0 :         status = dcerpc_clusapi_AddResourceNode_r(h, mem_ctx, &r);
    5401           0 :         if (!NT_STATUS_IS_OK(status)) {
    5402           0 :                 return status;
    5403             :         }
    5404             : 
    5405             :         /* Return variables */
    5406           0 :         *_rpc_status = *r.out.rpc_status;
    5407             : 
    5408             :         /* Return result */
    5409           0 :         *result = r.out.result;
    5410             : 
    5411           0 :         return NT_STATUS_OK;
    5412             : }
    5413             : 
    5414             : struct dcerpc_clusapi_RemoveResourceNode_r_state {
    5415             :         TALLOC_CTX *out_mem_ctx;
    5416             : };
    5417             : 
    5418             : static void dcerpc_clusapi_RemoveResourceNode_r_done(struct tevent_req *subreq);
    5419             : 
    5420           0 : struct tevent_req *dcerpc_clusapi_RemoveResourceNode_r_send(TALLOC_CTX *mem_ctx,
    5421             :         struct tevent_context *ev,
    5422             :         struct dcerpc_binding_handle *h,
    5423             :         struct clusapi_RemoveResourceNode *r)
    5424             : {
    5425             :         struct tevent_req *req;
    5426             :         struct dcerpc_clusapi_RemoveResourceNode_r_state *state;
    5427             :         struct tevent_req *subreq;
    5428             : 
    5429           0 :         req = tevent_req_create(mem_ctx, &state,
    5430             :                                 struct dcerpc_clusapi_RemoveResourceNode_r_state);
    5431           0 :         if (req == NULL) {
    5432           0 :                 return NULL;
    5433             :         }
    5434             : 
    5435           0 :         state->out_mem_ctx = talloc_new(state);
    5436           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5437           0 :                 return tevent_req_post(req, ev);
    5438             :         }
    5439             : 
    5440           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5441             :                         NULL, &ndr_table_clusapi,
    5442           0 :                         NDR_CLUSAPI_REMOVERESOURCENODE, state->out_mem_ctx, r);
    5443           0 :         if (tevent_req_nomem(subreq, req)) {
    5444           0 :                 return tevent_req_post(req, ev);
    5445             :         }
    5446           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_RemoveResourceNode_r_done, req);
    5447             : 
    5448           0 :         return req;
    5449             : }
    5450             : 
    5451           0 : static void dcerpc_clusapi_RemoveResourceNode_r_done(struct tevent_req *subreq)
    5452             : {
    5453           0 :         struct tevent_req *req =
    5454           0 :                 tevent_req_callback_data(subreq,
    5455             :                 struct tevent_req);
    5456             :         NTSTATUS status;
    5457             : 
    5458           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5459           0 :         TALLOC_FREE(subreq);
    5460           0 :         if (tevent_req_nterror(req, status)) {
    5461           0 :                 return;
    5462             :         }
    5463             : 
    5464           0 :         tevent_req_done(req);
    5465             : }
    5466             : 
    5467           0 : NTSTATUS dcerpc_clusapi_RemoveResourceNode_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5468             : {
    5469           0 :         struct dcerpc_clusapi_RemoveResourceNode_r_state *state =
    5470           0 :                 tevent_req_data(req,
    5471             :                 struct dcerpc_clusapi_RemoveResourceNode_r_state);
    5472             :         NTSTATUS status;
    5473             : 
    5474           0 :         if (tevent_req_is_nterror(req, &status)) {
    5475           0 :                 tevent_req_received(req);
    5476           0 :                 return status;
    5477             :         }
    5478             : 
    5479           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5480             : 
    5481           0 :         tevent_req_received(req);
    5482           0 :         return NT_STATUS_OK;
    5483             : }
    5484             : 
    5485           0 : NTSTATUS dcerpc_clusapi_RemoveResourceNode_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_RemoveResourceNode *r)
    5486             : {
    5487             :         NTSTATUS status;
    5488             : 
    5489           0 :         status = dcerpc_binding_handle_call(h,
    5490             :                         NULL, &ndr_table_clusapi,
    5491             :                         NDR_CLUSAPI_REMOVERESOURCENODE, mem_ctx, r);
    5492             : 
    5493           0 :         return status;
    5494             : }
    5495             : 
    5496             : struct dcerpc_clusapi_RemoveResourceNode_state {
    5497             :         struct clusapi_RemoveResourceNode orig;
    5498             :         struct clusapi_RemoveResourceNode tmp;
    5499             :         TALLOC_CTX *out_mem_ctx;
    5500             : };
    5501             : 
    5502             : static void dcerpc_clusapi_RemoveResourceNode_done(struct tevent_req *subreq);
    5503             : 
    5504           0 : struct tevent_req *dcerpc_clusapi_RemoveResourceNode_send(TALLOC_CTX *mem_ctx,
    5505             :                                                           struct tevent_context *ev,
    5506             :                                                           struct dcerpc_binding_handle *h,
    5507             :                                                           struct policy_handle _hResource /* [in]  */,
    5508             :                                                           struct policy_handle _hNode /* [in]  */,
    5509             :                                                           WERROR *_rpc_status /* [out] [ref] */)
    5510             : {
    5511             :         struct tevent_req *req;
    5512             :         struct dcerpc_clusapi_RemoveResourceNode_state *state;
    5513             :         struct tevent_req *subreq;
    5514             : 
    5515           0 :         req = tevent_req_create(mem_ctx, &state,
    5516             :                                 struct dcerpc_clusapi_RemoveResourceNode_state);
    5517           0 :         if (req == NULL) {
    5518           0 :                 return NULL;
    5519             :         }
    5520           0 :         state->out_mem_ctx = NULL;
    5521             : 
    5522             :         /* In parameters */
    5523           0 :         state->orig.in.hResource = _hResource;
    5524           0 :         state->orig.in.hNode = _hNode;
    5525             : 
    5526             :         /* Out parameters */
    5527           0 :         state->orig.out.rpc_status = _rpc_status;
    5528             : 
    5529             :         /* Result */
    5530           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5531             : 
    5532           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5533             :                              "dcerpc_clusapi_RemoveResourceNode_out_memory");
    5534           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5535           0 :                 return tevent_req_post(req, ev);
    5536             :         }
    5537             : 
    5538             :         /* make a temporary copy, that we pass to the dispatch function */
    5539           0 :         state->tmp = state->orig;
    5540             : 
    5541           0 :         subreq = dcerpc_clusapi_RemoveResourceNode_r_send(state, ev, h, &state->tmp);
    5542           0 :         if (tevent_req_nomem(subreq, req)) {
    5543           0 :                 return tevent_req_post(req, ev);
    5544             :         }
    5545           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_RemoveResourceNode_done, req);
    5546           0 :         return req;
    5547             : }
    5548             : 
    5549           0 : static void dcerpc_clusapi_RemoveResourceNode_done(struct tevent_req *subreq)
    5550             : {
    5551           0 :         struct tevent_req *req = tevent_req_callback_data(
    5552             :                 subreq, struct tevent_req);
    5553           0 :         struct dcerpc_clusapi_RemoveResourceNode_state *state = tevent_req_data(
    5554             :                 req, struct dcerpc_clusapi_RemoveResourceNode_state);
    5555             :         NTSTATUS status;
    5556             :         TALLOC_CTX *mem_ctx;
    5557             : 
    5558           0 :         if (state->out_mem_ctx) {
    5559           0 :                 mem_ctx = state->out_mem_ctx;
    5560             :         } else {
    5561           0 :                 mem_ctx = state;
    5562             :         }
    5563             : 
    5564           0 :         status = dcerpc_clusapi_RemoveResourceNode_r_recv(subreq, mem_ctx);
    5565           0 :         TALLOC_FREE(subreq);
    5566           0 :         if (tevent_req_nterror(req, status)) {
    5567           0 :                 return;
    5568             :         }
    5569             : 
    5570             :         /* Copy out parameters */
    5571           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    5572             : 
    5573             :         /* Copy result */
    5574           0 :         state->orig.out.result = state->tmp.out.result;
    5575             : 
    5576             :         /* Reset temporary structure */
    5577           0 :         NDR_ZERO_STRUCT(state->tmp);
    5578             : 
    5579           0 :         tevent_req_done(req);
    5580             : }
    5581             : 
    5582           0 : NTSTATUS dcerpc_clusapi_RemoveResourceNode_recv(struct tevent_req *req,
    5583             :                                                 TALLOC_CTX *mem_ctx,
    5584             :                                                 WERROR *result)
    5585             : {
    5586           0 :         struct dcerpc_clusapi_RemoveResourceNode_state *state = tevent_req_data(
    5587             :                 req, struct dcerpc_clusapi_RemoveResourceNode_state);
    5588             :         NTSTATUS status;
    5589             : 
    5590           0 :         if (tevent_req_is_nterror(req, &status)) {
    5591           0 :                 tevent_req_received(req);
    5592           0 :                 return status;
    5593             :         }
    5594             : 
    5595             :         /* Steal possible out parameters to the callers context */
    5596           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5597             : 
    5598             :         /* Return result */
    5599           0 :         *result = state->orig.out.result;
    5600             : 
    5601           0 :         tevent_req_received(req);
    5602           0 :         return NT_STATUS_OK;
    5603             : }
    5604             : 
    5605           0 : NTSTATUS dcerpc_clusapi_RemoveResourceNode(struct dcerpc_binding_handle *h,
    5606             :                                            TALLOC_CTX *mem_ctx,
    5607             :                                            struct policy_handle _hResource /* [in]  */,
    5608             :                                            struct policy_handle _hNode /* [in]  */,
    5609             :                                            WERROR *_rpc_status /* [out] [ref] */,
    5610             :                                            WERROR *result)
    5611             : {
    5612             :         struct clusapi_RemoveResourceNode r;
    5613             :         NTSTATUS status;
    5614             : 
    5615             :         /* In parameters */
    5616           0 :         r.in.hResource = _hResource;
    5617           0 :         r.in.hNode = _hNode;
    5618             : 
    5619             :         /* Out parameters */
    5620           0 :         r.out.rpc_status = _rpc_status;
    5621             : 
    5622             :         /* Result */
    5623           0 :         NDR_ZERO_STRUCT(r.out.result);
    5624             : 
    5625           0 :         status = dcerpc_clusapi_RemoveResourceNode_r(h, mem_ctx, &r);
    5626           0 :         if (!NT_STATUS_IS_OK(status)) {
    5627           0 :                 return status;
    5628             :         }
    5629             : 
    5630             :         /* Return variables */
    5631           0 :         *_rpc_status = *r.out.rpc_status;
    5632             : 
    5633             :         /* Return result */
    5634           0 :         *result = r.out.result;
    5635             : 
    5636           0 :         return NT_STATUS_OK;
    5637             : }
    5638             : 
    5639             : struct dcerpc_clusapi_ChangeResourceGroup_r_state {
    5640             :         TALLOC_CTX *out_mem_ctx;
    5641             : };
    5642             : 
    5643             : static void dcerpc_clusapi_ChangeResourceGroup_r_done(struct tevent_req *subreq);
    5644             : 
    5645           0 : struct tevent_req *dcerpc_clusapi_ChangeResourceGroup_r_send(TALLOC_CTX *mem_ctx,
    5646             :         struct tevent_context *ev,
    5647             :         struct dcerpc_binding_handle *h,
    5648             :         struct clusapi_ChangeResourceGroup *r)
    5649             : {
    5650             :         struct tevent_req *req;
    5651             :         struct dcerpc_clusapi_ChangeResourceGroup_r_state *state;
    5652             :         struct tevent_req *subreq;
    5653             : 
    5654           0 :         req = tevent_req_create(mem_ctx, &state,
    5655             :                                 struct dcerpc_clusapi_ChangeResourceGroup_r_state);
    5656           0 :         if (req == NULL) {
    5657           0 :                 return NULL;
    5658             :         }
    5659             : 
    5660           0 :         state->out_mem_ctx = talloc_new(state);
    5661           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5662           0 :                 return tevent_req_post(req, ev);
    5663             :         }
    5664             : 
    5665           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5666             :                         NULL, &ndr_table_clusapi,
    5667           0 :                         NDR_CLUSAPI_CHANGERESOURCEGROUP, state->out_mem_ctx, r);
    5668           0 :         if (tevent_req_nomem(subreq, req)) {
    5669           0 :                 return tevent_req_post(req, ev);
    5670             :         }
    5671           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_ChangeResourceGroup_r_done, req);
    5672             : 
    5673           0 :         return req;
    5674             : }
    5675             : 
    5676           0 : static void dcerpc_clusapi_ChangeResourceGroup_r_done(struct tevent_req *subreq)
    5677             : {
    5678           0 :         struct tevent_req *req =
    5679           0 :                 tevent_req_callback_data(subreq,
    5680             :                 struct tevent_req);
    5681             :         NTSTATUS status;
    5682             : 
    5683           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5684           0 :         TALLOC_FREE(subreq);
    5685           0 :         if (tevent_req_nterror(req, status)) {
    5686           0 :                 return;
    5687             :         }
    5688             : 
    5689           0 :         tevent_req_done(req);
    5690             : }
    5691             : 
    5692           0 : NTSTATUS dcerpc_clusapi_ChangeResourceGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5693             : {
    5694           0 :         struct dcerpc_clusapi_ChangeResourceGroup_r_state *state =
    5695           0 :                 tevent_req_data(req,
    5696             :                 struct dcerpc_clusapi_ChangeResourceGroup_r_state);
    5697             :         NTSTATUS status;
    5698             : 
    5699           0 :         if (tevent_req_is_nterror(req, &status)) {
    5700           0 :                 tevent_req_received(req);
    5701           0 :                 return status;
    5702             :         }
    5703             : 
    5704           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5705             : 
    5706           0 :         tevent_req_received(req);
    5707           0 :         return NT_STATUS_OK;
    5708             : }
    5709             : 
    5710           0 : NTSTATUS dcerpc_clusapi_ChangeResourceGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_ChangeResourceGroup *r)
    5711             : {
    5712             :         NTSTATUS status;
    5713             : 
    5714           0 :         status = dcerpc_binding_handle_call(h,
    5715             :                         NULL, &ndr_table_clusapi,
    5716             :                         NDR_CLUSAPI_CHANGERESOURCEGROUP, mem_ctx, r);
    5717             : 
    5718           0 :         return status;
    5719             : }
    5720             : 
    5721             : struct dcerpc_clusapi_ChangeResourceGroup_state {
    5722             :         struct clusapi_ChangeResourceGroup orig;
    5723             :         struct clusapi_ChangeResourceGroup tmp;
    5724             :         TALLOC_CTX *out_mem_ctx;
    5725             : };
    5726             : 
    5727             : static void dcerpc_clusapi_ChangeResourceGroup_done(struct tevent_req *subreq);
    5728             : 
    5729           0 : struct tevent_req *dcerpc_clusapi_ChangeResourceGroup_send(TALLOC_CTX *mem_ctx,
    5730             :                                                            struct tevent_context *ev,
    5731             :                                                            struct dcerpc_binding_handle *h,
    5732             :                                                            struct policy_handle _hResource /* [in]  */,
    5733             :                                                            struct policy_handle _hGroup /* [in]  */,
    5734             :                                                            WERROR *_rpc_status /* [out] [ref] */)
    5735             : {
    5736             :         struct tevent_req *req;
    5737             :         struct dcerpc_clusapi_ChangeResourceGroup_state *state;
    5738             :         struct tevent_req *subreq;
    5739             : 
    5740           0 :         req = tevent_req_create(mem_ctx, &state,
    5741             :                                 struct dcerpc_clusapi_ChangeResourceGroup_state);
    5742           0 :         if (req == NULL) {
    5743           0 :                 return NULL;
    5744             :         }
    5745           0 :         state->out_mem_ctx = NULL;
    5746             : 
    5747             :         /* In parameters */
    5748           0 :         state->orig.in.hResource = _hResource;
    5749           0 :         state->orig.in.hGroup = _hGroup;
    5750             : 
    5751             :         /* Out parameters */
    5752           0 :         state->orig.out.rpc_status = _rpc_status;
    5753             : 
    5754             :         /* Result */
    5755           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5756             : 
    5757           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5758             :                              "dcerpc_clusapi_ChangeResourceGroup_out_memory");
    5759           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5760           0 :                 return tevent_req_post(req, ev);
    5761             :         }
    5762             : 
    5763             :         /* make a temporary copy, that we pass to the dispatch function */
    5764           0 :         state->tmp = state->orig;
    5765             : 
    5766           0 :         subreq = dcerpc_clusapi_ChangeResourceGroup_r_send(state, ev, h, &state->tmp);
    5767           0 :         if (tevent_req_nomem(subreq, req)) {
    5768           0 :                 return tevent_req_post(req, ev);
    5769             :         }
    5770           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_ChangeResourceGroup_done, req);
    5771           0 :         return req;
    5772             : }
    5773             : 
    5774           0 : static void dcerpc_clusapi_ChangeResourceGroup_done(struct tevent_req *subreq)
    5775             : {
    5776           0 :         struct tevent_req *req = tevent_req_callback_data(
    5777             :                 subreq, struct tevent_req);
    5778           0 :         struct dcerpc_clusapi_ChangeResourceGroup_state *state = tevent_req_data(
    5779             :                 req, struct dcerpc_clusapi_ChangeResourceGroup_state);
    5780             :         NTSTATUS status;
    5781             :         TALLOC_CTX *mem_ctx;
    5782             : 
    5783           0 :         if (state->out_mem_ctx) {
    5784           0 :                 mem_ctx = state->out_mem_ctx;
    5785             :         } else {
    5786           0 :                 mem_ctx = state;
    5787             :         }
    5788             : 
    5789           0 :         status = dcerpc_clusapi_ChangeResourceGroup_r_recv(subreq, mem_ctx);
    5790           0 :         TALLOC_FREE(subreq);
    5791           0 :         if (tevent_req_nterror(req, status)) {
    5792           0 :                 return;
    5793             :         }
    5794             : 
    5795             :         /* Copy out parameters */
    5796           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    5797             : 
    5798             :         /* Copy result */
    5799           0 :         state->orig.out.result = state->tmp.out.result;
    5800             : 
    5801             :         /* Reset temporary structure */
    5802           0 :         NDR_ZERO_STRUCT(state->tmp);
    5803             : 
    5804           0 :         tevent_req_done(req);
    5805             : }
    5806             : 
    5807           0 : NTSTATUS dcerpc_clusapi_ChangeResourceGroup_recv(struct tevent_req *req,
    5808             :                                                  TALLOC_CTX *mem_ctx,
    5809             :                                                  WERROR *result)
    5810             : {
    5811           0 :         struct dcerpc_clusapi_ChangeResourceGroup_state *state = tevent_req_data(
    5812             :                 req, struct dcerpc_clusapi_ChangeResourceGroup_state);
    5813             :         NTSTATUS status;
    5814             : 
    5815           0 :         if (tevent_req_is_nterror(req, &status)) {
    5816           0 :                 tevent_req_received(req);
    5817           0 :                 return status;
    5818             :         }
    5819             : 
    5820             :         /* Steal possible out parameters to the callers context */
    5821           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5822             : 
    5823             :         /* Return result */
    5824           0 :         *result = state->orig.out.result;
    5825             : 
    5826           0 :         tevent_req_received(req);
    5827           0 :         return NT_STATUS_OK;
    5828             : }
    5829             : 
    5830           0 : NTSTATUS dcerpc_clusapi_ChangeResourceGroup(struct dcerpc_binding_handle *h,
    5831             :                                             TALLOC_CTX *mem_ctx,
    5832             :                                             struct policy_handle _hResource /* [in]  */,
    5833             :                                             struct policy_handle _hGroup /* [in]  */,
    5834             :                                             WERROR *_rpc_status /* [out] [ref] */,
    5835             :                                             WERROR *result)
    5836             : {
    5837             :         struct clusapi_ChangeResourceGroup r;
    5838             :         NTSTATUS status;
    5839             : 
    5840             :         /* In parameters */
    5841           0 :         r.in.hResource = _hResource;
    5842           0 :         r.in.hGroup = _hGroup;
    5843             : 
    5844             :         /* Out parameters */
    5845           0 :         r.out.rpc_status = _rpc_status;
    5846             : 
    5847             :         /* Result */
    5848           0 :         NDR_ZERO_STRUCT(r.out.result);
    5849             : 
    5850           0 :         status = dcerpc_clusapi_ChangeResourceGroup_r(h, mem_ctx, &r);
    5851           0 :         if (!NT_STATUS_IS_OK(status)) {
    5852           0 :                 return status;
    5853             :         }
    5854             : 
    5855             :         /* Return variables */
    5856           0 :         *_rpc_status = *r.out.rpc_status;
    5857             : 
    5858             :         /* Return result */
    5859           0 :         *result = r.out.result;
    5860             : 
    5861           0 :         return NT_STATUS_OK;
    5862             : }
    5863             : 
    5864             : struct dcerpc_clusapi_CreateResourceType_r_state {
    5865             :         TALLOC_CTX *out_mem_ctx;
    5866             : };
    5867             : 
    5868             : static void dcerpc_clusapi_CreateResourceType_r_done(struct tevent_req *subreq);
    5869             : 
    5870           0 : struct tevent_req *dcerpc_clusapi_CreateResourceType_r_send(TALLOC_CTX *mem_ctx,
    5871             :         struct tevent_context *ev,
    5872             :         struct dcerpc_binding_handle *h,
    5873             :         struct clusapi_CreateResourceType *r)
    5874             : {
    5875             :         struct tevent_req *req;
    5876             :         struct dcerpc_clusapi_CreateResourceType_r_state *state;
    5877             :         struct tevent_req *subreq;
    5878             : 
    5879           0 :         req = tevent_req_create(mem_ctx, &state,
    5880             :                                 struct dcerpc_clusapi_CreateResourceType_r_state);
    5881           0 :         if (req == NULL) {
    5882           0 :                 return NULL;
    5883             :         }
    5884             : 
    5885           0 :         state->out_mem_ctx = talloc_new(state);
    5886           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5887           0 :                 return tevent_req_post(req, ev);
    5888             :         }
    5889             : 
    5890           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5891             :                         NULL, &ndr_table_clusapi,
    5892           0 :                         NDR_CLUSAPI_CREATERESOURCETYPE, state->out_mem_ctx, r);
    5893           0 :         if (tevent_req_nomem(subreq, req)) {
    5894           0 :                 return tevent_req_post(req, ev);
    5895             :         }
    5896           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateResourceType_r_done, req);
    5897             : 
    5898           0 :         return req;
    5899             : }
    5900             : 
    5901           0 : static void dcerpc_clusapi_CreateResourceType_r_done(struct tevent_req *subreq)
    5902             : {
    5903           0 :         struct tevent_req *req =
    5904           0 :                 tevent_req_callback_data(subreq,
    5905             :                 struct tevent_req);
    5906             :         NTSTATUS status;
    5907             : 
    5908           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5909           0 :         TALLOC_FREE(subreq);
    5910           0 :         if (tevent_req_nterror(req, status)) {
    5911           0 :                 return;
    5912             :         }
    5913             : 
    5914           0 :         tevent_req_done(req);
    5915             : }
    5916             : 
    5917           0 : NTSTATUS dcerpc_clusapi_CreateResourceType_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5918             : {
    5919           0 :         struct dcerpc_clusapi_CreateResourceType_r_state *state =
    5920           0 :                 tevent_req_data(req,
    5921             :                 struct dcerpc_clusapi_CreateResourceType_r_state);
    5922             :         NTSTATUS status;
    5923             : 
    5924           0 :         if (tevent_req_is_nterror(req, &status)) {
    5925           0 :                 tevent_req_received(req);
    5926           0 :                 return status;
    5927             :         }
    5928             : 
    5929           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5930             : 
    5931           0 :         tevent_req_received(req);
    5932           0 :         return NT_STATUS_OK;
    5933             : }
    5934             : 
    5935           0 : NTSTATUS dcerpc_clusapi_CreateResourceType_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CreateResourceType *r)
    5936             : {
    5937             :         NTSTATUS status;
    5938             : 
    5939           0 :         status = dcerpc_binding_handle_call(h,
    5940             :                         NULL, &ndr_table_clusapi,
    5941             :                         NDR_CLUSAPI_CREATERESOURCETYPE, mem_ctx, r);
    5942             : 
    5943           0 :         return status;
    5944             : }
    5945             : 
    5946             : struct dcerpc_clusapi_CreateResourceType_state {
    5947             :         struct clusapi_CreateResourceType orig;
    5948             :         struct clusapi_CreateResourceType tmp;
    5949             :         TALLOC_CTX *out_mem_ctx;
    5950             : };
    5951             : 
    5952             : static void dcerpc_clusapi_CreateResourceType_done(struct tevent_req *subreq);
    5953             : 
    5954           0 : struct tevent_req *dcerpc_clusapi_CreateResourceType_send(TALLOC_CTX *mem_ctx,
    5955             :                                                           struct tevent_context *ev,
    5956             :                                                           struct dcerpc_binding_handle *h,
    5957             :                                                           const char *_lpszTypeName /* [in] [charset(UTF16),ref] */,
    5958             :                                                           const char *_lpszDisplayName /* [in] [charset(UTF16),ref] */,
    5959             :                                                           const char *_lpszDllName /* [in] [charset(UTF16),ref] */,
    5960             :                                                           uint32_t _dwLooksAlive /* [in]  */,
    5961             :                                                           uint32_t _dwIsAlive /* [in]  */,
    5962             :                                                           WERROR *_rpc_status /* [out] [ref] */)
    5963             : {
    5964             :         struct tevent_req *req;
    5965             :         struct dcerpc_clusapi_CreateResourceType_state *state;
    5966             :         struct tevent_req *subreq;
    5967             : 
    5968           0 :         req = tevent_req_create(mem_ctx, &state,
    5969             :                                 struct dcerpc_clusapi_CreateResourceType_state);
    5970           0 :         if (req == NULL) {
    5971           0 :                 return NULL;
    5972             :         }
    5973           0 :         state->out_mem_ctx = NULL;
    5974             : 
    5975             :         /* In parameters */
    5976           0 :         state->orig.in.lpszTypeName = _lpszTypeName;
    5977           0 :         state->orig.in.lpszDisplayName = _lpszDisplayName;
    5978           0 :         state->orig.in.lpszDllName = _lpszDllName;
    5979           0 :         state->orig.in.dwLooksAlive = _dwLooksAlive;
    5980           0 :         state->orig.in.dwIsAlive = _dwIsAlive;
    5981             : 
    5982             :         /* Out parameters */
    5983           0 :         state->orig.out.rpc_status = _rpc_status;
    5984             : 
    5985             :         /* Result */
    5986           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5987             : 
    5988           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5989             :                              "dcerpc_clusapi_CreateResourceType_out_memory");
    5990           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5991           0 :                 return tevent_req_post(req, ev);
    5992             :         }
    5993             : 
    5994             :         /* make a temporary copy, that we pass to the dispatch function */
    5995           0 :         state->tmp = state->orig;
    5996             : 
    5997           0 :         subreq = dcerpc_clusapi_CreateResourceType_r_send(state, ev, h, &state->tmp);
    5998           0 :         if (tevent_req_nomem(subreq, req)) {
    5999           0 :                 return tevent_req_post(req, ev);
    6000             :         }
    6001           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateResourceType_done, req);
    6002           0 :         return req;
    6003             : }
    6004             : 
    6005           0 : static void dcerpc_clusapi_CreateResourceType_done(struct tevent_req *subreq)
    6006             : {
    6007           0 :         struct tevent_req *req = tevent_req_callback_data(
    6008             :                 subreq, struct tevent_req);
    6009           0 :         struct dcerpc_clusapi_CreateResourceType_state *state = tevent_req_data(
    6010             :                 req, struct dcerpc_clusapi_CreateResourceType_state);
    6011             :         NTSTATUS status;
    6012             :         TALLOC_CTX *mem_ctx;
    6013             : 
    6014           0 :         if (state->out_mem_ctx) {
    6015           0 :                 mem_ctx = state->out_mem_ctx;
    6016             :         } else {
    6017           0 :                 mem_ctx = state;
    6018             :         }
    6019             : 
    6020           0 :         status = dcerpc_clusapi_CreateResourceType_r_recv(subreq, mem_ctx);
    6021           0 :         TALLOC_FREE(subreq);
    6022           0 :         if (tevent_req_nterror(req, status)) {
    6023           0 :                 return;
    6024             :         }
    6025             : 
    6026             :         /* Copy out parameters */
    6027           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    6028             : 
    6029             :         /* Copy result */
    6030           0 :         state->orig.out.result = state->tmp.out.result;
    6031             : 
    6032             :         /* Reset temporary structure */
    6033           0 :         NDR_ZERO_STRUCT(state->tmp);
    6034             : 
    6035           0 :         tevent_req_done(req);
    6036             : }
    6037             : 
    6038           0 : NTSTATUS dcerpc_clusapi_CreateResourceType_recv(struct tevent_req *req,
    6039             :                                                 TALLOC_CTX *mem_ctx,
    6040             :                                                 WERROR *result)
    6041             : {
    6042           0 :         struct dcerpc_clusapi_CreateResourceType_state *state = tevent_req_data(
    6043             :                 req, struct dcerpc_clusapi_CreateResourceType_state);
    6044             :         NTSTATUS status;
    6045             : 
    6046           0 :         if (tevent_req_is_nterror(req, &status)) {
    6047           0 :                 tevent_req_received(req);
    6048           0 :                 return status;
    6049             :         }
    6050             : 
    6051             :         /* Steal possible out parameters to the callers context */
    6052           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6053             : 
    6054             :         /* Return result */
    6055           0 :         *result = state->orig.out.result;
    6056             : 
    6057           0 :         tevent_req_received(req);
    6058           0 :         return NT_STATUS_OK;
    6059             : }
    6060             : 
    6061           0 : NTSTATUS dcerpc_clusapi_CreateResourceType(struct dcerpc_binding_handle *h,
    6062             :                                            TALLOC_CTX *mem_ctx,
    6063             :                                            const char *_lpszTypeName /* [in] [charset(UTF16),ref] */,
    6064             :                                            const char *_lpszDisplayName /* [in] [charset(UTF16),ref] */,
    6065             :                                            const char *_lpszDllName /* [in] [charset(UTF16),ref] */,
    6066             :                                            uint32_t _dwLooksAlive /* [in]  */,
    6067             :                                            uint32_t _dwIsAlive /* [in]  */,
    6068             :                                            WERROR *_rpc_status /* [out] [ref] */,
    6069             :                                            WERROR *result)
    6070             : {
    6071             :         struct clusapi_CreateResourceType r;
    6072             :         NTSTATUS status;
    6073             : 
    6074             :         /* In parameters */
    6075           0 :         r.in.lpszTypeName = _lpszTypeName;
    6076           0 :         r.in.lpszDisplayName = _lpszDisplayName;
    6077           0 :         r.in.lpszDllName = _lpszDllName;
    6078           0 :         r.in.dwLooksAlive = _dwLooksAlive;
    6079           0 :         r.in.dwIsAlive = _dwIsAlive;
    6080             : 
    6081             :         /* Out parameters */
    6082           0 :         r.out.rpc_status = _rpc_status;
    6083             : 
    6084             :         /* Result */
    6085           0 :         NDR_ZERO_STRUCT(r.out.result);
    6086             : 
    6087           0 :         status = dcerpc_clusapi_CreateResourceType_r(h, mem_ctx, &r);
    6088           0 :         if (!NT_STATUS_IS_OK(status)) {
    6089           0 :                 return status;
    6090             :         }
    6091             : 
    6092             :         /* Return variables */
    6093           0 :         *_rpc_status = *r.out.rpc_status;
    6094             : 
    6095             :         /* Return result */
    6096           0 :         *result = r.out.result;
    6097             : 
    6098           0 :         return NT_STATUS_OK;
    6099             : }
    6100             : 
    6101             : struct dcerpc_clusapi_DeleteResourceType_r_state {
    6102             :         TALLOC_CTX *out_mem_ctx;
    6103             : };
    6104             : 
    6105             : static void dcerpc_clusapi_DeleteResourceType_r_done(struct tevent_req *subreq);
    6106             : 
    6107           0 : struct tevent_req *dcerpc_clusapi_DeleteResourceType_r_send(TALLOC_CTX *mem_ctx,
    6108             :         struct tevent_context *ev,
    6109             :         struct dcerpc_binding_handle *h,
    6110             :         struct clusapi_DeleteResourceType *r)
    6111             : {
    6112             :         struct tevent_req *req;
    6113             :         struct dcerpc_clusapi_DeleteResourceType_r_state *state;
    6114             :         struct tevent_req *subreq;
    6115             : 
    6116           0 :         req = tevent_req_create(mem_ctx, &state,
    6117             :                                 struct dcerpc_clusapi_DeleteResourceType_r_state);
    6118           0 :         if (req == NULL) {
    6119           0 :                 return NULL;
    6120             :         }
    6121             : 
    6122           0 :         state->out_mem_ctx = talloc_new(state);
    6123           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6124           0 :                 return tevent_req_post(req, ev);
    6125             :         }
    6126             : 
    6127           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6128             :                         NULL, &ndr_table_clusapi,
    6129           0 :                         NDR_CLUSAPI_DELETERESOURCETYPE, state->out_mem_ctx, r);
    6130           0 :         if (tevent_req_nomem(subreq, req)) {
    6131           0 :                 return tevent_req_post(req, ev);
    6132             :         }
    6133           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteResourceType_r_done, req);
    6134             : 
    6135           0 :         return req;
    6136             : }
    6137             : 
    6138           0 : static void dcerpc_clusapi_DeleteResourceType_r_done(struct tevent_req *subreq)
    6139             : {
    6140           0 :         struct tevent_req *req =
    6141           0 :                 tevent_req_callback_data(subreq,
    6142             :                 struct tevent_req);
    6143             :         NTSTATUS status;
    6144             : 
    6145           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6146           0 :         TALLOC_FREE(subreq);
    6147           0 :         if (tevent_req_nterror(req, status)) {
    6148           0 :                 return;
    6149             :         }
    6150             : 
    6151           0 :         tevent_req_done(req);
    6152             : }
    6153             : 
    6154           0 : NTSTATUS dcerpc_clusapi_DeleteResourceType_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6155             : {
    6156           0 :         struct dcerpc_clusapi_DeleteResourceType_r_state *state =
    6157           0 :                 tevent_req_data(req,
    6158             :                 struct dcerpc_clusapi_DeleteResourceType_r_state);
    6159             :         NTSTATUS status;
    6160             : 
    6161           0 :         if (tevent_req_is_nterror(req, &status)) {
    6162           0 :                 tevent_req_received(req);
    6163           0 :                 return status;
    6164             :         }
    6165             : 
    6166           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6167             : 
    6168           0 :         tevent_req_received(req);
    6169           0 :         return NT_STATUS_OK;
    6170             : }
    6171             : 
    6172           0 : NTSTATUS dcerpc_clusapi_DeleteResourceType_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_DeleteResourceType *r)
    6173             : {
    6174             :         NTSTATUS status;
    6175             : 
    6176           0 :         status = dcerpc_binding_handle_call(h,
    6177             :                         NULL, &ndr_table_clusapi,
    6178             :                         NDR_CLUSAPI_DELETERESOURCETYPE, mem_ctx, r);
    6179             : 
    6180           0 :         return status;
    6181             : }
    6182             : 
    6183             : struct dcerpc_clusapi_DeleteResourceType_state {
    6184             :         struct clusapi_DeleteResourceType orig;
    6185             :         struct clusapi_DeleteResourceType tmp;
    6186             :         TALLOC_CTX *out_mem_ctx;
    6187             : };
    6188             : 
    6189             : static void dcerpc_clusapi_DeleteResourceType_done(struct tevent_req *subreq);
    6190             : 
    6191           0 : struct tevent_req *dcerpc_clusapi_DeleteResourceType_send(TALLOC_CTX *mem_ctx,
    6192             :                                                           struct tevent_context *ev,
    6193             :                                                           struct dcerpc_binding_handle *h,
    6194             :                                                           const char *_lpszTypeName /* [in] [charset(UTF16),ref] */,
    6195             :                                                           WERROR *_rpc_status /* [out] [ref] */)
    6196             : {
    6197             :         struct tevent_req *req;
    6198             :         struct dcerpc_clusapi_DeleteResourceType_state *state;
    6199             :         struct tevent_req *subreq;
    6200             : 
    6201           0 :         req = tevent_req_create(mem_ctx, &state,
    6202             :                                 struct dcerpc_clusapi_DeleteResourceType_state);
    6203           0 :         if (req == NULL) {
    6204           0 :                 return NULL;
    6205             :         }
    6206           0 :         state->out_mem_ctx = NULL;
    6207             : 
    6208             :         /* In parameters */
    6209           0 :         state->orig.in.lpszTypeName = _lpszTypeName;
    6210             : 
    6211             :         /* Out parameters */
    6212           0 :         state->orig.out.rpc_status = _rpc_status;
    6213             : 
    6214             :         /* Result */
    6215           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6216             : 
    6217           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6218             :                              "dcerpc_clusapi_DeleteResourceType_out_memory");
    6219           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6220           0 :                 return tevent_req_post(req, ev);
    6221             :         }
    6222             : 
    6223             :         /* make a temporary copy, that we pass to the dispatch function */
    6224           0 :         state->tmp = state->orig;
    6225             : 
    6226           0 :         subreq = dcerpc_clusapi_DeleteResourceType_r_send(state, ev, h, &state->tmp);
    6227           0 :         if (tevent_req_nomem(subreq, req)) {
    6228           0 :                 return tevent_req_post(req, ev);
    6229             :         }
    6230           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteResourceType_done, req);
    6231           0 :         return req;
    6232             : }
    6233             : 
    6234           0 : static void dcerpc_clusapi_DeleteResourceType_done(struct tevent_req *subreq)
    6235             : {
    6236           0 :         struct tevent_req *req = tevent_req_callback_data(
    6237             :                 subreq, struct tevent_req);
    6238           0 :         struct dcerpc_clusapi_DeleteResourceType_state *state = tevent_req_data(
    6239             :                 req, struct dcerpc_clusapi_DeleteResourceType_state);
    6240             :         NTSTATUS status;
    6241             :         TALLOC_CTX *mem_ctx;
    6242             : 
    6243           0 :         if (state->out_mem_ctx) {
    6244           0 :                 mem_ctx = state->out_mem_ctx;
    6245             :         } else {
    6246           0 :                 mem_ctx = state;
    6247             :         }
    6248             : 
    6249           0 :         status = dcerpc_clusapi_DeleteResourceType_r_recv(subreq, mem_ctx);
    6250           0 :         TALLOC_FREE(subreq);
    6251           0 :         if (tevent_req_nterror(req, status)) {
    6252           0 :                 return;
    6253             :         }
    6254             : 
    6255             :         /* Copy out parameters */
    6256           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    6257             : 
    6258             :         /* Copy result */
    6259           0 :         state->orig.out.result = state->tmp.out.result;
    6260             : 
    6261             :         /* Reset temporary structure */
    6262           0 :         NDR_ZERO_STRUCT(state->tmp);
    6263             : 
    6264           0 :         tevent_req_done(req);
    6265             : }
    6266             : 
    6267           0 : NTSTATUS dcerpc_clusapi_DeleteResourceType_recv(struct tevent_req *req,
    6268             :                                                 TALLOC_CTX *mem_ctx,
    6269             :                                                 WERROR *result)
    6270             : {
    6271           0 :         struct dcerpc_clusapi_DeleteResourceType_state *state = tevent_req_data(
    6272             :                 req, struct dcerpc_clusapi_DeleteResourceType_state);
    6273             :         NTSTATUS status;
    6274             : 
    6275           0 :         if (tevent_req_is_nterror(req, &status)) {
    6276           0 :                 tevent_req_received(req);
    6277           0 :                 return status;
    6278             :         }
    6279             : 
    6280             :         /* Steal possible out parameters to the callers context */
    6281           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6282             : 
    6283             :         /* Return result */
    6284           0 :         *result = state->orig.out.result;
    6285             : 
    6286           0 :         tevent_req_received(req);
    6287           0 :         return NT_STATUS_OK;
    6288             : }
    6289             : 
    6290           0 : NTSTATUS dcerpc_clusapi_DeleteResourceType(struct dcerpc_binding_handle *h,
    6291             :                                            TALLOC_CTX *mem_ctx,
    6292             :                                            const char *_lpszTypeName /* [in] [charset(UTF16),ref] */,
    6293             :                                            WERROR *_rpc_status /* [out] [ref] */,
    6294             :                                            WERROR *result)
    6295             : {
    6296             :         struct clusapi_DeleteResourceType r;
    6297             :         NTSTATUS status;
    6298             : 
    6299             :         /* In parameters */
    6300           0 :         r.in.lpszTypeName = _lpszTypeName;
    6301             : 
    6302             :         /* Out parameters */
    6303           0 :         r.out.rpc_status = _rpc_status;
    6304             : 
    6305             :         /* Result */
    6306           0 :         NDR_ZERO_STRUCT(r.out.result);
    6307             : 
    6308           0 :         status = dcerpc_clusapi_DeleteResourceType_r(h, mem_ctx, &r);
    6309           0 :         if (!NT_STATUS_IS_OK(status)) {
    6310           0 :                 return status;
    6311             :         }
    6312             : 
    6313             :         /* Return variables */
    6314           0 :         *_rpc_status = *r.out.rpc_status;
    6315             : 
    6316             :         /* Return result */
    6317           0 :         *result = r.out.result;
    6318             : 
    6319           0 :         return NT_STATUS_OK;
    6320             : }
    6321             : 
    6322             : struct dcerpc_clusapi_GetRootKey_r_state {
    6323             :         TALLOC_CTX *out_mem_ctx;
    6324             : };
    6325             : 
    6326             : static void dcerpc_clusapi_GetRootKey_r_done(struct tevent_req *subreq);
    6327             : 
    6328           0 : struct tevent_req *dcerpc_clusapi_GetRootKey_r_send(TALLOC_CTX *mem_ctx,
    6329             :         struct tevent_context *ev,
    6330             :         struct dcerpc_binding_handle *h,
    6331             :         struct clusapi_GetRootKey *r)
    6332             : {
    6333             :         struct tevent_req *req;
    6334             :         struct dcerpc_clusapi_GetRootKey_r_state *state;
    6335             :         struct tevent_req *subreq;
    6336             : 
    6337           0 :         req = tevent_req_create(mem_ctx, &state,
    6338             :                                 struct dcerpc_clusapi_GetRootKey_r_state);
    6339           0 :         if (req == NULL) {
    6340           0 :                 return NULL;
    6341             :         }
    6342             : 
    6343           0 :         state->out_mem_ctx = talloc_new(state);
    6344           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6345           0 :                 return tevent_req_post(req, ev);
    6346             :         }
    6347             : 
    6348           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6349             :                         NULL, &ndr_table_clusapi,
    6350           0 :                         NDR_CLUSAPI_GETROOTKEY, state->out_mem_ctx, r);
    6351           0 :         if (tevent_req_nomem(subreq, req)) {
    6352           0 :                 return tevent_req_post(req, ev);
    6353             :         }
    6354           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetRootKey_r_done, req);
    6355             : 
    6356           0 :         return req;
    6357             : }
    6358             : 
    6359           0 : static void dcerpc_clusapi_GetRootKey_r_done(struct tevent_req *subreq)
    6360             : {
    6361           0 :         struct tevent_req *req =
    6362           0 :                 tevent_req_callback_data(subreq,
    6363             :                 struct tevent_req);
    6364             :         NTSTATUS status;
    6365             : 
    6366           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6367           0 :         TALLOC_FREE(subreq);
    6368           0 :         if (tevent_req_nterror(req, status)) {
    6369           0 :                 return;
    6370             :         }
    6371             : 
    6372           0 :         tevent_req_done(req);
    6373             : }
    6374             : 
    6375           0 : NTSTATUS dcerpc_clusapi_GetRootKey_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6376             : {
    6377           0 :         struct dcerpc_clusapi_GetRootKey_r_state *state =
    6378           0 :                 tevent_req_data(req,
    6379             :                 struct dcerpc_clusapi_GetRootKey_r_state);
    6380             :         NTSTATUS status;
    6381             : 
    6382           0 :         if (tevent_req_is_nterror(req, &status)) {
    6383           0 :                 tevent_req_received(req);
    6384           0 :                 return status;
    6385             :         }
    6386             : 
    6387           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6388             : 
    6389           0 :         tevent_req_received(req);
    6390           0 :         return NT_STATUS_OK;
    6391             : }
    6392             : 
    6393           0 : NTSTATUS dcerpc_clusapi_GetRootKey_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetRootKey *r)
    6394             : {
    6395             :         NTSTATUS status;
    6396             : 
    6397           0 :         status = dcerpc_binding_handle_call(h,
    6398             :                         NULL, &ndr_table_clusapi,
    6399             :                         NDR_CLUSAPI_GETROOTKEY, mem_ctx, r);
    6400             : 
    6401           0 :         return status;
    6402             : }
    6403             : 
    6404             : struct dcerpc_clusapi_GetRootKey_state {
    6405             :         struct clusapi_GetRootKey orig;
    6406             :         struct clusapi_GetRootKey tmp;
    6407             :         TALLOC_CTX *out_mem_ctx;
    6408             : };
    6409             : 
    6410             : static void dcerpc_clusapi_GetRootKey_done(struct tevent_req *subreq);
    6411             : 
    6412           0 : struct tevent_req *dcerpc_clusapi_GetRootKey_send(TALLOC_CTX *mem_ctx,
    6413             :                                                   struct tevent_context *ev,
    6414             :                                                   struct dcerpc_binding_handle *h,
    6415             :                                                   uint32_t _samDesired /* [in]  */,
    6416             :                                                   WERROR *_Status /* [out] [ref] */,
    6417             :                                                   WERROR *_rpc_status /* [out] [ref] */,
    6418             :                                                   struct policy_handle *_phKey /* [out] [ref] */)
    6419             : {
    6420             :         struct tevent_req *req;
    6421             :         struct dcerpc_clusapi_GetRootKey_state *state;
    6422             :         struct tevent_req *subreq;
    6423             : 
    6424           0 :         req = tevent_req_create(mem_ctx, &state,
    6425             :                                 struct dcerpc_clusapi_GetRootKey_state);
    6426           0 :         if (req == NULL) {
    6427           0 :                 return NULL;
    6428             :         }
    6429           0 :         state->out_mem_ctx = NULL;
    6430             : 
    6431             :         /* In parameters */
    6432           0 :         state->orig.in.samDesired = _samDesired;
    6433             : 
    6434             :         /* Out parameters */
    6435           0 :         state->orig.out.Status = _Status;
    6436           0 :         state->orig.out.rpc_status = _rpc_status;
    6437           0 :         state->orig.out.phKey = _phKey;
    6438             : 
    6439           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6440             :                              "dcerpc_clusapi_GetRootKey_out_memory");
    6441           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6442           0 :                 return tevent_req_post(req, ev);
    6443             :         }
    6444             : 
    6445             :         /* make a temporary copy, that we pass to the dispatch function */
    6446           0 :         state->tmp = state->orig;
    6447             : 
    6448           0 :         subreq = dcerpc_clusapi_GetRootKey_r_send(state, ev, h, &state->tmp);
    6449           0 :         if (tevent_req_nomem(subreq, req)) {
    6450           0 :                 return tevent_req_post(req, ev);
    6451             :         }
    6452           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetRootKey_done, req);
    6453           0 :         return req;
    6454             : }
    6455             : 
    6456           0 : static void dcerpc_clusapi_GetRootKey_done(struct tevent_req *subreq)
    6457             : {
    6458           0 :         struct tevent_req *req = tevent_req_callback_data(
    6459             :                 subreq, struct tevent_req);
    6460           0 :         struct dcerpc_clusapi_GetRootKey_state *state = tevent_req_data(
    6461             :                 req, struct dcerpc_clusapi_GetRootKey_state);
    6462             :         NTSTATUS status;
    6463             :         TALLOC_CTX *mem_ctx;
    6464             : 
    6465           0 :         if (state->out_mem_ctx) {
    6466           0 :                 mem_ctx = state->out_mem_ctx;
    6467             :         } else {
    6468           0 :                 mem_ctx = state;
    6469             :         }
    6470             : 
    6471           0 :         status = dcerpc_clusapi_GetRootKey_r_recv(subreq, mem_ctx);
    6472           0 :         TALLOC_FREE(subreq);
    6473           0 :         if (tevent_req_nterror(req, status)) {
    6474           0 :                 return;
    6475             :         }
    6476             : 
    6477             :         /* Copy out parameters */
    6478           0 :         *state->orig.out.Status = *state->tmp.out.Status;
    6479           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    6480           0 :         *state->orig.out.phKey = *state->tmp.out.phKey;
    6481             : 
    6482             :         /* Reset temporary structure */
    6483           0 :         NDR_ZERO_STRUCT(state->tmp);
    6484             : 
    6485           0 :         tevent_req_done(req);
    6486             : }
    6487             : 
    6488           0 : NTSTATUS dcerpc_clusapi_GetRootKey_recv(struct tevent_req *req,
    6489             :                                         TALLOC_CTX *mem_ctx)
    6490             : {
    6491           0 :         struct dcerpc_clusapi_GetRootKey_state *state = tevent_req_data(
    6492             :                 req, struct dcerpc_clusapi_GetRootKey_state);
    6493             :         NTSTATUS status;
    6494             : 
    6495           0 :         if (tevent_req_is_nterror(req, &status)) {
    6496           0 :                 tevent_req_received(req);
    6497           0 :                 return status;
    6498             :         }
    6499             : 
    6500             :         /* Steal possible out parameters to the callers context */
    6501           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6502             : 
    6503           0 :         tevent_req_received(req);
    6504           0 :         return NT_STATUS_OK;
    6505             : }
    6506             : 
    6507           0 : NTSTATUS dcerpc_clusapi_GetRootKey(struct dcerpc_binding_handle *h,
    6508             :                                    TALLOC_CTX *mem_ctx,
    6509             :                                    uint32_t _samDesired /* [in]  */,
    6510             :                                    WERROR *_Status /* [out] [ref] */,
    6511             :                                    WERROR *_rpc_status /* [out] [ref] */,
    6512             :                                    struct policy_handle *_phKey /* [out] [ref] */)
    6513             : {
    6514             :         struct clusapi_GetRootKey r;
    6515             :         NTSTATUS status;
    6516             : 
    6517             :         /* In parameters */
    6518           0 :         r.in.samDesired = _samDesired;
    6519             : 
    6520             :         /* Out parameters */
    6521           0 :         r.out.Status = _Status;
    6522           0 :         r.out.rpc_status = _rpc_status;
    6523           0 :         r.out.phKey = _phKey;
    6524             : 
    6525           0 :         status = dcerpc_clusapi_GetRootKey_r(h, mem_ctx, &r);
    6526           0 :         if (!NT_STATUS_IS_OK(status)) {
    6527           0 :                 return status;
    6528             :         }
    6529             : 
    6530             :         /* Return variables */
    6531           0 :         *_Status = *r.out.Status;
    6532           0 :         *_rpc_status = *r.out.rpc_status;
    6533           0 :         *_phKey = *r.out.phKey;
    6534             : 
    6535             :         /* Return result */
    6536             : 
    6537           0 :         return NT_STATUS_OK;
    6538             : }
    6539             : 
    6540             : struct dcerpc_clusapi_CreateKey_r_state {
    6541             :         TALLOC_CTX *out_mem_ctx;
    6542             : };
    6543             : 
    6544             : static void dcerpc_clusapi_CreateKey_r_done(struct tevent_req *subreq);
    6545             : 
    6546           0 : struct tevent_req *dcerpc_clusapi_CreateKey_r_send(TALLOC_CTX *mem_ctx,
    6547             :         struct tevent_context *ev,
    6548             :         struct dcerpc_binding_handle *h,
    6549             :         struct clusapi_CreateKey *r)
    6550             : {
    6551             :         struct tevent_req *req;
    6552             :         struct dcerpc_clusapi_CreateKey_r_state *state;
    6553             :         struct tevent_req *subreq;
    6554             : 
    6555           0 :         req = tevent_req_create(mem_ctx, &state,
    6556             :                                 struct dcerpc_clusapi_CreateKey_r_state);
    6557           0 :         if (req == NULL) {
    6558           0 :                 return NULL;
    6559             :         }
    6560             : 
    6561           0 :         state->out_mem_ctx = talloc_new(state);
    6562           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6563           0 :                 return tevent_req_post(req, ev);
    6564             :         }
    6565             : 
    6566           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6567             :                         NULL, &ndr_table_clusapi,
    6568           0 :                         NDR_CLUSAPI_CREATEKEY, state->out_mem_ctx, r);
    6569           0 :         if (tevent_req_nomem(subreq, req)) {
    6570           0 :                 return tevent_req_post(req, ev);
    6571             :         }
    6572           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateKey_r_done, req);
    6573             : 
    6574           0 :         return req;
    6575             : }
    6576             : 
    6577           0 : static void dcerpc_clusapi_CreateKey_r_done(struct tevent_req *subreq)
    6578             : {
    6579           0 :         struct tevent_req *req =
    6580           0 :                 tevent_req_callback_data(subreq,
    6581             :                 struct tevent_req);
    6582             :         NTSTATUS status;
    6583             : 
    6584           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6585           0 :         TALLOC_FREE(subreq);
    6586           0 :         if (tevent_req_nterror(req, status)) {
    6587           0 :                 return;
    6588             :         }
    6589             : 
    6590           0 :         tevent_req_done(req);
    6591             : }
    6592             : 
    6593           0 : NTSTATUS dcerpc_clusapi_CreateKey_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6594             : {
    6595           0 :         struct dcerpc_clusapi_CreateKey_r_state *state =
    6596           0 :                 tevent_req_data(req,
    6597             :                 struct dcerpc_clusapi_CreateKey_r_state);
    6598             :         NTSTATUS status;
    6599             : 
    6600           0 :         if (tevent_req_is_nterror(req, &status)) {
    6601           0 :                 tevent_req_received(req);
    6602           0 :                 return status;
    6603             :         }
    6604             : 
    6605           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6606             : 
    6607           0 :         tevent_req_received(req);
    6608           0 :         return NT_STATUS_OK;
    6609             : }
    6610             : 
    6611           0 : NTSTATUS dcerpc_clusapi_CreateKey_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CreateKey *r)
    6612             : {
    6613             :         NTSTATUS status;
    6614             : 
    6615           0 :         status = dcerpc_binding_handle_call(h,
    6616             :                         NULL, &ndr_table_clusapi,
    6617             :                         NDR_CLUSAPI_CREATEKEY, mem_ctx, r);
    6618             : 
    6619           0 :         return status;
    6620             : }
    6621             : 
    6622             : struct dcerpc_clusapi_CreateKey_state {
    6623             :         struct clusapi_CreateKey orig;
    6624             :         struct clusapi_CreateKey tmp;
    6625             :         TALLOC_CTX *out_mem_ctx;
    6626             : };
    6627             : 
    6628             : static void dcerpc_clusapi_CreateKey_done(struct tevent_req *subreq);
    6629             : 
    6630           0 : struct tevent_req *dcerpc_clusapi_CreateKey_send(TALLOC_CTX *mem_ctx,
    6631             :                                                  struct tevent_context *ev,
    6632             :                                                  struct dcerpc_binding_handle *h,
    6633             :                                                  struct policy_handle _hKey /* [in]  */,
    6634             :                                                  const char *_lpSubKey /* [in] [charset(UTF16),ref] */,
    6635             :                                                  uint32_t _dwOptions /* [in]  */,
    6636             :                                                  uint32_t _samDesired /* [in]  */,
    6637             :                                                  struct RPC_SECURITY_ATTRIBUTES *_lpSecurityAttributes /* [in] [unique] */,
    6638             :                                                  uint32_t *_lpdwDisposition /* [out] [ref] */,
    6639             :                                                  WERROR *_Status /* [out] [ref] */,
    6640             :                                                  WERROR *_rpc_status /* [out] [ref] */,
    6641             :                                                  struct policy_handle *_phKey /* [out] [ref] */)
    6642             : {
    6643             :         struct tevent_req *req;
    6644             :         struct dcerpc_clusapi_CreateKey_state *state;
    6645             :         struct tevent_req *subreq;
    6646             : 
    6647           0 :         req = tevent_req_create(mem_ctx, &state,
    6648             :                                 struct dcerpc_clusapi_CreateKey_state);
    6649           0 :         if (req == NULL) {
    6650           0 :                 return NULL;
    6651             :         }
    6652           0 :         state->out_mem_ctx = NULL;
    6653             : 
    6654             :         /* In parameters */
    6655           0 :         state->orig.in.hKey = _hKey;
    6656           0 :         state->orig.in.lpSubKey = _lpSubKey;
    6657           0 :         state->orig.in.dwOptions = _dwOptions;
    6658           0 :         state->orig.in.samDesired = _samDesired;
    6659           0 :         state->orig.in.lpSecurityAttributes = _lpSecurityAttributes;
    6660             : 
    6661             :         /* Out parameters */
    6662           0 :         state->orig.out.lpdwDisposition = _lpdwDisposition;
    6663           0 :         state->orig.out.Status = _Status;
    6664           0 :         state->orig.out.rpc_status = _rpc_status;
    6665           0 :         state->orig.out.phKey = _phKey;
    6666             : 
    6667           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6668             :                              "dcerpc_clusapi_CreateKey_out_memory");
    6669           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6670           0 :                 return tevent_req_post(req, ev);
    6671             :         }
    6672             : 
    6673             :         /* make a temporary copy, that we pass to the dispatch function */
    6674           0 :         state->tmp = state->orig;
    6675             : 
    6676           0 :         subreq = dcerpc_clusapi_CreateKey_r_send(state, ev, h, &state->tmp);
    6677           0 :         if (tevent_req_nomem(subreq, req)) {
    6678           0 :                 return tevent_req_post(req, ev);
    6679             :         }
    6680           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateKey_done, req);
    6681           0 :         return req;
    6682             : }
    6683             : 
    6684           0 : static void dcerpc_clusapi_CreateKey_done(struct tevent_req *subreq)
    6685             : {
    6686           0 :         struct tevent_req *req = tevent_req_callback_data(
    6687             :                 subreq, struct tevent_req);
    6688           0 :         struct dcerpc_clusapi_CreateKey_state *state = tevent_req_data(
    6689             :                 req, struct dcerpc_clusapi_CreateKey_state);
    6690             :         NTSTATUS status;
    6691             :         TALLOC_CTX *mem_ctx;
    6692             : 
    6693           0 :         if (state->out_mem_ctx) {
    6694           0 :                 mem_ctx = state->out_mem_ctx;
    6695             :         } else {
    6696           0 :                 mem_ctx = state;
    6697             :         }
    6698             : 
    6699           0 :         status = dcerpc_clusapi_CreateKey_r_recv(subreq, mem_ctx);
    6700           0 :         TALLOC_FREE(subreq);
    6701           0 :         if (tevent_req_nterror(req, status)) {
    6702           0 :                 return;
    6703             :         }
    6704             : 
    6705             :         /* Copy out parameters */
    6706           0 :         *state->orig.out.lpdwDisposition = *state->tmp.out.lpdwDisposition;
    6707           0 :         *state->orig.out.Status = *state->tmp.out.Status;
    6708           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    6709           0 :         *state->orig.out.phKey = *state->tmp.out.phKey;
    6710             : 
    6711             :         /* Reset temporary structure */
    6712           0 :         NDR_ZERO_STRUCT(state->tmp);
    6713             : 
    6714           0 :         tevent_req_done(req);
    6715             : }
    6716             : 
    6717           0 : NTSTATUS dcerpc_clusapi_CreateKey_recv(struct tevent_req *req,
    6718             :                                        TALLOC_CTX *mem_ctx)
    6719             : {
    6720           0 :         struct dcerpc_clusapi_CreateKey_state *state = tevent_req_data(
    6721             :                 req, struct dcerpc_clusapi_CreateKey_state);
    6722             :         NTSTATUS status;
    6723             : 
    6724           0 :         if (tevent_req_is_nterror(req, &status)) {
    6725           0 :                 tevent_req_received(req);
    6726           0 :                 return status;
    6727             :         }
    6728             : 
    6729             :         /* Steal possible out parameters to the callers context */
    6730           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6731             : 
    6732           0 :         tevent_req_received(req);
    6733           0 :         return NT_STATUS_OK;
    6734             : }
    6735             : 
    6736           0 : NTSTATUS dcerpc_clusapi_CreateKey(struct dcerpc_binding_handle *h,
    6737             :                                   TALLOC_CTX *mem_ctx,
    6738             :                                   struct policy_handle _hKey /* [in]  */,
    6739             :                                   const char *_lpSubKey /* [in] [charset(UTF16),ref] */,
    6740             :                                   uint32_t _dwOptions /* [in]  */,
    6741             :                                   uint32_t _samDesired /* [in]  */,
    6742             :                                   struct RPC_SECURITY_ATTRIBUTES *_lpSecurityAttributes /* [in] [unique] */,
    6743             :                                   uint32_t *_lpdwDisposition /* [out] [ref] */,
    6744             :                                   WERROR *_Status /* [out] [ref] */,
    6745             :                                   WERROR *_rpc_status /* [out] [ref] */,
    6746             :                                   struct policy_handle *_phKey /* [out] [ref] */)
    6747             : {
    6748             :         struct clusapi_CreateKey r;
    6749             :         NTSTATUS status;
    6750             : 
    6751             :         /* In parameters */
    6752           0 :         r.in.hKey = _hKey;
    6753           0 :         r.in.lpSubKey = _lpSubKey;
    6754           0 :         r.in.dwOptions = _dwOptions;
    6755           0 :         r.in.samDesired = _samDesired;
    6756           0 :         r.in.lpSecurityAttributes = _lpSecurityAttributes;
    6757             : 
    6758             :         /* Out parameters */
    6759           0 :         r.out.lpdwDisposition = _lpdwDisposition;
    6760           0 :         r.out.Status = _Status;
    6761           0 :         r.out.rpc_status = _rpc_status;
    6762           0 :         r.out.phKey = _phKey;
    6763             : 
    6764           0 :         status = dcerpc_clusapi_CreateKey_r(h, mem_ctx, &r);
    6765           0 :         if (!NT_STATUS_IS_OK(status)) {
    6766           0 :                 return status;
    6767             :         }
    6768             : 
    6769             :         /* Return variables */
    6770           0 :         *_lpdwDisposition = *r.out.lpdwDisposition;
    6771           0 :         *_Status = *r.out.Status;
    6772           0 :         *_rpc_status = *r.out.rpc_status;
    6773           0 :         *_phKey = *r.out.phKey;
    6774             : 
    6775             :         /* Return result */
    6776             : 
    6777           0 :         return NT_STATUS_OK;
    6778             : }
    6779             : 
    6780             : struct dcerpc_clusapi_OpenKey_r_state {
    6781             :         TALLOC_CTX *out_mem_ctx;
    6782             : };
    6783             : 
    6784             : static void dcerpc_clusapi_OpenKey_r_done(struct tevent_req *subreq);
    6785             : 
    6786           0 : struct tevent_req *dcerpc_clusapi_OpenKey_r_send(TALLOC_CTX *mem_ctx,
    6787             :         struct tevent_context *ev,
    6788             :         struct dcerpc_binding_handle *h,
    6789             :         struct clusapi_OpenKey *r)
    6790             : {
    6791             :         struct tevent_req *req;
    6792             :         struct dcerpc_clusapi_OpenKey_r_state *state;
    6793             :         struct tevent_req *subreq;
    6794             : 
    6795           0 :         req = tevent_req_create(mem_ctx, &state,
    6796             :                                 struct dcerpc_clusapi_OpenKey_r_state);
    6797           0 :         if (req == NULL) {
    6798           0 :                 return NULL;
    6799             :         }
    6800             : 
    6801           0 :         state->out_mem_ctx = talloc_new(state);
    6802           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6803           0 :                 return tevent_req_post(req, ev);
    6804             :         }
    6805             : 
    6806           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6807             :                         NULL, &ndr_table_clusapi,
    6808           0 :                         NDR_CLUSAPI_OPENKEY, state->out_mem_ctx, r);
    6809           0 :         if (tevent_req_nomem(subreq, req)) {
    6810           0 :                 return tevent_req_post(req, ev);
    6811             :         }
    6812           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OpenKey_r_done, req);
    6813             : 
    6814           0 :         return req;
    6815             : }
    6816             : 
    6817           0 : static void dcerpc_clusapi_OpenKey_r_done(struct tevent_req *subreq)
    6818             : {
    6819           0 :         struct tevent_req *req =
    6820           0 :                 tevent_req_callback_data(subreq,
    6821             :                 struct tevent_req);
    6822             :         NTSTATUS status;
    6823             : 
    6824           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6825           0 :         TALLOC_FREE(subreq);
    6826           0 :         if (tevent_req_nterror(req, status)) {
    6827           0 :                 return;
    6828             :         }
    6829             : 
    6830           0 :         tevent_req_done(req);
    6831             : }
    6832             : 
    6833           0 : NTSTATUS dcerpc_clusapi_OpenKey_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6834             : {
    6835           0 :         struct dcerpc_clusapi_OpenKey_r_state *state =
    6836           0 :                 tevent_req_data(req,
    6837             :                 struct dcerpc_clusapi_OpenKey_r_state);
    6838             :         NTSTATUS status;
    6839             : 
    6840           0 :         if (tevent_req_is_nterror(req, &status)) {
    6841           0 :                 tevent_req_received(req);
    6842           0 :                 return status;
    6843             :         }
    6844             : 
    6845           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6846             : 
    6847           0 :         tevent_req_received(req);
    6848           0 :         return NT_STATUS_OK;
    6849             : }
    6850             : 
    6851           0 : NTSTATUS dcerpc_clusapi_OpenKey_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_OpenKey *r)
    6852             : {
    6853             :         NTSTATUS status;
    6854             : 
    6855           0 :         status = dcerpc_binding_handle_call(h,
    6856             :                         NULL, &ndr_table_clusapi,
    6857             :                         NDR_CLUSAPI_OPENKEY, mem_ctx, r);
    6858             : 
    6859           0 :         return status;
    6860             : }
    6861             : 
    6862             : struct dcerpc_clusapi_OpenKey_state {
    6863             :         struct clusapi_OpenKey orig;
    6864             :         struct clusapi_OpenKey tmp;
    6865             :         TALLOC_CTX *out_mem_ctx;
    6866             : };
    6867             : 
    6868             : static void dcerpc_clusapi_OpenKey_done(struct tevent_req *subreq);
    6869             : 
    6870           0 : struct tevent_req *dcerpc_clusapi_OpenKey_send(TALLOC_CTX *mem_ctx,
    6871             :                                                struct tevent_context *ev,
    6872             :                                                struct dcerpc_binding_handle *h,
    6873             :                                                struct policy_handle _hKey /* [in]  */,
    6874             :                                                const char *_lpSubKey /* [in] [charset(UTF16),ref] */,
    6875             :                                                uint32_t _samDesired /* [in]  */,
    6876             :                                                WERROR *_Status /* [out] [ref] */,
    6877             :                                                WERROR *_rpc_status /* [out] [ref] */,
    6878             :                                                struct policy_handle *_phKey /* [out] [ref] */)
    6879             : {
    6880             :         struct tevent_req *req;
    6881             :         struct dcerpc_clusapi_OpenKey_state *state;
    6882             :         struct tevent_req *subreq;
    6883             : 
    6884           0 :         req = tevent_req_create(mem_ctx, &state,
    6885             :                                 struct dcerpc_clusapi_OpenKey_state);
    6886           0 :         if (req == NULL) {
    6887           0 :                 return NULL;
    6888             :         }
    6889           0 :         state->out_mem_ctx = NULL;
    6890             : 
    6891             :         /* In parameters */
    6892           0 :         state->orig.in.hKey = _hKey;
    6893           0 :         state->orig.in.lpSubKey = _lpSubKey;
    6894           0 :         state->orig.in.samDesired = _samDesired;
    6895             : 
    6896             :         /* Out parameters */
    6897           0 :         state->orig.out.Status = _Status;
    6898           0 :         state->orig.out.rpc_status = _rpc_status;
    6899           0 :         state->orig.out.phKey = _phKey;
    6900             : 
    6901           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6902             :                              "dcerpc_clusapi_OpenKey_out_memory");
    6903           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6904           0 :                 return tevent_req_post(req, ev);
    6905             :         }
    6906             : 
    6907             :         /* make a temporary copy, that we pass to the dispatch function */
    6908           0 :         state->tmp = state->orig;
    6909             : 
    6910           0 :         subreq = dcerpc_clusapi_OpenKey_r_send(state, ev, h, &state->tmp);
    6911           0 :         if (tevent_req_nomem(subreq, req)) {
    6912           0 :                 return tevent_req_post(req, ev);
    6913             :         }
    6914           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OpenKey_done, req);
    6915           0 :         return req;
    6916             : }
    6917             : 
    6918           0 : static void dcerpc_clusapi_OpenKey_done(struct tevent_req *subreq)
    6919             : {
    6920           0 :         struct tevent_req *req = tevent_req_callback_data(
    6921             :                 subreq, struct tevent_req);
    6922           0 :         struct dcerpc_clusapi_OpenKey_state *state = tevent_req_data(
    6923             :                 req, struct dcerpc_clusapi_OpenKey_state);
    6924             :         NTSTATUS status;
    6925             :         TALLOC_CTX *mem_ctx;
    6926             : 
    6927           0 :         if (state->out_mem_ctx) {
    6928           0 :                 mem_ctx = state->out_mem_ctx;
    6929             :         } else {
    6930           0 :                 mem_ctx = state;
    6931             :         }
    6932             : 
    6933           0 :         status = dcerpc_clusapi_OpenKey_r_recv(subreq, mem_ctx);
    6934           0 :         TALLOC_FREE(subreq);
    6935           0 :         if (tevent_req_nterror(req, status)) {
    6936           0 :                 return;
    6937             :         }
    6938             : 
    6939             :         /* Copy out parameters */
    6940           0 :         *state->orig.out.Status = *state->tmp.out.Status;
    6941           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    6942           0 :         *state->orig.out.phKey = *state->tmp.out.phKey;
    6943             : 
    6944             :         /* Reset temporary structure */
    6945           0 :         NDR_ZERO_STRUCT(state->tmp);
    6946             : 
    6947           0 :         tevent_req_done(req);
    6948             : }
    6949             : 
    6950           0 : NTSTATUS dcerpc_clusapi_OpenKey_recv(struct tevent_req *req,
    6951             :                                      TALLOC_CTX *mem_ctx)
    6952             : {
    6953           0 :         struct dcerpc_clusapi_OpenKey_state *state = tevent_req_data(
    6954             :                 req, struct dcerpc_clusapi_OpenKey_state);
    6955             :         NTSTATUS status;
    6956             : 
    6957           0 :         if (tevent_req_is_nterror(req, &status)) {
    6958           0 :                 tevent_req_received(req);
    6959           0 :                 return status;
    6960             :         }
    6961             : 
    6962             :         /* Steal possible out parameters to the callers context */
    6963           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6964             : 
    6965           0 :         tevent_req_received(req);
    6966           0 :         return NT_STATUS_OK;
    6967             : }
    6968             : 
    6969           0 : NTSTATUS dcerpc_clusapi_OpenKey(struct dcerpc_binding_handle *h,
    6970             :                                 TALLOC_CTX *mem_ctx,
    6971             :                                 struct policy_handle _hKey /* [in]  */,
    6972             :                                 const char *_lpSubKey /* [in] [charset(UTF16),ref] */,
    6973             :                                 uint32_t _samDesired /* [in]  */,
    6974             :                                 WERROR *_Status /* [out] [ref] */,
    6975             :                                 WERROR *_rpc_status /* [out] [ref] */,
    6976             :                                 struct policy_handle *_phKey /* [out] [ref] */)
    6977             : {
    6978             :         struct clusapi_OpenKey r;
    6979             :         NTSTATUS status;
    6980             : 
    6981             :         /* In parameters */
    6982           0 :         r.in.hKey = _hKey;
    6983           0 :         r.in.lpSubKey = _lpSubKey;
    6984           0 :         r.in.samDesired = _samDesired;
    6985             : 
    6986             :         /* Out parameters */
    6987           0 :         r.out.Status = _Status;
    6988           0 :         r.out.rpc_status = _rpc_status;
    6989           0 :         r.out.phKey = _phKey;
    6990             : 
    6991           0 :         status = dcerpc_clusapi_OpenKey_r(h, mem_ctx, &r);
    6992           0 :         if (!NT_STATUS_IS_OK(status)) {
    6993           0 :                 return status;
    6994             :         }
    6995             : 
    6996             :         /* Return variables */
    6997           0 :         *_Status = *r.out.Status;
    6998           0 :         *_rpc_status = *r.out.rpc_status;
    6999           0 :         *_phKey = *r.out.phKey;
    7000             : 
    7001             :         /* Return result */
    7002             : 
    7003           0 :         return NT_STATUS_OK;
    7004             : }
    7005             : 
    7006             : struct dcerpc_clusapi_EnumKey_r_state {
    7007             :         TALLOC_CTX *out_mem_ctx;
    7008             : };
    7009             : 
    7010             : static void dcerpc_clusapi_EnumKey_r_done(struct tevent_req *subreq);
    7011             : 
    7012           0 : struct tevent_req *dcerpc_clusapi_EnumKey_r_send(TALLOC_CTX *mem_ctx,
    7013             :         struct tevent_context *ev,
    7014             :         struct dcerpc_binding_handle *h,
    7015             :         struct clusapi_EnumKey *r)
    7016             : {
    7017             :         struct tevent_req *req;
    7018             :         struct dcerpc_clusapi_EnumKey_r_state *state;
    7019             :         struct tevent_req *subreq;
    7020             : 
    7021           0 :         req = tevent_req_create(mem_ctx, &state,
    7022             :                                 struct dcerpc_clusapi_EnumKey_r_state);
    7023           0 :         if (req == NULL) {
    7024           0 :                 return NULL;
    7025             :         }
    7026             : 
    7027           0 :         state->out_mem_ctx = talloc_new(state);
    7028           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7029           0 :                 return tevent_req_post(req, ev);
    7030             :         }
    7031             : 
    7032           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7033             :                         NULL, &ndr_table_clusapi,
    7034           0 :                         NDR_CLUSAPI_ENUMKEY, state->out_mem_ctx, r);
    7035           0 :         if (tevent_req_nomem(subreq, req)) {
    7036           0 :                 return tevent_req_post(req, ev);
    7037             :         }
    7038           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_EnumKey_r_done, req);
    7039             : 
    7040           0 :         return req;
    7041             : }
    7042             : 
    7043           0 : static void dcerpc_clusapi_EnumKey_r_done(struct tevent_req *subreq)
    7044             : {
    7045           0 :         struct tevent_req *req =
    7046           0 :                 tevent_req_callback_data(subreq,
    7047             :                 struct tevent_req);
    7048             :         NTSTATUS status;
    7049             : 
    7050           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7051           0 :         TALLOC_FREE(subreq);
    7052           0 :         if (tevent_req_nterror(req, status)) {
    7053           0 :                 return;
    7054             :         }
    7055             : 
    7056           0 :         tevent_req_done(req);
    7057             : }
    7058             : 
    7059           0 : NTSTATUS dcerpc_clusapi_EnumKey_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7060             : {
    7061           0 :         struct dcerpc_clusapi_EnumKey_r_state *state =
    7062           0 :                 tevent_req_data(req,
    7063             :                 struct dcerpc_clusapi_EnumKey_r_state);
    7064             :         NTSTATUS status;
    7065             : 
    7066           0 :         if (tevent_req_is_nterror(req, &status)) {
    7067           0 :                 tevent_req_received(req);
    7068           0 :                 return status;
    7069             :         }
    7070             : 
    7071           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7072             : 
    7073           0 :         tevent_req_received(req);
    7074           0 :         return NT_STATUS_OK;
    7075             : }
    7076             : 
    7077           0 : NTSTATUS dcerpc_clusapi_EnumKey_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_EnumKey *r)
    7078             : {
    7079             :         NTSTATUS status;
    7080             : 
    7081           0 :         status = dcerpc_binding_handle_call(h,
    7082             :                         NULL, &ndr_table_clusapi,
    7083             :                         NDR_CLUSAPI_ENUMKEY, mem_ctx, r);
    7084             : 
    7085           0 :         return status;
    7086             : }
    7087             : 
    7088             : struct dcerpc_clusapi_EnumKey_state {
    7089             :         struct clusapi_EnumKey orig;
    7090             :         struct clusapi_EnumKey tmp;
    7091             :         TALLOC_CTX *out_mem_ctx;
    7092             : };
    7093             : 
    7094             : static void dcerpc_clusapi_EnumKey_done(struct tevent_req *subreq);
    7095             : 
    7096           0 : struct tevent_req *dcerpc_clusapi_EnumKey_send(TALLOC_CTX *mem_ctx,
    7097             :                                                struct tevent_context *ev,
    7098             :                                                struct dcerpc_binding_handle *h,
    7099             :                                                struct policy_handle _hKey /* [in]  */,
    7100             :                                                uint32_t _dwIndex /* [in]  */,
    7101             :                                                const char **_KeyName /* [out] [charset(UTF16),ref] */,
    7102             :                                                NTTIME *_lpftLastWriteTime /* [out] [ref] */,
    7103             :                                                WERROR *_rpc_status /* [out] [ref] */)
    7104             : {
    7105             :         struct tevent_req *req;
    7106             :         struct dcerpc_clusapi_EnumKey_state *state;
    7107             :         struct tevent_req *subreq;
    7108             : 
    7109           0 :         req = tevent_req_create(mem_ctx, &state,
    7110             :                                 struct dcerpc_clusapi_EnumKey_state);
    7111           0 :         if (req == NULL) {
    7112           0 :                 return NULL;
    7113             :         }
    7114           0 :         state->out_mem_ctx = NULL;
    7115             : 
    7116             :         /* In parameters */
    7117           0 :         state->orig.in.hKey = _hKey;
    7118           0 :         state->orig.in.dwIndex = _dwIndex;
    7119             : 
    7120             :         /* Out parameters */
    7121           0 :         state->orig.out.KeyName = _KeyName;
    7122           0 :         state->orig.out.lpftLastWriteTime = _lpftLastWriteTime;
    7123           0 :         state->orig.out.rpc_status = _rpc_status;
    7124             : 
    7125             :         /* Result */
    7126           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7127             : 
    7128           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7129             :                              "dcerpc_clusapi_EnumKey_out_memory");
    7130           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7131           0 :                 return tevent_req_post(req, ev);
    7132             :         }
    7133             : 
    7134             :         /* make a temporary copy, that we pass to the dispatch function */
    7135           0 :         state->tmp = state->orig;
    7136             : 
    7137           0 :         subreq = dcerpc_clusapi_EnumKey_r_send(state, ev, h, &state->tmp);
    7138           0 :         if (tevent_req_nomem(subreq, req)) {
    7139           0 :                 return tevent_req_post(req, ev);
    7140             :         }
    7141           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_EnumKey_done, req);
    7142           0 :         return req;
    7143             : }
    7144             : 
    7145           0 : static void dcerpc_clusapi_EnumKey_done(struct tevent_req *subreq)
    7146             : {
    7147           0 :         struct tevent_req *req = tevent_req_callback_data(
    7148             :                 subreq, struct tevent_req);
    7149           0 :         struct dcerpc_clusapi_EnumKey_state *state = tevent_req_data(
    7150             :                 req, struct dcerpc_clusapi_EnumKey_state);
    7151             :         NTSTATUS status;
    7152             :         TALLOC_CTX *mem_ctx;
    7153             : 
    7154           0 :         if (state->out_mem_ctx) {
    7155           0 :                 mem_ctx = state->out_mem_ctx;
    7156             :         } else {
    7157           0 :                 mem_ctx = state;
    7158             :         }
    7159             : 
    7160           0 :         status = dcerpc_clusapi_EnumKey_r_recv(subreq, mem_ctx);
    7161           0 :         TALLOC_FREE(subreq);
    7162           0 :         if (tevent_req_nterror(req, status)) {
    7163           0 :                 return;
    7164             :         }
    7165             : 
    7166             :         /* Copy out parameters */
    7167           0 :         *state->orig.out.KeyName = *state->tmp.out.KeyName;
    7168           0 :         *state->orig.out.lpftLastWriteTime = *state->tmp.out.lpftLastWriteTime;
    7169           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    7170             : 
    7171             :         /* Copy result */
    7172           0 :         state->orig.out.result = state->tmp.out.result;
    7173             : 
    7174             :         /* Reset temporary structure */
    7175           0 :         NDR_ZERO_STRUCT(state->tmp);
    7176             : 
    7177           0 :         tevent_req_done(req);
    7178             : }
    7179             : 
    7180           0 : NTSTATUS dcerpc_clusapi_EnumKey_recv(struct tevent_req *req,
    7181             :                                      TALLOC_CTX *mem_ctx,
    7182             :                                      WERROR *result)
    7183             : {
    7184           0 :         struct dcerpc_clusapi_EnumKey_state *state = tevent_req_data(
    7185             :                 req, struct dcerpc_clusapi_EnumKey_state);
    7186             :         NTSTATUS status;
    7187             : 
    7188           0 :         if (tevent_req_is_nterror(req, &status)) {
    7189           0 :                 tevent_req_received(req);
    7190           0 :                 return status;
    7191             :         }
    7192             : 
    7193             :         /* Steal possible out parameters to the callers context */
    7194           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7195             : 
    7196             :         /* Return result */
    7197           0 :         *result = state->orig.out.result;
    7198             : 
    7199           0 :         tevent_req_received(req);
    7200           0 :         return NT_STATUS_OK;
    7201             : }
    7202             : 
    7203           0 : NTSTATUS dcerpc_clusapi_EnumKey(struct dcerpc_binding_handle *h,
    7204             :                                 TALLOC_CTX *mem_ctx,
    7205             :                                 struct policy_handle _hKey /* [in]  */,
    7206             :                                 uint32_t _dwIndex /* [in]  */,
    7207             :                                 const char **_KeyName /* [out] [charset(UTF16),ref] */,
    7208             :                                 NTTIME *_lpftLastWriteTime /* [out] [ref] */,
    7209             :                                 WERROR *_rpc_status /* [out] [ref] */,
    7210             :                                 WERROR *result)
    7211             : {
    7212             :         struct clusapi_EnumKey r;
    7213             :         NTSTATUS status;
    7214             : 
    7215             :         /* In parameters */
    7216           0 :         r.in.hKey = _hKey;
    7217           0 :         r.in.dwIndex = _dwIndex;
    7218             : 
    7219             :         /* Out parameters */
    7220           0 :         r.out.KeyName = _KeyName;
    7221           0 :         r.out.lpftLastWriteTime = _lpftLastWriteTime;
    7222           0 :         r.out.rpc_status = _rpc_status;
    7223             : 
    7224             :         /* Result */
    7225           0 :         NDR_ZERO_STRUCT(r.out.result);
    7226             : 
    7227           0 :         status = dcerpc_clusapi_EnumKey_r(h, mem_ctx, &r);
    7228           0 :         if (!NT_STATUS_IS_OK(status)) {
    7229           0 :                 return status;
    7230             :         }
    7231             : 
    7232             :         /* Return variables */
    7233           0 :         *_KeyName = *r.out.KeyName;
    7234           0 :         *_lpftLastWriteTime = *r.out.lpftLastWriteTime;
    7235           0 :         *_rpc_status = *r.out.rpc_status;
    7236             : 
    7237             :         /* Return result */
    7238           0 :         *result = r.out.result;
    7239             : 
    7240           0 :         return NT_STATUS_OK;
    7241             : }
    7242             : 
    7243             : struct dcerpc_clusapi_SetValue_r_state {
    7244             :         TALLOC_CTX *out_mem_ctx;
    7245             : };
    7246             : 
    7247             : static void dcerpc_clusapi_SetValue_r_done(struct tevent_req *subreq);
    7248             : 
    7249           0 : struct tevent_req *dcerpc_clusapi_SetValue_r_send(TALLOC_CTX *mem_ctx,
    7250             :         struct tevent_context *ev,
    7251             :         struct dcerpc_binding_handle *h,
    7252             :         struct clusapi_SetValue *r)
    7253             : {
    7254             :         struct tevent_req *req;
    7255             :         struct dcerpc_clusapi_SetValue_r_state *state;
    7256             :         struct tevent_req *subreq;
    7257             : 
    7258           0 :         req = tevent_req_create(mem_ctx, &state,
    7259             :                                 struct dcerpc_clusapi_SetValue_r_state);
    7260           0 :         if (req == NULL) {
    7261           0 :                 return NULL;
    7262             :         }
    7263             : 
    7264           0 :         state->out_mem_ctx = talloc_new(state);
    7265           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7266           0 :                 return tevent_req_post(req, ev);
    7267             :         }
    7268             : 
    7269           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7270             :                         NULL, &ndr_table_clusapi,
    7271           0 :                         NDR_CLUSAPI_SETVALUE, state->out_mem_ctx, r);
    7272           0 :         if (tevent_req_nomem(subreq, req)) {
    7273           0 :                 return tevent_req_post(req, ev);
    7274             :         }
    7275           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetValue_r_done, req);
    7276             : 
    7277           0 :         return req;
    7278             : }
    7279             : 
    7280           0 : static void dcerpc_clusapi_SetValue_r_done(struct tevent_req *subreq)
    7281             : {
    7282           0 :         struct tevent_req *req =
    7283           0 :                 tevent_req_callback_data(subreq,
    7284             :                 struct tevent_req);
    7285             :         NTSTATUS status;
    7286             : 
    7287           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7288           0 :         TALLOC_FREE(subreq);
    7289           0 :         if (tevent_req_nterror(req, status)) {
    7290           0 :                 return;
    7291             :         }
    7292             : 
    7293           0 :         tevent_req_done(req);
    7294             : }
    7295             : 
    7296           0 : NTSTATUS dcerpc_clusapi_SetValue_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7297             : {
    7298           0 :         struct dcerpc_clusapi_SetValue_r_state *state =
    7299           0 :                 tevent_req_data(req,
    7300             :                 struct dcerpc_clusapi_SetValue_r_state);
    7301             :         NTSTATUS status;
    7302             : 
    7303           0 :         if (tevent_req_is_nterror(req, &status)) {
    7304           0 :                 tevent_req_received(req);
    7305           0 :                 return status;
    7306             :         }
    7307             : 
    7308           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7309             : 
    7310           0 :         tevent_req_received(req);
    7311           0 :         return NT_STATUS_OK;
    7312             : }
    7313             : 
    7314           0 : NTSTATUS dcerpc_clusapi_SetValue_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_SetValue *r)
    7315             : {
    7316             :         NTSTATUS status;
    7317             : 
    7318           0 :         status = dcerpc_binding_handle_call(h,
    7319             :                         NULL, &ndr_table_clusapi,
    7320             :                         NDR_CLUSAPI_SETVALUE, mem_ctx, r);
    7321             : 
    7322           0 :         return status;
    7323             : }
    7324             : 
    7325             : struct dcerpc_clusapi_SetValue_state {
    7326             :         struct clusapi_SetValue orig;
    7327             :         struct clusapi_SetValue tmp;
    7328             :         TALLOC_CTX *out_mem_ctx;
    7329             : };
    7330             : 
    7331             : static void dcerpc_clusapi_SetValue_done(struct tevent_req *subreq);
    7332             : 
    7333           0 : struct tevent_req *dcerpc_clusapi_SetValue_send(TALLOC_CTX *mem_ctx,
    7334             :                                                 struct tevent_context *ev,
    7335             :                                                 struct dcerpc_binding_handle *h,
    7336             :                                                 struct policy_handle _hKey /* [in]  */,
    7337             :                                                 const char *_lpValueName /* [in] [charset(UTF16),ref] */,
    7338             :                                                 enum winreg_Type _dwType /* [in]  */,
    7339             :                                                 uint8_t *_lpData /* [in] [ref,size_is(cbData)] */,
    7340             :                                                 uint32_t _cbData /* [in]  */,
    7341             :                                                 WERROR *_rpc_status /* [out] [ref] */)
    7342             : {
    7343             :         struct tevent_req *req;
    7344             :         struct dcerpc_clusapi_SetValue_state *state;
    7345             :         struct tevent_req *subreq;
    7346             : 
    7347           0 :         req = tevent_req_create(mem_ctx, &state,
    7348             :                                 struct dcerpc_clusapi_SetValue_state);
    7349           0 :         if (req == NULL) {
    7350           0 :                 return NULL;
    7351             :         }
    7352           0 :         state->out_mem_ctx = NULL;
    7353             : 
    7354             :         /* In parameters */
    7355           0 :         state->orig.in.hKey = _hKey;
    7356           0 :         state->orig.in.lpValueName = _lpValueName;
    7357           0 :         state->orig.in.dwType = _dwType;
    7358           0 :         state->orig.in.lpData = _lpData;
    7359           0 :         state->orig.in.cbData = _cbData;
    7360             : 
    7361             :         /* Out parameters */
    7362           0 :         state->orig.out.rpc_status = _rpc_status;
    7363             : 
    7364             :         /* Result */
    7365           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7366             : 
    7367           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7368             :                              "dcerpc_clusapi_SetValue_out_memory");
    7369           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7370           0 :                 return tevent_req_post(req, ev);
    7371             :         }
    7372             : 
    7373             :         /* make a temporary copy, that we pass to the dispatch function */
    7374           0 :         state->tmp = state->orig;
    7375             : 
    7376           0 :         subreq = dcerpc_clusapi_SetValue_r_send(state, ev, h, &state->tmp);
    7377           0 :         if (tevent_req_nomem(subreq, req)) {
    7378           0 :                 return tevent_req_post(req, ev);
    7379             :         }
    7380           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetValue_done, req);
    7381           0 :         return req;
    7382             : }
    7383             : 
    7384           0 : static void dcerpc_clusapi_SetValue_done(struct tevent_req *subreq)
    7385             : {
    7386           0 :         struct tevent_req *req = tevent_req_callback_data(
    7387             :                 subreq, struct tevent_req);
    7388           0 :         struct dcerpc_clusapi_SetValue_state *state = tevent_req_data(
    7389             :                 req, struct dcerpc_clusapi_SetValue_state);
    7390             :         NTSTATUS status;
    7391             :         TALLOC_CTX *mem_ctx;
    7392             : 
    7393           0 :         if (state->out_mem_ctx) {
    7394           0 :                 mem_ctx = state->out_mem_ctx;
    7395             :         } else {
    7396           0 :                 mem_ctx = state;
    7397             :         }
    7398             : 
    7399           0 :         status = dcerpc_clusapi_SetValue_r_recv(subreq, mem_ctx);
    7400           0 :         TALLOC_FREE(subreq);
    7401           0 :         if (tevent_req_nterror(req, status)) {
    7402           0 :                 return;
    7403             :         }
    7404             : 
    7405             :         /* Copy out parameters */
    7406           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    7407             : 
    7408             :         /* Copy result */
    7409           0 :         state->orig.out.result = state->tmp.out.result;
    7410             : 
    7411             :         /* Reset temporary structure */
    7412           0 :         NDR_ZERO_STRUCT(state->tmp);
    7413             : 
    7414           0 :         tevent_req_done(req);
    7415             : }
    7416             : 
    7417           0 : NTSTATUS dcerpc_clusapi_SetValue_recv(struct tevent_req *req,
    7418             :                                       TALLOC_CTX *mem_ctx,
    7419             :                                       WERROR *result)
    7420             : {
    7421           0 :         struct dcerpc_clusapi_SetValue_state *state = tevent_req_data(
    7422             :                 req, struct dcerpc_clusapi_SetValue_state);
    7423             :         NTSTATUS status;
    7424             : 
    7425           0 :         if (tevent_req_is_nterror(req, &status)) {
    7426           0 :                 tevent_req_received(req);
    7427           0 :                 return status;
    7428             :         }
    7429             : 
    7430             :         /* Steal possible out parameters to the callers context */
    7431           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7432             : 
    7433             :         /* Return result */
    7434           0 :         *result = state->orig.out.result;
    7435             : 
    7436           0 :         tevent_req_received(req);
    7437           0 :         return NT_STATUS_OK;
    7438             : }
    7439             : 
    7440           0 : NTSTATUS dcerpc_clusapi_SetValue(struct dcerpc_binding_handle *h,
    7441             :                                  TALLOC_CTX *mem_ctx,
    7442             :                                  struct policy_handle _hKey /* [in]  */,
    7443             :                                  const char *_lpValueName /* [in] [charset(UTF16),ref] */,
    7444             :                                  enum winreg_Type _dwType /* [in]  */,
    7445             :                                  uint8_t *_lpData /* [in] [ref,size_is(cbData)] */,
    7446             :                                  uint32_t _cbData /* [in]  */,
    7447             :                                  WERROR *_rpc_status /* [out] [ref] */,
    7448             :                                  WERROR *result)
    7449             : {
    7450             :         struct clusapi_SetValue r;
    7451             :         NTSTATUS status;
    7452             : 
    7453             :         /* In parameters */
    7454           0 :         r.in.hKey = _hKey;
    7455           0 :         r.in.lpValueName = _lpValueName;
    7456           0 :         r.in.dwType = _dwType;
    7457           0 :         r.in.lpData = _lpData;
    7458           0 :         r.in.cbData = _cbData;
    7459             : 
    7460             :         /* Out parameters */
    7461           0 :         r.out.rpc_status = _rpc_status;
    7462             : 
    7463             :         /* Result */
    7464           0 :         NDR_ZERO_STRUCT(r.out.result);
    7465             : 
    7466           0 :         status = dcerpc_clusapi_SetValue_r(h, mem_ctx, &r);
    7467           0 :         if (!NT_STATUS_IS_OK(status)) {
    7468           0 :                 return status;
    7469             :         }
    7470             : 
    7471             :         /* Return variables */
    7472           0 :         *_rpc_status = *r.out.rpc_status;
    7473             : 
    7474             :         /* Return result */
    7475           0 :         *result = r.out.result;
    7476             : 
    7477           0 :         return NT_STATUS_OK;
    7478             : }
    7479             : 
    7480             : struct dcerpc_clusapi_DeleteValue_r_state {
    7481             :         TALLOC_CTX *out_mem_ctx;
    7482             : };
    7483             : 
    7484             : static void dcerpc_clusapi_DeleteValue_r_done(struct tevent_req *subreq);
    7485             : 
    7486           0 : struct tevent_req *dcerpc_clusapi_DeleteValue_r_send(TALLOC_CTX *mem_ctx,
    7487             :         struct tevent_context *ev,
    7488             :         struct dcerpc_binding_handle *h,
    7489             :         struct clusapi_DeleteValue *r)
    7490             : {
    7491             :         struct tevent_req *req;
    7492             :         struct dcerpc_clusapi_DeleteValue_r_state *state;
    7493             :         struct tevent_req *subreq;
    7494             : 
    7495           0 :         req = tevent_req_create(mem_ctx, &state,
    7496             :                                 struct dcerpc_clusapi_DeleteValue_r_state);
    7497           0 :         if (req == NULL) {
    7498           0 :                 return NULL;
    7499             :         }
    7500             : 
    7501           0 :         state->out_mem_ctx = talloc_new(state);
    7502           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7503           0 :                 return tevent_req_post(req, ev);
    7504             :         }
    7505             : 
    7506           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7507             :                         NULL, &ndr_table_clusapi,
    7508           0 :                         NDR_CLUSAPI_DELETEVALUE, state->out_mem_ctx, r);
    7509           0 :         if (tevent_req_nomem(subreq, req)) {
    7510           0 :                 return tevent_req_post(req, ev);
    7511             :         }
    7512           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteValue_r_done, req);
    7513             : 
    7514           0 :         return req;
    7515             : }
    7516             : 
    7517           0 : static void dcerpc_clusapi_DeleteValue_r_done(struct tevent_req *subreq)
    7518             : {
    7519           0 :         struct tevent_req *req =
    7520           0 :                 tevent_req_callback_data(subreq,
    7521             :                 struct tevent_req);
    7522             :         NTSTATUS status;
    7523             : 
    7524           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7525           0 :         TALLOC_FREE(subreq);
    7526           0 :         if (tevent_req_nterror(req, status)) {
    7527           0 :                 return;
    7528             :         }
    7529             : 
    7530           0 :         tevent_req_done(req);
    7531             : }
    7532             : 
    7533           0 : NTSTATUS dcerpc_clusapi_DeleteValue_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7534             : {
    7535           0 :         struct dcerpc_clusapi_DeleteValue_r_state *state =
    7536           0 :                 tevent_req_data(req,
    7537             :                 struct dcerpc_clusapi_DeleteValue_r_state);
    7538             :         NTSTATUS status;
    7539             : 
    7540           0 :         if (tevent_req_is_nterror(req, &status)) {
    7541           0 :                 tevent_req_received(req);
    7542           0 :                 return status;
    7543             :         }
    7544             : 
    7545           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7546             : 
    7547           0 :         tevent_req_received(req);
    7548           0 :         return NT_STATUS_OK;
    7549             : }
    7550             : 
    7551           0 : NTSTATUS dcerpc_clusapi_DeleteValue_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_DeleteValue *r)
    7552             : {
    7553             :         NTSTATUS status;
    7554             : 
    7555           0 :         status = dcerpc_binding_handle_call(h,
    7556             :                         NULL, &ndr_table_clusapi,
    7557             :                         NDR_CLUSAPI_DELETEVALUE, mem_ctx, r);
    7558             : 
    7559           0 :         return status;
    7560             : }
    7561             : 
    7562             : struct dcerpc_clusapi_DeleteValue_state {
    7563             :         struct clusapi_DeleteValue orig;
    7564             :         struct clusapi_DeleteValue tmp;
    7565             :         TALLOC_CTX *out_mem_ctx;
    7566             : };
    7567             : 
    7568             : static void dcerpc_clusapi_DeleteValue_done(struct tevent_req *subreq);
    7569             : 
    7570           0 : struct tevent_req *dcerpc_clusapi_DeleteValue_send(TALLOC_CTX *mem_ctx,
    7571             :                                                    struct tevent_context *ev,
    7572             :                                                    struct dcerpc_binding_handle *h,
    7573             :                                                    struct policy_handle _hKey /* [in]  */,
    7574             :                                                    const char *_lpValueName /* [in] [charset(UTF16),ref] */,
    7575             :                                                    WERROR *_rpc_status /* [out] [ref] */)
    7576             : {
    7577             :         struct tevent_req *req;
    7578             :         struct dcerpc_clusapi_DeleteValue_state *state;
    7579             :         struct tevent_req *subreq;
    7580             : 
    7581           0 :         req = tevent_req_create(mem_ctx, &state,
    7582             :                                 struct dcerpc_clusapi_DeleteValue_state);
    7583           0 :         if (req == NULL) {
    7584           0 :                 return NULL;
    7585             :         }
    7586           0 :         state->out_mem_ctx = NULL;
    7587             : 
    7588             :         /* In parameters */
    7589           0 :         state->orig.in.hKey = _hKey;
    7590           0 :         state->orig.in.lpValueName = _lpValueName;
    7591             : 
    7592             :         /* Out parameters */
    7593           0 :         state->orig.out.rpc_status = _rpc_status;
    7594             : 
    7595             :         /* Result */
    7596           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7597             : 
    7598           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7599             :                              "dcerpc_clusapi_DeleteValue_out_memory");
    7600           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7601           0 :                 return tevent_req_post(req, ev);
    7602             :         }
    7603             : 
    7604             :         /* make a temporary copy, that we pass to the dispatch function */
    7605           0 :         state->tmp = state->orig;
    7606             : 
    7607           0 :         subreq = dcerpc_clusapi_DeleteValue_r_send(state, ev, h, &state->tmp);
    7608           0 :         if (tevent_req_nomem(subreq, req)) {
    7609           0 :                 return tevent_req_post(req, ev);
    7610             :         }
    7611           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteValue_done, req);
    7612           0 :         return req;
    7613             : }
    7614             : 
    7615           0 : static void dcerpc_clusapi_DeleteValue_done(struct tevent_req *subreq)
    7616             : {
    7617           0 :         struct tevent_req *req = tevent_req_callback_data(
    7618             :                 subreq, struct tevent_req);
    7619           0 :         struct dcerpc_clusapi_DeleteValue_state *state = tevent_req_data(
    7620             :                 req, struct dcerpc_clusapi_DeleteValue_state);
    7621             :         NTSTATUS status;
    7622             :         TALLOC_CTX *mem_ctx;
    7623             : 
    7624           0 :         if (state->out_mem_ctx) {
    7625           0 :                 mem_ctx = state->out_mem_ctx;
    7626             :         } else {
    7627           0 :                 mem_ctx = state;
    7628             :         }
    7629             : 
    7630           0 :         status = dcerpc_clusapi_DeleteValue_r_recv(subreq, mem_ctx);
    7631           0 :         TALLOC_FREE(subreq);
    7632           0 :         if (tevent_req_nterror(req, status)) {
    7633           0 :                 return;
    7634             :         }
    7635             : 
    7636             :         /* Copy out parameters */
    7637           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    7638             : 
    7639             :         /* Copy result */
    7640           0 :         state->orig.out.result = state->tmp.out.result;
    7641             : 
    7642             :         /* Reset temporary structure */
    7643           0 :         NDR_ZERO_STRUCT(state->tmp);
    7644             : 
    7645           0 :         tevent_req_done(req);
    7646             : }
    7647             : 
    7648           0 : NTSTATUS dcerpc_clusapi_DeleteValue_recv(struct tevent_req *req,
    7649             :                                          TALLOC_CTX *mem_ctx,
    7650             :                                          WERROR *result)
    7651             : {
    7652           0 :         struct dcerpc_clusapi_DeleteValue_state *state = tevent_req_data(
    7653             :                 req, struct dcerpc_clusapi_DeleteValue_state);
    7654             :         NTSTATUS status;
    7655             : 
    7656           0 :         if (tevent_req_is_nterror(req, &status)) {
    7657           0 :                 tevent_req_received(req);
    7658           0 :                 return status;
    7659             :         }
    7660             : 
    7661             :         /* Steal possible out parameters to the callers context */
    7662           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7663             : 
    7664             :         /* Return result */
    7665           0 :         *result = state->orig.out.result;
    7666             : 
    7667           0 :         tevent_req_received(req);
    7668           0 :         return NT_STATUS_OK;
    7669             : }
    7670             : 
    7671           0 : NTSTATUS dcerpc_clusapi_DeleteValue(struct dcerpc_binding_handle *h,
    7672             :                                     TALLOC_CTX *mem_ctx,
    7673             :                                     struct policy_handle _hKey /* [in]  */,
    7674             :                                     const char *_lpValueName /* [in] [charset(UTF16),ref] */,
    7675             :                                     WERROR *_rpc_status /* [out] [ref] */,
    7676             :                                     WERROR *result)
    7677             : {
    7678             :         struct clusapi_DeleteValue r;
    7679             :         NTSTATUS status;
    7680             : 
    7681             :         /* In parameters */
    7682           0 :         r.in.hKey = _hKey;
    7683           0 :         r.in.lpValueName = _lpValueName;
    7684             : 
    7685             :         /* Out parameters */
    7686           0 :         r.out.rpc_status = _rpc_status;
    7687             : 
    7688             :         /* Result */
    7689           0 :         NDR_ZERO_STRUCT(r.out.result);
    7690             : 
    7691           0 :         status = dcerpc_clusapi_DeleteValue_r(h, mem_ctx, &r);
    7692           0 :         if (!NT_STATUS_IS_OK(status)) {
    7693           0 :                 return status;
    7694             :         }
    7695             : 
    7696             :         /* Return variables */
    7697           0 :         *_rpc_status = *r.out.rpc_status;
    7698             : 
    7699             :         /* Return result */
    7700           0 :         *result = r.out.result;
    7701             : 
    7702           0 :         return NT_STATUS_OK;
    7703             : }
    7704             : 
    7705             : struct dcerpc_clusapi_QueryValue_r_state {
    7706             :         TALLOC_CTX *out_mem_ctx;
    7707             : };
    7708             : 
    7709             : static void dcerpc_clusapi_QueryValue_r_done(struct tevent_req *subreq);
    7710             : 
    7711           0 : struct tevent_req *dcerpc_clusapi_QueryValue_r_send(TALLOC_CTX *mem_ctx,
    7712             :         struct tevent_context *ev,
    7713             :         struct dcerpc_binding_handle *h,
    7714             :         struct clusapi_QueryValue *r)
    7715             : {
    7716             :         struct tevent_req *req;
    7717             :         struct dcerpc_clusapi_QueryValue_r_state *state;
    7718             :         struct tevent_req *subreq;
    7719             : 
    7720           0 :         req = tevent_req_create(mem_ctx, &state,
    7721             :                                 struct dcerpc_clusapi_QueryValue_r_state);
    7722           0 :         if (req == NULL) {
    7723           0 :                 return NULL;
    7724             :         }
    7725             : 
    7726           0 :         state->out_mem_ctx = talloc_new(state);
    7727           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7728           0 :                 return tevent_req_post(req, ev);
    7729             :         }
    7730             : 
    7731           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7732             :                         NULL, &ndr_table_clusapi,
    7733           0 :                         NDR_CLUSAPI_QUERYVALUE, state->out_mem_ctx, r);
    7734           0 :         if (tevent_req_nomem(subreq, req)) {
    7735           0 :                 return tevent_req_post(req, ev);
    7736             :         }
    7737           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_QueryValue_r_done, req);
    7738             : 
    7739           0 :         return req;
    7740             : }
    7741             : 
    7742           0 : static void dcerpc_clusapi_QueryValue_r_done(struct tevent_req *subreq)
    7743             : {
    7744           0 :         struct tevent_req *req =
    7745           0 :                 tevent_req_callback_data(subreq,
    7746             :                 struct tevent_req);
    7747             :         NTSTATUS status;
    7748             : 
    7749           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7750           0 :         TALLOC_FREE(subreq);
    7751           0 :         if (tevent_req_nterror(req, status)) {
    7752           0 :                 return;
    7753             :         }
    7754             : 
    7755           0 :         tevent_req_done(req);
    7756             : }
    7757             : 
    7758           0 : NTSTATUS dcerpc_clusapi_QueryValue_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7759             : {
    7760           0 :         struct dcerpc_clusapi_QueryValue_r_state *state =
    7761           0 :                 tevent_req_data(req,
    7762             :                 struct dcerpc_clusapi_QueryValue_r_state);
    7763             :         NTSTATUS status;
    7764             : 
    7765           0 :         if (tevent_req_is_nterror(req, &status)) {
    7766           0 :                 tevent_req_received(req);
    7767           0 :                 return status;
    7768             :         }
    7769             : 
    7770           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7771             : 
    7772           0 :         tevent_req_received(req);
    7773           0 :         return NT_STATUS_OK;
    7774             : }
    7775             : 
    7776           0 : NTSTATUS dcerpc_clusapi_QueryValue_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_QueryValue *r)
    7777             : {
    7778             :         NTSTATUS status;
    7779             : 
    7780           0 :         status = dcerpc_binding_handle_call(h,
    7781             :                         NULL, &ndr_table_clusapi,
    7782             :                         NDR_CLUSAPI_QUERYVALUE, mem_ctx, r);
    7783             : 
    7784           0 :         return status;
    7785             : }
    7786             : 
    7787             : struct dcerpc_clusapi_QueryValue_state {
    7788             :         struct clusapi_QueryValue orig;
    7789             :         struct clusapi_QueryValue tmp;
    7790             :         TALLOC_CTX *out_mem_ctx;
    7791             : };
    7792             : 
    7793             : static void dcerpc_clusapi_QueryValue_done(struct tevent_req *subreq);
    7794             : 
    7795           0 : struct tevent_req *dcerpc_clusapi_QueryValue_send(TALLOC_CTX *mem_ctx,
    7796             :                                                   struct tevent_context *ev,
    7797             :                                                   struct dcerpc_binding_handle *h,
    7798             :                                                   struct policy_handle _hKey /* [in]  */,
    7799             :                                                   const char *_lpValueName /* [in] [charset(UTF16),ref] */,
    7800             :                                                   enum winreg_Type *_lpValueType /* [out] [ref] */,
    7801             :                                                   uint8_t *_lpData /* [out] [ref,size_is(cbData)] */,
    7802             :                                                   uint32_t _cbData /* [in]  */,
    7803             :                                                   uint32_t *_lpcbRequired /* [out] [ref] */,
    7804             :                                                   WERROR *_rpc_status /* [out] [ref] */)
    7805             : {
    7806             :         struct tevent_req *req;
    7807             :         struct dcerpc_clusapi_QueryValue_state *state;
    7808             :         struct tevent_req *subreq;
    7809             : 
    7810           0 :         req = tevent_req_create(mem_ctx, &state,
    7811             :                                 struct dcerpc_clusapi_QueryValue_state);
    7812           0 :         if (req == NULL) {
    7813           0 :                 return NULL;
    7814             :         }
    7815           0 :         state->out_mem_ctx = NULL;
    7816             : 
    7817             :         /* In parameters */
    7818           0 :         state->orig.in.hKey = _hKey;
    7819           0 :         state->orig.in.lpValueName = _lpValueName;
    7820           0 :         state->orig.in.cbData = _cbData;
    7821             : 
    7822             :         /* Out parameters */
    7823           0 :         state->orig.out.lpValueType = _lpValueType;
    7824           0 :         state->orig.out.lpData = _lpData;
    7825           0 :         state->orig.out.lpcbRequired = _lpcbRequired;
    7826           0 :         state->orig.out.rpc_status = _rpc_status;
    7827             : 
    7828             :         /* Result */
    7829           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7830             : 
    7831           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7832             :                              "dcerpc_clusapi_QueryValue_out_memory");
    7833           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7834           0 :                 return tevent_req_post(req, ev);
    7835             :         }
    7836             : 
    7837             :         /* make a temporary copy, that we pass to the dispatch function */
    7838           0 :         state->tmp = state->orig;
    7839             : 
    7840           0 :         subreq = dcerpc_clusapi_QueryValue_r_send(state, ev, h, &state->tmp);
    7841           0 :         if (tevent_req_nomem(subreq, req)) {
    7842           0 :                 return tevent_req_post(req, ev);
    7843             :         }
    7844           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_QueryValue_done, req);
    7845           0 :         return req;
    7846             : }
    7847             : 
    7848           0 : static void dcerpc_clusapi_QueryValue_done(struct tevent_req *subreq)
    7849             : {
    7850           0 :         struct tevent_req *req = tevent_req_callback_data(
    7851             :                 subreq, struct tevent_req);
    7852           0 :         struct dcerpc_clusapi_QueryValue_state *state = tevent_req_data(
    7853             :                 req, struct dcerpc_clusapi_QueryValue_state);
    7854             :         NTSTATUS status;
    7855             :         TALLOC_CTX *mem_ctx;
    7856             : 
    7857           0 :         if (state->out_mem_ctx) {
    7858           0 :                 mem_ctx = state->out_mem_ctx;
    7859             :         } else {
    7860           0 :                 mem_ctx = state;
    7861             :         }
    7862             : 
    7863           0 :         status = dcerpc_clusapi_QueryValue_r_recv(subreq, mem_ctx);
    7864           0 :         TALLOC_FREE(subreq);
    7865           0 :         if (tevent_req_nterror(req, status)) {
    7866           0 :                 return;
    7867             :         }
    7868             : 
    7869             :         /* Copy out parameters */
    7870           0 :         *state->orig.out.lpValueType = *state->tmp.out.lpValueType;
    7871             :         {
    7872             :                 size_t _copy_len_lpData;
    7873           0 :                 _copy_len_lpData = state->tmp.in.cbData;
    7874           0 :                 if (state->orig.out.lpData != state->tmp.out.lpData) {
    7875           0 :                         memcpy(state->orig.out.lpData, state->tmp.out.lpData, _copy_len_lpData * sizeof(*state->orig.out.lpData));
    7876             :                 }
    7877             :         }
    7878           0 :         *state->orig.out.lpcbRequired = *state->tmp.out.lpcbRequired;
    7879           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    7880             : 
    7881             :         /* Copy result */
    7882           0 :         state->orig.out.result = state->tmp.out.result;
    7883             : 
    7884             :         /* Reset temporary structure */
    7885           0 :         NDR_ZERO_STRUCT(state->tmp);
    7886             : 
    7887           0 :         tevent_req_done(req);
    7888             : }
    7889             : 
    7890           0 : NTSTATUS dcerpc_clusapi_QueryValue_recv(struct tevent_req *req,
    7891             :                                         TALLOC_CTX *mem_ctx,
    7892             :                                         WERROR *result)
    7893             : {
    7894           0 :         struct dcerpc_clusapi_QueryValue_state *state = tevent_req_data(
    7895             :                 req, struct dcerpc_clusapi_QueryValue_state);
    7896             :         NTSTATUS status;
    7897             : 
    7898           0 :         if (tevent_req_is_nterror(req, &status)) {
    7899           0 :                 tevent_req_received(req);
    7900           0 :                 return status;
    7901             :         }
    7902             : 
    7903             :         /* Steal possible out parameters to the callers context */
    7904           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7905             : 
    7906             :         /* Return result */
    7907           0 :         *result = state->orig.out.result;
    7908             : 
    7909           0 :         tevent_req_received(req);
    7910           0 :         return NT_STATUS_OK;
    7911             : }
    7912             : 
    7913           0 : NTSTATUS dcerpc_clusapi_QueryValue(struct dcerpc_binding_handle *h,
    7914             :                                    TALLOC_CTX *mem_ctx,
    7915             :                                    struct policy_handle _hKey /* [in]  */,
    7916             :                                    const char *_lpValueName /* [in] [charset(UTF16),ref] */,
    7917             :                                    enum winreg_Type *_lpValueType /* [out] [ref] */,
    7918             :                                    uint8_t *_lpData /* [out] [ref,size_is(cbData)] */,
    7919             :                                    uint32_t _cbData /* [in]  */,
    7920             :                                    uint32_t *_lpcbRequired /* [out] [ref] */,
    7921             :                                    WERROR *_rpc_status /* [out] [ref] */,
    7922             :                                    WERROR *result)
    7923             : {
    7924             :         struct clusapi_QueryValue r;
    7925             :         NTSTATUS status;
    7926             : 
    7927             :         /* In parameters */
    7928           0 :         r.in.hKey = _hKey;
    7929           0 :         r.in.lpValueName = _lpValueName;
    7930           0 :         r.in.cbData = _cbData;
    7931             : 
    7932             :         /* Out parameters */
    7933           0 :         r.out.lpValueType = _lpValueType;
    7934           0 :         r.out.lpData = _lpData;
    7935           0 :         r.out.lpcbRequired = _lpcbRequired;
    7936           0 :         r.out.rpc_status = _rpc_status;
    7937             : 
    7938             :         /* Result */
    7939           0 :         NDR_ZERO_STRUCT(r.out.result);
    7940             : 
    7941           0 :         status = dcerpc_clusapi_QueryValue_r(h, mem_ctx, &r);
    7942           0 :         if (!NT_STATUS_IS_OK(status)) {
    7943           0 :                 return status;
    7944             :         }
    7945             : 
    7946             :         /* Return variables */
    7947           0 :         *_lpValueType = *r.out.lpValueType;
    7948             :         {
    7949             :                 size_t _copy_len_lpData;
    7950           0 :                 _copy_len_lpData = r.in.cbData;
    7951           0 :                 if (_lpData != r.out.lpData) {
    7952           0 :                         memcpy(_lpData, r.out.lpData, _copy_len_lpData * sizeof(*_lpData));
    7953             :                 }
    7954             :         }
    7955           0 :         *_lpcbRequired = *r.out.lpcbRequired;
    7956           0 :         *_rpc_status = *r.out.rpc_status;
    7957             : 
    7958             :         /* Return result */
    7959           0 :         *result = r.out.result;
    7960             : 
    7961           0 :         return NT_STATUS_OK;
    7962             : }
    7963             : 
    7964             : struct dcerpc_clusapi_DeleteKey_r_state {
    7965             :         TALLOC_CTX *out_mem_ctx;
    7966             : };
    7967             : 
    7968             : static void dcerpc_clusapi_DeleteKey_r_done(struct tevent_req *subreq);
    7969             : 
    7970           0 : struct tevent_req *dcerpc_clusapi_DeleteKey_r_send(TALLOC_CTX *mem_ctx,
    7971             :         struct tevent_context *ev,
    7972             :         struct dcerpc_binding_handle *h,
    7973             :         struct clusapi_DeleteKey *r)
    7974             : {
    7975             :         struct tevent_req *req;
    7976             :         struct dcerpc_clusapi_DeleteKey_r_state *state;
    7977             :         struct tevent_req *subreq;
    7978             : 
    7979           0 :         req = tevent_req_create(mem_ctx, &state,
    7980             :                                 struct dcerpc_clusapi_DeleteKey_r_state);
    7981           0 :         if (req == NULL) {
    7982           0 :                 return NULL;
    7983             :         }
    7984             : 
    7985           0 :         state->out_mem_ctx = talloc_new(state);
    7986           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7987           0 :                 return tevent_req_post(req, ev);
    7988             :         }
    7989             : 
    7990           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7991             :                         NULL, &ndr_table_clusapi,
    7992           0 :                         NDR_CLUSAPI_DELETEKEY, state->out_mem_ctx, r);
    7993           0 :         if (tevent_req_nomem(subreq, req)) {
    7994           0 :                 return tevent_req_post(req, ev);
    7995             :         }
    7996           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteKey_r_done, req);
    7997             : 
    7998           0 :         return req;
    7999             : }
    8000             : 
    8001           0 : static void dcerpc_clusapi_DeleteKey_r_done(struct tevent_req *subreq)
    8002             : {
    8003           0 :         struct tevent_req *req =
    8004           0 :                 tevent_req_callback_data(subreq,
    8005             :                 struct tevent_req);
    8006             :         NTSTATUS status;
    8007             : 
    8008           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8009           0 :         TALLOC_FREE(subreq);
    8010           0 :         if (tevent_req_nterror(req, status)) {
    8011           0 :                 return;
    8012             :         }
    8013             : 
    8014           0 :         tevent_req_done(req);
    8015             : }
    8016             : 
    8017           0 : NTSTATUS dcerpc_clusapi_DeleteKey_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8018             : {
    8019           0 :         struct dcerpc_clusapi_DeleteKey_r_state *state =
    8020           0 :                 tevent_req_data(req,
    8021             :                 struct dcerpc_clusapi_DeleteKey_r_state);
    8022             :         NTSTATUS status;
    8023             : 
    8024           0 :         if (tevent_req_is_nterror(req, &status)) {
    8025           0 :                 tevent_req_received(req);
    8026           0 :                 return status;
    8027             :         }
    8028             : 
    8029           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8030             : 
    8031           0 :         tevent_req_received(req);
    8032           0 :         return NT_STATUS_OK;
    8033             : }
    8034             : 
    8035           0 : NTSTATUS dcerpc_clusapi_DeleteKey_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_DeleteKey *r)
    8036             : {
    8037             :         NTSTATUS status;
    8038             : 
    8039           0 :         status = dcerpc_binding_handle_call(h,
    8040             :                         NULL, &ndr_table_clusapi,
    8041             :                         NDR_CLUSAPI_DELETEKEY, mem_ctx, r);
    8042             : 
    8043           0 :         return status;
    8044             : }
    8045             : 
    8046             : struct dcerpc_clusapi_DeleteKey_state {
    8047             :         struct clusapi_DeleteKey orig;
    8048             :         struct clusapi_DeleteKey tmp;
    8049             :         TALLOC_CTX *out_mem_ctx;
    8050             : };
    8051             : 
    8052             : static void dcerpc_clusapi_DeleteKey_done(struct tevent_req *subreq);
    8053             : 
    8054           0 : struct tevent_req *dcerpc_clusapi_DeleteKey_send(TALLOC_CTX *mem_ctx,
    8055             :                                                  struct tevent_context *ev,
    8056             :                                                  struct dcerpc_binding_handle *h,
    8057             :                                                  struct policy_handle _hKey /* [in]  */,
    8058             :                                                  const char *_lpSubKey /* [in] [charset(UTF16),ref] */,
    8059             :                                                  WERROR *_rpc_status /* [out] [ref] */)
    8060             : {
    8061             :         struct tevent_req *req;
    8062             :         struct dcerpc_clusapi_DeleteKey_state *state;
    8063             :         struct tevent_req *subreq;
    8064             : 
    8065           0 :         req = tevent_req_create(mem_ctx, &state,
    8066             :                                 struct dcerpc_clusapi_DeleteKey_state);
    8067           0 :         if (req == NULL) {
    8068           0 :                 return NULL;
    8069             :         }
    8070           0 :         state->out_mem_ctx = NULL;
    8071             : 
    8072             :         /* In parameters */
    8073           0 :         state->orig.in.hKey = _hKey;
    8074           0 :         state->orig.in.lpSubKey = _lpSubKey;
    8075             : 
    8076             :         /* Out parameters */
    8077           0 :         state->orig.out.rpc_status = _rpc_status;
    8078             : 
    8079             :         /* Result */
    8080           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8081             : 
    8082           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8083             :                              "dcerpc_clusapi_DeleteKey_out_memory");
    8084           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8085           0 :                 return tevent_req_post(req, ev);
    8086             :         }
    8087             : 
    8088             :         /* make a temporary copy, that we pass to the dispatch function */
    8089           0 :         state->tmp = state->orig;
    8090             : 
    8091           0 :         subreq = dcerpc_clusapi_DeleteKey_r_send(state, ev, h, &state->tmp);
    8092           0 :         if (tevent_req_nomem(subreq, req)) {
    8093           0 :                 return tevent_req_post(req, ev);
    8094             :         }
    8095           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteKey_done, req);
    8096           0 :         return req;
    8097             : }
    8098             : 
    8099           0 : static void dcerpc_clusapi_DeleteKey_done(struct tevent_req *subreq)
    8100             : {
    8101           0 :         struct tevent_req *req = tevent_req_callback_data(
    8102             :                 subreq, struct tevent_req);
    8103           0 :         struct dcerpc_clusapi_DeleteKey_state *state = tevent_req_data(
    8104             :                 req, struct dcerpc_clusapi_DeleteKey_state);
    8105             :         NTSTATUS status;
    8106             :         TALLOC_CTX *mem_ctx;
    8107             : 
    8108           0 :         if (state->out_mem_ctx) {
    8109           0 :                 mem_ctx = state->out_mem_ctx;
    8110             :         } else {
    8111           0 :                 mem_ctx = state;
    8112             :         }
    8113             : 
    8114           0 :         status = dcerpc_clusapi_DeleteKey_r_recv(subreq, mem_ctx);
    8115           0 :         TALLOC_FREE(subreq);
    8116           0 :         if (tevent_req_nterror(req, status)) {
    8117           0 :                 return;
    8118             :         }
    8119             : 
    8120             :         /* Copy out parameters */
    8121           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    8122             : 
    8123             :         /* Copy result */
    8124           0 :         state->orig.out.result = state->tmp.out.result;
    8125             : 
    8126             :         /* Reset temporary structure */
    8127           0 :         NDR_ZERO_STRUCT(state->tmp);
    8128             : 
    8129           0 :         tevent_req_done(req);
    8130             : }
    8131             : 
    8132           0 : NTSTATUS dcerpc_clusapi_DeleteKey_recv(struct tevent_req *req,
    8133             :                                        TALLOC_CTX *mem_ctx,
    8134             :                                        WERROR *result)
    8135             : {
    8136           0 :         struct dcerpc_clusapi_DeleteKey_state *state = tevent_req_data(
    8137             :                 req, struct dcerpc_clusapi_DeleteKey_state);
    8138             :         NTSTATUS status;
    8139             : 
    8140           0 :         if (tevent_req_is_nterror(req, &status)) {
    8141           0 :                 tevent_req_received(req);
    8142           0 :                 return status;
    8143             :         }
    8144             : 
    8145             :         /* Steal possible out parameters to the callers context */
    8146           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8147             : 
    8148             :         /* Return result */
    8149           0 :         *result = state->orig.out.result;
    8150             : 
    8151           0 :         tevent_req_received(req);
    8152           0 :         return NT_STATUS_OK;
    8153             : }
    8154             : 
    8155           0 : NTSTATUS dcerpc_clusapi_DeleteKey(struct dcerpc_binding_handle *h,
    8156             :                                   TALLOC_CTX *mem_ctx,
    8157             :                                   struct policy_handle _hKey /* [in]  */,
    8158             :                                   const char *_lpSubKey /* [in] [charset(UTF16),ref] */,
    8159             :                                   WERROR *_rpc_status /* [out] [ref] */,
    8160             :                                   WERROR *result)
    8161             : {
    8162             :         struct clusapi_DeleteKey r;
    8163             :         NTSTATUS status;
    8164             : 
    8165             :         /* In parameters */
    8166           0 :         r.in.hKey = _hKey;
    8167           0 :         r.in.lpSubKey = _lpSubKey;
    8168             : 
    8169             :         /* Out parameters */
    8170           0 :         r.out.rpc_status = _rpc_status;
    8171             : 
    8172             :         /* Result */
    8173           0 :         NDR_ZERO_STRUCT(r.out.result);
    8174             : 
    8175           0 :         status = dcerpc_clusapi_DeleteKey_r(h, mem_ctx, &r);
    8176           0 :         if (!NT_STATUS_IS_OK(status)) {
    8177           0 :                 return status;
    8178             :         }
    8179             : 
    8180             :         /* Return variables */
    8181           0 :         *_rpc_status = *r.out.rpc_status;
    8182             : 
    8183             :         /* Return result */
    8184           0 :         *result = r.out.result;
    8185             : 
    8186           0 :         return NT_STATUS_OK;
    8187             : }
    8188             : 
    8189             : struct dcerpc_clusapi_EnumValue_r_state {
    8190             :         TALLOC_CTX *out_mem_ctx;
    8191             : };
    8192             : 
    8193             : static void dcerpc_clusapi_EnumValue_r_done(struct tevent_req *subreq);
    8194             : 
    8195           0 : struct tevent_req *dcerpc_clusapi_EnumValue_r_send(TALLOC_CTX *mem_ctx,
    8196             :         struct tevent_context *ev,
    8197             :         struct dcerpc_binding_handle *h,
    8198             :         struct clusapi_EnumValue *r)
    8199             : {
    8200             :         struct tevent_req *req;
    8201             :         struct dcerpc_clusapi_EnumValue_r_state *state;
    8202             :         struct tevent_req *subreq;
    8203             : 
    8204           0 :         req = tevent_req_create(mem_ctx, &state,
    8205             :                                 struct dcerpc_clusapi_EnumValue_r_state);
    8206           0 :         if (req == NULL) {
    8207           0 :                 return NULL;
    8208             :         }
    8209             : 
    8210           0 :         state->out_mem_ctx = talloc_new(state);
    8211           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8212           0 :                 return tevent_req_post(req, ev);
    8213             :         }
    8214             : 
    8215           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8216             :                         NULL, &ndr_table_clusapi,
    8217           0 :                         NDR_CLUSAPI_ENUMVALUE, state->out_mem_ctx, r);
    8218           0 :         if (tevent_req_nomem(subreq, req)) {
    8219           0 :                 return tevent_req_post(req, ev);
    8220             :         }
    8221           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_EnumValue_r_done, req);
    8222             : 
    8223           0 :         return req;
    8224             : }
    8225             : 
    8226           0 : static void dcerpc_clusapi_EnumValue_r_done(struct tevent_req *subreq)
    8227             : {
    8228           0 :         struct tevent_req *req =
    8229           0 :                 tevent_req_callback_data(subreq,
    8230             :                 struct tevent_req);
    8231             :         NTSTATUS status;
    8232             : 
    8233           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8234           0 :         TALLOC_FREE(subreq);
    8235           0 :         if (tevent_req_nterror(req, status)) {
    8236           0 :                 return;
    8237             :         }
    8238             : 
    8239           0 :         tevent_req_done(req);
    8240             : }
    8241             : 
    8242           0 : NTSTATUS dcerpc_clusapi_EnumValue_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8243             : {
    8244           0 :         struct dcerpc_clusapi_EnumValue_r_state *state =
    8245           0 :                 tevent_req_data(req,
    8246             :                 struct dcerpc_clusapi_EnumValue_r_state);
    8247             :         NTSTATUS status;
    8248             : 
    8249           0 :         if (tevent_req_is_nterror(req, &status)) {
    8250           0 :                 tevent_req_received(req);
    8251           0 :                 return status;
    8252             :         }
    8253             : 
    8254           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8255             : 
    8256           0 :         tevent_req_received(req);
    8257           0 :         return NT_STATUS_OK;
    8258             : }
    8259             : 
    8260           0 : NTSTATUS dcerpc_clusapi_EnumValue_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_EnumValue *r)
    8261             : {
    8262             :         NTSTATUS status;
    8263             : 
    8264           0 :         status = dcerpc_binding_handle_call(h,
    8265             :                         NULL, &ndr_table_clusapi,
    8266             :                         NDR_CLUSAPI_ENUMVALUE, mem_ctx, r);
    8267             : 
    8268           0 :         return status;
    8269             : }
    8270             : 
    8271             : struct dcerpc_clusapi_EnumValue_state {
    8272             :         struct clusapi_EnumValue orig;
    8273             :         struct clusapi_EnumValue tmp;
    8274             :         TALLOC_CTX *out_mem_ctx;
    8275             : };
    8276             : 
    8277             : static void dcerpc_clusapi_EnumValue_done(struct tevent_req *subreq);
    8278             : 
    8279           0 : struct tevent_req *dcerpc_clusapi_EnumValue_send(TALLOC_CTX *mem_ctx,
    8280             :                                                  struct tevent_context *ev,
    8281             :                                                  struct dcerpc_binding_handle *h,
    8282             :                                                  struct policy_handle _hKey /* [in]  */,
    8283             :                                                  uint32_t _dwIndex /* [in]  */,
    8284             :                                                  const char **_lpValueName /* [out] [charset(UTF16),ref] */,
    8285             :                                                  enum winreg_Type *_lpType /* [out] [ref] */,
    8286             :                                                  uint8_t *_lpData /* [out] [ref,size_is(*lpcbData)] */,
    8287             :                                                  uint32_t *_lpcbData /* [in,out] [ref] */,
    8288             :                                                  uint32_t *_TotalSize /* [out] [ref] */,
    8289             :                                                  WERROR *_rpc_status /* [out] [ref] */)
    8290             : {
    8291             :         struct tevent_req *req;
    8292             :         struct dcerpc_clusapi_EnumValue_state *state;
    8293             :         struct tevent_req *subreq;
    8294             : 
    8295           0 :         req = tevent_req_create(mem_ctx, &state,
    8296             :                                 struct dcerpc_clusapi_EnumValue_state);
    8297           0 :         if (req == NULL) {
    8298           0 :                 return NULL;
    8299             :         }
    8300           0 :         state->out_mem_ctx = NULL;
    8301             : 
    8302             :         /* In parameters */
    8303           0 :         state->orig.in.hKey = _hKey;
    8304           0 :         state->orig.in.dwIndex = _dwIndex;
    8305           0 :         state->orig.in.lpcbData = _lpcbData;
    8306             : 
    8307             :         /* Out parameters */
    8308           0 :         state->orig.out.lpValueName = _lpValueName;
    8309           0 :         state->orig.out.lpType = _lpType;
    8310           0 :         state->orig.out.lpData = _lpData;
    8311           0 :         state->orig.out.lpcbData = _lpcbData;
    8312           0 :         state->orig.out.TotalSize = _TotalSize;
    8313           0 :         state->orig.out.rpc_status = _rpc_status;
    8314             : 
    8315             :         /* Result */
    8316           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8317             : 
    8318           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8319             :                              "dcerpc_clusapi_EnumValue_out_memory");
    8320           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8321           0 :                 return tevent_req_post(req, ev);
    8322             :         }
    8323             : 
    8324             :         /* make a temporary copy, that we pass to the dispatch function */
    8325           0 :         state->tmp = state->orig;
    8326             : 
    8327           0 :         subreq = dcerpc_clusapi_EnumValue_r_send(state, ev, h, &state->tmp);
    8328           0 :         if (tevent_req_nomem(subreq, req)) {
    8329           0 :                 return tevent_req_post(req, ev);
    8330             :         }
    8331           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_EnumValue_done, req);
    8332           0 :         return req;
    8333             : }
    8334             : 
    8335           0 : static void dcerpc_clusapi_EnumValue_done(struct tevent_req *subreq)
    8336             : {
    8337           0 :         struct tevent_req *req = tevent_req_callback_data(
    8338             :                 subreq, struct tevent_req);
    8339           0 :         struct dcerpc_clusapi_EnumValue_state *state = tevent_req_data(
    8340             :                 req, struct dcerpc_clusapi_EnumValue_state);
    8341             :         NTSTATUS status;
    8342             :         TALLOC_CTX *mem_ctx;
    8343             : 
    8344           0 :         if (state->out_mem_ctx) {
    8345           0 :                 mem_ctx = state->out_mem_ctx;
    8346             :         } else {
    8347           0 :                 mem_ctx = state;
    8348             :         }
    8349             : 
    8350           0 :         status = dcerpc_clusapi_EnumValue_r_recv(subreq, mem_ctx);
    8351           0 :         TALLOC_FREE(subreq);
    8352           0 :         if (tevent_req_nterror(req, status)) {
    8353           0 :                 return;
    8354             :         }
    8355             : 
    8356             :         /* Copy out parameters */
    8357           0 :         *state->orig.out.lpValueName = *state->tmp.out.lpValueName;
    8358           0 :         *state->orig.out.lpType = *state->tmp.out.lpType;
    8359             :         {
    8360             :                 size_t _copy_len_lpData;
    8361           0 :                 if ((*state->tmp.out.lpcbData) > (*state->tmp.in.lpcbData)) {
    8362           0 :                         tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
    8363           0 :                         return;
    8364             :                 }
    8365           0 :                 _copy_len_lpData = *state->tmp.out.lpcbData;
    8366           0 :                 if (state->orig.out.lpData != state->tmp.out.lpData) {
    8367           0 :                         memcpy(state->orig.out.lpData, state->tmp.out.lpData, _copy_len_lpData * sizeof(*state->orig.out.lpData));
    8368             :                 }
    8369             :         }
    8370           0 :         *state->orig.out.lpcbData = *state->tmp.out.lpcbData;
    8371           0 :         *state->orig.out.TotalSize = *state->tmp.out.TotalSize;
    8372           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    8373             : 
    8374             :         /* Copy result */
    8375           0 :         state->orig.out.result = state->tmp.out.result;
    8376             : 
    8377             :         /* Reset temporary structure */
    8378           0 :         NDR_ZERO_STRUCT(state->tmp);
    8379             : 
    8380           0 :         tevent_req_done(req);
    8381             : }
    8382             : 
    8383           0 : NTSTATUS dcerpc_clusapi_EnumValue_recv(struct tevent_req *req,
    8384             :                                        TALLOC_CTX *mem_ctx,
    8385             :                                        WERROR *result)
    8386             : {
    8387           0 :         struct dcerpc_clusapi_EnumValue_state *state = tevent_req_data(
    8388             :                 req, struct dcerpc_clusapi_EnumValue_state);
    8389             :         NTSTATUS status;
    8390             : 
    8391           0 :         if (tevent_req_is_nterror(req, &status)) {
    8392           0 :                 tevent_req_received(req);
    8393           0 :                 return status;
    8394             :         }
    8395             : 
    8396             :         /* Steal possible out parameters to the callers context */
    8397           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8398             : 
    8399             :         /* Return result */
    8400           0 :         *result = state->orig.out.result;
    8401             : 
    8402           0 :         tevent_req_received(req);
    8403           0 :         return NT_STATUS_OK;
    8404             : }
    8405             : 
    8406           0 : NTSTATUS dcerpc_clusapi_EnumValue(struct dcerpc_binding_handle *h,
    8407             :                                   TALLOC_CTX *mem_ctx,
    8408             :                                   struct policy_handle _hKey /* [in]  */,
    8409             :                                   uint32_t _dwIndex /* [in]  */,
    8410             :                                   const char **_lpValueName /* [out] [charset(UTF16),ref] */,
    8411             :                                   enum winreg_Type *_lpType /* [out] [ref] */,
    8412             :                                   uint8_t *_lpData /* [out] [ref,size_is(*lpcbData)] */,
    8413             :                                   uint32_t *_lpcbData /* [in,out] [ref] */,
    8414             :                                   uint32_t *_TotalSize /* [out] [ref] */,
    8415             :                                   WERROR *_rpc_status /* [out] [ref] */,
    8416             :                                   WERROR *result)
    8417             : {
    8418             :         struct clusapi_EnumValue r;
    8419             :         NTSTATUS status;
    8420             : 
    8421             :         /* In parameters */
    8422           0 :         r.in.hKey = _hKey;
    8423           0 :         r.in.dwIndex = _dwIndex;
    8424           0 :         r.in.lpcbData = _lpcbData;
    8425             : 
    8426             :         /* Out parameters */
    8427           0 :         r.out.lpValueName = _lpValueName;
    8428           0 :         r.out.lpType = _lpType;
    8429           0 :         r.out.lpData = _lpData;
    8430           0 :         r.out.lpcbData = _lpcbData;
    8431           0 :         r.out.TotalSize = _TotalSize;
    8432           0 :         r.out.rpc_status = _rpc_status;
    8433             : 
    8434             :         /* Result */
    8435           0 :         NDR_ZERO_STRUCT(r.out.result);
    8436             : 
    8437           0 :         status = dcerpc_clusapi_EnumValue_r(h, mem_ctx, &r);
    8438           0 :         if (!NT_STATUS_IS_OK(status)) {
    8439           0 :                 return status;
    8440             :         }
    8441             : 
    8442             :         /* Return variables */
    8443           0 :         *_lpValueName = *r.out.lpValueName;
    8444           0 :         *_lpType = *r.out.lpType;
    8445             :         {
    8446             :                 size_t _copy_len_lpData;
    8447           0 :                 if ((*r.out.lpcbData) > (*r.in.lpcbData)) {
    8448           0 :                         return NT_STATUS_INVALID_NETWORK_RESPONSE;
    8449             :                 }
    8450           0 :                 _copy_len_lpData = *r.out.lpcbData;
    8451           0 :                 if (_lpData != r.out.lpData) {
    8452           0 :                         memcpy(_lpData, r.out.lpData, _copy_len_lpData * sizeof(*_lpData));
    8453             :                 }
    8454             :         }
    8455           0 :         *_lpcbData = *r.out.lpcbData;
    8456           0 :         *_TotalSize = *r.out.TotalSize;
    8457           0 :         *_rpc_status = *r.out.rpc_status;
    8458             : 
    8459             :         /* Return result */
    8460           0 :         *result = r.out.result;
    8461             : 
    8462           0 :         return NT_STATUS_OK;
    8463             : }
    8464             : 
    8465             : struct dcerpc_clusapi_CloseKey_r_state {
    8466             :         TALLOC_CTX *out_mem_ctx;
    8467             : };
    8468             : 
    8469             : static void dcerpc_clusapi_CloseKey_r_done(struct tevent_req *subreq);
    8470             : 
    8471           0 : struct tevent_req *dcerpc_clusapi_CloseKey_r_send(TALLOC_CTX *mem_ctx,
    8472             :         struct tevent_context *ev,
    8473             :         struct dcerpc_binding_handle *h,
    8474             :         struct clusapi_CloseKey *r)
    8475             : {
    8476             :         struct tevent_req *req;
    8477             :         struct dcerpc_clusapi_CloseKey_r_state *state;
    8478             :         struct tevent_req *subreq;
    8479             : 
    8480           0 :         req = tevent_req_create(mem_ctx, &state,
    8481             :                                 struct dcerpc_clusapi_CloseKey_r_state);
    8482           0 :         if (req == NULL) {
    8483           0 :                 return NULL;
    8484             :         }
    8485             : 
    8486           0 :         state->out_mem_ctx = talloc_new(state);
    8487           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8488           0 :                 return tevent_req_post(req, ev);
    8489             :         }
    8490             : 
    8491           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8492             :                         NULL, &ndr_table_clusapi,
    8493           0 :                         NDR_CLUSAPI_CLOSEKEY, state->out_mem_ctx, r);
    8494           0 :         if (tevent_req_nomem(subreq, req)) {
    8495           0 :                 return tevent_req_post(req, ev);
    8496             :         }
    8497           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CloseKey_r_done, req);
    8498             : 
    8499           0 :         return req;
    8500             : }
    8501             : 
    8502           0 : static void dcerpc_clusapi_CloseKey_r_done(struct tevent_req *subreq)
    8503             : {
    8504           0 :         struct tevent_req *req =
    8505           0 :                 tevent_req_callback_data(subreq,
    8506             :                 struct tevent_req);
    8507             :         NTSTATUS status;
    8508             : 
    8509           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8510           0 :         TALLOC_FREE(subreq);
    8511           0 :         if (tevent_req_nterror(req, status)) {
    8512           0 :                 return;
    8513             :         }
    8514             : 
    8515           0 :         tevent_req_done(req);
    8516             : }
    8517             : 
    8518           0 : NTSTATUS dcerpc_clusapi_CloseKey_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8519             : {
    8520           0 :         struct dcerpc_clusapi_CloseKey_r_state *state =
    8521           0 :                 tevent_req_data(req,
    8522             :                 struct dcerpc_clusapi_CloseKey_r_state);
    8523             :         NTSTATUS status;
    8524             : 
    8525           0 :         if (tevent_req_is_nterror(req, &status)) {
    8526           0 :                 tevent_req_received(req);
    8527           0 :                 return status;
    8528             :         }
    8529             : 
    8530           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8531             : 
    8532           0 :         tevent_req_received(req);
    8533           0 :         return NT_STATUS_OK;
    8534             : }
    8535             : 
    8536           0 : NTSTATUS dcerpc_clusapi_CloseKey_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CloseKey *r)
    8537             : {
    8538             :         NTSTATUS status;
    8539             : 
    8540           0 :         status = dcerpc_binding_handle_call(h,
    8541             :                         NULL, &ndr_table_clusapi,
    8542             :                         NDR_CLUSAPI_CLOSEKEY, mem_ctx, r);
    8543             : 
    8544           0 :         return status;
    8545             : }
    8546             : 
    8547             : struct dcerpc_clusapi_CloseKey_state {
    8548             :         struct clusapi_CloseKey orig;
    8549             :         struct clusapi_CloseKey tmp;
    8550             :         TALLOC_CTX *out_mem_ctx;
    8551             : };
    8552             : 
    8553             : static void dcerpc_clusapi_CloseKey_done(struct tevent_req *subreq);
    8554             : 
    8555           0 : struct tevent_req *dcerpc_clusapi_CloseKey_send(TALLOC_CTX *mem_ctx,
    8556             :                                                 struct tevent_context *ev,
    8557             :                                                 struct dcerpc_binding_handle *h,
    8558             :                                                 struct policy_handle *_pKey /* [in,out] [ref] */)
    8559             : {
    8560             :         struct tevent_req *req;
    8561             :         struct dcerpc_clusapi_CloseKey_state *state;
    8562             :         struct tevent_req *subreq;
    8563             : 
    8564           0 :         req = tevent_req_create(mem_ctx, &state,
    8565             :                                 struct dcerpc_clusapi_CloseKey_state);
    8566           0 :         if (req == NULL) {
    8567           0 :                 return NULL;
    8568             :         }
    8569           0 :         state->out_mem_ctx = NULL;
    8570             : 
    8571             :         /* In parameters */
    8572           0 :         state->orig.in.pKey = _pKey;
    8573             : 
    8574             :         /* Out parameters */
    8575           0 :         state->orig.out.pKey = _pKey;
    8576             : 
    8577             :         /* Result */
    8578           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8579             : 
    8580           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8581             :                              "dcerpc_clusapi_CloseKey_out_memory");
    8582           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8583           0 :                 return tevent_req_post(req, ev);
    8584             :         }
    8585             : 
    8586             :         /* make a temporary copy, that we pass to the dispatch function */
    8587           0 :         state->tmp = state->orig;
    8588             : 
    8589           0 :         subreq = dcerpc_clusapi_CloseKey_r_send(state, ev, h, &state->tmp);
    8590           0 :         if (tevent_req_nomem(subreq, req)) {
    8591           0 :                 return tevent_req_post(req, ev);
    8592             :         }
    8593           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CloseKey_done, req);
    8594           0 :         return req;
    8595             : }
    8596             : 
    8597           0 : static void dcerpc_clusapi_CloseKey_done(struct tevent_req *subreq)
    8598             : {
    8599           0 :         struct tevent_req *req = tevent_req_callback_data(
    8600             :                 subreq, struct tevent_req);
    8601           0 :         struct dcerpc_clusapi_CloseKey_state *state = tevent_req_data(
    8602             :                 req, struct dcerpc_clusapi_CloseKey_state);
    8603             :         NTSTATUS status;
    8604             :         TALLOC_CTX *mem_ctx;
    8605             : 
    8606           0 :         if (state->out_mem_ctx) {
    8607           0 :                 mem_ctx = state->out_mem_ctx;
    8608             :         } else {
    8609           0 :                 mem_ctx = state;
    8610             :         }
    8611             : 
    8612           0 :         status = dcerpc_clusapi_CloseKey_r_recv(subreq, mem_ctx);
    8613           0 :         TALLOC_FREE(subreq);
    8614           0 :         if (tevent_req_nterror(req, status)) {
    8615           0 :                 return;
    8616             :         }
    8617             : 
    8618             :         /* Copy out parameters */
    8619           0 :         *state->orig.out.pKey = *state->tmp.out.pKey;
    8620             : 
    8621             :         /* Copy result */
    8622           0 :         state->orig.out.result = state->tmp.out.result;
    8623             : 
    8624             :         /* Reset temporary structure */
    8625           0 :         NDR_ZERO_STRUCT(state->tmp);
    8626             : 
    8627           0 :         tevent_req_done(req);
    8628             : }
    8629             : 
    8630           0 : NTSTATUS dcerpc_clusapi_CloseKey_recv(struct tevent_req *req,
    8631             :                                       TALLOC_CTX *mem_ctx,
    8632             :                                       WERROR *result)
    8633             : {
    8634           0 :         struct dcerpc_clusapi_CloseKey_state *state = tevent_req_data(
    8635             :                 req, struct dcerpc_clusapi_CloseKey_state);
    8636             :         NTSTATUS status;
    8637             : 
    8638           0 :         if (tevent_req_is_nterror(req, &status)) {
    8639           0 :                 tevent_req_received(req);
    8640           0 :                 return status;
    8641             :         }
    8642             : 
    8643             :         /* Steal possible out parameters to the callers context */
    8644           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8645             : 
    8646             :         /* Return result */
    8647           0 :         *result = state->orig.out.result;
    8648             : 
    8649           0 :         tevent_req_received(req);
    8650           0 :         return NT_STATUS_OK;
    8651             : }
    8652             : 
    8653           0 : NTSTATUS dcerpc_clusapi_CloseKey(struct dcerpc_binding_handle *h,
    8654             :                                  TALLOC_CTX *mem_ctx,
    8655             :                                  struct policy_handle *_pKey /* [in,out] [ref] */,
    8656             :                                  WERROR *result)
    8657             : {
    8658             :         struct clusapi_CloseKey r;
    8659             :         NTSTATUS status;
    8660             : 
    8661             :         /* In parameters */
    8662           0 :         r.in.pKey = _pKey;
    8663             : 
    8664             :         /* Out parameters */
    8665           0 :         r.out.pKey = _pKey;
    8666             : 
    8667             :         /* Result */
    8668           0 :         NDR_ZERO_STRUCT(r.out.result);
    8669             : 
    8670           0 :         status = dcerpc_clusapi_CloseKey_r(h, mem_ctx, &r);
    8671           0 :         if (!NT_STATUS_IS_OK(status)) {
    8672           0 :                 return status;
    8673             :         }
    8674             : 
    8675             :         /* Return variables */
    8676           0 :         *_pKey = *r.out.pKey;
    8677             : 
    8678             :         /* Return result */
    8679           0 :         *result = r.out.result;
    8680             : 
    8681           0 :         return NT_STATUS_OK;
    8682             : }
    8683             : 
    8684             : struct dcerpc_clusapi_QueryInfoKey_r_state {
    8685             :         TALLOC_CTX *out_mem_ctx;
    8686             : };
    8687             : 
    8688             : static void dcerpc_clusapi_QueryInfoKey_r_done(struct tevent_req *subreq);
    8689             : 
    8690           0 : struct tevent_req *dcerpc_clusapi_QueryInfoKey_r_send(TALLOC_CTX *mem_ctx,
    8691             :         struct tevent_context *ev,
    8692             :         struct dcerpc_binding_handle *h,
    8693             :         struct clusapi_QueryInfoKey *r)
    8694             : {
    8695             :         struct tevent_req *req;
    8696             :         struct dcerpc_clusapi_QueryInfoKey_r_state *state;
    8697             :         struct tevent_req *subreq;
    8698             : 
    8699           0 :         req = tevent_req_create(mem_ctx, &state,
    8700             :                                 struct dcerpc_clusapi_QueryInfoKey_r_state);
    8701           0 :         if (req == NULL) {
    8702           0 :                 return NULL;
    8703             :         }
    8704             : 
    8705           0 :         state->out_mem_ctx = talloc_new(state);
    8706           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8707           0 :                 return tevent_req_post(req, ev);
    8708             :         }
    8709             : 
    8710           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8711             :                         NULL, &ndr_table_clusapi,
    8712           0 :                         NDR_CLUSAPI_QUERYINFOKEY, state->out_mem_ctx, r);
    8713           0 :         if (tevent_req_nomem(subreq, req)) {
    8714           0 :                 return tevent_req_post(req, ev);
    8715             :         }
    8716           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_QueryInfoKey_r_done, req);
    8717             : 
    8718           0 :         return req;
    8719             : }
    8720             : 
    8721           0 : static void dcerpc_clusapi_QueryInfoKey_r_done(struct tevent_req *subreq)
    8722             : {
    8723           0 :         struct tevent_req *req =
    8724           0 :                 tevent_req_callback_data(subreq,
    8725             :                 struct tevent_req);
    8726             :         NTSTATUS status;
    8727             : 
    8728           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8729           0 :         TALLOC_FREE(subreq);
    8730           0 :         if (tevent_req_nterror(req, status)) {
    8731           0 :                 return;
    8732             :         }
    8733             : 
    8734           0 :         tevent_req_done(req);
    8735             : }
    8736             : 
    8737           0 : NTSTATUS dcerpc_clusapi_QueryInfoKey_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8738             : {
    8739           0 :         struct dcerpc_clusapi_QueryInfoKey_r_state *state =
    8740           0 :                 tevent_req_data(req,
    8741             :                 struct dcerpc_clusapi_QueryInfoKey_r_state);
    8742             :         NTSTATUS status;
    8743             : 
    8744           0 :         if (tevent_req_is_nterror(req, &status)) {
    8745           0 :                 tevent_req_received(req);
    8746           0 :                 return status;
    8747             :         }
    8748             : 
    8749           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8750             : 
    8751           0 :         tevent_req_received(req);
    8752           0 :         return NT_STATUS_OK;
    8753             : }
    8754             : 
    8755           0 : NTSTATUS dcerpc_clusapi_QueryInfoKey_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_QueryInfoKey *r)
    8756             : {
    8757             :         NTSTATUS status;
    8758             : 
    8759           0 :         status = dcerpc_binding_handle_call(h,
    8760             :                         NULL, &ndr_table_clusapi,
    8761             :                         NDR_CLUSAPI_QUERYINFOKEY, mem_ctx, r);
    8762             : 
    8763           0 :         return status;
    8764             : }
    8765             : 
    8766             : struct dcerpc_clusapi_QueryInfoKey_state {
    8767             :         struct clusapi_QueryInfoKey orig;
    8768             :         struct clusapi_QueryInfoKey tmp;
    8769             :         TALLOC_CTX *out_mem_ctx;
    8770             : };
    8771             : 
    8772             : static void dcerpc_clusapi_QueryInfoKey_done(struct tevent_req *subreq);
    8773             : 
    8774           0 : struct tevent_req *dcerpc_clusapi_QueryInfoKey_send(TALLOC_CTX *mem_ctx,
    8775             :                                                     struct tevent_context *ev,
    8776             :                                                     struct dcerpc_binding_handle *h,
    8777             :                                                     struct policy_handle _hKey /* [in]  */,
    8778             :                                                     uint32_t *_lpcSubKeys /* [out] [ref] */,
    8779             :                                                     uint32_t *_lpcbMaxSubKeyLen /* [out] [ref] */,
    8780             :                                                     uint32_t *_lpcValues /* [out] [ref] */,
    8781             :                                                     uint32_t *_lpcbMaxValueNameLen /* [out] [ref] */,
    8782             :                                                     uint32_t *_lpcbMaxValueLen /* [out] [ref] */,
    8783             :                                                     uint32_t *_lpcbSecurityDescriptor /* [out] [ref] */,
    8784             :                                                     NTTIME *_lpftLastWriteTime /* [out] [ref] */,
    8785             :                                                     WERROR *_rpc_status /* [out] [ref] */)
    8786             : {
    8787             :         struct tevent_req *req;
    8788             :         struct dcerpc_clusapi_QueryInfoKey_state *state;
    8789             :         struct tevent_req *subreq;
    8790             : 
    8791           0 :         req = tevent_req_create(mem_ctx, &state,
    8792             :                                 struct dcerpc_clusapi_QueryInfoKey_state);
    8793           0 :         if (req == NULL) {
    8794           0 :                 return NULL;
    8795             :         }
    8796           0 :         state->out_mem_ctx = NULL;
    8797             : 
    8798             :         /* In parameters */
    8799           0 :         state->orig.in.hKey = _hKey;
    8800             : 
    8801             :         /* Out parameters */
    8802           0 :         state->orig.out.lpcSubKeys = _lpcSubKeys;
    8803           0 :         state->orig.out.lpcbMaxSubKeyLen = _lpcbMaxSubKeyLen;
    8804           0 :         state->orig.out.lpcValues = _lpcValues;
    8805           0 :         state->orig.out.lpcbMaxValueNameLen = _lpcbMaxValueNameLen;
    8806           0 :         state->orig.out.lpcbMaxValueLen = _lpcbMaxValueLen;
    8807           0 :         state->orig.out.lpcbSecurityDescriptor = _lpcbSecurityDescriptor;
    8808           0 :         state->orig.out.lpftLastWriteTime = _lpftLastWriteTime;
    8809           0 :         state->orig.out.rpc_status = _rpc_status;
    8810             : 
    8811             :         /* Result */
    8812           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8813             : 
    8814           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8815             :                              "dcerpc_clusapi_QueryInfoKey_out_memory");
    8816           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8817           0 :                 return tevent_req_post(req, ev);
    8818             :         }
    8819             : 
    8820             :         /* make a temporary copy, that we pass to the dispatch function */
    8821           0 :         state->tmp = state->orig;
    8822             : 
    8823           0 :         subreq = dcerpc_clusapi_QueryInfoKey_r_send(state, ev, h, &state->tmp);
    8824           0 :         if (tevent_req_nomem(subreq, req)) {
    8825           0 :                 return tevent_req_post(req, ev);
    8826             :         }
    8827           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_QueryInfoKey_done, req);
    8828           0 :         return req;
    8829             : }
    8830             : 
    8831           0 : static void dcerpc_clusapi_QueryInfoKey_done(struct tevent_req *subreq)
    8832             : {
    8833           0 :         struct tevent_req *req = tevent_req_callback_data(
    8834             :                 subreq, struct tevent_req);
    8835           0 :         struct dcerpc_clusapi_QueryInfoKey_state *state = tevent_req_data(
    8836             :                 req, struct dcerpc_clusapi_QueryInfoKey_state);
    8837             :         NTSTATUS status;
    8838             :         TALLOC_CTX *mem_ctx;
    8839             : 
    8840           0 :         if (state->out_mem_ctx) {
    8841           0 :                 mem_ctx = state->out_mem_ctx;
    8842             :         } else {
    8843           0 :                 mem_ctx = state;
    8844             :         }
    8845             : 
    8846           0 :         status = dcerpc_clusapi_QueryInfoKey_r_recv(subreq, mem_ctx);
    8847           0 :         TALLOC_FREE(subreq);
    8848           0 :         if (tevent_req_nterror(req, status)) {
    8849           0 :                 return;
    8850             :         }
    8851             : 
    8852             :         /* Copy out parameters */
    8853           0 :         *state->orig.out.lpcSubKeys = *state->tmp.out.lpcSubKeys;
    8854           0 :         *state->orig.out.lpcbMaxSubKeyLen = *state->tmp.out.lpcbMaxSubKeyLen;
    8855           0 :         *state->orig.out.lpcValues = *state->tmp.out.lpcValues;
    8856           0 :         *state->orig.out.lpcbMaxValueNameLen = *state->tmp.out.lpcbMaxValueNameLen;
    8857           0 :         *state->orig.out.lpcbMaxValueLen = *state->tmp.out.lpcbMaxValueLen;
    8858           0 :         *state->orig.out.lpcbSecurityDescriptor = *state->tmp.out.lpcbSecurityDescriptor;
    8859           0 :         *state->orig.out.lpftLastWriteTime = *state->tmp.out.lpftLastWriteTime;
    8860           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    8861             : 
    8862             :         /* Copy result */
    8863           0 :         state->orig.out.result = state->tmp.out.result;
    8864             : 
    8865             :         /* Reset temporary structure */
    8866           0 :         NDR_ZERO_STRUCT(state->tmp);
    8867             : 
    8868           0 :         tevent_req_done(req);
    8869             : }
    8870             : 
    8871           0 : NTSTATUS dcerpc_clusapi_QueryInfoKey_recv(struct tevent_req *req,
    8872             :                                           TALLOC_CTX *mem_ctx,
    8873             :                                           WERROR *result)
    8874             : {
    8875           0 :         struct dcerpc_clusapi_QueryInfoKey_state *state = tevent_req_data(
    8876             :                 req, struct dcerpc_clusapi_QueryInfoKey_state);
    8877             :         NTSTATUS status;
    8878             : 
    8879           0 :         if (tevent_req_is_nterror(req, &status)) {
    8880           0 :                 tevent_req_received(req);
    8881           0 :                 return status;
    8882             :         }
    8883             : 
    8884             :         /* Steal possible out parameters to the callers context */
    8885           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8886             : 
    8887             :         /* Return result */
    8888           0 :         *result = state->orig.out.result;
    8889             : 
    8890           0 :         tevent_req_received(req);
    8891           0 :         return NT_STATUS_OK;
    8892             : }
    8893             : 
    8894           0 : NTSTATUS dcerpc_clusapi_QueryInfoKey(struct dcerpc_binding_handle *h,
    8895             :                                      TALLOC_CTX *mem_ctx,
    8896             :                                      struct policy_handle _hKey /* [in]  */,
    8897             :                                      uint32_t *_lpcSubKeys /* [out] [ref] */,
    8898             :                                      uint32_t *_lpcbMaxSubKeyLen /* [out] [ref] */,
    8899             :                                      uint32_t *_lpcValues /* [out] [ref] */,
    8900             :                                      uint32_t *_lpcbMaxValueNameLen /* [out] [ref] */,
    8901             :                                      uint32_t *_lpcbMaxValueLen /* [out] [ref] */,
    8902             :                                      uint32_t *_lpcbSecurityDescriptor /* [out] [ref] */,
    8903             :                                      NTTIME *_lpftLastWriteTime /* [out] [ref] */,
    8904             :                                      WERROR *_rpc_status /* [out] [ref] */,
    8905             :                                      WERROR *result)
    8906             : {
    8907             :         struct clusapi_QueryInfoKey r;
    8908             :         NTSTATUS status;
    8909             : 
    8910             :         /* In parameters */
    8911           0 :         r.in.hKey = _hKey;
    8912             : 
    8913             :         /* Out parameters */
    8914           0 :         r.out.lpcSubKeys = _lpcSubKeys;
    8915           0 :         r.out.lpcbMaxSubKeyLen = _lpcbMaxSubKeyLen;
    8916           0 :         r.out.lpcValues = _lpcValues;
    8917           0 :         r.out.lpcbMaxValueNameLen = _lpcbMaxValueNameLen;
    8918           0 :         r.out.lpcbMaxValueLen = _lpcbMaxValueLen;
    8919           0 :         r.out.lpcbSecurityDescriptor = _lpcbSecurityDescriptor;
    8920           0 :         r.out.lpftLastWriteTime = _lpftLastWriteTime;
    8921           0 :         r.out.rpc_status = _rpc_status;
    8922             : 
    8923             :         /* Result */
    8924           0 :         NDR_ZERO_STRUCT(r.out.result);
    8925             : 
    8926           0 :         status = dcerpc_clusapi_QueryInfoKey_r(h, mem_ctx, &r);
    8927           0 :         if (!NT_STATUS_IS_OK(status)) {
    8928           0 :                 return status;
    8929             :         }
    8930             : 
    8931             :         /* Return variables */
    8932           0 :         *_lpcSubKeys = *r.out.lpcSubKeys;
    8933           0 :         *_lpcbMaxSubKeyLen = *r.out.lpcbMaxSubKeyLen;
    8934           0 :         *_lpcValues = *r.out.lpcValues;
    8935           0 :         *_lpcbMaxValueNameLen = *r.out.lpcbMaxValueNameLen;
    8936           0 :         *_lpcbMaxValueLen = *r.out.lpcbMaxValueLen;
    8937           0 :         *_lpcbSecurityDescriptor = *r.out.lpcbSecurityDescriptor;
    8938           0 :         *_lpftLastWriteTime = *r.out.lpftLastWriteTime;
    8939           0 :         *_rpc_status = *r.out.rpc_status;
    8940             : 
    8941             :         /* Return result */
    8942           0 :         *result = r.out.result;
    8943             : 
    8944           0 :         return NT_STATUS_OK;
    8945             : }
    8946             : 
    8947             : struct dcerpc_clusapi_SetKeySecurity_r_state {
    8948             :         TALLOC_CTX *out_mem_ctx;
    8949             : };
    8950             : 
    8951             : static void dcerpc_clusapi_SetKeySecurity_r_done(struct tevent_req *subreq);
    8952             : 
    8953           0 : struct tevent_req *dcerpc_clusapi_SetKeySecurity_r_send(TALLOC_CTX *mem_ctx,
    8954             :         struct tevent_context *ev,
    8955             :         struct dcerpc_binding_handle *h,
    8956             :         struct clusapi_SetKeySecurity *r)
    8957             : {
    8958             :         struct tevent_req *req;
    8959             :         struct dcerpc_clusapi_SetKeySecurity_r_state *state;
    8960             :         struct tevent_req *subreq;
    8961             : 
    8962           0 :         req = tevent_req_create(mem_ctx, &state,
    8963             :                                 struct dcerpc_clusapi_SetKeySecurity_r_state);
    8964           0 :         if (req == NULL) {
    8965           0 :                 return NULL;
    8966             :         }
    8967             : 
    8968           0 :         state->out_mem_ctx = talloc_new(state);
    8969           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8970           0 :                 return tevent_req_post(req, ev);
    8971             :         }
    8972             : 
    8973           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8974             :                         NULL, &ndr_table_clusapi,
    8975           0 :                         NDR_CLUSAPI_SETKEYSECURITY, state->out_mem_ctx, r);
    8976           0 :         if (tevent_req_nomem(subreq, req)) {
    8977           0 :                 return tevent_req_post(req, ev);
    8978             :         }
    8979           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetKeySecurity_r_done, req);
    8980             : 
    8981           0 :         return req;
    8982             : }
    8983             : 
    8984           0 : static void dcerpc_clusapi_SetKeySecurity_r_done(struct tevent_req *subreq)
    8985             : {
    8986           0 :         struct tevent_req *req =
    8987           0 :                 tevent_req_callback_data(subreq,
    8988             :                 struct tevent_req);
    8989             :         NTSTATUS status;
    8990             : 
    8991           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8992           0 :         TALLOC_FREE(subreq);
    8993           0 :         if (tevent_req_nterror(req, status)) {
    8994           0 :                 return;
    8995             :         }
    8996             : 
    8997           0 :         tevent_req_done(req);
    8998             : }
    8999             : 
    9000           0 : NTSTATUS dcerpc_clusapi_SetKeySecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9001             : {
    9002           0 :         struct dcerpc_clusapi_SetKeySecurity_r_state *state =
    9003           0 :                 tevent_req_data(req,
    9004             :                 struct dcerpc_clusapi_SetKeySecurity_r_state);
    9005             :         NTSTATUS status;
    9006             : 
    9007           0 :         if (tevent_req_is_nterror(req, &status)) {
    9008           0 :                 tevent_req_received(req);
    9009           0 :                 return status;
    9010             :         }
    9011             : 
    9012           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9013             : 
    9014           0 :         tevent_req_received(req);
    9015           0 :         return NT_STATUS_OK;
    9016             : }
    9017             : 
    9018           0 : NTSTATUS dcerpc_clusapi_SetKeySecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_SetKeySecurity *r)
    9019             : {
    9020             :         NTSTATUS status;
    9021             : 
    9022           0 :         status = dcerpc_binding_handle_call(h,
    9023             :                         NULL, &ndr_table_clusapi,
    9024             :                         NDR_CLUSAPI_SETKEYSECURITY, mem_ctx, r);
    9025             : 
    9026           0 :         return status;
    9027             : }
    9028             : 
    9029             : struct dcerpc_clusapi_SetKeySecurity_state {
    9030             :         struct clusapi_SetKeySecurity orig;
    9031             :         struct clusapi_SetKeySecurity tmp;
    9032             :         TALLOC_CTX *out_mem_ctx;
    9033             : };
    9034             : 
    9035             : static void dcerpc_clusapi_SetKeySecurity_done(struct tevent_req *subreq);
    9036             : 
    9037           0 : struct tevent_req *dcerpc_clusapi_SetKeySecurity_send(TALLOC_CTX *mem_ctx,
    9038             :                                                       struct tevent_context *ev,
    9039             :                                                       struct dcerpc_binding_handle *h,
    9040             :                                                       struct policy_handle _hKey /* [in]  */,
    9041             :                                                       uint32_t _SecurityInformation /* [in]  */,
    9042             :                                                       struct RPC_SECURITY_DESCRIPTOR *_pRpcSecurityDescriptor /* [in] [ref] */,
    9043             :                                                       WERROR *_rpc_status /* [out] [ref] */)
    9044             : {
    9045             :         struct tevent_req *req;
    9046             :         struct dcerpc_clusapi_SetKeySecurity_state *state;
    9047             :         struct tevent_req *subreq;
    9048             : 
    9049           0 :         req = tevent_req_create(mem_ctx, &state,
    9050             :                                 struct dcerpc_clusapi_SetKeySecurity_state);
    9051           0 :         if (req == NULL) {
    9052           0 :                 return NULL;
    9053             :         }
    9054           0 :         state->out_mem_ctx = NULL;
    9055             : 
    9056             :         /* In parameters */
    9057           0 :         state->orig.in.hKey = _hKey;
    9058           0 :         state->orig.in.SecurityInformation = _SecurityInformation;
    9059           0 :         state->orig.in.pRpcSecurityDescriptor = _pRpcSecurityDescriptor;
    9060             : 
    9061             :         /* Out parameters */
    9062           0 :         state->orig.out.rpc_status = _rpc_status;
    9063             : 
    9064             :         /* Result */
    9065           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9066             : 
    9067           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9068             :                              "dcerpc_clusapi_SetKeySecurity_out_memory");
    9069           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9070           0 :                 return tevent_req_post(req, ev);
    9071             :         }
    9072             : 
    9073             :         /* make a temporary copy, that we pass to the dispatch function */
    9074           0 :         state->tmp = state->orig;
    9075             : 
    9076           0 :         subreq = dcerpc_clusapi_SetKeySecurity_r_send(state, ev, h, &state->tmp);
    9077           0 :         if (tevent_req_nomem(subreq, req)) {
    9078           0 :                 return tevent_req_post(req, ev);
    9079             :         }
    9080           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetKeySecurity_done, req);
    9081           0 :         return req;
    9082             : }
    9083             : 
    9084           0 : static void dcerpc_clusapi_SetKeySecurity_done(struct tevent_req *subreq)
    9085             : {
    9086           0 :         struct tevent_req *req = tevent_req_callback_data(
    9087             :                 subreq, struct tevent_req);
    9088           0 :         struct dcerpc_clusapi_SetKeySecurity_state *state = tevent_req_data(
    9089             :                 req, struct dcerpc_clusapi_SetKeySecurity_state);
    9090             :         NTSTATUS status;
    9091             :         TALLOC_CTX *mem_ctx;
    9092             : 
    9093           0 :         if (state->out_mem_ctx) {
    9094           0 :                 mem_ctx = state->out_mem_ctx;
    9095             :         } else {
    9096           0 :                 mem_ctx = state;
    9097             :         }
    9098             : 
    9099           0 :         status = dcerpc_clusapi_SetKeySecurity_r_recv(subreq, mem_ctx);
    9100           0 :         TALLOC_FREE(subreq);
    9101           0 :         if (tevent_req_nterror(req, status)) {
    9102           0 :                 return;
    9103             :         }
    9104             : 
    9105             :         /* Copy out parameters */
    9106           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    9107             : 
    9108             :         /* Copy result */
    9109           0 :         state->orig.out.result = state->tmp.out.result;
    9110             : 
    9111             :         /* Reset temporary structure */
    9112           0 :         NDR_ZERO_STRUCT(state->tmp);
    9113             : 
    9114           0 :         tevent_req_done(req);
    9115             : }
    9116             : 
    9117           0 : NTSTATUS dcerpc_clusapi_SetKeySecurity_recv(struct tevent_req *req,
    9118             :                                             TALLOC_CTX *mem_ctx,
    9119             :                                             WERROR *result)
    9120             : {
    9121           0 :         struct dcerpc_clusapi_SetKeySecurity_state *state = tevent_req_data(
    9122             :                 req, struct dcerpc_clusapi_SetKeySecurity_state);
    9123             :         NTSTATUS status;
    9124             : 
    9125           0 :         if (tevent_req_is_nterror(req, &status)) {
    9126           0 :                 tevent_req_received(req);
    9127           0 :                 return status;
    9128             :         }
    9129             : 
    9130             :         /* Steal possible out parameters to the callers context */
    9131           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9132             : 
    9133             :         /* Return result */
    9134           0 :         *result = state->orig.out.result;
    9135             : 
    9136           0 :         tevent_req_received(req);
    9137           0 :         return NT_STATUS_OK;
    9138             : }
    9139             : 
    9140           0 : NTSTATUS dcerpc_clusapi_SetKeySecurity(struct dcerpc_binding_handle *h,
    9141             :                                        TALLOC_CTX *mem_ctx,
    9142             :                                        struct policy_handle _hKey /* [in]  */,
    9143             :                                        uint32_t _SecurityInformation /* [in]  */,
    9144             :                                        struct RPC_SECURITY_DESCRIPTOR *_pRpcSecurityDescriptor /* [in] [ref] */,
    9145             :                                        WERROR *_rpc_status /* [out] [ref] */,
    9146             :                                        WERROR *result)
    9147             : {
    9148             :         struct clusapi_SetKeySecurity r;
    9149             :         NTSTATUS status;
    9150             : 
    9151             :         /* In parameters */
    9152           0 :         r.in.hKey = _hKey;
    9153           0 :         r.in.SecurityInformation = _SecurityInformation;
    9154           0 :         r.in.pRpcSecurityDescriptor = _pRpcSecurityDescriptor;
    9155             : 
    9156             :         /* Out parameters */
    9157           0 :         r.out.rpc_status = _rpc_status;
    9158             : 
    9159             :         /* Result */
    9160           0 :         NDR_ZERO_STRUCT(r.out.result);
    9161             : 
    9162           0 :         status = dcerpc_clusapi_SetKeySecurity_r(h, mem_ctx, &r);
    9163           0 :         if (!NT_STATUS_IS_OK(status)) {
    9164           0 :                 return status;
    9165             :         }
    9166             : 
    9167             :         /* Return variables */
    9168           0 :         *_rpc_status = *r.out.rpc_status;
    9169             : 
    9170             :         /* Return result */
    9171           0 :         *result = r.out.result;
    9172             : 
    9173           0 :         return NT_STATUS_OK;
    9174             : }
    9175             : 
    9176             : struct dcerpc_clusapi_GetKeySecurity_r_state {
    9177             :         TALLOC_CTX *out_mem_ctx;
    9178             : };
    9179             : 
    9180             : static void dcerpc_clusapi_GetKeySecurity_r_done(struct tevent_req *subreq);
    9181             : 
    9182           0 : struct tevent_req *dcerpc_clusapi_GetKeySecurity_r_send(TALLOC_CTX *mem_ctx,
    9183             :         struct tevent_context *ev,
    9184             :         struct dcerpc_binding_handle *h,
    9185             :         struct clusapi_GetKeySecurity *r)
    9186             : {
    9187             :         struct tevent_req *req;
    9188             :         struct dcerpc_clusapi_GetKeySecurity_r_state *state;
    9189             :         struct tevent_req *subreq;
    9190             : 
    9191           0 :         req = tevent_req_create(mem_ctx, &state,
    9192             :                                 struct dcerpc_clusapi_GetKeySecurity_r_state);
    9193           0 :         if (req == NULL) {
    9194           0 :                 return NULL;
    9195             :         }
    9196             : 
    9197           0 :         state->out_mem_ctx = talloc_new(state);
    9198           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9199           0 :                 return tevent_req_post(req, ev);
    9200             :         }
    9201             : 
    9202           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9203             :                         NULL, &ndr_table_clusapi,
    9204           0 :                         NDR_CLUSAPI_GETKEYSECURITY, state->out_mem_ctx, r);
    9205           0 :         if (tevent_req_nomem(subreq, req)) {
    9206           0 :                 return tevent_req_post(req, ev);
    9207             :         }
    9208           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetKeySecurity_r_done, req);
    9209             : 
    9210           0 :         return req;
    9211             : }
    9212             : 
    9213           0 : static void dcerpc_clusapi_GetKeySecurity_r_done(struct tevent_req *subreq)
    9214             : {
    9215           0 :         struct tevent_req *req =
    9216           0 :                 tevent_req_callback_data(subreq,
    9217             :                 struct tevent_req);
    9218             :         NTSTATUS status;
    9219             : 
    9220           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9221           0 :         TALLOC_FREE(subreq);
    9222           0 :         if (tevent_req_nterror(req, status)) {
    9223           0 :                 return;
    9224             :         }
    9225             : 
    9226           0 :         tevent_req_done(req);
    9227             : }
    9228             : 
    9229           0 : NTSTATUS dcerpc_clusapi_GetKeySecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9230             : {
    9231           0 :         struct dcerpc_clusapi_GetKeySecurity_r_state *state =
    9232           0 :                 tevent_req_data(req,
    9233             :                 struct dcerpc_clusapi_GetKeySecurity_r_state);
    9234             :         NTSTATUS status;
    9235             : 
    9236           0 :         if (tevent_req_is_nterror(req, &status)) {
    9237           0 :                 tevent_req_received(req);
    9238           0 :                 return status;
    9239             :         }
    9240             : 
    9241           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9242             : 
    9243           0 :         tevent_req_received(req);
    9244           0 :         return NT_STATUS_OK;
    9245             : }
    9246             : 
    9247           0 : NTSTATUS dcerpc_clusapi_GetKeySecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetKeySecurity *r)
    9248             : {
    9249             :         NTSTATUS status;
    9250             : 
    9251           0 :         status = dcerpc_binding_handle_call(h,
    9252             :                         NULL, &ndr_table_clusapi,
    9253             :                         NDR_CLUSAPI_GETKEYSECURITY, mem_ctx, r);
    9254             : 
    9255           0 :         return status;
    9256             : }
    9257             : 
    9258             : struct dcerpc_clusapi_GetKeySecurity_state {
    9259             :         struct clusapi_GetKeySecurity orig;
    9260             :         struct clusapi_GetKeySecurity tmp;
    9261             :         TALLOC_CTX *out_mem_ctx;
    9262             : };
    9263             : 
    9264             : static void dcerpc_clusapi_GetKeySecurity_done(struct tevent_req *subreq);
    9265             : 
    9266           0 : struct tevent_req *dcerpc_clusapi_GetKeySecurity_send(TALLOC_CTX *mem_ctx,
    9267             :                                                       struct tevent_context *ev,
    9268             :                                                       struct dcerpc_binding_handle *h,
    9269             :                                                       struct policy_handle _hKey /* [in]  */,
    9270             :                                                       uint32_t _SecurityInformation /* [in]  */,
    9271             :                                                       struct RPC_SECURITY_DESCRIPTOR *_pRpcSecurityDescriptor /* [in,out] [ref] */,
    9272             :                                                       WERROR *_rpc_status /* [out] [ref] */)
    9273             : {
    9274             :         struct tevent_req *req;
    9275             :         struct dcerpc_clusapi_GetKeySecurity_state *state;
    9276             :         struct tevent_req *subreq;
    9277             : 
    9278           0 :         req = tevent_req_create(mem_ctx, &state,
    9279             :                                 struct dcerpc_clusapi_GetKeySecurity_state);
    9280           0 :         if (req == NULL) {
    9281           0 :                 return NULL;
    9282             :         }
    9283           0 :         state->out_mem_ctx = NULL;
    9284             : 
    9285             :         /* In parameters */
    9286           0 :         state->orig.in.hKey = _hKey;
    9287           0 :         state->orig.in.SecurityInformation = _SecurityInformation;
    9288           0 :         state->orig.in.pRpcSecurityDescriptor = _pRpcSecurityDescriptor;
    9289             : 
    9290             :         /* Out parameters */
    9291           0 :         state->orig.out.pRpcSecurityDescriptor = _pRpcSecurityDescriptor;
    9292           0 :         state->orig.out.rpc_status = _rpc_status;
    9293             : 
    9294             :         /* Result */
    9295           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9296             : 
    9297           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9298             :                              "dcerpc_clusapi_GetKeySecurity_out_memory");
    9299           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9300           0 :                 return tevent_req_post(req, ev);
    9301             :         }
    9302             : 
    9303             :         /* make a temporary copy, that we pass to the dispatch function */
    9304           0 :         state->tmp = state->orig;
    9305             : 
    9306           0 :         subreq = dcerpc_clusapi_GetKeySecurity_r_send(state, ev, h, &state->tmp);
    9307           0 :         if (tevent_req_nomem(subreq, req)) {
    9308           0 :                 return tevent_req_post(req, ev);
    9309             :         }
    9310           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetKeySecurity_done, req);
    9311           0 :         return req;
    9312             : }
    9313             : 
    9314           0 : static void dcerpc_clusapi_GetKeySecurity_done(struct tevent_req *subreq)
    9315             : {
    9316           0 :         struct tevent_req *req = tevent_req_callback_data(
    9317             :                 subreq, struct tevent_req);
    9318           0 :         struct dcerpc_clusapi_GetKeySecurity_state *state = tevent_req_data(
    9319             :                 req, struct dcerpc_clusapi_GetKeySecurity_state);
    9320             :         NTSTATUS status;
    9321             :         TALLOC_CTX *mem_ctx;
    9322             : 
    9323           0 :         if (state->out_mem_ctx) {
    9324           0 :                 mem_ctx = state->out_mem_ctx;
    9325             :         } else {
    9326           0 :                 mem_ctx = state;
    9327             :         }
    9328             : 
    9329           0 :         status = dcerpc_clusapi_GetKeySecurity_r_recv(subreq, mem_ctx);
    9330           0 :         TALLOC_FREE(subreq);
    9331           0 :         if (tevent_req_nterror(req, status)) {
    9332           0 :                 return;
    9333             :         }
    9334             : 
    9335             :         /* Copy out parameters */
    9336           0 :         *state->orig.out.pRpcSecurityDescriptor = *state->tmp.out.pRpcSecurityDescriptor;
    9337           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    9338             : 
    9339             :         /* Copy result */
    9340           0 :         state->orig.out.result = state->tmp.out.result;
    9341             : 
    9342             :         /* Reset temporary structure */
    9343           0 :         NDR_ZERO_STRUCT(state->tmp);
    9344             : 
    9345           0 :         tevent_req_done(req);
    9346             : }
    9347             : 
    9348           0 : NTSTATUS dcerpc_clusapi_GetKeySecurity_recv(struct tevent_req *req,
    9349             :                                             TALLOC_CTX *mem_ctx,
    9350             :                                             WERROR *result)
    9351             : {
    9352           0 :         struct dcerpc_clusapi_GetKeySecurity_state *state = tevent_req_data(
    9353             :                 req, struct dcerpc_clusapi_GetKeySecurity_state);
    9354             :         NTSTATUS status;
    9355             : 
    9356           0 :         if (tevent_req_is_nterror(req, &status)) {
    9357           0 :                 tevent_req_received(req);
    9358           0 :                 return status;
    9359             :         }
    9360             : 
    9361             :         /* Steal possible out parameters to the callers context */
    9362           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9363             : 
    9364             :         /* Return result */
    9365           0 :         *result = state->orig.out.result;
    9366             : 
    9367           0 :         tevent_req_received(req);
    9368           0 :         return NT_STATUS_OK;
    9369             : }
    9370             : 
    9371           0 : NTSTATUS dcerpc_clusapi_GetKeySecurity(struct dcerpc_binding_handle *h,
    9372             :                                        TALLOC_CTX *mem_ctx,
    9373             :                                        struct policy_handle _hKey /* [in]  */,
    9374             :                                        uint32_t _SecurityInformation /* [in]  */,
    9375             :                                        struct RPC_SECURITY_DESCRIPTOR *_pRpcSecurityDescriptor /* [in,out] [ref] */,
    9376             :                                        WERROR *_rpc_status /* [out] [ref] */,
    9377             :                                        WERROR *result)
    9378             : {
    9379             :         struct clusapi_GetKeySecurity r;
    9380             :         NTSTATUS status;
    9381             : 
    9382             :         /* In parameters */
    9383           0 :         r.in.hKey = _hKey;
    9384           0 :         r.in.SecurityInformation = _SecurityInformation;
    9385           0 :         r.in.pRpcSecurityDescriptor = _pRpcSecurityDescriptor;
    9386             : 
    9387             :         /* Out parameters */
    9388           0 :         r.out.pRpcSecurityDescriptor = _pRpcSecurityDescriptor;
    9389           0 :         r.out.rpc_status = _rpc_status;
    9390             : 
    9391             :         /* Result */
    9392           0 :         NDR_ZERO_STRUCT(r.out.result);
    9393             : 
    9394           0 :         status = dcerpc_clusapi_GetKeySecurity_r(h, mem_ctx, &r);
    9395           0 :         if (!NT_STATUS_IS_OK(status)) {
    9396           0 :                 return status;
    9397             :         }
    9398             : 
    9399             :         /* Return variables */
    9400           0 :         *_pRpcSecurityDescriptor = *r.out.pRpcSecurityDescriptor;
    9401           0 :         *_rpc_status = *r.out.rpc_status;
    9402             : 
    9403             :         /* Return result */
    9404           0 :         *result = r.out.result;
    9405             : 
    9406           0 :         return NT_STATUS_OK;
    9407             : }
    9408             : 
    9409             : struct dcerpc_clusapi_OpenGroup_r_state {
    9410             :         TALLOC_CTX *out_mem_ctx;
    9411             : };
    9412             : 
    9413             : static void dcerpc_clusapi_OpenGroup_r_done(struct tevent_req *subreq);
    9414             : 
    9415           0 : struct tevent_req *dcerpc_clusapi_OpenGroup_r_send(TALLOC_CTX *mem_ctx,
    9416             :         struct tevent_context *ev,
    9417             :         struct dcerpc_binding_handle *h,
    9418             :         struct clusapi_OpenGroup *r)
    9419             : {
    9420             :         struct tevent_req *req;
    9421             :         struct dcerpc_clusapi_OpenGroup_r_state *state;
    9422             :         struct tevent_req *subreq;
    9423             : 
    9424           0 :         req = tevent_req_create(mem_ctx, &state,
    9425             :                                 struct dcerpc_clusapi_OpenGroup_r_state);
    9426           0 :         if (req == NULL) {
    9427           0 :                 return NULL;
    9428             :         }
    9429             : 
    9430           0 :         state->out_mem_ctx = talloc_new(state);
    9431           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9432           0 :                 return tevent_req_post(req, ev);
    9433             :         }
    9434             : 
    9435           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9436             :                         NULL, &ndr_table_clusapi,
    9437           0 :                         NDR_CLUSAPI_OPENGROUP, state->out_mem_ctx, r);
    9438           0 :         if (tevent_req_nomem(subreq, req)) {
    9439           0 :                 return tevent_req_post(req, ev);
    9440             :         }
    9441           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OpenGroup_r_done, req);
    9442             : 
    9443           0 :         return req;
    9444             : }
    9445             : 
    9446           0 : static void dcerpc_clusapi_OpenGroup_r_done(struct tevent_req *subreq)
    9447             : {
    9448           0 :         struct tevent_req *req =
    9449           0 :                 tevent_req_callback_data(subreq,
    9450             :                 struct tevent_req);
    9451             :         NTSTATUS status;
    9452             : 
    9453           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9454           0 :         TALLOC_FREE(subreq);
    9455           0 :         if (tevent_req_nterror(req, status)) {
    9456           0 :                 return;
    9457             :         }
    9458             : 
    9459           0 :         tevent_req_done(req);
    9460             : }
    9461             : 
    9462           0 : NTSTATUS dcerpc_clusapi_OpenGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9463             : {
    9464           0 :         struct dcerpc_clusapi_OpenGroup_r_state *state =
    9465           0 :                 tevent_req_data(req,
    9466             :                 struct dcerpc_clusapi_OpenGroup_r_state);
    9467             :         NTSTATUS status;
    9468             : 
    9469           0 :         if (tevent_req_is_nterror(req, &status)) {
    9470           0 :                 tevent_req_received(req);
    9471           0 :                 return status;
    9472             :         }
    9473             : 
    9474           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9475             : 
    9476           0 :         tevent_req_received(req);
    9477           0 :         return NT_STATUS_OK;
    9478             : }
    9479             : 
    9480           0 : NTSTATUS dcerpc_clusapi_OpenGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_OpenGroup *r)
    9481             : {
    9482             :         NTSTATUS status;
    9483             : 
    9484           0 :         status = dcerpc_binding_handle_call(h,
    9485             :                         NULL, &ndr_table_clusapi,
    9486             :                         NDR_CLUSAPI_OPENGROUP, mem_ctx, r);
    9487             : 
    9488           0 :         return status;
    9489             : }
    9490             : 
    9491             : struct dcerpc_clusapi_OpenGroup_state {
    9492             :         struct clusapi_OpenGroup orig;
    9493             :         struct clusapi_OpenGroup tmp;
    9494             :         TALLOC_CTX *out_mem_ctx;
    9495             : };
    9496             : 
    9497             : static void dcerpc_clusapi_OpenGroup_done(struct tevent_req *subreq);
    9498             : 
    9499           0 : struct tevent_req *dcerpc_clusapi_OpenGroup_send(TALLOC_CTX *mem_ctx,
    9500             :                                                  struct tevent_context *ev,
    9501             :                                                  struct dcerpc_binding_handle *h,
    9502             :                                                  const char *_lpszGroupName /* [in] [charset(UTF16),ref] */,
    9503             :                                                  WERROR *_Status /* [out] [ref] */,
    9504             :                                                  WERROR *_rpc_status /* [out] [ref] */,
    9505             :                                                  struct policy_handle *_hGroup /* [out] [ref] */)
    9506             : {
    9507             :         struct tevent_req *req;
    9508             :         struct dcerpc_clusapi_OpenGroup_state *state;
    9509             :         struct tevent_req *subreq;
    9510             : 
    9511           0 :         req = tevent_req_create(mem_ctx, &state,
    9512             :                                 struct dcerpc_clusapi_OpenGroup_state);
    9513           0 :         if (req == NULL) {
    9514           0 :                 return NULL;
    9515             :         }
    9516           0 :         state->out_mem_ctx = NULL;
    9517             : 
    9518             :         /* In parameters */
    9519           0 :         state->orig.in.lpszGroupName = _lpszGroupName;
    9520             : 
    9521             :         /* Out parameters */
    9522           0 :         state->orig.out.Status = _Status;
    9523           0 :         state->orig.out.rpc_status = _rpc_status;
    9524           0 :         state->orig.out.hGroup = _hGroup;
    9525             : 
    9526           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9527             :                              "dcerpc_clusapi_OpenGroup_out_memory");
    9528           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9529           0 :                 return tevent_req_post(req, ev);
    9530             :         }
    9531             : 
    9532             :         /* make a temporary copy, that we pass to the dispatch function */
    9533           0 :         state->tmp = state->orig;
    9534             : 
    9535           0 :         subreq = dcerpc_clusapi_OpenGroup_r_send(state, ev, h, &state->tmp);
    9536           0 :         if (tevent_req_nomem(subreq, req)) {
    9537           0 :                 return tevent_req_post(req, ev);
    9538             :         }
    9539           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_OpenGroup_done, req);
    9540           0 :         return req;
    9541             : }
    9542             : 
    9543           0 : static void dcerpc_clusapi_OpenGroup_done(struct tevent_req *subreq)
    9544             : {
    9545           0 :         struct tevent_req *req = tevent_req_callback_data(
    9546             :                 subreq, struct tevent_req);
    9547           0 :         struct dcerpc_clusapi_OpenGroup_state *state = tevent_req_data(
    9548             :                 req, struct dcerpc_clusapi_OpenGroup_state);
    9549             :         NTSTATUS status;
    9550             :         TALLOC_CTX *mem_ctx;
    9551             : 
    9552           0 :         if (state->out_mem_ctx) {
    9553           0 :                 mem_ctx = state->out_mem_ctx;
    9554             :         } else {
    9555           0 :                 mem_ctx = state;
    9556             :         }
    9557             : 
    9558           0 :         status = dcerpc_clusapi_OpenGroup_r_recv(subreq, mem_ctx);
    9559           0 :         TALLOC_FREE(subreq);
    9560           0 :         if (tevent_req_nterror(req, status)) {
    9561           0 :                 return;
    9562             :         }
    9563             : 
    9564             :         /* Copy out parameters */
    9565           0 :         *state->orig.out.Status = *state->tmp.out.Status;
    9566           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    9567           0 :         *state->orig.out.hGroup = *state->tmp.out.hGroup;
    9568             : 
    9569             :         /* Reset temporary structure */
    9570           0 :         NDR_ZERO_STRUCT(state->tmp);
    9571             : 
    9572           0 :         tevent_req_done(req);
    9573             : }
    9574             : 
    9575           0 : NTSTATUS dcerpc_clusapi_OpenGroup_recv(struct tevent_req *req,
    9576             :                                        TALLOC_CTX *mem_ctx)
    9577             : {
    9578           0 :         struct dcerpc_clusapi_OpenGroup_state *state = tevent_req_data(
    9579             :                 req, struct dcerpc_clusapi_OpenGroup_state);
    9580             :         NTSTATUS status;
    9581             : 
    9582           0 :         if (tevent_req_is_nterror(req, &status)) {
    9583           0 :                 tevent_req_received(req);
    9584           0 :                 return status;
    9585             :         }
    9586             : 
    9587             :         /* Steal possible out parameters to the callers context */
    9588           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9589             : 
    9590           0 :         tevent_req_received(req);
    9591           0 :         return NT_STATUS_OK;
    9592             : }
    9593             : 
    9594           0 : NTSTATUS dcerpc_clusapi_OpenGroup(struct dcerpc_binding_handle *h,
    9595             :                                   TALLOC_CTX *mem_ctx,
    9596             :                                   const char *_lpszGroupName /* [in] [charset(UTF16),ref] */,
    9597             :                                   WERROR *_Status /* [out] [ref] */,
    9598             :                                   WERROR *_rpc_status /* [out] [ref] */,
    9599             :                                   struct policy_handle *_hGroup /* [out] [ref] */)
    9600             : {
    9601             :         struct clusapi_OpenGroup r;
    9602             :         NTSTATUS status;
    9603             : 
    9604             :         /* In parameters */
    9605           0 :         r.in.lpszGroupName = _lpszGroupName;
    9606             : 
    9607             :         /* Out parameters */
    9608           0 :         r.out.Status = _Status;
    9609           0 :         r.out.rpc_status = _rpc_status;
    9610           0 :         r.out.hGroup = _hGroup;
    9611             : 
    9612           0 :         status = dcerpc_clusapi_OpenGroup_r(h, mem_ctx, &r);
    9613           0 :         if (!NT_STATUS_IS_OK(status)) {
    9614           0 :                 return status;
    9615             :         }
    9616             : 
    9617             :         /* Return variables */
    9618           0 :         *_Status = *r.out.Status;
    9619           0 :         *_rpc_status = *r.out.rpc_status;
    9620           0 :         *_hGroup = *r.out.hGroup;
    9621             : 
    9622             :         /* Return result */
    9623             : 
    9624           0 :         return NT_STATUS_OK;
    9625             : }
    9626             : 
    9627             : struct dcerpc_clusapi_CreateGroup_r_state {
    9628             :         TALLOC_CTX *out_mem_ctx;
    9629             : };
    9630             : 
    9631             : static void dcerpc_clusapi_CreateGroup_r_done(struct tevent_req *subreq);
    9632             : 
    9633           0 : struct tevent_req *dcerpc_clusapi_CreateGroup_r_send(TALLOC_CTX *mem_ctx,
    9634             :         struct tevent_context *ev,
    9635             :         struct dcerpc_binding_handle *h,
    9636             :         struct clusapi_CreateGroup *r)
    9637             : {
    9638             :         struct tevent_req *req;
    9639             :         struct dcerpc_clusapi_CreateGroup_r_state *state;
    9640             :         struct tevent_req *subreq;
    9641             : 
    9642           0 :         req = tevent_req_create(mem_ctx, &state,
    9643             :                                 struct dcerpc_clusapi_CreateGroup_r_state);
    9644           0 :         if (req == NULL) {
    9645           0 :                 return NULL;
    9646             :         }
    9647             : 
    9648           0 :         state->out_mem_ctx = talloc_new(state);
    9649           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9650           0 :                 return tevent_req_post(req, ev);
    9651             :         }
    9652             : 
    9653           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9654             :                         NULL, &ndr_table_clusapi,
    9655           0 :                         NDR_CLUSAPI_CREATEGROUP, state->out_mem_ctx, r);
    9656           0 :         if (tevent_req_nomem(subreq, req)) {
    9657           0 :                 return tevent_req_post(req, ev);
    9658             :         }
    9659           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateGroup_r_done, req);
    9660             : 
    9661           0 :         return req;
    9662             : }
    9663             : 
    9664           0 : static void dcerpc_clusapi_CreateGroup_r_done(struct tevent_req *subreq)
    9665             : {
    9666           0 :         struct tevent_req *req =
    9667           0 :                 tevent_req_callback_data(subreq,
    9668             :                 struct tevent_req);
    9669             :         NTSTATUS status;
    9670             : 
    9671           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9672           0 :         TALLOC_FREE(subreq);
    9673           0 :         if (tevent_req_nterror(req, status)) {
    9674           0 :                 return;
    9675             :         }
    9676             : 
    9677           0 :         tevent_req_done(req);
    9678             : }
    9679             : 
    9680           0 : NTSTATUS dcerpc_clusapi_CreateGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9681             : {
    9682           0 :         struct dcerpc_clusapi_CreateGroup_r_state *state =
    9683           0 :                 tevent_req_data(req,
    9684             :                 struct dcerpc_clusapi_CreateGroup_r_state);
    9685             :         NTSTATUS status;
    9686             : 
    9687           0 :         if (tevent_req_is_nterror(req, &status)) {
    9688           0 :                 tevent_req_received(req);
    9689           0 :                 return status;
    9690             :         }
    9691             : 
    9692           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9693             : 
    9694           0 :         tevent_req_received(req);
    9695           0 :         return NT_STATUS_OK;
    9696             : }
    9697             : 
    9698           0 : NTSTATUS dcerpc_clusapi_CreateGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CreateGroup *r)
    9699             : {
    9700             :         NTSTATUS status;
    9701             : 
    9702           0 :         status = dcerpc_binding_handle_call(h,
    9703             :                         NULL, &ndr_table_clusapi,
    9704             :                         NDR_CLUSAPI_CREATEGROUP, mem_ctx, r);
    9705             : 
    9706           0 :         return status;
    9707             : }
    9708             : 
    9709             : struct dcerpc_clusapi_CreateGroup_state {
    9710             :         struct clusapi_CreateGroup orig;
    9711             :         struct clusapi_CreateGroup tmp;
    9712             :         TALLOC_CTX *out_mem_ctx;
    9713             : };
    9714             : 
    9715             : static void dcerpc_clusapi_CreateGroup_done(struct tevent_req *subreq);
    9716             : 
    9717           0 : struct tevent_req *dcerpc_clusapi_CreateGroup_send(TALLOC_CTX *mem_ctx,
    9718             :                                                    struct tevent_context *ev,
    9719             :                                                    struct dcerpc_binding_handle *h,
    9720             :                                                    const char *_lpszGroupName /* [in] [charset(UTF16),ref] */,
    9721             :                                                    WERROR *_Status /* [out] [ref] */,
    9722             :                                                    WERROR *_rpc_status /* [out] [ref] */,
    9723             :                                                    struct policy_handle *_hGroup /* [out] [ref] */)
    9724             : {
    9725             :         struct tevent_req *req;
    9726             :         struct dcerpc_clusapi_CreateGroup_state *state;
    9727             :         struct tevent_req *subreq;
    9728             : 
    9729           0 :         req = tevent_req_create(mem_ctx, &state,
    9730             :                                 struct dcerpc_clusapi_CreateGroup_state);
    9731           0 :         if (req == NULL) {
    9732           0 :                 return NULL;
    9733             :         }
    9734           0 :         state->out_mem_ctx = NULL;
    9735             : 
    9736             :         /* In parameters */
    9737           0 :         state->orig.in.lpszGroupName = _lpszGroupName;
    9738             : 
    9739             :         /* Out parameters */
    9740           0 :         state->orig.out.Status = _Status;
    9741           0 :         state->orig.out.rpc_status = _rpc_status;
    9742           0 :         state->orig.out.hGroup = _hGroup;
    9743             : 
    9744           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9745             :                              "dcerpc_clusapi_CreateGroup_out_memory");
    9746           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9747           0 :                 return tevent_req_post(req, ev);
    9748             :         }
    9749             : 
    9750             :         /* make a temporary copy, that we pass to the dispatch function */
    9751           0 :         state->tmp = state->orig;
    9752             : 
    9753           0 :         subreq = dcerpc_clusapi_CreateGroup_r_send(state, ev, h, &state->tmp);
    9754           0 :         if (tevent_req_nomem(subreq, req)) {
    9755           0 :                 return tevent_req_post(req, ev);
    9756             :         }
    9757           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CreateGroup_done, req);
    9758           0 :         return req;
    9759             : }
    9760             : 
    9761           0 : static void dcerpc_clusapi_CreateGroup_done(struct tevent_req *subreq)
    9762             : {
    9763           0 :         struct tevent_req *req = tevent_req_callback_data(
    9764             :                 subreq, struct tevent_req);
    9765           0 :         struct dcerpc_clusapi_CreateGroup_state *state = tevent_req_data(
    9766             :                 req, struct dcerpc_clusapi_CreateGroup_state);
    9767             :         NTSTATUS status;
    9768             :         TALLOC_CTX *mem_ctx;
    9769             : 
    9770           0 :         if (state->out_mem_ctx) {
    9771           0 :                 mem_ctx = state->out_mem_ctx;
    9772             :         } else {
    9773           0 :                 mem_ctx = state;
    9774             :         }
    9775             : 
    9776           0 :         status = dcerpc_clusapi_CreateGroup_r_recv(subreq, mem_ctx);
    9777           0 :         TALLOC_FREE(subreq);
    9778           0 :         if (tevent_req_nterror(req, status)) {
    9779           0 :                 return;
    9780             :         }
    9781             : 
    9782             :         /* Copy out parameters */
    9783           0 :         *state->orig.out.Status = *state->tmp.out.Status;
    9784           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
    9785           0 :         *state->orig.out.hGroup = *state->tmp.out.hGroup;
    9786             : 
    9787             :         /* Reset temporary structure */
    9788           0 :         NDR_ZERO_STRUCT(state->tmp);
    9789             : 
    9790           0 :         tevent_req_done(req);
    9791             : }
    9792             : 
    9793           0 : NTSTATUS dcerpc_clusapi_CreateGroup_recv(struct tevent_req *req,
    9794             :                                          TALLOC_CTX *mem_ctx)
    9795             : {
    9796           0 :         struct dcerpc_clusapi_CreateGroup_state *state = tevent_req_data(
    9797             :                 req, struct dcerpc_clusapi_CreateGroup_state);
    9798             :         NTSTATUS status;
    9799             : 
    9800           0 :         if (tevent_req_is_nterror(req, &status)) {
    9801           0 :                 tevent_req_received(req);
    9802           0 :                 return status;
    9803             :         }
    9804             : 
    9805             :         /* Steal possible out parameters to the callers context */
    9806           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9807             : 
    9808           0 :         tevent_req_received(req);
    9809           0 :         return NT_STATUS_OK;
    9810             : }
    9811             : 
    9812           0 : NTSTATUS dcerpc_clusapi_CreateGroup(struct dcerpc_binding_handle *h,
    9813             :                                     TALLOC_CTX *mem_ctx,
    9814             :                                     const char *_lpszGroupName /* [in] [charset(UTF16),ref] */,
    9815             :                                     WERROR *_Status /* [out] [ref] */,
    9816             :                                     WERROR *_rpc_status /* [out] [ref] */,
    9817             :                                     struct policy_handle *_hGroup /* [out] [ref] */)
    9818             : {
    9819             :         struct clusapi_CreateGroup r;
    9820             :         NTSTATUS status;
    9821             : 
    9822             :         /* In parameters */
    9823           0 :         r.in.lpszGroupName = _lpszGroupName;
    9824             : 
    9825             :         /* Out parameters */
    9826           0 :         r.out.Status = _Status;
    9827           0 :         r.out.rpc_status = _rpc_status;
    9828           0 :         r.out.hGroup = _hGroup;
    9829             : 
    9830           0 :         status = dcerpc_clusapi_CreateGroup_r(h, mem_ctx, &r);
    9831           0 :         if (!NT_STATUS_IS_OK(status)) {
    9832           0 :                 return status;
    9833             :         }
    9834             : 
    9835             :         /* Return variables */
    9836           0 :         *_Status = *r.out.Status;
    9837           0 :         *_rpc_status = *r.out.rpc_status;
    9838           0 :         *_hGroup = *r.out.hGroup;
    9839             : 
    9840             :         /* Return result */
    9841             : 
    9842           0 :         return NT_STATUS_OK;
    9843             : }
    9844             : 
    9845             : struct dcerpc_clusapi_DeleteGroup_r_state {
    9846             :         TALLOC_CTX *out_mem_ctx;
    9847             : };
    9848             : 
    9849             : static void dcerpc_clusapi_DeleteGroup_r_done(struct tevent_req *subreq);
    9850             : 
    9851           0 : struct tevent_req *dcerpc_clusapi_DeleteGroup_r_send(TALLOC_CTX *mem_ctx,
    9852             :         struct tevent_context *ev,
    9853             :         struct dcerpc_binding_handle *h,
    9854             :         struct clusapi_DeleteGroup *r)
    9855             : {
    9856             :         struct tevent_req *req;
    9857             :         struct dcerpc_clusapi_DeleteGroup_r_state *state;
    9858             :         struct tevent_req *subreq;
    9859             : 
    9860           0 :         req = tevent_req_create(mem_ctx, &state,
    9861             :                                 struct dcerpc_clusapi_DeleteGroup_r_state);
    9862           0 :         if (req == NULL) {
    9863           0 :                 return NULL;
    9864             :         }
    9865             : 
    9866           0 :         state->out_mem_ctx = talloc_new(state);
    9867           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9868           0 :                 return tevent_req_post(req, ev);
    9869             :         }
    9870             : 
    9871           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9872             :                         NULL, &ndr_table_clusapi,
    9873           0 :                         NDR_CLUSAPI_DELETEGROUP, state->out_mem_ctx, r);
    9874           0 :         if (tevent_req_nomem(subreq, req)) {
    9875           0 :                 return tevent_req_post(req, ev);
    9876             :         }
    9877           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteGroup_r_done, req);
    9878             : 
    9879           0 :         return req;
    9880             : }
    9881             : 
    9882           0 : static void dcerpc_clusapi_DeleteGroup_r_done(struct tevent_req *subreq)
    9883             : {
    9884           0 :         struct tevent_req *req =
    9885           0 :                 tevent_req_callback_data(subreq,
    9886             :                 struct tevent_req);
    9887             :         NTSTATUS status;
    9888             : 
    9889           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9890           0 :         TALLOC_FREE(subreq);
    9891           0 :         if (tevent_req_nterror(req, status)) {
    9892           0 :                 return;
    9893             :         }
    9894             : 
    9895           0 :         tevent_req_done(req);
    9896             : }
    9897             : 
    9898           0 : NTSTATUS dcerpc_clusapi_DeleteGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9899             : {
    9900           0 :         struct dcerpc_clusapi_DeleteGroup_r_state *state =
    9901           0 :                 tevent_req_data(req,
    9902             :                 struct dcerpc_clusapi_DeleteGroup_r_state);
    9903             :         NTSTATUS status;
    9904             : 
    9905           0 :         if (tevent_req_is_nterror(req, &status)) {
    9906           0 :                 tevent_req_received(req);
    9907           0 :                 return status;
    9908             :         }
    9909             : 
    9910           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9911             : 
    9912           0 :         tevent_req_received(req);
    9913           0 :         return NT_STATUS_OK;
    9914             : }
    9915             : 
    9916           0 : NTSTATUS dcerpc_clusapi_DeleteGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_DeleteGroup *r)
    9917             : {
    9918             :         NTSTATUS status;
    9919             : 
    9920           0 :         status = dcerpc_binding_handle_call(h,
    9921             :                         NULL, &ndr_table_clusapi,
    9922             :                         NDR_CLUSAPI_DELETEGROUP, mem_ctx, r);
    9923             : 
    9924           0 :         return status;
    9925             : }
    9926             : 
    9927             : struct dcerpc_clusapi_DeleteGroup_state {
    9928             :         struct clusapi_DeleteGroup orig;
    9929             :         struct clusapi_DeleteGroup tmp;
    9930             :         TALLOC_CTX *out_mem_ctx;
    9931             : };
    9932             : 
    9933             : static void dcerpc_clusapi_DeleteGroup_done(struct tevent_req *subreq);
    9934             : 
    9935           0 : struct tevent_req *dcerpc_clusapi_DeleteGroup_send(TALLOC_CTX *mem_ctx,
    9936             :                                                    struct tevent_context *ev,
    9937             :                                                    struct dcerpc_binding_handle *h,
    9938             :                                                    struct policy_handle _Group /* [in]  */,
    9939             :                                                    uint8_t _force /* [in]  */,
    9940             :                                                    WERROR *_rpc_status /* [out] [ref] */)
    9941             : {
    9942             :         struct tevent_req *req;
    9943             :         struct dcerpc_clusapi_DeleteGroup_state *state;
    9944             :         struct tevent_req *subreq;
    9945             : 
    9946           0 :         req = tevent_req_create(mem_ctx, &state,
    9947             :                                 struct dcerpc_clusapi_DeleteGroup_state);
    9948           0 :         if (req == NULL) {
    9949           0 :                 return NULL;
    9950             :         }
    9951           0 :         state->out_mem_ctx = NULL;
    9952             : 
    9953             :         /* In parameters */
    9954           0 :         state->orig.in.Group = _Group;
    9955           0 :         state->orig.in.force = _force;
    9956             : 
    9957             :         /* Out parameters */
    9958           0 :         state->orig.out.rpc_status = _rpc_status;
    9959             : 
    9960             :         /* Result */
    9961           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9962             : 
    9963           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9964             :                              "dcerpc_clusapi_DeleteGroup_out_memory");
    9965           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9966           0 :                 return tevent_req_post(req, ev);
    9967             :         }
    9968             : 
    9969             :         /* make a temporary copy, that we pass to the dispatch function */
    9970           0 :         state->tmp = state->orig;
    9971             : 
    9972           0 :         subreq = dcerpc_clusapi_DeleteGroup_r_send(state, ev, h, &state->tmp);
    9973           0 :         if (tevent_req_nomem(subreq, req)) {
    9974           0 :                 return tevent_req_post(req, ev);
    9975             :         }
    9976           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_DeleteGroup_done, req);
    9977           0 :         return req;
    9978             : }
    9979             : 
    9980           0 : static void dcerpc_clusapi_DeleteGroup_done(struct tevent_req *subreq)
    9981             : {
    9982           0 :         struct tevent_req *req = tevent_req_callback_data(
    9983             :                 subreq, struct tevent_req);
    9984           0 :         struct dcerpc_clusapi_DeleteGroup_state *state = tevent_req_data(
    9985             :                 req, struct dcerpc_clusapi_DeleteGroup_state);
    9986             :         NTSTATUS status;
    9987             :         TALLOC_CTX *mem_ctx;
    9988             : 
    9989           0 :         if (state->out_mem_ctx) {
    9990           0 :                 mem_ctx = state->out_mem_ctx;
    9991             :         } else {
    9992           0 :                 mem_ctx = state;
    9993             :         }
    9994             : 
    9995           0 :         status = dcerpc_clusapi_DeleteGroup_r_recv(subreq, mem_ctx);
    9996           0 :         TALLOC_FREE(subreq);
    9997           0 :         if (tevent_req_nterror(req, status)) {
    9998           0 :                 return;
    9999             :         }
   10000             : 
   10001             :         /* Copy out parameters */
   10002           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
   10003             : 
   10004             :         /* Copy result */
   10005           0 :         state->orig.out.result = state->tmp.out.result;
   10006             : 
   10007             :         /* Reset temporary structure */
   10008           0 :         NDR_ZERO_STRUCT(state->tmp);
   10009             : 
   10010           0 :         tevent_req_done(req);
   10011             : }
   10012             : 
   10013           0 : NTSTATUS dcerpc_clusapi_DeleteGroup_recv(struct tevent_req *req,
   10014             :                                          TALLOC_CTX *mem_ctx,
   10015             :                                          WERROR *result)
   10016             : {
   10017           0 :         struct dcerpc_clusapi_DeleteGroup_state *state = tevent_req_data(
   10018             :                 req, struct dcerpc_clusapi_DeleteGroup_state);
   10019             :         NTSTATUS status;
   10020             : 
   10021           0 :         if (tevent_req_is_nterror(req, &status)) {
   10022           0 :                 tevent_req_received(req);
   10023           0 :                 return status;
   10024             :         }
   10025             : 
   10026             :         /* Steal possible out parameters to the callers context */
   10027           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10028             : 
   10029             :         /* Return result */
   10030           0 :         *result = state->orig.out.result;
   10031             : 
   10032           0 :         tevent_req_received(req);
   10033           0 :         return NT_STATUS_OK;
   10034             : }
   10035             : 
   10036           0 : NTSTATUS dcerpc_clusapi_DeleteGroup(struct dcerpc_binding_handle *h,
   10037             :                                     TALLOC_CTX *mem_ctx,
   10038             :                                     struct policy_handle _Group /* [in]  */,
   10039             :                                     uint8_t _force /* [in]  */,
   10040             :                                     WERROR *_rpc_status /* [out] [ref] */,
   10041             :                                     WERROR *result)
   10042             : {
   10043             :         struct clusapi_DeleteGroup r;
   10044             :         NTSTATUS status;
   10045             : 
   10046             :         /* In parameters */
   10047           0 :         r.in.Group = _Group;
   10048           0 :         r.in.force = _force;
   10049             : 
   10050             :         /* Out parameters */
   10051           0 :         r.out.rpc_status = _rpc_status;
   10052             : 
   10053             :         /* Result */
   10054           0 :         NDR_ZERO_STRUCT(r.out.result);
   10055             : 
   10056           0 :         status = dcerpc_clusapi_DeleteGroup_r(h, mem_ctx, &r);
   10057           0 :         if (!NT_STATUS_IS_OK(status)) {
   10058           0 :                 return status;
   10059             :         }
   10060             : 
   10061             :         /* Return variables */
   10062           0 :         *_rpc_status = *r.out.rpc_status;
   10063             : 
   10064             :         /* Return result */
   10065           0 :         *result = r.out.result;
   10066             : 
   10067           0 :         return NT_STATUS_OK;
   10068             : }
   10069             : 
   10070             : struct dcerpc_clusapi_CloseGroup_r_state {
   10071             :         TALLOC_CTX *out_mem_ctx;
   10072             : };
   10073             : 
   10074             : static void dcerpc_clusapi_CloseGroup_r_done(struct tevent_req *subreq);
   10075             : 
   10076           0 : struct tevent_req *dcerpc_clusapi_CloseGroup_r_send(TALLOC_CTX *mem_ctx,
   10077             :         struct tevent_context *ev,
   10078             :         struct dcerpc_binding_handle *h,
   10079             :         struct clusapi_CloseGroup *r)
   10080             : {
   10081             :         struct tevent_req *req;
   10082             :         struct dcerpc_clusapi_CloseGroup_r_state *state;
   10083             :         struct tevent_req *subreq;
   10084             : 
   10085           0 :         req = tevent_req_create(mem_ctx, &state,
   10086             :                                 struct dcerpc_clusapi_CloseGroup_r_state);
   10087           0 :         if (req == NULL) {
   10088           0 :                 return NULL;
   10089             :         }
   10090             : 
   10091           0 :         state->out_mem_ctx = talloc_new(state);
   10092           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10093           0 :                 return tevent_req_post(req, ev);
   10094             :         }
   10095             : 
   10096           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10097             :                         NULL, &ndr_table_clusapi,
   10098           0 :                         NDR_CLUSAPI_CLOSEGROUP, state->out_mem_ctx, r);
   10099           0 :         if (tevent_req_nomem(subreq, req)) {
   10100           0 :                 return tevent_req_post(req, ev);
   10101             :         }
   10102           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CloseGroup_r_done, req);
   10103             : 
   10104           0 :         return req;
   10105             : }
   10106             : 
   10107           0 : static void dcerpc_clusapi_CloseGroup_r_done(struct tevent_req *subreq)
   10108             : {
   10109           0 :         struct tevent_req *req =
   10110           0 :                 tevent_req_callback_data(subreq,
   10111             :                 struct tevent_req);
   10112             :         NTSTATUS status;
   10113             : 
   10114           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10115           0 :         TALLOC_FREE(subreq);
   10116           0 :         if (tevent_req_nterror(req, status)) {
   10117           0 :                 return;
   10118             :         }
   10119             : 
   10120           0 :         tevent_req_done(req);
   10121             : }
   10122             : 
   10123           0 : NTSTATUS dcerpc_clusapi_CloseGroup_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10124             : {
   10125           0 :         struct dcerpc_clusapi_CloseGroup_r_state *state =
   10126           0 :                 tevent_req_data(req,
   10127             :                 struct dcerpc_clusapi_CloseGroup_r_state);
   10128             :         NTSTATUS status;
   10129             : 
   10130           0 :         if (tevent_req_is_nterror(req, &status)) {
   10131           0 :                 tevent_req_received(req);
   10132           0 :                 return status;
   10133             :         }
   10134             : 
   10135           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10136             : 
   10137           0 :         tevent_req_received(req);
   10138           0 :         return NT_STATUS_OK;
   10139             : }
   10140             : 
   10141           0 : NTSTATUS dcerpc_clusapi_CloseGroup_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_CloseGroup *r)
   10142             : {
   10143             :         NTSTATUS status;
   10144             : 
   10145           0 :         status = dcerpc_binding_handle_call(h,
   10146             :                         NULL, &ndr_table_clusapi,
   10147             :                         NDR_CLUSAPI_CLOSEGROUP, mem_ctx, r);
   10148             : 
   10149           0 :         return status;
   10150             : }
   10151             : 
   10152             : struct dcerpc_clusapi_CloseGroup_state {
   10153             :         struct clusapi_CloseGroup orig;
   10154             :         struct clusapi_CloseGroup tmp;
   10155             :         TALLOC_CTX *out_mem_ctx;
   10156             : };
   10157             : 
   10158             : static void dcerpc_clusapi_CloseGroup_done(struct tevent_req *subreq);
   10159             : 
   10160           0 : struct tevent_req *dcerpc_clusapi_CloseGroup_send(TALLOC_CTX *mem_ctx,
   10161             :                                                   struct tevent_context *ev,
   10162             :                                                   struct dcerpc_binding_handle *h,
   10163             :                                                   struct policy_handle *_Group /* [in,out] [ref] */)
   10164             : {
   10165             :         struct tevent_req *req;
   10166             :         struct dcerpc_clusapi_CloseGroup_state *state;
   10167             :         struct tevent_req *subreq;
   10168             : 
   10169           0 :         req = tevent_req_create(mem_ctx, &state,
   10170             :                                 struct dcerpc_clusapi_CloseGroup_state);
   10171           0 :         if (req == NULL) {
   10172           0 :                 return NULL;
   10173             :         }
   10174           0 :         state->out_mem_ctx = NULL;
   10175             : 
   10176             :         /* In parameters */
   10177           0 :         state->orig.in.Group = _Group;
   10178             : 
   10179             :         /* Out parameters */
   10180           0 :         state->orig.out.Group = _Group;
   10181             : 
   10182             :         /* Result */
   10183           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10184             : 
   10185           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10186             :                              "dcerpc_clusapi_CloseGroup_out_memory");
   10187           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10188           0 :                 return tevent_req_post(req, ev);
   10189             :         }
   10190             : 
   10191             :         /* make a temporary copy, that we pass to the dispatch function */
   10192           0 :         state->tmp = state->orig;
   10193             : 
   10194           0 :         subreq = dcerpc_clusapi_CloseGroup_r_send(state, ev, h, &state->tmp);
   10195           0 :         if (tevent_req_nomem(subreq, req)) {
   10196           0 :                 return tevent_req_post(req, ev);
   10197             :         }
   10198           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_CloseGroup_done, req);
   10199           0 :         return req;
   10200             : }
   10201             : 
   10202           0 : static void dcerpc_clusapi_CloseGroup_done(struct tevent_req *subreq)
   10203             : {
   10204           0 :         struct tevent_req *req = tevent_req_callback_data(
   10205             :                 subreq, struct tevent_req);
   10206           0 :         struct dcerpc_clusapi_CloseGroup_state *state = tevent_req_data(
   10207             :                 req, struct dcerpc_clusapi_CloseGroup_state);
   10208             :         NTSTATUS status;
   10209             :         TALLOC_CTX *mem_ctx;
   10210             : 
   10211           0 :         if (state->out_mem_ctx) {
   10212           0 :                 mem_ctx = state->out_mem_ctx;
   10213             :         } else {
   10214           0 :                 mem_ctx = state;
   10215             :         }
   10216             : 
   10217           0 :         status = dcerpc_clusapi_CloseGroup_r_recv(subreq, mem_ctx);
   10218           0 :         TALLOC_FREE(subreq);
   10219           0 :         if (tevent_req_nterror(req, status)) {
   10220           0 :                 return;
   10221             :         }
   10222             : 
   10223             :         /* Copy out parameters */
   10224           0 :         *state->orig.out.Group = *state->tmp.out.Group;
   10225             : 
   10226             :         /* Copy result */
   10227           0 :         state->orig.out.result = state->tmp.out.result;
   10228             : 
   10229             :         /* Reset temporary structure */
   10230           0 :         NDR_ZERO_STRUCT(state->tmp);
   10231             : 
   10232           0 :         tevent_req_done(req);
   10233             : }
   10234             : 
   10235           0 : NTSTATUS dcerpc_clusapi_CloseGroup_recv(struct tevent_req *req,
   10236             :                                         TALLOC_CTX *mem_ctx,
   10237             :                                         WERROR *result)
   10238             : {
   10239           0 :         struct dcerpc_clusapi_CloseGroup_state *state = tevent_req_data(
   10240             :                 req, struct dcerpc_clusapi_CloseGroup_state);
   10241             :         NTSTATUS status;
   10242             : 
   10243           0 :         if (tevent_req_is_nterror(req, &status)) {
   10244           0 :                 tevent_req_received(req);
   10245           0 :                 return status;
   10246             :         }
   10247             : 
   10248             :         /* Steal possible out parameters to the callers context */
   10249           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10250             : 
   10251             :         /* Return result */
   10252           0 :         *result = state->orig.out.result;
   10253             : 
   10254           0 :         tevent_req_received(req);
   10255           0 :         return NT_STATUS_OK;
   10256             : }
   10257             : 
   10258           0 : NTSTATUS dcerpc_clusapi_CloseGroup(struct dcerpc_binding_handle *h,
   10259             :                                    TALLOC_CTX *mem_ctx,
   10260             :                                    struct policy_handle *_Group /* [in,out] [ref] */,
   10261             :                                    WERROR *result)
   10262             : {
   10263             :         struct clusapi_CloseGroup r;
   10264             :         NTSTATUS status;
   10265             : 
   10266             :         /* In parameters */
   10267           0 :         r.in.Group = _Group;
   10268             : 
   10269             :         /* Out parameters */
   10270           0 :         r.out.Group = _Group;
   10271             : 
   10272             :         /* Result */
   10273           0 :         NDR_ZERO_STRUCT(r.out.result);
   10274             : 
   10275           0 :         status = dcerpc_clusapi_CloseGroup_r(h, mem_ctx, &r);
   10276           0 :         if (!NT_STATUS_IS_OK(status)) {
   10277           0 :                 return status;
   10278             :         }
   10279             : 
   10280             :         /* Return variables */
   10281           0 :         *_Group = *r.out.Group;
   10282             : 
   10283             :         /* Return result */
   10284           0 :         *result = r.out.result;
   10285             : 
   10286           0 :         return NT_STATUS_OK;
   10287             : }
   10288             : 
   10289             : struct dcerpc_clusapi_GetGroupState_r_state {
   10290             :         TALLOC_CTX *out_mem_ctx;
   10291             : };
   10292             : 
   10293             : static void dcerpc_clusapi_GetGroupState_r_done(struct tevent_req *subreq);
   10294             : 
   10295           0 : struct tevent_req *dcerpc_clusapi_GetGroupState_r_send(TALLOC_CTX *mem_ctx,
   10296             :         struct tevent_context *ev,
   10297             :         struct dcerpc_binding_handle *h,
   10298             :         struct clusapi_GetGroupState *r)
   10299             : {
   10300             :         struct tevent_req *req;
   10301             :         struct dcerpc_clusapi_GetGroupState_r_state *state;
   10302             :         struct tevent_req *subreq;
   10303             : 
   10304           0 :         req = tevent_req_create(mem_ctx, &state,
   10305             :                                 struct dcerpc_clusapi_GetGroupState_r_state);
   10306           0 :         if (req == NULL) {
   10307           0 :                 return NULL;
   10308             :         }
   10309             : 
   10310           0 :         state->out_mem_ctx = talloc_new(state);
   10311           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10312           0 :                 return tevent_req_post(req, ev);
   10313             :         }
   10314             : 
   10315           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10316             :                         NULL, &ndr_table_clusapi,
   10317           0 :                         NDR_CLUSAPI_GETGROUPSTATE, state->out_mem_ctx, r);
   10318           0 :         if (tevent_req_nomem(subreq, req)) {
   10319           0 :                 return tevent_req_post(req, ev);
   10320             :         }
   10321           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetGroupState_r_done, req);
   10322             : 
   10323           0 :         return req;
   10324             : }
   10325             : 
   10326           0 : static void dcerpc_clusapi_GetGroupState_r_done(struct tevent_req *subreq)
   10327             : {
   10328           0 :         struct tevent_req *req =
   10329           0 :                 tevent_req_callback_data(subreq,
   10330             :                 struct tevent_req);
   10331             :         NTSTATUS status;
   10332             : 
   10333           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10334           0 :         TALLOC_FREE(subreq);
   10335           0 :         if (tevent_req_nterror(req, status)) {
   10336           0 :                 return;
   10337             :         }
   10338             : 
   10339           0 :         tevent_req_done(req);
   10340             : }
   10341             : 
   10342           0 : NTSTATUS dcerpc_clusapi_GetGroupState_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10343             : {
   10344           0 :         struct dcerpc_clusapi_GetGroupState_r_state *state =
   10345           0 :                 tevent_req_data(req,
   10346             :                 struct dcerpc_clusapi_GetGroupState_r_state);
   10347             :         NTSTATUS status;
   10348             : 
   10349           0 :         if (tevent_req_is_nterror(req, &status)) {
   10350           0 :                 tevent_req_received(req);
   10351           0 :                 return status;
   10352             :         }
   10353             : 
   10354           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10355             : 
   10356           0 :         tevent_req_received(req);
   10357           0 :         return NT_STATUS_OK;
   10358             : }
   10359             : 
   10360           0 : NTSTATUS dcerpc_clusapi_GetGroupState_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct clusapi_GetGroupState *r)
   10361             : {
   10362             :         NTSTATUS status;
   10363             : 
   10364           0 :         status = dcerpc_binding_handle_call(h,
   10365             :                         NULL, &ndr_table_clusapi,
   10366             :                         NDR_CLUSAPI_GETGROUPSTATE, mem_ctx, r);
   10367             : 
   10368           0 :         return status;
   10369             : }
   10370             : 
   10371             : struct dcerpc_clusapi_GetGroupState_state {
   10372             :         struct clusapi_GetGroupState orig;
   10373             :         struct clusapi_GetGroupState tmp;
   10374             :         TALLOC_CTX *out_mem_ctx;
   10375             : };
   10376             : 
   10377             : static void dcerpc_clusapi_GetGroupState_done(struct tevent_req *subreq);
   10378             : 
   10379           0 : struct tevent_req *dcerpc_clusapi_GetGroupState_send(TALLOC_CTX *mem_ctx,
   10380             :                                                      struct tevent_context *ev,
   10381             :                                                      struct dcerpc_binding_handle *h,
   10382             :                                                      struct policy_handle _hGroup /* [in]  */,
   10383             :                                                      enum clusapi_ClusterGroupState *_State /* [out] [ref] */,
   10384             :                                                      const char **_NodeName /* [out] [charset(UTF16),ref] */,
   10385             :                                                      WERROR *_rpc_status /* [out] [ref] */)
   10386             : {
   10387             :         struct tevent_req *req;
   10388             :         struct dcerpc_clusapi_GetGroupState_state *state;
   10389             :         struct tevent_req *subreq;
   10390             : 
   10391           0 :         req = tevent_req_create(mem_ctx, &state,
   10392             :                                 struct dcerpc_clusapi_GetGroupState_state);
   10393           0 :         if (req == NULL) {
   10394           0 :                 return NULL;
   10395             :         }
   10396           0 :         state->out_mem_ctx = NULL;
   10397             : 
   10398             :         /* In parameters */
   10399           0 :         state->orig.in.hGroup = _hGroup;
   10400             : 
   10401             :         /* Out parameters */
   10402           0 :         state->orig.out.State = _State;
   10403           0 :         state->orig.out.NodeName = _NodeName;
   10404           0 :         state->orig.out.rpc_status = _rpc_status;
   10405             : 
   10406             :         /* Result */
   10407           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10408             : 
   10409           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10410             :                              "dcerpc_clusapi_GetGroupState_out_memory");
   10411           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10412           0 :                 return tevent_req_post(req, ev);
   10413             :         }
   10414             : 
   10415             :         /* make a temporary copy, that we pass to the dispatch function */
   10416           0 :         state->tmp = state->orig;
   10417             : 
   10418           0 :         subreq = dcerpc_clusapi_GetGroupState_r_send(state, ev, h, &state->tmp);
   10419           0 :         if (tevent_req_nomem(subreq, req)) {
   10420           0 :                 return tevent_req_post(req, ev);
   10421             :         }
   10422           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_GetGroupState_done, req);
   10423           0 :         return req;
   10424             : }
   10425             : 
   10426           0 : static void dcerpc_clusapi_GetGroupState_done(struct tevent_req *subreq)
   10427             : {
   10428           0 :         struct tevent_req *req = tevent_req_callback_data(
   10429             :                 subreq, struct tevent_req);
   10430           0 :         struct dcerpc_clusapi_GetGroupState_state *state = tevent_req_data(
   10431             :                 req, struct dcerpc_clusapi_GetGroupState_state);
   10432             :         NTSTATUS status;
   10433             :         TALLOC_CTX *mem_ctx;
   10434             : 
   10435           0 :         if (state->out_mem_ctx) {
   10436           0 :                 mem_ctx = state->out_mem_ctx;
   10437             :         } else {
   10438           0 :                 mem_ctx = state;
   10439             :         }
   10440             : 
   10441           0 :         status = dcerpc_clusapi_GetGroupState_r_recv(subreq, mem_ctx);
   10442           0 :         TALLOC_FREE(subreq);
   10443           0 :         if (tevent_req_nterror(req, status)) {
   10444           0 :                 return;
   10445             :         }
   10446             : 
   10447             :         /* Copy out parameters */
   10448           0 :         *state->orig.out.State = *state->tmp.out.State;
   10449           0 :         *state->orig.out.NodeName = *state->tmp.out.NodeName;
   10450           0 :         *state->orig.out.rpc_status = *state->tmp.out.rpc_status;
   10451             : 
   10452             :         /* Copy result */
   10453           0 :         state->orig.out.result = state->tmp.out.result;
   10454             : 
   10455             :         /* Reset temporary structure */
   10456           0 :         NDR_ZERO_STRUCT(state->tmp);
   10457             : 
   10458           0 :         tevent_req_done(req);
   10459             : }
   10460             : 
   10461           0 : NTSTATUS dcerpc_clusapi_GetGroupState_recv(struct tevent_req *req,
   10462             :                                            TALLOC_CTX *mem_ctx,
   10463             :                                            WERROR *result)
   10464             : {
   10465           0 :         struct dcerpc_clusapi_GetGroupState_state *state = tevent_req_data(
   10466             :                 req, struct dcerpc_clusapi_GetGroupState_state);
   10467             :         NTSTATUS status;
   10468             : 
   10469           0 :         if (tevent_req_is_nterror(req, &status)) {
   10470           0 :                 tevent_req_received(req);
   10471           0 :                 return status;
   10472             :         }
   10473             : 
   10474             :         /* Steal possible out parameters to the callers context */
   10475           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10476             : 
   10477             :         /* Return result */
   10478           0 :         *result = state->orig.out.result;
   10479             : 
   10480           0 :         tevent_req_received(req);
   10481           0 :         return NT_STATUS_OK;
   10482             : }
   10483             : 
   10484           0 : NTSTATUS dcerpc_clusapi_GetGroupState(struct dcerpc_binding_handle *h,
   10485             :                                       TALLOC_CTX *mem_ctx,
   10486             :                                       struct policy_handle _hGroup /* [in]  */,
   10487             :                                       enum clusapi_ClusterGroupState *_State /* [out] [ref] */,
   10488             :                                       const char **_NodeName /* [out] [charset(UTF16),ref] */,
   10489             :                                       WERROR *_rpc_status /* [out] [ref] */,
   10490             :                                       WERROR *result)
   10491             : {
   10492             :         struct clusapi_GetGroupState r;
   10493             :         NTSTATUS status;
   10494             : 
   10495             :         /* In parameters */
   10496           0 :         r.in.hGroup = _hGroup;
   10497             : 
   10498             :         /* Out parameters */
   10499           0 :         r.out.State = _State;
   10500           0 :         r.out.NodeName = _NodeName;
   10501           0 :         r.out.rpc_status = _rpc_status;
   10502             : 
   10503             :         /* Result */
   10504           0 :         NDR_ZERO_STRUCT(r.out.result);
   10505             : 
   10506           0 :         status = dcerpc_clusapi_GetGroupState_r(h, mem_ctx, &r);
   10507           0 :         if (!NT_STATUS_IS_OK(status)) {
   10508           0 :                 return status;
   10509             :         }
   10510             : 
   10511             :         /* Return variables */
   10512           0 :         *_State = *r.out.State;
   10513           0 :         *_NodeName = *r.out.NodeName;
   10514           0 :         *_rpc_status = *r.out.rpc_status;
   10515             : 
   10516             :         /* Return result */
   10517           0 :         *result = r.out.result;
   10518             : 
   10519           0 :         return NT_STATUS_OK;
   10520             : }
   10521             : 
   10522             : struct dcerpc_clusapi_SetGroupName_r_state {
   10523             :         TALLOC_CTX *out_mem_ctx;
   10524             : };
   10525             : 
   10526             : static void dcerpc_clusapi_SetGroupName_r_done(struct tevent_req *subreq);
   10527             : 
   10528           0 : struct tevent_req *dcerpc_clusapi_SetGroupName_r_send(TALLOC_CTX *mem_ctx,
   10529             :         struct tevent_context *ev,
   10530             :         struct dcerpc_binding_handle *h,
   10531             :         struct clusapi_SetGroupName *r)
   10532             : {
   10533             :         struct tevent_req *req;
   10534             :         struct dcerpc_clusapi_SetGroupName_r_state *state;
   10535             :         struct tevent_req *subreq;
   10536             : 
   10537           0 :         req = tevent_req_create(mem_ctx, &state,
   10538             :                                 struct dcerpc_clusapi_SetGroupName_r_state);
   10539           0 :         if (req == NULL) {
   10540           0 :                 return NULL;
   10541             :         }
   10542             : 
   10543           0 :         state->out_mem_ctx = talloc_new(state);
   10544           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10545           0 :                 return tevent_req_post(req, ev);
   10546             :         }
   10547             : 
   10548           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10549             :                         NULL, &ndr_table_clusapi,
   10550           0 :                         NDR_CLUSAPI_SETGROUPNAME, state->out_mem_ctx, r);
   10551           0 :         if (tevent_req_nomem(subreq, req)) {
   10552           0 :                 return tevent_req_post(req, ev);
   10553             :         }
   10554           0 :         tevent_req_set_callback(subreq, dcerpc_clusapi_SetGroupName_r_done, req);
   10555             : 
   10556           0 :         return req;
   10557             : }
   10558             : 
   10559           0 : static void dcerpc_clusapi_SetGroupName_r_done(struct tevent_req *subreq)
   10560             : {
   10561           0 :         struct tevent_req *req =
   10562           0 :                 tevent_req_callback_data(subreq,
   10563             :                 struct tevent_req);
   10564             :         NTSTATUS status;
   10565             : 
   10566           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10567           0 :         TALLOC_FREE(subreq);
   10568           0 :         if (tevent_req_nterror(req, status)) {
   10569           0 :                 return;
   10570             :         }
   10571             : 
   10572           0 :         tevent_req_done(req);
   10573             : }
   10574             : 
   10575           0 : NTSTATUS dcerpc_clusapi_SetGroupName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10576             : {
   10577           0 :         struct dcerpc_clusapi_SetGroupName_r_state *state =
   10578           0 :                 tevent_req_data(req,
   10579             :                 struct dcerpc_clusapi_SetGroupName_r_state);
   10580             :         NTSTATUS status;
   10581             : 
   10582           0 :         if (tevent_req_is_nterror(req, &status)) {
   10583           0 :                 tevent_req_received(req);
   10584           0 :                 return status;
   10585             :         }
   10586             :