LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_frsapi_c.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 0 502 0.0 %
Date: 2021-09-23 10:06:22 Functions: 0 48 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_frsapi.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_frsapi_c.h"
       8             : 
       9             : /* frsapi - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_frsapi_SetDsPollingIntervalW_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_frsapi_SetDsPollingIntervalW_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_frsapi_SetDsPollingIntervalW_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct frsapi_SetDsPollingIntervalW *r)
      21             : {
      22             :         struct tevent_req *req;
      23             :         struct dcerpc_frsapi_SetDsPollingIntervalW_r_state *state;
      24             :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_frsapi_SetDsPollingIntervalW_r_state);
      28           0 :         if (req == NULL) {
      29           0 :                 return NULL;
      30             :         }
      31             : 
      32           0 :         state->out_mem_ctx = NULL;
      33             : 
      34           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
      35             :                         NULL, &ndr_table_frsapi,
      36             :                         NDR_FRSAPI_SETDSPOLLINGINTERVALW, state, r);
      37           0 :         if (tevent_req_nomem(subreq, req)) {
      38           0 :                 return tevent_req_post(req, ev);
      39             :         }
      40           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_SetDsPollingIntervalW_r_done, req);
      41             : 
      42           0 :         return req;
      43             : }
      44             : 
      45           0 : static void dcerpc_frsapi_SetDsPollingIntervalW_r_done(struct tevent_req *subreq)
      46             : {
      47           0 :         struct tevent_req *req =
      48           0 :                 tevent_req_callback_data(subreq,
      49             :                 struct tevent_req);
      50             :         NTSTATUS status;
      51             : 
      52           0 :         status = dcerpc_binding_handle_call_recv(subreq);
      53           0 :         TALLOC_FREE(subreq);
      54           0 :         if (tevent_req_nterror(req, status)) {
      55           0 :                 return;
      56             :         }
      57             : 
      58           0 :         tevent_req_done(req);
      59             : }
      60             : 
      61           0 : NTSTATUS dcerpc_frsapi_SetDsPollingIntervalW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      62             : {
      63           0 :         struct dcerpc_frsapi_SetDsPollingIntervalW_r_state *state =
      64           0 :                 tevent_req_data(req,
      65             :                 struct dcerpc_frsapi_SetDsPollingIntervalW_r_state);
      66             :         NTSTATUS status;
      67             : 
      68           0 :         if (tevent_req_is_nterror(req, &status)) {
      69           0 :                 tevent_req_received(req);
      70           0 :                 return status;
      71             :         }
      72             : 
      73           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      74             : 
      75           0 :         tevent_req_received(req);
      76           0 :         return NT_STATUS_OK;
      77             : }
      78             : 
      79           0 : NTSTATUS dcerpc_frsapi_SetDsPollingIntervalW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct frsapi_SetDsPollingIntervalW *r)
      80             : {
      81             :         NTSTATUS status;
      82             : 
      83           0 :         status = dcerpc_binding_handle_call(h,
      84             :                         NULL, &ndr_table_frsapi,
      85             :                         NDR_FRSAPI_SETDSPOLLINGINTERVALW, mem_ctx, r);
      86             : 
      87           0 :         return status;
      88             : }
      89             : 
      90             : struct dcerpc_frsapi_SetDsPollingIntervalW_state {
      91             :         struct frsapi_SetDsPollingIntervalW orig;
      92             :         struct frsapi_SetDsPollingIntervalW tmp;
      93             :         TALLOC_CTX *out_mem_ctx;
      94             : };
      95             : 
      96             : static void dcerpc_frsapi_SetDsPollingIntervalW_done(struct tevent_req *subreq);
      97             : 
      98           0 : struct tevent_req *dcerpc_frsapi_SetDsPollingIntervalW_send(TALLOC_CTX *mem_ctx,
      99             :                                                             struct tevent_context *ev,
     100             :                                                             struct dcerpc_binding_handle *h,
     101             :                                                             uint32_t _CurrentInterval /* [in]  */,
     102             :                                                             uint32_t _DsPollingLongInterval /* [in]  */,
     103             :                                                             uint32_t _DsPollingShortInterval /* [in]  */)
     104             : {
     105             :         struct tevent_req *req;
     106             :         struct dcerpc_frsapi_SetDsPollingIntervalW_state *state;
     107             :         struct tevent_req *subreq;
     108             : 
     109           0 :         req = tevent_req_create(mem_ctx, &state,
     110             :                                 struct dcerpc_frsapi_SetDsPollingIntervalW_state);
     111           0 :         if (req == NULL) {
     112           0 :                 return NULL;
     113             :         }
     114           0 :         state->out_mem_ctx = NULL;
     115             : 
     116             :         /* In parameters */
     117           0 :         state->orig.in.CurrentInterval = _CurrentInterval;
     118           0 :         state->orig.in.DsPollingLongInterval = _DsPollingLongInterval;
     119           0 :         state->orig.in.DsPollingShortInterval = _DsPollingShortInterval;
     120             : 
     121             :         /* Out parameters */
     122             : 
     123             :         /* Result */
     124           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     125             : 
     126             :         /* make a temporary copy, that we pass to the dispatch function */
     127           0 :         state->tmp = state->orig;
     128             : 
     129           0 :         subreq = dcerpc_frsapi_SetDsPollingIntervalW_r_send(state, ev, h, &state->tmp);
     130           0 :         if (tevent_req_nomem(subreq, req)) {
     131           0 :                 return tevent_req_post(req, ev);
     132             :         }
     133           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_SetDsPollingIntervalW_done, req);
     134           0 :         return req;
     135             : }
     136             : 
     137           0 : static void dcerpc_frsapi_SetDsPollingIntervalW_done(struct tevent_req *subreq)
     138             : {
     139           0 :         struct tevent_req *req = tevent_req_callback_data(
     140             :                 subreq, struct tevent_req);
     141           0 :         struct dcerpc_frsapi_SetDsPollingIntervalW_state *state = tevent_req_data(
     142             :                 req, struct dcerpc_frsapi_SetDsPollingIntervalW_state);
     143             :         NTSTATUS status;
     144             :         TALLOC_CTX *mem_ctx;
     145             : 
     146           0 :         if (state->out_mem_ctx) {
     147           0 :                 mem_ctx = state->out_mem_ctx;
     148             :         } else {
     149           0 :                 mem_ctx = state;
     150             :         }
     151             : 
     152           0 :         status = dcerpc_frsapi_SetDsPollingIntervalW_r_recv(subreq, mem_ctx);
     153           0 :         TALLOC_FREE(subreq);
     154           0 :         if (tevent_req_nterror(req, status)) {
     155           0 :                 return;
     156             :         }
     157             : 
     158             :         /* Copy out parameters */
     159             : 
     160             :         /* Copy result */
     161           0 :         state->orig.out.result = state->tmp.out.result;
     162             : 
     163             :         /* Reset temporary structure */
     164           0 :         NDR_ZERO_STRUCT(state->tmp);
     165             : 
     166           0 :         tevent_req_done(req);
     167             : }
     168             : 
     169           0 : NTSTATUS dcerpc_frsapi_SetDsPollingIntervalW_recv(struct tevent_req *req,
     170             :                                                   TALLOC_CTX *mem_ctx,
     171             :                                                   WERROR *result)
     172             : {
     173           0 :         struct dcerpc_frsapi_SetDsPollingIntervalW_state *state = tevent_req_data(
     174             :                 req, struct dcerpc_frsapi_SetDsPollingIntervalW_state);
     175             :         NTSTATUS status;
     176             : 
     177           0 :         if (tevent_req_is_nterror(req, &status)) {
     178           0 :                 tevent_req_received(req);
     179           0 :                 return status;
     180             :         }
     181             : 
     182             :         /* Steal possible out parameters to the callers context */
     183           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     184             : 
     185             :         /* Return result */
     186           0 :         *result = state->orig.out.result;
     187             : 
     188           0 :         tevent_req_received(req);
     189           0 :         return NT_STATUS_OK;
     190             : }
     191             : 
     192           0 : NTSTATUS dcerpc_frsapi_SetDsPollingIntervalW(struct dcerpc_binding_handle *h,
     193             :                                              TALLOC_CTX *mem_ctx,
     194             :                                              uint32_t _CurrentInterval /* [in]  */,
     195             :                                              uint32_t _DsPollingLongInterval /* [in]  */,
     196             :                                              uint32_t _DsPollingShortInterval /* [in]  */,
     197             :                                              WERROR *result)
     198             : {
     199             :         struct frsapi_SetDsPollingIntervalW r;
     200             :         NTSTATUS status;
     201             : 
     202             :         /* In parameters */
     203           0 :         r.in.CurrentInterval = _CurrentInterval;
     204           0 :         r.in.DsPollingLongInterval = _DsPollingLongInterval;
     205           0 :         r.in.DsPollingShortInterval = _DsPollingShortInterval;
     206             : 
     207             :         /* Out parameters */
     208             : 
     209             :         /* Result */
     210           0 :         NDR_ZERO_STRUCT(r.out.result);
     211             : 
     212           0 :         status = dcerpc_frsapi_SetDsPollingIntervalW_r(h, mem_ctx, &r);
     213           0 :         if (!NT_STATUS_IS_OK(status)) {
     214           0 :                 return status;
     215             :         }
     216             : 
     217             :         /* Return variables */
     218             : 
     219             :         /* Return result */
     220           0 :         *result = r.out.result;
     221             : 
     222           0 :         return NT_STATUS_OK;
     223             : }
     224             : 
     225             : struct dcerpc_frsapi_GetDsPollingIntervalW_r_state {
     226             :         TALLOC_CTX *out_mem_ctx;
     227             : };
     228             : 
     229             : static void dcerpc_frsapi_GetDsPollingIntervalW_r_done(struct tevent_req *subreq);
     230             : 
     231           0 : struct tevent_req *dcerpc_frsapi_GetDsPollingIntervalW_r_send(TALLOC_CTX *mem_ctx,
     232             :         struct tevent_context *ev,
     233             :         struct dcerpc_binding_handle *h,
     234             :         struct frsapi_GetDsPollingIntervalW *r)
     235             : {
     236             :         struct tevent_req *req;
     237             :         struct dcerpc_frsapi_GetDsPollingIntervalW_r_state *state;
     238             :         struct tevent_req *subreq;
     239             : 
     240           0 :         req = tevent_req_create(mem_ctx, &state,
     241             :                                 struct dcerpc_frsapi_GetDsPollingIntervalW_r_state);
     242           0 :         if (req == NULL) {
     243           0 :                 return NULL;
     244             :         }
     245             : 
     246           0 :         state->out_mem_ctx = talloc_new(state);
     247           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     248           0 :                 return tevent_req_post(req, ev);
     249             :         }
     250             : 
     251           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     252             :                         NULL, &ndr_table_frsapi,
     253           0 :                         NDR_FRSAPI_GETDSPOLLINGINTERVALW, state->out_mem_ctx, r);
     254           0 :         if (tevent_req_nomem(subreq, req)) {
     255           0 :                 return tevent_req_post(req, ev);
     256             :         }
     257           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_GetDsPollingIntervalW_r_done, req);
     258             : 
     259           0 :         return req;
     260             : }
     261             : 
     262           0 : static void dcerpc_frsapi_GetDsPollingIntervalW_r_done(struct tevent_req *subreq)
     263             : {
     264           0 :         struct tevent_req *req =
     265           0 :                 tevent_req_callback_data(subreq,
     266             :                 struct tevent_req);
     267             :         NTSTATUS status;
     268             : 
     269           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     270           0 :         TALLOC_FREE(subreq);
     271           0 :         if (tevent_req_nterror(req, status)) {
     272           0 :                 return;
     273             :         }
     274             : 
     275           0 :         tevent_req_done(req);
     276             : }
     277             : 
     278           0 : NTSTATUS dcerpc_frsapi_GetDsPollingIntervalW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     279             : {
     280           0 :         struct dcerpc_frsapi_GetDsPollingIntervalW_r_state *state =
     281           0 :                 tevent_req_data(req,
     282             :                 struct dcerpc_frsapi_GetDsPollingIntervalW_r_state);
     283             :         NTSTATUS status;
     284             : 
     285           0 :         if (tevent_req_is_nterror(req, &status)) {
     286           0 :                 tevent_req_received(req);
     287           0 :                 return status;
     288             :         }
     289             : 
     290           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     291             : 
     292           0 :         tevent_req_received(req);
     293           0 :         return NT_STATUS_OK;
     294             : }
     295             : 
     296           0 : NTSTATUS dcerpc_frsapi_GetDsPollingIntervalW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct frsapi_GetDsPollingIntervalW *r)
     297             : {
     298             :         NTSTATUS status;
     299             : 
     300           0 :         status = dcerpc_binding_handle_call(h,
     301             :                         NULL, &ndr_table_frsapi,
     302             :                         NDR_FRSAPI_GETDSPOLLINGINTERVALW, mem_ctx, r);
     303             : 
     304           0 :         return status;
     305             : }
     306             : 
     307             : struct dcerpc_frsapi_GetDsPollingIntervalW_state {
     308             :         struct frsapi_GetDsPollingIntervalW orig;
     309             :         struct frsapi_GetDsPollingIntervalW tmp;
     310             :         TALLOC_CTX *out_mem_ctx;
     311             : };
     312             : 
     313             : static void dcerpc_frsapi_GetDsPollingIntervalW_done(struct tevent_req *subreq);
     314             : 
     315           0 : struct tevent_req *dcerpc_frsapi_GetDsPollingIntervalW_send(TALLOC_CTX *mem_ctx,
     316             :                                                             struct tevent_context *ev,
     317             :                                                             struct dcerpc_binding_handle *h,
     318             :                                                             uint32_t *_CurrentInterval /* [out] [ref] */,
     319             :                                                             uint32_t *_DsPollingLongInterval /* [out] [ref] */,
     320             :                                                             uint32_t *_DsPollingShortInterval /* [out] [ref] */)
     321             : {
     322             :         struct tevent_req *req;
     323             :         struct dcerpc_frsapi_GetDsPollingIntervalW_state *state;
     324             :         struct tevent_req *subreq;
     325             : 
     326           0 :         req = tevent_req_create(mem_ctx, &state,
     327             :                                 struct dcerpc_frsapi_GetDsPollingIntervalW_state);
     328           0 :         if (req == NULL) {
     329           0 :                 return NULL;
     330             :         }
     331           0 :         state->out_mem_ctx = NULL;
     332             : 
     333             :         /* In parameters */
     334             : 
     335             :         /* Out parameters */
     336           0 :         state->orig.out.CurrentInterval = _CurrentInterval;
     337           0 :         state->orig.out.DsPollingLongInterval = _DsPollingLongInterval;
     338           0 :         state->orig.out.DsPollingShortInterval = _DsPollingShortInterval;
     339             : 
     340             :         /* Result */
     341           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     342             : 
     343           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     344             :                              "dcerpc_frsapi_GetDsPollingIntervalW_out_memory");
     345           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     346           0 :                 return tevent_req_post(req, ev);
     347             :         }
     348             : 
     349             :         /* make a temporary copy, that we pass to the dispatch function */
     350           0 :         state->tmp = state->orig;
     351             : 
     352           0 :         subreq = dcerpc_frsapi_GetDsPollingIntervalW_r_send(state, ev, h, &state->tmp);
     353           0 :         if (tevent_req_nomem(subreq, req)) {
     354           0 :                 return tevent_req_post(req, ev);
     355             :         }
     356           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_GetDsPollingIntervalW_done, req);
     357           0 :         return req;
     358             : }
     359             : 
     360           0 : static void dcerpc_frsapi_GetDsPollingIntervalW_done(struct tevent_req *subreq)
     361             : {
     362           0 :         struct tevent_req *req = tevent_req_callback_data(
     363             :                 subreq, struct tevent_req);
     364           0 :         struct dcerpc_frsapi_GetDsPollingIntervalW_state *state = tevent_req_data(
     365             :                 req, struct dcerpc_frsapi_GetDsPollingIntervalW_state);
     366             :         NTSTATUS status;
     367             :         TALLOC_CTX *mem_ctx;
     368             : 
     369           0 :         if (state->out_mem_ctx) {
     370           0 :                 mem_ctx = state->out_mem_ctx;
     371             :         } else {
     372           0 :                 mem_ctx = state;
     373             :         }
     374             : 
     375           0 :         status = dcerpc_frsapi_GetDsPollingIntervalW_r_recv(subreq, mem_ctx);
     376           0 :         TALLOC_FREE(subreq);
     377           0 :         if (tevent_req_nterror(req, status)) {
     378           0 :                 return;
     379             :         }
     380             : 
     381             :         /* Copy out parameters */
     382           0 :         *state->orig.out.CurrentInterval = *state->tmp.out.CurrentInterval;
     383           0 :         *state->orig.out.DsPollingLongInterval = *state->tmp.out.DsPollingLongInterval;
     384           0 :         *state->orig.out.DsPollingShortInterval = *state->tmp.out.DsPollingShortInterval;
     385             : 
     386             :         /* Copy result */
     387           0 :         state->orig.out.result = state->tmp.out.result;
     388             : 
     389             :         /* Reset temporary structure */
     390           0 :         NDR_ZERO_STRUCT(state->tmp);
     391             : 
     392           0 :         tevent_req_done(req);
     393             : }
     394             : 
     395           0 : NTSTATUS dcerpc_frsapi_GetDsPollingIntervalW_recv(struct tevent_req *req,
     396             :                                                   TALLOC_CTX *mem_ctx,
     397             :                                                   WERROR *result)
     398             : {
     399           0 :         struct dcerpc_frsapi_GetDsPollingIntervalW_state *state = tevent_req_data(
     400             :                 req, struct dcerpc_frsapi_GetDsPollingIntervalW_state);
     401             :         NTSTATUS status;
     402             : 
     403           0 :         if (tevent_req_is_nterror(req, &status)) {
     404           0 :                 tevent_req_received(req);
     405           0 :                 return status;
     406             :         }
     407             : 
     408             :         /* Steal possible out parameters to the callers context */
     409           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     410             : 
     411             :         /* Return result */
     412           0 :         *result = state->orig.out.result;
     413             : 
     414           0 :         tevent_req_received(req);
     415           0 :         return NT_STATUS_OK;
     416             : }
     417             : 
     418           0 : NTSTATUS dcerpc_frsapi_GetDsPollingIntervalW(struct dcerpc_binding_handle *h,
     419             :                                              TALLOC_CTX *mem_ctx,
     420             :                                              uint32_t *_CurrentInterval /* [out] [ref] */,
     421             :                                              uint32_t *_DsPollingLongInterval /* [out] [ref] */,
     422             :                                              uint32_t *_DsPollingShortInterval /* [out] [ref] */,
     423             :                                              WERROR *result)
     424             : {
     425             :         struct frsapi_GetDsPollingIntervalW r;
     426             :         NTSTATUS status;
     427             : 
     428             :         /* In parameters */
     429             : 
     430             :         /* Out parameters */
     431           0 :         r.out.CurrentInterval = _CurrentInterval;
     432           0 :         r.out.DsPollingLongInterval = _DsPollingLongInterval;
     433           0 :         r.out.DsPollingShortInterval = _DsPollingShortInterval;
     434             : 
     435             :         /* Result */
     436           0 :         NDR_ZERO_STRUCT(r.out.result);
     437             : 
     438           0 :         status = dcerpc_frsapi_GetDsPollingIntervalW_r(h, mem_ctx, &r);
     439           0 :         if (!NT_STATUS_IS_OK(status)) {
     440           0 :                 return status;
     441             :         }
     442             : 
     443             :         /* Return variables */
     444           0 :         *_CurrentInterval = *r.out.CurrentInterval;
     445           0 :         *_DsPollingLongInterval = *r.out.DsPollingLongInterval;
     446           0 :         *_DsPollingShortInterval = *r.out.DsPollingShortInterval;
     447             : 
     448             :         /* Return result */
     449           0 :         *result = r.out.result;
     450             : 
     451           0 :         return NT_STATUS_OK;
     452             : }
     453             : 
     454             : struct dcerpc_frsapi_InfoW_r_state {
     455             :         TALLOC_CTX *out_mem_ctx;
     456             : };
     457             : 
     458             : static void dcerpc_frsapi_InfoW_r_done(struct tevent_req *subreq);
     459             : 
     460           0 : struct tevent_req *dcerpc_frsapi_InfoW_r_send(TALLOC_CTX *mem_ctx,
     461             :         struct tevent_context *ev,
     462             :         struct dcerpc_binding_handle *h,
     463             :         struct frsapi_InfoW *r)
     464             : {
     465             :         struct tevent_req *req;
     466             :         struct dcerpc_frsapi_InfoW_r_state *state;
     467             :         struct tevent_req *subreq;
     468             : 
     469           0 :         req = tevent_req_create(mem_ctx, &state,
     470             :                                 struct dcerpc_frsapi_InfoW_r_state);
     471           0 :         if (req == NULL) {
     472           0 :                 return NULL;
     473             :         }
     474             : 
     475           0 :         state->out_mem_ctx = talloc_new(state);
     476           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     477           0 :                 return tevent_req_post(req, ev);
     478             :         }
     479             : 
     480           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     481             :                         NULL, &ndr_table_frsapi,
     482           0 :                         NDR_FRSAPI_INFOW, state->out_mem_ctx, r);
     483           0 :         if (tevent_req_nomem(subreq, req)) {
     484           0 :                 return tevent_req_post(req, ev);
     485             :         }
     486           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_InfoW_r_done, req);
     487             : 
     488           0 :         return req;
     489             : }
     490             : 
     491           0 : static void dcerpc_frsapi_InfoW_r_done(struct tevent_req *subreq)
     492             : {
     493           0 :         struct tevent_req *req =
     494           0 :                 tevent_req_callback_data(subreq,
     495             :                 struct tevent_req);
     496             :         NTSTATUS status;
     497             : 
     498           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     499           0 :         TALLOC_FREE(subreq);
     500           0 :         if (tevent_req_nterror(req, status)) {
     501           0 :                 return;
     502             :         }
     503             : 
     504           0 :         tevent_req_done(req);
     505             : }
     506             : 
     507           0 : NTSTATUS dcerpc_frsapi_InfoW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     508             : {
     509           0 :         struct dcerpc_frsapi_InfoW_r_state *state =
     510           0 :                 tevent_req_data(req,
     511             :                 struct dcerpc_frsapi_InfoW_r_state);
     512             :         NTSTATUS status;
     513             : 
     514           0 :         if (tevent_req_is_nterror(req, &status)) {
     515           0 :                 tevent_req_received(req);
     516           0 :                 return status;
     517             :         }
     518             : 
     519           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     520             : 
     521           0 :         tevent_req_received(req);
     522           0 :         return NT_STATUS_OK;
     523             : }
     524             : 
     525           0 : NTSTATUS dcerpc_frsapi_InfoW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct frsapi_InfoW *r)
     526             : {
     527             :         NTSTATUS status;
     528             : 
     529           0 :         status = dcerpc_binding_handle_call(h,
     530             :                         NULL, &ndr_table_frsapi,
     531             :                         NDR_FRSAPI_INFOW, mem_ctx, r);
     532             : 
     533           0 :         return status;
     534             : }
     535             : 
     536             : struct dcerpc_frsapi_InfoW_state {
     537             :         struct frsapi_InfoW orig;
     538             :         struct frsapi_InfoW tmp;
     539             :         TALLOC_CTX *out_mem_ctx;
     540             : };
     541             : 
     542             : static void dcerpc_frsapi_InfoW_done(struct tevent_req *subreq);
     543             : 
     544           0 : struct tevent_req *dcerpc_frsapi_InfoW_send(TALLOC_CTX *mem_ctx,
     545             :                                             struct tevent_context *ev,
     546             :                                             struct dcerpc_binding_handle *h,
     547             :                                             uint32_t _length /* [in] [range(0,0x10000)] */,
     548             :                                             struct frsapi_Info *_info /* [in,out] [unique] */)
     549             : {
     550             :         struct tevent_req *req;
     551             :         struct dcerpc_frsapi_InfoW_state *state;
     552             :         struct tevent_req *subreq;
     553             : 
     554           0 :         req = tevent_req_create(mem_ctx, &state,
     555             :                                 struct dcerpc_frsapi_InfoW_state);
     556           0 :         if (req == NULL) {
     557           0 :                 return NULL;
     558             :         }
     559           0 :         state->out_mem_ctx = NULL;
     560             : 
     561             :         /* In parameters */
     562           0 :         state->orig.in.length = _length;
     563           0 :         state->orig.in.info = _info;
     564             : 
     565             :         /* Out parameters */
     566           0 :         state->orig.out.info = _info;
     567             : 
     568             :         /* Result */
     569           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     570             : 
     571           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     572             :                              "dcerpc_frsapi_InfoW_out_memory");
     573           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     574           0 :                 return tevent_req_post(req, ev);
     575             :         }
     576             : 
     577             :         /* make a temporary copy, that we pass to the dispatch function */
     578           0 :         state->tmp = state->orig;
     579             : 
     580           0 :         subreq = dcerpc_frsapi_InfoW_r_send(state, ev, h, &state->tmp);
     581           0 :         if (tevent_req_nomem(subreq, req)) {
     582           0 :                 return tevent_req_post(req, ev);
     583             :         }
     584           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_InfoW_done, req);
     585           0 :         return req;
     586             : }
     587             : 
     588           0 : static void dcerpc_frsapi_InfoW_done(struct tevent_req *subreq)
     589             : {
     590           0 :         struct tevent_req *req = tevent_req_callback_data(
     591             :                 subreq, struct tevent_req);
     592           0 :         struct dcerpc_frsapi_InfoW_state *state = tevent_req_data(
     593             :                 req, struct dcerpc_frsapi_InfoW_state);
     594             :         NTSTATUS status;
     595             :         TALLOC_CTX *mem_ctx;
     596             : 
     597           0 :         if (state->out_mem_ctx) {
     598           0 :                 mem_ctx = state->out_mem_ctx;
     599             :         } else {
     600           0 :                 mem_ctx = state;
     601             :         }
     602             : 
     603           0 :         status = dcerpc_frsapi_InfoW_r_recv(subreq, mem_ctx);
     604           0 :         TALLOC_FREE(subreq);
     605           0 :         if (tevent_req_nterror(req, status)) {
     606           0 :                 return;
     607             :         }
     608             : 
     609             :         /* Copy out parameters */
     610           0 :         if (state->orig.out.info && state->tmp.out.info) {
     611           0 :                 *state->orig.out.info = *state->tmp.out.info;
     612             :         }
     613             : 
     614             :         /* Copy result */
     615           0 :         state->orig.out.result = state->tmp.out.result;
     616             : 
     617             :         /* Reset temporary structure */
     618           0 :         NDR_ZERO_STRUCT(state->tmp);
     619             : 
     620           0 :         tevent_req_done(req);
     621             : }
     622             : 
     623           0 : NTSTATUS dcerpc_frsapi_InfoW_recv(struct tevent_req *req,
     624             :                                   TALLOC_CTX *mem_ctx,
     625             :                                   WERROR *result)
     626             : {
     627           0 :         struct dcerpc_frsapi_InfoW_state *state = tevent_req_data(
     628             :                 req, struct dcerpc_frsapi_InfoW_state);
     629             :         NTSTATUS status;
     630             : 
     631           0 :         if (tevent_req_is_nterror(req, &status)) {
     632           0 :                 tevent_req_received(req);
     633           0 :                 return status;
     634             :         }
     635             : 
     636             :         /* Steal possible out parameters to the callers context */
     637           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     638             : 
     639             :         /* Return result */
     640           0 :         *result = state->orig.out.result;
     641             : 
     642           0 :         tevent_req_received(req);
     643           0 :         return NT_STATUS_OK;
     644             : }
     645             : 
     646           0 : NTSTATUS dcerpc_frsapi_InfoW(struct dcerpc_binding_handle *h,
     647             :                              TALLOC_CTX *mem_ctx,
     648             :                              uint32_t _length /* [in] [range(0,0x10000)] */,
     649             :                              struct frsapi_Info *_info /* [in,out] [unique] */,
     650             :                              WERROR *result)
     651             : {
     652             :         struct frsapi_InfoW r;
     653             :         NTSTATUS status;
     654             : 
     655             :         /* In parameters */
     656           0 :         r.in.length = _length;
     657           0 :         r.in.info = _info;
     658             : 
     659             :         /* Out parameters */
     660           0 :         r.out.info = _info;
     661             : 
     662             :         /* Result */
     663           0 :         NDR_ZERO_STRUCT(r.out.result);
     664             : 
     665           0 :         status = dcerpc_frsapi_InfoW_r(h, mem_ctx, &r);
     666           0 :         if (!NT_STATUS_IS_OK(status)) {
     667           0 :                 return status;
     668             :         }
     669             : 
     670             :         /* Return variables */
     671           0 :         if (_info && r.out.info) {
     672           0 :                 *_info = *r.out.info;
     673             :         }
     674             : 
     675             :         /* Return result */
     676           0 :         *result = r.out.result;
     677             : 
     678           0 :         return NT_STATUS_OK;
     679             : }
     680             : 
     681             : struct dcerpc_frsapi_IsPathReplicated_r_state {
     682             :         TALLOC_CTX *out_mem_ctx;
     683             : };
     684             : 
     685             : static void dcerpc_frsapi_IsPathReplicated_r_done(struct tevent_req *subreq);
     686             : 
     687           0 : struct tevent_req *dcerpc_frsapi_IsPathReplicated_r_send(TALLOC_CTX *mem_ctx,
     688             :         struct tevent_context *ev,
     689             :         struct dcerpc_binding_handle *h,
     690             :         struct frsapi_IsPathReplicated *r)
     691             : {
     692             :         struct tevent_req *req;
     693             :         struct dcerpc_frsapi_IsPathReplicated_r_state *state;
     694             :         struct tevent_req *subreq;
     695             : 
     696           0 :         req = tevent_req_create(mem_ctx, &state,
     697             :                                 struct dcerpc_frsapi_IsPathReplicated_r_state);
     698           0 :         if (req == NULL) {
     699           0 :                 return NULL;
     700             :         }
     701             : 
     702           0 :         state->out_mem_ctx = talloc_new(state);
     703           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     704           0 :                 return tevent_req_post(req, ev);
     705             :         }
     706             : 
     707           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     708             :                         NULL, &ndr_table_frsapi,
     709           0 :                         NDR_FRSAPI_ISPATHREPLICATED, state->out_mem_ctx, r);
     710           0 :         if (tevent_req_nomem(subreq, req)) {
     711           0 :                 return tevent_req_post(req, ev);
     712             :         }
     713           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_IsPathReplicated_r_done, req);
     714             : 
     715           0 :         return req;
     716             : }
     717             : 
     718           0 : static void dcerpc_frsapi_IsPathReplicated_r_done(struct tevent_req *subreq)
     719             : {
     720           0 :         struct tevent_req *req =
     721           0 :                 tevent_req_callback_data(subreq,
     722             :                 struct tevent_req);
     723             :         NTSTATUS status;
     724             : 
     725           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     726           0 :         TALLOC_FREE(subreq);
     727           0 :         if (tevent_req_nterror(req, status)) {
     728           0 :                 return;
     729             :         }
     730             : 
     731           0 :         tevent_req_done(req);
     732             : }
     733             : 
     734           0 : NTSTATUS dcerpc_frsapi_IsPathReplicated_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     735             : {
     736           0 :         struct dcerpc_frsapi_IsPathReplicated_r_state *state =
     737           0 :                 tevent_req_data(req,
     738             :                 struct dcerpc_frsapi_IsPathReplicated_r_state);
     739             :         NTSTATUS status;
     740             : 
     741           0 :         if (tevent_req_is_nterror(req, &status)) {
     742           0 :                 tevent_req_received(req);
     743           0 :                 return status;
     744             :         }
     745             : 
     746           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     747             : 
     748           0 :         tevent_req_received(req);
     749           0 :         return NT_STATUS_OK;
     750             : }
     751             : 
     752           0 : NTSTATUS dcerpc_frsapi_IsPathReplicated_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct frsapi_IsPathReplicated *r)
     753             : {
     754             :         NTSTATUS status;
     755             : 
     756           0 :         status = dcerpc_binding_handle_call(h,
     757             :                         NULL, &ndr_table_frsapi,
     758             :                         NDR_FRSAPI_ISPATHREPLICATED, mem_ctx, r);
     759             : 
     760           0 :         return status;
     761             : }
     762             : 
     763             : struct dcerpc_frsapi_IsPathReplicated_state {
     764             :         struct frsapi_IsPathReplicated orig;
     765             :         struct frsapi_IsPathReplicated tmp;
     766             :         TALLOC_CTX *out_mem_ctx;
     767             : };
     768             : 
     769             : static void dcerpc_frsapi_IsPathReplicated_done(struct tevent_req *subreq);
     770             : 
     771           0 : struct tevent_req *dcerpc_frsapi_IsPathReplicated_send(TALLOC_CTX *mem_ctx,
     772             :                                                        struct tevent_context *ev,
     773             :                                                        struct dcerpc_binding_handle *h,
     774             :                                                        const char *_path /* [in] [charset(UTF16),unique] */,
     775             :                                                        enum frsapi_ReplicaSetType _replica_set_type /* [in]  */,
     776             :                                                        uint32_t *_replicated /* [out] [ref] */,
     777             :                                                        uint32_t *_primary /* [out] [ref] */,
     778             :                                                        uint32_t *_root /* [out] [ref] */,
     779             :                                                        struct GUID *_replica_set_guid /* [out] [ref] */)
     780             : {
     781             :         struct tevent_req *req;
     782             :         struct dcerpc_frsapi_IsPathReplicated_state *state;
     783             :         struct tevent_req *subreq;
     784             : 
     785           0 :         req = tevent_req_create(mem_ctx, &state,
     786             :                                 struct dcerpc_frsapi_IsPathReplicated_state);
     787           0 :         if (req == NULL) {
     788           0 :                 return NULL;
     789             :         }
     790           0 :         state->out_mem_ctx = NULL;
     791             : 
     792             :         /* In parameters */
     793           0 :         state->orig.in.path = _path;
     794           0 :         state->orig.in.replica_set_type = _replica_set_type;
     795             : 
     796             :         /* Out parameters */
     797           0 :         state->orig.out.replicated = _replicated;
     798           0 :         state->orig.out.primary = _primary;
     799           0 :         state->orig.out.root = _root;
     800           0 :         state->orig.out.replica_set_guid = _replica_set_guid;
     801             : 
     802             :         /* Result */
     803           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     804             : 
     805           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     806             :                              "dcerpc_frsapi_IsPathReplicated_out_memory");
     807           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     808           0 :                 return tevent_req_post(req, ev);
     809             :         }
     810             : 
     811             :         /* make a temporary copy, that we pass to the dispatch function */
     812           0 :         state->tmp = state->orig;
     813             : 
     814           0 :         subreq = dcerpc_frsapi_IsPathReplicated_r_send(state, ev, h, &state->tmp);
     815           0 :         if (tevent_req_nomem(subreq, req)) {
     816           0 :                 return tevent_req_post(req, ev);
     817             :         }
     818           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_IsPathReplicated_done, req);
     819           0 :         return req;
     820             : }
     821             : 
     822           0 : static void dcerpc_frsapi_IsPathReplicated_done(struct tevent_req *subreq)
     823             : {
     824           0 :         struct tevent_req *req = tevent_req_callback_data(
     825             :                 subreq, struct tevent_req);
     826           0 :         struct dcerpc_frsapi_IsPathReplicated_state *state = tevent_req_data(
     827             :                 req, struct dcerpc_frsapi_IsPathReplicated_state);
     828             :         NTSTATUS status;
     829             :         TALLOC_CTX *mem_ctx;
     830             : 
     831           0 :         if (state->out_mem_ctx) {
     832           0 :                 mem_ctx = state->out_mem_ctx;
     833             :         } else {
     834           0 :                 mem_ctx = state;
     835             :         }
     836             : 
     837           0 :         status = dcerpc_frsapi_IsPathReplicated_r_recv(subreq, mem_ctx);
     838           0 :         TALLOC_FREE(subreq);
     839           0 :         if (tevent_req_nterror(req, status)) {
     840           0 :                 return;
     841             :         }
     842             : 
     843             :         /* Copy out parameters */
     844           0 :         *state->orig.out.replicated = *state->tmp.out.replicated;
     845           0 :         *state->orig.out.primary = *state->tmp.out.primary;
     846           0 :         *state->orig.out.root = *state->tmp.out.root;
     847           0 :         *state->orig.out.replica_set_guid = *state->tmp.out.replica_set_guid;
     848             : 
     849             :         /* Copy result */
     850           0 :         state->orig.out.result = state->tmp.out.result;
     851             : 
     852             :         /* Reset temporary structure */
     853           0 :         NDR_ZERO_STRUCT(state->tmp);
     854             : 
     855           0 :         tevent_req_done(req);
     856             : }
     857             : 
     858           0 : NTSTATUS dcerpc_frsapi_IsPathReplicated_recv(struct tevent_req *req,
     859             :                                              TALLOC_CTX *mem_ctx,
     860             :                                              WERROR *result)
     861             : {
     862           0 :         struct dcerpc_frsapi_IsPathReplicated_state *state = tevent_req_data(
     863             :                 req, struct dcerpc_frsapi_IsPathReplicated_state);
     864             :         NTSTATUS status;
     865             : 
     866           0 :         if (tevent_req_is_nterror(req, &status)) {
     867           0 :                 tevent_req_received(req);
     868           0 :                 return status;
     869             :         }
     870             : 
     871             :         /* Steal possible out parameters to the callers context */
     872           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     873             : 
     874             :         /* Return result */
     875           0 :         *result = state->orig.out.result;
     876             : 
     877           0 :         tevent_req_received(req);
     878           0 :         return NT_STATUS_OK;
     879             : }
     880             : 
     881           0 : NTSTATUS dcerpc_frsapi_IsPathReplicated(struct dcerpc_binding_handle *h,
     882             :                                         TALLOC_CTX *mem_ctx,
     883             :                                         const char *_path /* [in] [charset(UTF16),unique] */,
     884             :                                         enum frsapi_ReplicaSetType _replica_set_type /* [in]  */,
     885             :                                         uint32_t *_replicated /* [out] [ref] */,
     886             :                                         uint32_t *_primary /* [out] [ref] */,
     887             :                                         uint32_t *_root /* [out] [ref] */,
     888             :                                         struct GUID *_replica_set_guid /* [out] [ref] */,
     889             :                                         WERROR *result)
     890             : {
     891             :         struct frsapi_IsPathReplicated r;
     892             :         NTSTATUS status;
     893             : 
     894             :         /* In parameters */
     895           0 :         r.in.path = _path;
     896           0 :         r.in.replica_set_type = _replica_set_type;
     897             : 
     898             :         /* Out parameters */
     899           0 :         r.out.replicated = _replicated;
     900           0 :         r.out.primary = _primary;
     901           0 :         r.out.root = _root;
     902           0 :         r.out.replica_set_guid = _replica_set_guid;
     903             : 
     904             :         /* Result */
     905           0 :         NDR_ZERO_STRUCT(r.out.result);
     906             : 
     907           0 :         status = dcerpc_frsapi_IsPathReplicated_r(h, mem_ctx, &r);
     908           0 :         if (!NT_STATUS_IS_OK(status)) {
     909           0 :                 return status;
     910             :         }
     911             : 
     912             :         /* Return variables */
     913           0 :         *_replicated = *r.out.replicated;
     914           0 :         *_primary = *r.out.primary;
     915           0 :         *_root = *r.out.root;
     916           0 :         *_replica_set_guid = *r.out.replica_set_guid;
     917             : 
     918             :         /* Return result */
     919           0 :         *result = r.out.result;
     920             : 
     921           0 :         return NT_STATUS_OK;
     922             : }
     923             : 
     924             : struct dcerpc_frsapi_WriterCommand_r_state {
     925             :         TALLOC_CTX *out_mem_ctx;
     926             : };
     927             : 
     928             : static void dcerpc_frsapi_WriterCommand_r_done(struct tevent_req *subreq);
     929             : 
     930           0 : struct tevent_req *dcerpc_frsapi_WriterCommand_r_send(TALLOC_CTX *mem_ctx,
     931             :         struct tevent_context *ev,
     932             :         struct dcerpc_binding_handle *h,
     933             :         struct frsapi_WriterCommand *r)
     934             : {
     935             :         struct tevent_req *req;
     936             :         struct dcerpc_frsapi_WriterCommand_r_state *state;
     937             :         struct tevent_req *subreq;
     938             : 
     939           0 :         req = tevent_req_create(mem_ctx, &state,
     940             :                                 struct dcerpc_frsapi_WriterCommand_r_state);
     941           0 :         if (req == NULL) {
     942           0 :                 return NULL;
     943             :         }
     944             : 
     945           0 :         state->out_mem_ctx = NULL;
     946             : 
     947           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     948             :                         NULL, &ndr_table_frsapi,
     949             :                         NDR_FRSAPI_WRITERCOMMAND, state, r);
     950           0 :         if (tevent_req_nomem(subreq, req)) {
     951           0 :                 return tevent_req_post(req, ev);
     952             :         }
     953           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_WriterCommand_r_done, req);
     954             : 
     955           0 :         return req;
     956             : }
     957             : 
     958           0 : static void dcerpc_frsapi_WriterCommand_r_done(struct tevent_req *subreq)
     959             : {
     960           0 :         struct tevent_req *req =
     961           0 :                 tevent_req_callback_data(subreq,
     962             :                 struct tevent_req);
     963             :         NTSTATUS status;
     964             : 
     965           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     966           0 :         TALLOC_FREE(subreq);
     967           0 :         if (tevent_req_nterror(req, status)) {
     968           0 :                 return;
     969             :         }
     970             : 
     971           0 :         tevent_req_done(req);
     972             : }
     973             : 
     974           0 : NTSTATUS dcerpc_frsapi_WriterCommand_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     975             : {
     976           0 :         struct dcerpc_frsapi_WriterCommand_r_state *state =
     977           0 :                 tevent_req_data(req,
     978             :                 struct dcerpc_frsapi_WriterCommand_r_state);
     979             :         NTSTATUS status;
     980             : 
     981           0 :         if (tevent_req_is_nterror(req, &status)) {
     982           0 :                 tevent_req_received(req);
     983           0 :                 return status;
     984             :         }
     985             : 
     986           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     987             : 
     988           0 :         tevent_req_received(req);
     989           0 :         return NT_STATUS_OK;
     990             : }
     991             : 
     992           0 : NTSTATUS dcerpc_frsapi_WriterCommand_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct frsapi_WriterCommand *r)
     993             : {
     994             :         NTSTATUS status;
     995             : 
     996           0 :         status = dcerpc_binding_handle_call(h,
     997             :                         NULL, &ndr_table_frsapi,
     998             :                         NDR_FRSAPI_WRITERCOMMAND, mem_ctx, r);
     999             : 
    1000           0 :         return status;
    1001             : }
    1002             : 
    1003             : struct dcerpc_frsapi_WriterCommand_state {
    1004             :         struct frsapi_WriterCommand orig;
    1005             :         struct frsapi_WriterCommand tmp;
    1006             :         TALLOC_CTX *out_mem_ctx;
    1007             : };
    1008             : 
    1009             : static void dcerpc_frsapi_WriterCommand_done(struct tevent_req *subreq);
    1010             : 
    1011           0 : struct tevent_req *dcerpc_frsapi_WriterCommand_send(TALLOC_CTX *mem_ctx,
    1012             :                                                     struct tevent_context *ev,
    1013             :                                                     struct dcerpc_binding_handle *h,
    1014             :                                                     enum frsapi_WriterCommandsValues _command /* [in]  */)
    1015             : {
    1016             :         struct tevent_req *req;
    1017             :         struct dcerpc_frsapi_WriterCommand_state *state;
    1018             :         struct tevent_req *subreq;
    1019             : 
    1020           0 :         req = tevent_req_create(mem_ctx, &state,
    1021             :                                 struct dcerpc_frsapi_WriterCommand_state);
    1022           0 :         if (req == NULL) {
    1023           0 :                 return NULL;
    1024             :         }
    1025           0 :         state->out_mem_ctx = NULL;
    1026             : 
    1027             :         /* In parameters */
    1028           0 :         state->orig.in.command = _command;
    1029             : 
    1030             :         /* Out parameters */
    1031             : 
    1032             :         /* Result */
    1033           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1034             : 
    1035             :         /* make a temporary copy, that we pass to the dispatch function */
    1036           0 :         state->tmp = state->orig;
    1037             : 
    1038           0 :         subreq = dcerpc_frsapi_WriterCommand_r_send(state, ev, h, &state->tmp);
    1039           0 :         if (tevent_req_nomem(subreq, req)) {
    1040           0 :                 return tevent_req_post(req, ev);
    1041             :         }
    1042           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_WriterCommand_done, req);
    1043           0 :         return req;
    1044             : }
    1045             : 
    1046           0 : static void dcerpc_frsapi_WriterCommand_done(struct tevent_req *subreq)
    1047             : {
    1048           0 :         struct tevent_req *req = tevent_req_callback_data(
    1049             :                 subreq, struct tevent_req);
    1050           0 :         struct dcerpc_frsapi_WriterCommand_state *state = tevent_req_data(
    1051             :                 req, struct dcerpc_frsapi_WriterCommand_state);
    1052             :         NTSTATUS status;
    1053             :         TALLOC_CTX *mem_ctx;
    1054             : 
    1055           0 :         if (state->out_mem_ctx) {
    1056           0 :                 mem_ctx = state->out_mem_ctx;
    1057             :         } else {
    1058           0 :                 mem_ctx = state;
    1059             :         }
    1060             : 
    1061           0 :         status = dcerpc_frsapi_WriterCommand_r_recv(subreq, mem_ctx);
    1062           0 :         TALLOC_FREE(subreq);
    1063           0 :         if (tevent_req_nterror(req, status)) {
    1064           0 :                 return;
    1065             :         }
    1066             : 
    1067             :         /* Copy out parameters */
    1068             : 
    1069             :         /* Copy result */
    1070           0 :         state->orig.out.result = state->tmp.out.result;
    1071             : 
    1072             :         /* Reset temporary structure */
    1073           0 :         NDR_ZERO_STRUCT(state->tmp);
    1074             : 
    1075           0 :         tevent_req_done(req);
    1076             : }
    1077             : 
    1078           0 : NTSTATUS dcerpc_frsapi_WriterCommand_recv(struct tevent_req *req,
    1079             :                                           TALLOC_CTX *mem_ctx,
    1080             :                                           WERROR *result)
    1081             : {
    1082           0 :         struct dcerpc_frsapi_WriterCommand_state *state = tevent_req_data(
    1083             :                 req, struct dcerpc_frsapi_WriterCommand_state);
    1084             :         NTSTATUS status;
    1085             : 
    1086           0 :         if (tevent_req_is_nterror(req, &status)) {
    1087           0 :                 tevent_req_received(req);
    1088           0 :                 return status;
    1089             :         }
    1090             : 
    1091             :         /* Steal possible out parameters to the callers context */
    1092           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1093             : 
    1094             :         /* Return result */
    1095           0 :         *result = state->orig.out.result;
    1096             : 
    1097           0 :         tevent_req_received(req);
    1098           0 :         return NT_STATUS_OK;
    1099             : }
    1100             : 
    1101           0 : NTSTATUS dcerpc_frsapi_WriterCommand(struct dcerpc_binding_handle *h,
    1102             :                                      TALLOC_CTX *mem_ctx,
    1103             :                                      enum frsapi_WriterCommandsValues _command /* [in]  */,
    1104             :                                      WERROR *result)
    1105             : {
    1106             :         struct frsapi_WriterCommand r;
    1107             :         NTSTATUS status;
    1108             : 
    1109             :         /* In parameters */
    1110           0 :         r.in.command = _command;
    1111             : 
    1112             :         /* Out parameters */
    1113             : 
    1114             :         /* Result */
    1115           0 :         NDR_ZERO_STRUCT(r.out.result);
    1116             : 
    1117           0 :         status = dcerpc_frsapi_WriterCommand_r(h, mem_ctx, &r);
    1118           0 :         if (!NT_STATUS_IS_OK(status)) {
    1119           0 :                 return status;
    1120             :         }
    1121             : 
    1122             :         /* Return variables */
    1123             : 
    1124             :         /* Return result */
    1125           0 :         *result = r.out.result;
    1126             : 
    1127           0 :         return NT_STATUS_OK;
    1128             : }
    1129             : 
    1130             : struct dcerpc_frsapi_ForceReplication_r_state {
    1131             :         TALLOC_CTX *out_mem_ctx;
    1132             : };
    1133             : 
    1134             : static void dcerpc_frsapi_ForceReplication_r_done(struct tevent_req *subreq);
    1135             : 
    1136           0 : struct tevent_req *dcerpc_frsapi_ForceReplication_r_send(TALLOC_CTX *mem_ctx,
    1137             :         struct tevent_context *ev,
    1138             :         struct dcerpc_binding_handle *h,
    1139             :         struct frsapi_ForceReplication *r)
    1140             : {
    1141             :         struct tevent_req *req;
    1142             :         struct dcerpc_frsapi_ForceReplication_r_state *state;
    1143             :         struct tevent_req *subreq;
    1144             : 
    1145           0 :         req = tevent_req_create(mem_ctx, &state,
    1146             :                                 struct dcerpc_frsapi_ForceReplication_r_state);
    1147           0 :         if (req == NULL) {
    1148           0 :                 return NULL;
    1149             :         }
    1150             : 
    1151           0 :         state->out_mem_ctx = NULL;
    1152             : 
    1153           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1154             :                         NULL, &ndr_table_frsapi,
    1155             :                         NDR_FRSAPI_FORCEREPLICATION, state, r);
    1156           0 :         if (tevent_req_nomem(subreq, req)) {
    1157           0 :                 return tevent_req_post(req, ev);
    1158             :         }
    1159           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_ForceReplication_r_done, req);
    1160             : 
    1161           0 :         return req;
    1162             : }
    1163             : 
    1164           0 : static void dcerpc_frsapi_ForceReplication_r_done(struct tevent_req *subreq)
    1165             : {
    1166           0 :         struct tevent_req *req =
    1167           0 :                 tevent_req_callback_data(subreq,
    1168             :                 struct tevent_req);
    1169             :         NTSTATUS status;
    1170             : 
    1171           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1172           0 :         TALLOC_FREE(subreq);
    1173           0 :         if (tevent_req_nterror(req, status)) {
    1174           0 :                 return;
    1175             :         }
    1176             : 
    1177           0 :         tevent_req_done(req);
    1178             : }
    1179             : 
    1180           0 : NTSTATUS dcerpc_frsapi_ForceReplication_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1181             : {
    1182           0 :         struct dcerpc_frsapi_ForceReplication_r_state *state =
    1183           0 :                 tevent_req_data(req,
    1184             :                 struct dcerpc_frsapi_ForceReplication_r_state);
    1185             :         NTSTATUS status;
    1186             : 
    1187           0 :         if (tevent_req_is_nterror(req, &status)) {
    1188           0 :                 tevent_req_received(req);
    1189           0 :                 return status;
    1190             :         }
    1191             : 
    1192           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1193             : 
    1194           0 :         tevent_req_received(req);
    1195           0 :         return NT_STATUS_OK;
    1196             : }
    1197             : 
    1198           0 : NTSTATUS dcerpc_frsapi_ForceReplication_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct frsapi_ForceReplication *r)
    1199             : {
    1200             :         NTSTATUS status;
    1201             : 
    1202           0 :         status = dcerpc_binding_handle_call(h,
    1203             :                         NULL, &ndr_table_frsapi,
    1204             :                         NDR_FRSAPI_FORCEREPLICATION, mem_ctx, r);
    1205             : 
    1206           0 :         return status;
    1207             : }
    1208             : 
    1209             : struct dcerpc_frsapi_ForceReplication_state {
    1210             :         struct frsapi_ForceReplication orig;
    1211             :         struct frsapi_ForceReplication tmp;
    1212             :         TALLOC_CTX *out_mem_ctx;
    1213             : };
    1214             : 
    1215             : static void dcerpc_frsapi_ForceReplication_done(struct tevent_req *subreq);
    1216             : 
    1217           0 : struct tevent_req *dcerpc_frsapi_ForceReplication_send(TALLOC_CTX *mem_ctx,
    1218             :                                                        struct tevent_context *ev,
    1219             :                                                        struct dcerpc_binding_handle *h,
    1220             :                                                        struct GUID *_replica_set_guid /* [in] [unique] */,
    1221             :                                                        struct GUID *_connection_guid /* [in] [unique] */,
    1222             :                                                        const char *_replica_set_name /* [in] [charset(UTF16),unique] */,
    1223             :                                                        const char *_partner_dns_name /* [in] [charset(UTF16),unique] */)
    1224             : {
    1225             :         struct tevent_req *req;
    1226             :         struct dcerpc_frsapi_ForceReplication_state *state;
    1227             :         struct tevent_req *subreq;
    1228             : 
    1229           0 :         req = tevent_req_create(mem_ctx, &state,
    1230             :                                 struct dcerpc_frsapi_ForceReplication_state);
    1231           0 :         if (req == NULL) {
    1232           0 :                 return NULL;
    1233             :         }
    1234           0 :         state->out_mem_ctx = NULL;
    1235             : 
    1236             :         /* In parameters */
    1237           0 :         state->orig.in.replica_set_guid = _replica_set_guid;
    1238           0 :         state->orig.in.connection_guid = _connection_guid;
    1239           0 :         state->orig.in.replica_set_name = _replica_set_name;
    1240           0 :         state->orig.in.partner_dns_name = _partner_dns_name;
    1241             : 
    1242             :         /* Out parameters */
    1243             : 
    1244             :         /* Result */
    1245           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1246             : 
    1247             :         /* make a temporary copy, that we pass to the dispatch function */
    1248           0 :         state->tmp = state->orig;
    1249             : 
    1250           0 :         subreq = dcerpc_frsapi_ForceReplication_r_send(state, ev, h, &state->tmp);
    1251           0 :         if (tevent_req_nomem(subreq, req)) {
    1252           0 :                 return tevent_req_post(req, ev);
    1253             :         }
    1254           0 :         tevent_req_set_callback(subreq, dcerpc_frsapi_ForceReplication_done, req);
    1255           0 :         return req;
    1256             : }
    1257             : 
    1258           0 : static void dcerpc_frsapi_ForceReplication_done(struct tevent_req *subreq)
    1259             : {
    1260           0 :         struct tevent_req *req = tevent_req_callback_data(
    1261             :                 subreq, struct tevent_req);
    1262           0 :         struct dcerpc_frsapi_ForceReplication_state *state = tevent_req_data(
    1263             :                 req, struct dcerpc_frsapi_ForceReplication_state);
    1264             :         NTSTATUS status;
    1265             :         TALLOC_CTX *mem_ctx;
    1266             : 
    1267           0 :         if (state->out_mem_ctx) {
    1268           0 :                 mem_ctx = state->out_mem_ctx;
    1269             :         } else {
    1270           0 :                 mem_ctx = state;
    1271             :         }
    1272             : 
    1273           0 :         status = dcerpc_frsapi_ForceReplication_r_recv(subreq, mem_ctx);
    1274           0 :         TALLOC_FREE(subreq);
    1275           0 :         if (tevent_req_nterror(req, status)) {
    1276           0 :                 return;
    1277             :         }
    1278             : 
    1279             :         /* Copy out parameters */
    1280             : 
    1281             :         /* Copy result */
    1282           0 :         state->orig.out.result = state->tmp.out.result;
    1283             : 
    1284             :         /* Reset temporary structure */
    1285           0 :         NDR_ZERO_STRUCT(state->tmp);
    1286             : 
    1287           0 :         tevent_req_done(req);
    1288             : }
    1289             : 
    1290           0 : NTSTATUS dcerpc_frsapi_ForceReplication_recv(struct tevent_req *req,
    1291             :                                              TALLOC_CTX *mem_ctx,
    1292             :                                              WERROR *result)
    1293             : {
    1294           0 :         struct dcerpc_frsapi_ForceReplication_state *state = tevent_req_data(
    1295             :                 req, struct dcerpc_frsapi_ForceReplication_state);
    1296             :         NTSTATUS status;
    1297             : 
    1298           0 :         if (tevent_req_is_nterror(req, &status)) {
    1299           0 :                 tevent_req_received(req);
    1300           0 :                 return status;
    1301             :         }
    1302             : 
    1303             :         /* Steal possible out parameters to the callers context */
    1304           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1305             : 
    1306             :         /* Return result */
    1307           0 :         *result = state->orig.out.result;
    1308             : 
    1309           0 :         tevent_req_received(req);
    1310           0 :         return NT_STATUS_OK;
    1311             : }
    1312             : 
    1313           0 : NTSTATUS dcerpc_frsapi_ForceReplication(struct dcerpc_binding_handle *h,
    1314             :                                         TALLOC_CTX *mem_ctx,
    1315             :                                         struct GUID *_replica_set_guid /* [in] [unique] */,
    1316             :                                         struct GUID *_connection_guid /* [in] [unique] */,
    1317             :                                         const char *_replica_set_name /* [in] [charset(UTF16),unique] */,
    1318             :                                         const char *_partner_dns_name /* [in] [charset(UTF16),unique] */,
    1319             :                                         WERROR *result)
    1320             : {
    1321             :         struct frsapi_ForceReplication r;
    1322             :         NTSTATUS status;
    1323             : 
    1324             :         /* In parameters */
    1325           0 :         r.in.replica_set_guid = _replica_set_guid;
    1326           0 :         r.in.connection_guid = _connection_guid;
    1327           0 :         r.in.replica_set_name = _replica_set_name;
    1328           0 :         r.in.partner_dns_name = _partner_dns_name;
    1329             : 
    1330             :         /* Out parameters */
    1331             : 
    1332             :         /* Result */
    1333           0 :         NDR_ZERO_STRUCT(r.out.result);
    1334             : 
    1335           0 :         status = dcerpc_frsapi_ForceReplication_r(h, mem_ctx, &r);
    1336           0 :         if (!NT_STATUS_IS_OK(status)) {
    1337           0 :                 return status;
    1338             :         }
    1339             : 
    1340             :         /* Return variables */
    1341             : 
    1342             :         /* Return result */
    1343           0 :         *result = r.out.result;
    1344             : 
    1345           0 :         return NT_STATUS_OK;
    1346             : }
    1347             : 

Generated by: LCOV version 1.13