LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_fsrvp_c.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 33 1221 2.7 %
Date: 2024-04-21 15:09:00 Functions: 11 104 10.6 %

          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_fsrvp.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_fsrvp_c.h"
       8             : 
       9             : /* FileServerVssAgent - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_fss_GetSupportedVersion_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_fss_GetSupportedVersion_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_fss_GetSupportedVersion_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct fss_GetSupportedVersion *r)
      21             : {
      22           0 :         struct tevent_req *req;
      23           0 :         struct dcerpc_fss_GetSupportedVersion_r_state *state;
      24           0 :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_fss_GetSupportedVersion_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_FileServerVssAgent,
      39           0 :                         NDR_FSS_GETSUPPORTEDVERSION, 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_fss_GetSupportedVersion_r_done, req);
      44             : 
      45           0 :         return req;
      46             : }
      47             : 
      48           0 : static void dcerpc_fss_GetSupportedVersion_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           0 :         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_fss_GetSupportedVersion_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_fss_GetSupportedVersion_r_state *state =
      67           0 :                 tevent_req_data(req,
      68             :                 struct dcerpc_fss_GetSupportedVersion_r_state);
      69           0 :         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          28 : NTSTATUS dcerpc_fss_GetSupportedVersion_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_GetSupportedVersion *r)
      83             : {
      84           0 :         NTSTATUS status;
      85             : 
      86          28 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_FileServerVssAgent,
      88             :                         NDR_FSS_GETSUPPORTEDVERSION, mem_ctx, r);
      89             : 
      90          28 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_fss_GetSupportedVersion_state {
      94             :         struct fss_GetSupportedVersion orig;
      95             :         struct fss_GetSupportedVersion tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_fss_GetSupportedVersion_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_fss_GetSupportedVersion_send(TALLOC_CTX *mem_ctx,
     102             :                                                        struct tevent_context *ev,
     103             :                                                        struct dcerpc_binding_handle *h,
     104             :                                                        uint32_t *_MinVersion /* [out] [ref] */,
     105             :                                                        uint32_t *_MaxVersion /* [out] [ref] */)
     106             : {
     107           0 :         struct tevent_req *req;
     108           0 :         struct dcerpc_fss_GetSupportedVersion_state *state;
     109           0 :         struct tevent_req *subreq;
     110             : 
     111           0 :         req = tevent_req_create(mem_ctx, &state,
     112             :                                 struct dcerpc_fss_GetSupportedVersion_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.MinVersion = _MinVersion;
     122           0 :         state->orig.out.MaxVersion = _MaxVersion;
     123             : 
     124             :         /* Result */
     125           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     126             : 
     127           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     128             :                              "dcerpc_fss_GetSupportedVersion_out_memory");
     129           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     130           0 :                 return tevent_req_post(req, ev);
     131             :         }
     132             : 
     133             :         /* make a temporary copy, that we pass to the dispatch function */
     134           0 :         state->tmp = state->orig;
     135             : 
     136           0 :         subreq = dcerpc_fss_GetSupportedVersion_r_send(state, ev, h, &state->tmp);
     137           0 :         if (tevent_req_nomem(subreq, req)) {
     138           0 :                 return tevent_req_post(req, ev);
     139             :         }
     140           0 :         tevent_req_set_callback(subreq, dcerpc_fss_GetSupportedVersion_done, req);
     141           0 :         return req;
     142             : }
     143             : 
     144           0 : static void dcerpc_fss_GetSupportedVersion_done(struct tevent_req *subreq)
     145             : {
     146           0 :         struct tevent_req *req = tevent_req_callback_data(
     147             :                 subreq, struct tevent_req);
     148           0 :         struct dcerpc_fss_GetSupportedVersion_state *state = tevent_req_data(
     149             :                 req, struct dcerpc_fss_GetSupportedVersion_state);
     150           0 :         NTSTATUS status;
     151           0 :         TALLOC_CTX *mem_ctx;
     152             : 
     153           0 :         if (state->out_mem_ctx) {
     154           0 :                 mem_ctx = state->out_mem_ctx;
     155             :         } else {
     156           0 :                 mem_ctx = state;
     157             :         }
     158             : 
     159           0 :         status = dcerpc_fss_GetSupportedVersion_r_recv(subreq, mem_ctx);
     160           0 :         TALLOC_FREE(subreq);
     161           0 :         if (tevent_req_nterror(req, status)) {
     162           0 :                 return;
     163             :         }
     164             : 
     165             :         /* Copy out parameters */
     166           0 :         *state->orig.out.MinVersion = *state->tmp.out.MinVersion;
     167           0 :         *state->orig.out.MaxVersion = *state->tmp.out.MaxVersion;
     168             : 
     169             :         /* Copy result */
     170           0 :         state->orig.out.result = state->tmp.out.result;
     171             : 
     172             :         /* Reset temporary structure */
     173           0 :         NDR_ZERO_STRUCT(state->tmp);
     174             : 
     175           0 :         tevent_req_done(req);
     176             : }
     177             : 
     178           0 : NTSTATUS dcerpc_fss_GetSupportedVersion_recv(struct tevent_req *req,
     179             :                                              TALLOC_CTX *mem_ctx,
     180             :                                              uint32_t *result)
     181             : {
     182           0 :         struct dcerpc_fss_GetSupportedVersion_state *state = tevent_req_data(
     183             :                 req, struct dcerpc_fss_GetSupportedVersion_state);
     184           0 :         NTSTATUS status;
     185             : 
     186           0 :         if (tevent_req_is_nterror(req, &status)) {
     187           0 :                 tevent_req_received(req);
     188           0 :                 return status;
     189             :         }
     190             : 
     191             :         /* Steal possible out parameters to the callers context */
     192           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     193             : 
     194             :         /* Return result */
     195           0 :         *result = state->orig.out.result;
     196             : 
     197           0 :         tevent_req_received(req);
     198           0 :         return NT_STATUS_OK;
     199             : }
     200             : 
     201           0 : NTSTATUS dcerpc_fss_GetSupportedVersion(struct dcerpc_binding_handle *h,
     202             :                                         TALLOC_CTX *mem_ctx,
     203             :                                         uint32_t *_MinVersion /* [out] [ref] */,
     204             :                                         uint32_t *_MaxVersion /* [out] [ref] */,
     205             :                                         uint32_t *result)
     206             : {
     207           0 :         struct fss_GetSupportedVersion r;
     208           0 :         NTSTATUS status;
     209             : 
     210             :         /* In parameters */
     211             : 
     212             :         /* Out parameters */
     213           0 :         r.out.MinVersion = _MinVersion;
     214           0 :         r.out.MaxVersion = _MaxVersion;
     215             : 
     216             :         /* Result */
     217           0 :         NDR_ZERO_STRUCT(r.out.result);
     218             : 
     219           0 :         status = dcerpc_fss_GetSupportedVersion_r(h, mem_ctx, &r);
     220           0 :         if (!NT_STATUS_IS_OK(status)) {
     221           0 :                 return status;
     222             :         }
     223             : 
     224             :         /* Return variables */
     225           0 :         *_MinVersion = *r.out.MinVersion;
     226           0 :         *_MaxVersion = *r.out.MaxVersion;
     227             : 
     228             :         /* Return result */
     229           0 :         *result = r.out.result;
     230             : 
     231           0 :         return NT_STATUS_OK;
     232             : }
     233             : 
     234             : struct dcerpc_fss_SetContext_r_state {
     235             :         TALLOC_CTX *out_mem_ctx;
     236             : };
     237             : 
     238             : static void dcerpc_fss_SetContext_r_done(struct tevent_req *subreq);
     239             : 
     240           0 : struct tevent_req *dcerpc_fss_SetContext_r_send(TALLOC_CTX *mem_ctx,
     241             :         struct tevent_context *ev,
     242             :         struct dcerpc_binding_handle *h,
     243             :         struct fss_SetContext *r)
     244             : {
     245           0 :         struct tevent_req *req;
     246           0 :         struct dcerpc_fss_SetContext_r_state *state;
     247           0 :         struct tevent_req *subreq;
     248             : 
     249           0 :         req = tevent_req_create(mem_ctx, &state,
     250             :                                 struct dcerpc_fss_SetContext_r_state);
     251           0 :         if (req == NULL) {
     252           0 :                 return NULL;
     253             :         }
     254             : 
     255           0 :         state->out_mem_ctx = NULL;
     256             : 
     257           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     258             :                         NULL, &ndr_table_FileServerVssAgent,
     259             :                         NDR_FSS_SETCONTEXT, state, r);
     260           0 :         if (tevent_req_nomem(subreq, req)) {
     261           0 :                 return tevent_req_post(req, ev);
     262             :         }
     263           0 :         tevent_req_set_callback(subreq, dcerpc_fss_SetContext_r_done, req);
     264             : 
     265           0 :         return req;
     266             : }
     267             : 
     268           0 : static void dcerpc_fss_SetContext_r_done(struct tevent_req *subreq)
     269             : {
     270           0 :         struct tevent_req *req =
     271           0 :                 tevent_req_callback_data(subreq,
     272             :                 struct tevent_req);
     273           0 :         NTSTATUS status;
     274             : 
     275           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     276           0 :         TALLOC_FREE(subreq);
     277           0 :         if (tevent_req_nterror(req, status)) {
     278           0 :                 return;
     279             :         }
     280             : 
     281           0 :         tevent_req_done(req);
     282             : }
     283             : 
     284           0 : NTSTATUS dcerpc_fss_SetContext_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     285             : {
     286           0 :         struct dcerpc_fss_SetContext_r_state *state =
     287           0 :                 tevent_req_data(req,
     288             :                 struct dcerpc_fss_SetContext_r_state);
     289           0 :         NTSTATUS status;
     290             : 
     291           0 :         if (tevent_req_is_nterror(req, &status)) {
     292           0 :                 tevent_req_received(req);
     293           0 :                 return status;
     294             :         }
     295             : 
     296           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     297             : 
     298           0 :         tevent_req_received(req);
     299           0 :         return NT_STATUS_OK;
     300             : }
     301             : 
     302          28 : NTSTATUS dcerpc_fss_SetContext_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_SetContext *r)
     303             : {
     304           0 :         NTSTATUS status;
     305             : 
     306          28 :         status = dcerpc_binding_handle_call(h,
     307             :                         NULL, &ndr_table_FileServerVssAgent,
     308             :                         NDR_FSS_SETCONTEXT, mem_ctx, r);
     309             : 
     310          28 :         return status;
     311             : }
     312             : 
     313             : struct dcerpc_fss_SetContext_state {
     314             :         struct fss_SetContext orig;
     315             :         struct fss_SetContext tmp;
     316             :         TALLOC_CTX *out_mem_ctx;
     317             : };
     318             : 
     319             : static void dcerpc_fss_SetContext_done(struct tevent_req *subreq);
     320             : 
     321           0 : struct tevent_req *dcerpc_fss_SetContext_send(TALLOC_CTX *mem_ctx,
     322             :                                               struct tevent_context *ev,
     323             :                                               struct dcerpc_binding_handle *h,
     324             :                                               uint32_t _Context /* [in]  */)
     325             : {
     326           0 :         struct tevent_req *req;
     327           0 :         struct dcerpc_fss_SetContext_state *state;
     328           0 :         struct tevent_req *subreq;
     329             : 
     330           0 :         req = tevent_req_create(mem_ctx, &state,
     331             :                                 struct dcerpc_fss_SetContext_state);
     332           0 :         if (req == NULL) {
     333           0 :                 return NULL;
     334             :         }
     335           0 :         state->out_mem_ctx = NULL;
     336             : 
     337             :         /* In parameters */
     338           0 :         state->orig.in.Context = _Context;
     339             : 
     340             :         /* Out parameters */
     341             : 
     342             :         /* Result */
     343           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     344             : 
     345             :         /* make a temporary copy, that we pass to the dispatch function */
     346           0 :         state->tmp = state->orig;
     347             : 
     348           0 :         subreq = dcerpc_fss_SetContext_r_send(state, ev, h, &state->tmp);
     349           0 :         if (tevent_req_nomem(subreq, req)) {
     350           0 :                 return tevent_req_post(req, ev);
     351             :         }
     352           0 :         tevent_req_set_callback(subreq, dcerpc_fss_SetContext_done, req);
     353           0 :         return req;
     354             : }
     355             : 
     356           0 : static void dcerpc_fss_SetContext_done(struct tevent_req *subreq)
     357             : {
     358           0 :         struct tevent_req *req = tevent_req_callback_data(
     359             :                 subreq, struct tevent_req);
     360           0 :         struct dcerpc_fss_SetContext_state *state = tevent_req_data(
     361             :                 req, struct dcerpc_fss_SetContext_state);
     362           0 :         NTSTATUS status;
     363           0 :         TALLOC_CTX *mem_ctx;
     364             : 
     365           0 :         if (state->out_mem_ctx) {
     366           0 :                 mem_ctx = state->out_mem_ctx;
     367             :         } else {
     368           0 :                 mem_ctx = state;
     369             :         }
     370             : 
     371           0 :         status = dcerpc_fss_SetContext_r_recv(subreq, mem_ctx);
     372           0 :         TALLOC_FREE(subreq);
     373           0 :         if (tevent_req_nterror(req, status)) {
     374           0 :                 return;
     375             :         }
     376             : 
     377             :         /* Copy out parameters */
     378             : 
     379             :         /* Copy result */
     380           0 :         state->orig.out.result = state->tmp.out.result;
     381             : 
     382             :         /* Reset temporary structure */
     383           0 :         NDR_ZERO_STRUCT(state->tmp);
     384             : 
     385           0 :         tevent_req_done(req);
     386             : }
     387             : 
     388           0 : NTSTATUS dcerpc_fss_SetContext_recv(struct tevent_req *req,
     389             :                                     TALLOC_CTX *mem_ctx,
     390             :                                     uint32_t *result)
     391             : {
     392           0 :         struct dcerpc_fss_SetContext_state *state = tevent_req_data(
     393             :                 req, struct dcerpc_fss_SetContext_state);
     394           0 :         NTSTATUS status;
     395             : 
     396           0 :         if (tevent_req_is_nterror(req, &status)) {
     397           0 :                 tevent_req_received(req);
     398           0 :                 return status;
     399             :         }
     400             : 
     401             :         /* Steal possible out parameters to the callers context */
     402           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     403             : 
     404             :         /* Return result */
     405           0 :         *result = state->orig.out.result;
     406             : 
     407           0 :         tevent_req_received(req);
     408           0 :         return NT_STATUS_OK;
     409             : }
     410             : 
     411           0 : NTSTATUS dcerpc_fss_SetContext(struct dcerpc_binding_handle *h,
     412             :                                TALLOC_CTX *mem_ctx,
     413             :                                uint32_t _Context /* [in]  */,
     414             :                                uint32_t *result)
     415             : {
     416           0 :         struct fss_SetContext r;
     417           0 :         NTSTATUS status;
     418             : 
     419             :         /* In parameters */
     420           0 :         r.in.Context = _Context;
     421             : 
     422             :         /* Out parameters */
     423             : 
     424             :         /* Result */
     425           0 :         NDR_ZERO_STRUCT(r.out.result);
     426             : 
     427           0 :         status = dcerpc_fss_SetContext_r(h, mem_ctx, &r);
     428           0 :         if (!NT_STATUS_IS_OK(status)) {
     429           0 :                 return status;
     430             :         }
     431             : 
     432             :         /* Return variables */
     433             : 
     434             :         /* Return result */
     435           0 :         *result = r.out.result;
     436             : 
     437           0 :         return NT_STATUS_OK;
     438             : }
     439             : 
     440             : struct dcerpc_fss_StartShadowCopySet_r_state {
     441             :         TALLOC_CTX *out_mem_ctx;
     442             : };
     443             : 
     444             : static void dcerpc_fss_StartShadowCopySet_r_done(struct tevent_req *subreq);
     445             : 
     446           0 : struct tevent_req *dcerpc_fss_StartShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
     447             :         struct tevent_context *ev,
     448             :         struct dcerpc_binding_handle *h,
     449             :         struct fss_StartShadowCopySet *r)
     450             : {
     451           0 :         struct tevent_req *req;
     452           0 :         struct dcerpc_fss_StartShadowCopySet_r_state *state;
     453           0 :         struct tevent_req *subreq;
     454             : 
     455           0 :         req = tevent_req_create(mem_ctx, &state,
     456             :                                 struct dcerpc_fss_StartShadowCopySet_r_state);
     457           0 :         if (req == NULL) {
     458           0 :                 return NULL;
     459             :         }
     460             : 
     461           0 :         state->out_mem_ctx = talloc_new(state);
     462           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     463           0 :                 return tevent_req_post(req, ev);
     464             :         }
     465             : 
     466           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     467             :                         NULL, &ndr_table_FileServerVssAgent,
     468           0 :                         NDR_FSS_STARTSHADOWCOPYSET, state->out_mem_ctx, r);
     469           0 :         if (tevent_req_nomem(subreq, req)) {
     470           0 :                 return tevent_req_post(req, ev);
     471             :         }
     472           0 :         tevent_req_set_callback(subreq, dcerpc_fss_StartShadowCopySet_r_done, req);
     473             : 
     474           0 :         return req;
     475             : }
     476             : 
     477           0 : static void dcerpc_fss_StartShadowCopySet_r_done(struct tevent_req *subreq)
     478             : {
     479           0 :         struct tevent_req *req =
     480           0 :                 tevent_req_callback_data(subreq,
     481             :                 struct tevent_req);
     482           0 :         NTSTATUS status;
     483             : 
     484           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     485           0 :         TALLOC_FREE(subreq);
     486           0 :         if (tevent_req_nterror(req, status)) {
     487           0 :                 return;
     488             :         }
     489             : 
     490           0 :         tevent_req_done(req);
     491             : }
     492             : 
     493           0 : NTSTATUS dcerpc_fss_StartShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     494             : {
     495           0 :         struct dcerpc_fss_StartShadowCopySet_r_state *state =
     496           0 :                 tevent_req_data(req,
     497             :                 struct dcerpc_fss_StartShadowCopySet_r_state);
     498           0 :         NTSTATUS status;
     499             : 
     500           0 :         if (tevent_req_is_nterror(req, &status)) {
     501           0 :                 tevent_req_received(req);
     502           0 :                 return status;
     503             :         }
     504             : 
     505           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     506             : 
     507           0 :         tevent_req_received(req);
     508           0 :         return NT_STATUS_OK;
     509             : }
     510             : 
     511          26 : NTSTATUS dcerpc_fss_StartShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_StartShadowCopySet *r)
     512             : {
     513           0 :         NTSTATUS status;
     514             : 
     515          26 :         status = dcerpc_binding_handle_call(h,
     516             :                         NULL, &ndr_table_FileServerVssAgent,
     517             :                         NDR_FSS_STARTSHADOWCOPYSET, mem_ctx, r);
     518             : 
     519          26 :         return status;
     520             : }
     521             : 
     522             : struct dcerpc_fss_StartShadowCopySet_state {
     523             :         struct fss_StartShadowCopySet orig;
     524             :         struct fss_StartShadowCopySet tmp;
     525             :         TALLOC_CTX *out_mem_ctx;
     526             : };
     527             : 
     528             : static void dcerpc_fss_StartShadowCopySet_done(struct tevent_req *subreq);
     529             : 
     530           0 : struct tevent_req *dcerpc_fss_StartShadowCopySet_send(TALLOC_CTX *mem_ctx,
     531             :                                                       struct tevent_context *ev,
     532             :                                                       struct dcerpc_binding_handle *h,
     533             :                                                       struct GUID _ClientShadowCopySetId /* [in]  */,
     534             :                                                       struct GUID *_pShadowCopySetId /* [out] [ref] */)
     535             : {
     536           0 :         struct tevent_req *req;
     537           0 :         struct dcerpc_fss_StartShadowCopySet_state *state;
     538           0 :         struct tevent_req *subreq;
     539             : 
     540           0 :         req = tevent_req_create(mem_ctx, &state,
     541             :                                 struct dcerpc_fss_StartShadowCopySet_state);
     542           0 :         if (req == NULL) {
     543           0 :                 return NULL;
     544             :         }
     545           0 :         state->out_mem_ctx = NULL;
     546             : 
     547             :         /* In parameters */
     548           0 :         state->orig.in.ClientShadowCopySetId = _ClientShadowCopySetId;
     549             : 
     550             :         /* Out parameters */
     551           0 :         state->orig.out.pShadowCopySetId = _pShadowCopySetId;
     552             : 
     553             :         /* Result */
     554           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     555             : 
     556           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     557             :                              "dcerpc_fss_StartShadowCopySet_out_memory");
     558           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     559           0 :                 return tevent_req_post(req, ev);
     560             :         }
     561             : 
     562             :         /* make a temporary copy, that we pass to the dispatch function */
     563           0 :         state->tmp = state->orig;
     564             : 
     565           0 :         subreq = dcerpc_fss_StartShadowCopySet_r_send(state, ev, h, &state->tmp);
     566           0 :         if (tevent_req_nomem(subreq, req)) {
     567           0 :                 return tevent_req_post(req, ev);
     568             :         }
     569           0 :         tevent_req_set_callback(subreq, dcerpc_fss_StartShadowCopySet_done, req);
     570           0 :         return req;
     571             : }
     572             : 
     573           0 : static void dcerpc_fss_StartShadowCopySet_done(struct tevent_req *subreq)
     574             : {
     575           0 :         struct tevent_req *req = tevent_req_callback_data(
     576             :                 subreq, struct tevent_req);
     577           0 :         struct dcerpc_fss_StartShadowCopySet_state *state = tevent_req_data(
     578             :                 req, struct dcerpc_fss_StartShadowCopySet_state);
     579           0 :         NTSTATUS status;
     580           0 :         TALLOC_CTX *mem_ctx;
     581             : 
     582           0 :         if (state->out_mem_ctx) {
     583           0 :                 mem_ctx = state->out_mem_ctx;
     584             :         } else {
     585           0 :                 mem_ctx = state;
     586             :         }
     587             : 
     588           0 :         status = dcerpc_fss_StartShadowCopySet_r_recv(subreq, mem_ctx);
     589           0 :         TALLOC_FREE(subreq);
     590           0 :         if (tevent_req_nterror(req, status)) {
     591           0 :                 return;
     592             :         }
     593             : 
     594             :         /* Copy out parameters */
     595           0 :         *state->orig.out.pShadowCopySetId = *state->tmp.out.pShadowCopySetId;
     596             : 
     597             :         /* Copy result */
     598           0 :         state->orig.out.result = state->tmp.out.result;
     599             : 
     600             :         /* Reset temporary structure */
     601           0 :         NDR_ZERO_STRUCT(state->tmp);
     602             : 
     603           0 :         tevent_req_done(req);
     604             : }
     605             : 
     606           0 : NTSTATUS dcerpc_fss_StartShadowCopySet_recv(struct tevent_req *req,
     607             :                                             TALLOC_CTX *mem_ctx,
     608             :                                             uint32_t *result)
     609             : {
     610           0 :         struct dcerpc_fss_StartShadowCopySet_state *state = tevent_req_data(
     611             :                 req, struct dcerpc_fss_StartShadowCopySet_state);
     612           0 :         NTSTATUS status;
     613             : 
     614           0 :         if (tevent_req_is_nterror(req, &status)) {
     615           0 :                 tevent_req_received(req);
     616           0 :                 return status;
     617             :         }
     618             : 
     619             :         /* Steal possible out parameters to the callers context */
     620           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     621             : 
     622             :         /* Return result */
     623           0 :         *result = state->orig.out.result;
     624             : 
     625           0 :         tevent_req_received(req);
     626           0 :         return NT_STATUS_OK;
     627             : }
     628             : 
     629           0 : NTSTATUS dcerpc_fss_StartShadowCopySet(struct dcerpc_binding_handle *h,
     630             :                                        TALLOC_CTX *mem_ctx,
     631             :                                        struct GUID _ClientShadowCopySetId /* [in]  */,
     632             :                                        struct GUID *_pShadowCopySetId /* [out] [ref] */,
     633             :                                        uint32_t *result)
     634             : {
     635           0 :         struct fss_StartShadowCopySet r;
     636           0 :         NTSTATUS status;
     637             : 
     638             :         /* In parameters */
     639           0 :         r.in.ClientShadowCopySetId = _ClientShadowCopySetId;
     640             : 
     641             :         /* Out parameters */
     642           0 :         r.out.pShadowCopySetId = _pShadowCopySetId;
     643             : 
     644             :         /* Result */
     645           0 :         NDR_ZERO_STRUCT(r.out.result);
     646             : 
     647           0 :         status = dcerpc_fss_StartShadowCopySet_r(h, mem_ctx, &r);
     648           0 :         if (!NT_STATUS_IS_OK(status)) {
     649           0 :                 return status;
     650             :         }
     651             : 
     652             :         /* Return variables */
     653           0 :         *_pShadowCopySetId = *r.out.pShadowCopySetId;
     654             : 
     655             :         /* Return result */
     656           0 :         *result = r.out.result;
     657             : 
     658           0 :         return NT_STATUS_OK;
     659             : }
     660             : 
     661             : struct dcerpc_fss_AddToShadowCopySet_r_state {
     662             :         TALLOC_CTX *out_mem_ctx;
     663             : };
     664             : 
     665             : static void dcerpc_fss_AddToShadowCopySet_r_done(struct tevent_req *subreq);
     666             : 
     667           0 : struct tevent_req *dcerpc_fss_AddToShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
     668             :         struct tevent_context *ev,
     669             :         struct dcerpc_binding_handle *h,
     670             :         struct fss_AddToShadowCopySet *r)
     671             : {
     672           0 :         struct tevent_req *req;
     673           0 :         struct dcerpc_fss_AddToShadowCopySet_r_state *state;
     674           0 :         struct tevent_req *subreq;
     675             : 
     676           0 :         req = tevent_req_create(mem_ctx, &state,
     677             :                                 struct dcerpc_fss_AddToShadowCopySet_r_state);
     678           0 :         if (req == NULL) {
     679           0 :                 return NULL;
     680             :         }
     681             : 
     682           0 :         state->out_mem_ctx = talloc_new(state);
     683           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     684           0 :                 return tevent_req_post(req, ev);
     685             :         }
     686             : 
     687           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     688             :                         NULL, &ndr_table_FileServerVssAgent,
     689           0 :                         NDR_FSS_ADDTOSHADOWCOPYSET, state->out_mem_ctx, r);
     690           0 :         if (tevent_req_nomem(subreq, req)) {
     691           0 :                 return tevent_req_post(req, ev);
     692             :         }
     693           0 :         tevent_req_set_callback(subreq, dcerpc_fss_AddToShadowCopySet_r_done, req);
     694             : 
     695           0 :         return req;
     696             : }
     697             : 
     698           0 : static void dcerpc_fss_AddToShadowCopySet_r_done(struct tevent_req *subreq)
     699             : {
     700           0 :         struct tevent_req *req =
     701           0 :                 tevent_req_callback_data(subreq,
     702             :                 struct tevent_req);
     703           0 :         NTSTATUS status;
     704             : 
     705           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     706           0 :         TALLOC_FREE(subreq);
     707           0 :         if (tevent_req_nterror(req, status)) {
     708           0 :                 return;
     709             :         }
     710             : 
     711           0 :         tevent_req_done(req);
     712             : }
     713             : 
     714           0 : NTSTATUS dcerpc_fss_AddToShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     715             : {
     716           0 :         struct dcerpc_fss_AddToShadowCopySet_r_state *state =
     717           0 :                 tevent_req_data(req,
     718             :                 struct dcerpc_fss_AddToShadowCopySet_r_state);
     719           0 :         NTSTATUS status;
     720             : 
     721           0 :         if (tevent_req_is_nterror(req, &status)) {
     722           0 :                 tevent_req_received(req);
     723           0 :                 return status;
     724             :         }
     725             : 
     726           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     727             : 
     728           0 :         tevent_req_received(req);
     729           0 :         return NT_STATUS_OK;
     730             : }
     731             : 
     732          44 : NTSTATUS dcerpc_fss_AddToShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_AddToShadowCopySet *r)
     733             : {
     734           0 :         NTSTATUS status;
     735             : 
     736          44 :         status = dcerpc_binding_handle_call(h,
     737             :                         NULL, &ndr_table_FileServerVssAgent,
     738             :                         NDR_FSS_ADDTOSHADOWCOPYSET, mem_ctx, r);
     739             : 
     740          44 :         return status;
     741             : }
     742             : 
     743             : struct dcerpc_fss_AddToShadowCopySet_state {
     744             :         struct fss_AddToShadowCopySet orig;
     745             :         struct fss_AddToShadowCopySet tmp;
     746             :         TALLOC_CTX *out_mem_ctx;
     747             : };
     748             : 
     749             : static void dcerpc_fss_AddToShadowCopySet_done(struct tevent_req *subreq);
     750             : 
     751           0 : struct tevent_req *dcerpc_fss_AddToShadowCopySet_send(TALLOC_CTX *mem_ctx,
     752             :                                                       struct tevent_context *ev,
     753             :                                                       struct dcerpc_binding_handle *h,
     754             :                                                       struct GUID _ClientShadowCopyId /* [in]  */,
     755             :                                                       struct GUID _ShadowCopySetId /* [in]  */,
     756             :                                                       const char *_ShareName /* [in] [charset(UTF16),ref] */,
     757             :                                                       struct GUID *_pShadowCopyId /* [out] [ref] */)
     758             : {
     759           0 :         struct tevent_req *req;
     760           0 :         struct dcerpc_fss_AddToShadowCopySet_state *state;
     761           0 :         struct tevent_req *subreq;
     762             : 
     763           0 :         req = tevent_req_create(mem_ctx, &state,
     764             :                                 struct dcerpc_fss_AddToShadowCopySet_state);
     765           0 :         if (req == NULL) {
     766           0 :                 return NULL;
     767             :         }
     768           0 :         state->out_mem_ctx = NULL;
     769             : 
     770             :         /* In parameters */
     771           0 :         state->orig.in.ClientShadowCopyId = _ClientShadowCopyId;
     772           0 :         state->orig.in.ShadowCopySetId = _ShadowCopySetId;
     773           0 :         state->orig.in.ShareName = _ShareName;
     774             : 
     775             :         /* Out parameters */
     776           0 :         state->orig.out.pShadowCopyId = _pShadowCopyId;
     777             : 
     778             :         /* Result */
     779           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     780             : 
     781           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     782             :                              "dcerpc_fss_AddToShadowCopySet_out_memory");
     783           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     784           0 :                 return tevent_req_post(req, ev);
     785             :         }
     786             : 
     787             :         /* make a temporary copy, that we pass to the dispatch function */
     788           0 :         state->tmp = state->orig;
     789             : 
     790           0 :         subreq = dcerpc_fss_AddToShadowCopySet_r_send(state, ev, h, &state->tmp);
     791           0 :         if (tevent_req_nomem(subreq, req)) {
     792           0 :                 return tevent_req_post(req, ev);
     793             :         }
     794           0 :         tevent_req_set_callback(subreq, dcerpc_fss_AddToShadowCopySet_done, req);
     795           0 :         return req;
     796             : }
     797             : 
     798           0 : static void dcerpc_fss_AddToShadowCopySet_done(struct tevent_req *subreq)
     799             : {
     800           0 :         struct tevent_req *req = tevent_req_callback_data(
     801             :                 subreq, struct tevent_req);
     802           0 :         struct dcerpc_fss_AddToShadowCopySet_state *state = tevent_req_data(
     803             :                 req, struct dcerpc_fss_AddToShadowCopySet_state);
     804           0 :         NTSTATUS status;
     805           0 :         TALLOC_CTX *mem_ctx;
     806             : 
     807           0 :         if (state->out_mem_ctx) {
     808           0 :                 mem_ctx = state->out_mem_ctx;
     809             :         } else {
     810           0 :                 mem_ctx = state;
     811             :         }
     812             : 
     813           0 :         status = dcerpc_fss_AddToShadowCopySet_r_recv(subreq, mem_ctx);
     814           0 :         TALLOC_FREE(subreq);
     815           0 :         if (tevent_req_nterror(req, status)) {
     816           0 :                 return;
     817             :         }
     818             : 
     819             :         /* Copy out parameters */
     820           0 :         *state->orig.out.pShadowCopyId = *state->tmp.out.pShadowCopyId;
     821             : 
     822             :         /* Copy result */
     823           0 :         state->orig.out.result = state->tmp.out.result;
     824             : 
     825             :         /* Reset temporary structure */
     826           0 :         NDR_ZERO_STRUCT(state->tmp);
     827             : 
     828           0 :         tevent_req_done(req);
     829             : }
     830             : 
     831           0 : NTSTATUS dcerpc_fss_AddToShadowCopySet_recv(struct tevent_req *req,
     832             :                                             TALLOC_CTX *mem_ctx,
     833             :                                             uint32_t *result)
     834             : {
     835           0 :         struct dcerpc_fss_AddToShadowCopySet_state *state = tevent_req_data(
     836             :                 req, struct dcerpc_fss_AddToShadowCopySet_state);
     837           0 :         NTSTATUS status;
     838             : 
     839           0 :         if (tevent_req_is_nterror(req, &status)) {
     840           0 :                 tevent_req_received(req);
     841           0 :                 return status;
     842             :         }
     843             : 
     844             :         /* Steal possible out parameters to the callers context */
     845           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     846             : 
     847             :         /* Return result */
     848           0 :         *result = state->orig.out.result;
     849             : 
     850           0 :         tevent_req_received(req);
     851           0 :         return NT_STATUS_OK;
     852             : }
     853             : 
     854           0 : NTSTATUS dcerpc_fss_AddToShadowCopySet(struct dcerpc_binding_handle *h,
     855             :                                        TALLOC_CTX *mem_ctx,
     856             :                                        struct GUID _ClientShadowCopyId /* [in]  */,
     857             :                                        struct GUID _ShadowCopySetId /* [in]  */,
     858             :                                        const char *_ShareName /* [in] [charset(UTF16),ref] */,
     859             :                                        struct GUID *_pShadowCopyId /* [out] [ref] */,
     860             :                                        uint32_t *result)
     861             : {
     862           0 :         struct fss_AddToShadowCopySet r;
     863           0 :         NTSTATUS status;
     864             : 
     865             :         /* In parameters */
     866           0 :         r.in.ClientShadowCopyId = _ClientShadowCopyId;
     867           0 :         r.in.ShadowCopySetId = _ShadowCopySetId;
     868           0 :         r.in.ShareName = _ShareName;
     869             : 
     870             :         /* Out parameters */
     871           0 :         r.out.pShadowCopyId = _pShadowCopyId;
     872             : 
     873             :         /* Result */
     874           0 :         NDR_ZERO_STRUCT(r.out.result);
     875             : 
     876           0 :         status = dcerpc_fss_AddToShadowCopySet_r(h, mem_ctx, &r);
     877           0 :         if (!NT_STATUS_IS_OK(status)) {
     878           0 :                 return status;
     879             :         }
     880             : 
     881             :         /* Return variables */
     882           0 :         *_pShadowCopyId = *r.out.pShadowCopyId;
     883             : 
     884             :         /* Return result */
     885           0 :         *result = r.out.result;
     886             : 
     887           0 :         return NT_STATUS_OK;
     888             : }
     889             : 
     890             : struct dcerpc_fss_CommitShadowCopySet_r_state {
     891             :         TALLOC_CTX *out_mem_ctx;
     892             : };
     893             : 
     894             : static void dcerpc_fss_CommitShadowCopySet_r_done(struct tevent_req *subreq);
     895             : 
     896           0 : struct tevent_req *dcerpc_fss_CommitShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
     897             :         struct tevent_context *ev,
     898             :         struct dcerpc_binding_handle *h,
     899             :         struct fss_CommitShadowCopySet *r)
     900             : {
     901           0 :         struct tevent_req *req;
     902           0 :         struct dcerpc_fss_CommitShadowCopySet_r_state *state;
     903           0 :         struct tevent_req *subreq;
     904             : 
     905           0 :         req = tevent_req_create(mem_ctx, &state,
     906             :                                 struct dcerpc_fss_CommitShadowCopySet_r_state);
     907           0 :         if (req == NULL) {
     908           0 :                 return NULL;
     909             :         }
     910             : 
     911           0 :         state->out_mem_ctx = NULL;
     912             : 
     913           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     914             :                         NULL, &ndr_table_FileServerVssAgent,
     915             :                         NDR_FSS_COMMITSHADOWCOPYSET, state, r);
     916           0 :         if (tevent_req_nomem(subreq, req)) {
     917           0 :                 return tevent_req_post(req, ev);
     918             :         }
     919           0 :         tevent_req_set_callback(subreq, dcerpc_fss_CommitShadowCopySet_r_done, req);
     920             : 
     921           0 :         return req;
     922             : }
     923             : 
     924           0 : static void dcerpc_fss_CommitShadowCopySet_r_done(struct tevent_req *subreq)
     925             : {
     926           0 :         struct tevent_req *req =
     927           0 :                 tevent_req_callback_data(subreq,
     928             :                 struct tevent_req);
     929           0 :         NTSTATUS status;
     930             : 
     931           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     932           0 :         TALLOC_FREE(subreq);
     933           0 :         if (tevent_req_nterror(req, status)) {
     934           0 :                 return;
     935             :         }
     936             : 
     937           0 :         tevent_req_done(req);
     938             : }
     939             : 
     940           0 : NTSTATUS dcerpc_fss_CommitShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     941             : {
     942           0 :         struct dcerpc_fss_CommitShadowCopySet_r_state *state =
     943           0 :                 tevent_req_data(req,
     944             :                 struct dcerpc_fss_CommitShadowCopySet_r_state);
     945           0 :         NTSTATUS status;
     946             : 
     947           0 :         if (tevent_req_is_nterror(req, &status)) {
     948           0 :                 tevent_req_received(req);
     949           0 :                 return status;
     950             :         }
     951             : 
     952           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     953             : 
     954           0 :         tevent_req_received(req);
     955           0 :         return NT_STATUS_OK;
     956             : }
     957             : 
     958          18 : NTSTATUS dcerpc_fss_CommitShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_CommitShadowCopySet *r)
     959             : {
     960           0 :         NTSTATUS status;
     961             : 
     962          18 :         status = dcerpc_binding_handle_call(h,
     963             :                         NULL, &ndr_table_FileServerVssAgent,
     964             :                         NDR_FSS_COMMITSHADOWCOPYSET, mem_ctx, r);
     965             : 
     966          18 :         return status;
     967             : }
     968             : 
     969             : struct dcerpc_fss_CommitShadowCopySet_state {
     970             :         struct fss_CommitShadowCopySet orig;
     971             :         struct fss_CommitShadowCopySet tmp;
     972             :         TALLOC_CTX *out_mem_ctx;
     973             : };
     974             : 
     975             : static void dcerpc_fss_CommitShadowCopySet_done(struct tevent_req *subreq);
     976             : 
     977           0 : struct tevent_req *dcerpc_fss_CommitShadowCopySet_send(TALLOC_CTX *mem_ctx,
     978             :                                                        struct tevent_context *ev,
     979             :                                                        struct dcerpc_binding_handle *h,
     980             :                                                        struct GUID _ShadowCopySetId /* [in]  */,
     981             :                                                        uint32_t _TimeOutInMilliseconds /* [in]  */)
     982             : {
     983           0 :         struct tevent_req *req;
     984           0 :         struct dcerpc_fss_CommitShadowCopySet_state *state;
     985           0 :         struct tevent_req *subreq;
     986             : 
     987           0 :         req = tevent_req_create(mem_ctx, &state,
     988             :                                 struct dcerpc_fss_CommitShadowCopySet_state);
     989           0 :         if (req == NULL) {
     990           0 :                 return NULL;
     991             :         }
     992           0 :         state->out_mem_ctx = NULL;
     993             : 
     994             :         /* In parameters */
     995           0 :         state->orig.in.ShadowCopySetId = _ShadowCopySetId;
     996           0 :         state->orig.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
     997             : 
     998             :         /* Out parameters */
     999             : 
    1000             :         /* Result */
    1001           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1002             : 
    1003             :         /* make a temporary copy, that we pass to the dispatch function */
    1004           0 :         state->tmp = state->orig;
    1005             : 
    1006           0 :         subreq = dcerpc_fss_CommitShadowCopySet_r_send(state, ev, h, &state->tmp);
    1007           0 :         if (tevent_req_nomem(subreq, req)) {
    1008           0 :                 return tevent_req_post(req, ev);
    1009             :         }
    1010           0 :         tevent_req_set_callback(subreq, dcerpc_fss_CommitShadowCopySet_done, req);
    1011           0 :         return req;
    1012             : }
    1013             : 
    1014           0 : static void dcerpc_fss_CommitShadowCopySet_done(struct tevent_req *subreq)
    1015             : {
    1016           0 :         struct tevent_req *req = tevent_req_callback_data(
    1017             :                 subreq, struct tevent_req);
    1018           0 :         struct dcerpc_fss_CommitShadowCopySet_state *state = tevent_req_data(
    1019             :                 req, struct dcerpc_fss_CommitShadowCopySet_state);
    1020           0 :         NTSTATUS status;
    1021           0 :         TALLOC_CTX *mem_ctx;
    1022             : 
    1023           0 :         if (state->out_mem_ctx) {
    1024           0 :                 mem_ctx = state->out_mem_ctx;
    1025             :         } else {
    1026           0 :                 mem_ctx = state;
    1027             :         }
    1028             : 
    1029           0 :         status = dcerpc_fss_CommitShadowCopySet_r_recv(subreq, mem_ctx);
    1030           0 :         TALLOC_FREE(subreq);
    1031           0 :         if (tevent_req_nterror(req, status)) {
    1032           0 :                 return;
    1033             :         }
    1034             : 
    1035             :         /* Copy out parameters */
    1036             : 
    1037             :         /* Copy result */
    1038           0 :         state->orig.out.result = state->tmp.out.result;
    1039             : 
    1040             :         /* Reset temporary structure */
    1041           0 :         NDR_ZERO_STRUCT(state->tmp);
    1042             : 
    1043           0 :         tevent_req_done(req);
    1044             : }
    1045             : 
    1046           0 : NTSTATUS dcerpc_fss_CommitShadowCopySet_recv(struct tevent_req *req,
    1047             :                                              TALLOC_CTX *mem_ctx,
    1048             :                                              uint32_t *result)
    1049             : {
    1050           0 :         struct dcerpc_fss_CommitShadowCopySet_state *state = tevent_req_data(
    1051             :                 req, struct dcerpc_fss_CommitShadowCopySet_state);
    1052           0 :         NTSTATUS status;
    1053             : 
    1054           0 :         if (tevent_req_is_nterror(req, &status)) {
    1055           0 :                 tevent_req_received(req);
    1056           0 :                 return status;
    1057             :         }
    1058             : 
    1059             :         /* Steal possible out parameters to the callers context */
    1060           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1061             : 
    1062             :         /* Return result */
    1063           0 :         *result = state->orig.out.result;
    1064             : 
    1065           0 :         tevent_req_received(req);
    1066           0 :         return NT_STATUS_OK;
    1067             : }
    1068             : 
    1069           0 : NTSTATUS dcerpc_fss_CommitShadowCopySet(struct dcerpc_binding_handle *h,
    1070             :                                         TALLOC_CTX *mem_ctx,
    1071             :                                         struct GUID _ShadowCopySetId /* [in]  */,
    1072             :                                         uint32_t _TimeOutInMilliseconds /* [in]  */,
    1073             :                                         uint32_t *result)
    1074             : {
    1075           0 :         struct fss_CommitShadowCopySet r;
    1076           0 :         NTSTATUS status;
    1077             : 
    1078             :         /* In parameters */
    1079           0 :         r.in.ShadowCopySetId = _ShadowCopySetId;
    1080           0 :         r.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
    1081             : 
    1082             :         /* Out parameters */
    1083             : 
    1084             :         /* Result */
    1085           0 :         NDR_ZERO_STRUCT(r.out.result);
    1086             : 
    1087           0 :         status = dcerpc_fss_CommitShadowCopySet_r(h, mem_ctx, &r);
    1088           0 :         if (!NT_STATUS_IS_OK(status)) {
    1089           0 :                 return status;
    1090             :         }
    1091             : 
    1092             :         /* Return variables */
    1093             : 
    1094             :         /* Return result */
    1095           0 :         *result = r.out.result;
    1096             : 
    1097           0 :         return NT_STATUS_OK;
    1098             : }
    1099             : 
    1100             : struct dcerpc_fss_ExposeShadowCopySet_r_state {
    1101             :         TALLOC_CTX *out_mem_ctx;
    1102             : };
    1103             : 
    1104             : static void dcerpc_fss_ExposeShadowCopySet_r_done(struct tevent_req *subreq);
    1105             : 
    1106           0 : struct tevent_req *dcerpc_fss_ExposeShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
    1107             :         struct tevent_context *ev,
    1108             :         struct dcerpc_binding_handle *h,
    1109             :         struct fss_ExposeShadowCopySet *r)
    1110             : {
    1111           0 :         struct tevent_req *req;
    1112           0 :         struct dcerpc_fss_ExposeShadowCopySet_r_state *state;
    1113           0 :         struct tevent_req *subreq;
    1114             : 
    1115           0 :         req = tevent_req_create(mem_ctx, &state,
    1116             :                                 struct dcerpc_fss_ExposeShadowCopySet_r_state);
    1117           0 :         if (req == NULL) {
    1118           0 :                 return NULL;
    1119             :         }
    1120             : 
    1121           0 :         state->out_mem_ctx = NULL;
    1122             : 
    1123           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1124             :                         NULL, &ndr_table_FileServerVssAgent,
    1125             :                         NDR_FSS_EXPOSESHADOWCOPYSET, state, r);
    1126           0 :         if (tevent_req_nomem(subreq, req)) {
    1127           0 :                 return tevent_req_post(req, ev);
    1128             :         }
    1129           0 :         tevent_req_set_callback(subreq, dcerpc_fss_ExposeShadowCopySet_r_done, req);
    1130             : 
    1131           0 :         return req;
    1132             : }
    1133             : 
    1134           0 : static void dcerpc_fss_ExposeShadowCopySet_r_done(struct tevent_req *subreq)
    1135             : {
    1136           0 :         struct tevent_req *req =
    1137           0 :                 tevent_req_callback_data(subreq,
    1138             :                 struct tevent_req);
    1139           0 :         NTSTATUS status;
    1140             : 
    1141           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1142           0 :         TALLOC_FREE(subreq);
    1143           0 :         if (tevent_req_nterror(req, status)) {
    1144           0 :                 return;
    1145             :         }
    1146             : 
    1147           0 :         tevent_req_done(req);
    1148             : }
    1149             : 
    1150           0 : NTSTATUS dcerpc_fss_ExposeShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1151             : {
    1152           0 :         struct dcerpc_fss_ExposeShadowCopySet_r_state *state =
    1153           0 :                 tevent_req_data(req,
    1154             :                 struct dcerpc_fss_ExposeShadowCopySet_r_state);
    1155           0 :         NTSTATUS status;
    1156             : 
    1157           0 :         if (tevent_req_is_nterror(req, &status)) {
    1158           0 :                 tevent_req_received(req);
    1159           0 :                 return status;
    1160             :         }
    1161             : 
    1162           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1163             : 
    1164           0 :         tevent_req_received(req);
    1165           0 :         return NT_STATUS_OK;
    1166             : }
    1167             : 
    1168          16 : NTSTATUS dcerpc_fss_ExposeShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_ExposeShadowCopySet *r)
    1169             : {
    1170           0 :         NTSTATUS status;
    1171             : 
    1172          16 :         status = dcerpc_binding_handle_call(h,
    1173             :                         NULL, &ndr_table_FileServerVssAgent,
    1174             :                         NDR_FSS_EXPOSESHADOWCOPYSET, mem_ctx, r);
    1175             : 
    1176          16 :         return status;
    1177             : }
    1178             : 
    1179             : struct dcerpc_fss_ExposeShadowCopySet_state {
    1180             :         struct fss_ExposeShadowCopySet orig;
    1181             :         struct fss_ExposeShadowCopySet tmp;
    1182             :         TALLOC_CTX *out_mem_ctx;
    1183             : };
    1184             : 
    1185             : static void dcerpc_fss_ExposeShadowCopySet_done(struct tevent_req *subreq);
    1186             : 
    1187           0 : struct tevent_req *dcerpc_fss_ExposeShadowCopySet_send(TALLOC_CTX *mem_ctx,
    1188             :                                                        struct tevent_context *ev,
    1189             :                                                        struct dcerpc_binding_handle *h,
    1190             :                                                        struct GUID _ShadowCopySetId /* [in]  */,
    1191             :                                                        uint32_t _TimeOutInMilliseconds /* [in]  */)
    1192             : {
    1193           0 :         struct tevent_req *req;
    1194           0 :         struct dcerpc_fss_ExposeShadowCopySet_state *state;
    1195           0 :         struct tevent_req *subreq;
    1196             : 
    1197           0 :         req = tevent_req_create(mem_ctx, &state,
    1198             :                                 struct dcerpc_fss_ExposeShadowCopySet_state);
    1199           0 :         if (req == NULL) {
    1200           0 :                 return NULL;
    1201             :         }
    1202           0 :         state->out_mem_ctx = NULL;
    1203             : 
    1204             :         /* In parameters */
    1205           0 :         state->orig.in.ShadowCopySetId = _ShadowCopySetId;
    1206           0 :         state->orig.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
    1207             : 
    1208             :         /* Out parameters */
    1209             : 
    1210             :         /* Result */
    1211           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1212             : 
    1213             :         /* make a temporary copy, that we pass to the dispatch function */
    1214           0 :         state->tmp = state->orig;
    1215             : 
    1216           0 :         subreq = dcerpc_fss_ExposeShadowCopySet_r_send(state, ev, h, &state->tmp);
    1217           0 :         if (tevent_req_nomem(subreq, req)) {
    1218           0 :                 return tevent_req_post(req, ev);
    1219             :         }
    1220           0 :         tevent_req_set_callback(subreq, dcerpc_fss_ExposeShadowCopySet_done, req);
    1221           0 :         return req;
    1222             : }
    1223             : 
    1224           0 : static void dcerpc_fss_ExposeShadowCopySet_done(struct tevent_req *subreq)
    1225             : {
    1226           0 :         struct tevent_req *req = tevent_req_callback_data(
    1227             :                 subreq, struct tevent_req);
    1228           0 :         struct dcerpc_fss_ExposeShadowCopySet_state *state = tevent_req_data(
    1229             :                 req, struct dcerpc_fss_ExposeShadowCopySet_state);
    1230           0 :         NTSTATUS status;
    1231           0 :         TALLOC_CTX *mem_ctx;
    1232             : 
    1233           0 :         if (state->out_mem_ctx) {
    1234           0 :                 mem_ctx = state->out_mem_ctx;
    1235             :         } else {
    1236           0 :                 mem_ctx = state;
    1237             :         }
    1238             : 
    1239           0 :         status = dcerpc_fss_ExposeShadowCopySet_r_recv(subreq, mem_ctx);
    1240           0 :         TALLOC_FREE(subreq);
    1241           0 :         if (tevent_req_nterror(req, status)) {
    1242           0 :                 return;
    1243             :         }
    1244             : 
    1245             :         /* Copy out parameters */
    1246             : 
    1247             :         /* Copy result */
    1248           0 :         state->orig.out.result = state->tmp.out.result;
    1249             : 
    1250             :         /* Reset temporary structure */
    1251           0 :         NDR_ZERO_STRUCT(state->tmp);
    1252             : 
    1253           0 :         tevent_req_done(req);
    1254             : }
    1255             : 
    1256           0 : NTSTATUS dcerpc_fss_ExposeShadowCopySet_recv(struct tevent_req *req,
    1257             :                                              TALLOC_CTX *mem_ctx,
    1258             :                                              uint32_t *result)
    1259             : {
    1260           0 :         struct dcerpc_fss_ExposeShadowCopySet_state *state = tevent_req_data(
    1261             :                 req, struct dcerpc_fss_ExposeShadowCopySet_state);
    1262           0 :         NTSTATUS status;
    1263             : 
    1264           0 :         if (tevent_req_is_nterror(req, &status)) {
    1265           0 :                 tevent_req_received(req);
    1266           0 :                 return status;
    1267             :         }
    1268             : 
    1269             :         /* Steal possible out parameters to the callers context */
    1270           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1271             : 
    1272             :         /* Return result */
    1273           0 :         *result = state->orig.out.result;
    1274             : 
    1275           0 :         tevent_req_received(req);
    1276           0 :         return NT_STATUS_OK;
    1277             : }
    1278             : 
    1279           0 : NTSTATUS dcerpc_fss_ExposeShadowCopySet(struct dcerpc_binding_handle *h,
    1280             :                                         TALLOC_CTX *mem_ctx,
    1281             :                                         struct GUID _ShadowCopySetId /* [in]  */,
    1282             :                                         uint32_t _TimeOutInMilliseconds /* [in]  */,
    1283             :                                         uint32_t *result)
    1284             : {
    1285           0 :         struct fss_ExposeShadowCopySet r;
    1286           0 :         NTSTATUS status;
    1287             : 
    1288             :         /* In parameters */
    1289           0 :         r.in.ShadowCopySetId = _ShadowCopySetId;
    1290           0 :         r.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
    1291             : 
    1292             :         /* Out parameters */
    1293             : 
    1294             :         /* Result */
    1295           0 :         NDR_ZERO_STRUCT(r.out.result);
    1296             : 
    1297           0 :         status = dcerpc_fss_ExposeShadowCopySet_r(h, mem_ctx, &r);
    1298           0 :         if (!NT_STATUS_IS_OK(status)) {
    1299           0 :                 return status;
    1300             :         }
    1301             : 
    1302             :         /* Return variables */
    1303             : 
    1304             :         /* Return result */
    1305           0 :         *result = r.out.result;
    1306             : 
    1307           0 :         return NT_STATUS_OK;
    1308             : }
    1309             : 
    1310             : struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state {
    1311             :         TALLOC_CTX *out_mem_ctx;
    1312             : };
    1313             : 
    1314             : static void dcerpc_fss_RecoveryCompleteShadowCopySet_r_done(struct tevent_req *subreq);
    1315             : 
    1316           0 : struct tevent_req *dcerpc_fss_RecoveryCompleteShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
    1317             :         struct tevent_context *ev,
    1318             :         struct dcerpc_binding_handle *h,
    1319             :         struct fss_RecoveryCompleteShadowCopySet *r)
    1320             : {
    1321           0 :         struct tevent_req *req;
    1322           0 :         struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state *state;
    1323           0 :         struct tevent_req *subreq;
    1324             : 
    1325           0 :         req = tevent_req_create(mem_ctx, &state,
    1326             :                                 struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state);
    1327           0 :         if (req == NULL) {
    1328           0 :                 return NULL;
    1329             :         }
    1330             : 
    1331           0 :         state->out_mem_ctx = NULL;
    1332             : 
    1333           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1334             :                         NULL, &ndr_table_FileServerVssAgent,
    1335             :                         NDR_FSS_RECOVERYCOMPLETESHADOWCOPYSET, state, r);
    1336           0 :         if (tevent_req_nomem(subreq, req)) {
    1337           0 :                 return tevent_req_post(req, ev);
    1338             :         }
    1339           0 :         tevent_req_set_callback(subreq, dcerpc_fss_RecoveryCompleteShadowCopySet_r_done, req);
    1340             : 
    1341           0 :         return req;
    1342             : }
    1343             : 
    1344           0 : static void dcerpc_fss_RecoveryCompleteShadowCopySet_r_done(struct tevent_req *subreq)
    1345             : {
    1346           0 :         struct tevent_req *req =
    1347           0 :                 tevent_req_callback_data(subreq,
    1348             :                 struct tevent_req);
    1349           0 :         NTSTATUS status;
    1350             : 
    1351           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1352           0 :         TALLOC_FREE(subreq);
    1353           0 :         if (tevent_req_nterror(req, status)) {
    1354           0 :                 return;
    1355             :         }
    1356             : 
    1357           0 :         tevent_req_done(req);
    1358             : }
    1359             : 
    1360           0 : NTSTATUS dcerpc_fss_RecoveryCompleteShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1361             : {
    1362           0 :         struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state *state =
    1363           0 :                 tevent_req_data(req,
    1364             :                 struct dcerpc_fss_RecoveryCompleteShadowCopySet_r_state);
    1365           0 :         NTSTATUS status;
    1366             : 
    1367           0 :         if (tevent_req_is_nterror(req, &status)) {
    1368           0 :                 tevent_req_received(req);
    1369           0 :                 return status;
    1370             :         }
    1371             : 
    1372           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1373             : 
    1374           0 :         tevent_req_received(req);
    1375           0 :         return NT_STATUS_OK;
    1376             : }
    1377             : 
    1378           0 : NTSTATUS dcerpc_fss_RecoveryCompleteShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_RecoveryCompleteShadowCopySet *r)
    1379             : {
    1380           0 :         NTSTATUS status;
    1381             : 
    1382           0 :         status = dcerpc_binding_handle_call(h,
    1383             :                         NULL, &ndr_table_FileServerVssAgent,
    1384             :                         NDR_FSS_RECOVERYCOMPLETESHADOWCOPYSET, mem_ctx, r);
    1385             : 
    1386           0 :         return status;
    1387             : }
    1388             : 
    1389             : struct dcerpc_fss_RecoveryCompleteShadowCopySet_state {
    1390             :         struct fss_RecoveryCompleteShadowCopySet orig;
    1391             :         struct fss_RecoveryCompleteShadowCopySet tmp;
    1392             :         TALLOC_CTX *out_mem_ctx;
    1393             : };
    1394             : 
    1395             : static void dcerpc_fss_RecoveryCompleteShadowCopySet_done(struct tevent_req *subreq);
    1396             : 
    1397           0 : struct tevent_req *dcerpc_fss_RecoveryCompleteShadowCopySet_send(TALLOC_CTX *mem_ctx,
    1398             :                                                                  struct tevent_context *ev,
    1399             :                                                                  struct dcerpc_binding_handle *h,
    1400             :                                                                  struct GUID _ShadowCopySetId /* [in]  */)
    1401             : {
    1402           0 :         struct tevent_req *req;
    1403           0 :         struct dcerpc_fss_RecoveryCompleteShadowCopySet_state *state;
    1404           0 :         struct tevent_req *subreq;
    1405             : 
    1406           0 :         req = tevent_req_create(mem_ctx, &state,
    1407             :                                 struct dcerpc_fss_RecoveryCompleteShadowCopySet_state);
    1408           0 :         if (req == NULL) {
    1409           0 :                 return NULL;
    1410             :         }
    1411           0 :         state->out_mem_ctx = NULL;
    1412             : 
    1413             :         /* In parameters */
    1414           0 :         state->orig.in.ShadowCopySetId = _ShadowCopySetId;
    1415             : 
    1416             :         /* Out parameters */
    1417             : 
    1418             :         /* Result */
    1419           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1420             : 
    1421             :         /* make a temporary copy, that we pass to the dispatch function */
    1422           0 :         state->tmp = state->orig;
    1423             : 
    1424           0 :         subreq = dcerpc_fss_RecoveryCompleteShadowCopySet_r_send(state, ev, h, &state->tmp);
    1425           0 :         if (tevent_req_nomem(subreq, req)) {
    1426           0 :                 return tevent_req_post(req, ev);
    1427             :         }
    1428           0 :         tevent_req_set_callback(subreq, dcerpc_fss_RecoveryCompleteShadowCopySet_done, req);
    1429           0 :         return req;
    1430             : }
    1431             : 
    1432           0 : static void dcerpc_fss_RecoveryCompleteShadowCopySet_done(struct tevent_req *subreq)
    1433             : {
    1434           0 :         struct tevent_req *req = tevent_req_callback_data(
    1435             :                 subreq, struct tevent_req);
    1436           0 :         struct dcerpc_fss_RecoveryCompleteShadowCopySet_state *state = tevent_req_data(
    1437             :                 req, struct dcerpc_fss_RecoveryCompleteShadowCopySet_state);
    1438           0 :         NTSTATUS status;
    1439           0 :         TALLOC_CTX *mem_ctx;
    1440             : 
    1441           0 :         if (state->out_mem_ctx) {
    1442           0 :                 mem_ctx = state->out_mem_ctx;
    1443             :         } else {
    1444           0 :                 mem_ctx = state;
    1445             :         }
    1446             : 
    1447           0 :         status = dcerpc_fss_RecoveryCompleteShadowCopySet_r_recv(subreq, mem_ctx);
    1448           0 :         TALLOC_FREE(subreq);
    1449           0 :         if (tevent_req_nterror(req, status)) {
    1450           0 :                 return;
    1451             :         }
    1452             : 
    1453             :         /* Copy out parameters */
    1454             : 
    1455             :         /* Copy result */
    1456           0 :         state->orig.out.result = state->tmp.out.result;
    1457             : 
    1458             :         /* Reset temporary structure */
    1459           0 :         NDR_ZERO_STRUCT(state->tmp);
    1460             : 
    1461           0 :         tevent_req_done(req);
    1462             : }
    1463             : 
    1464           0 : NTSTATUS dcerpc_fss_RecoveryCompleteShadowCopySet_recv(struct tevent_req *req,
    1465             :                                                        TALLOC_CTX *mem_ctx,
    1466             :                                                        uint32_t *result)
    1467             : {
    1468           0 :         struct dcerpc_fss_RecoveryCompleteShadowCopySet_state *state = tevent_req_data(
    1469             :                 req, struct dcerpc_fss_RecoveryCompleteShadowCopySet_state);
    1470           0 :         NTSTATUS status;
    1471             : 
    1472           0 :         if (tevent_req_is_nterror(req, &status)) {
    1473           0 :                 tevent_req_received(req);
    1474           0 :                 return status;
    1475             :         }
    1476             : 
    1477             :         /* Steal possible out parameters to the callers context */
    1478           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1479             : 
    1480             :         /* Return result */
    1481           0 :         *result = state->orig.out.result;
    1482             : 
    1483           0 :         tevent_req_received(req);
    1484           0 :         return NT_STATUS_OK;
    1485             : }
    1486             : 
    1487           0 : NTSTATUS dcerpc_fss_RecoveryCompleteShadowCopySet(struct dcerpc_binding_handle *h,
    1488             :                                                   TALLOC_CTX *mem_ctx,
    1489             :                                                   struct GUID _ShadowCopySetId /* [in]  */,
    1490             :                                                   uint32_t *result)
    1491             : {
    1492           0 :         struct fss_RecoveryCompleteShadowCopySet r;
    1493           0 :         NTSTATUS status;
    1494             : 
    1495             :         /* In parameters */
    1496           0 :         r.in.ShadowCopySetId = _ShadowCopySetId;
    1497             : 
    1498             :         /* Out parameters */
    1499             : 
    1500             :         /* Result */
    1501           0 :         NDR_ZERO_STRUCT(r.out.result);
    1502             : 
    1503           0 :         status = dcerpc_fss_RecoveryCompleteShadowCopySet_r(h, mem_ctx, &r);
    1504           0 :         if (!NT_STATUS_IS_OK(status)) {
    1505           0 :                 return status;
    1506             :         }
    1507             : 
    1508             :         /* Return variables */
    1509             : 
    1510             :         /* Return result */
    1511           0 :         *result = r.out.result;
    1512             : 
    1513           0 :         return NT_STATUS_OK;
    1514             : }
    1515             : 
    1516             : struct dcerpc_fss_AbortShadowCopySet_r_state {
    1517             :         TALLOC_CTX *out_mem_ctx;
    1518             : };
    1519             : 
    1520             : static void dcerpc_fss_AbortShadowCopySet_r_done(struct tevent_req *subreq);
    1521             : 
    1522           0 : struct tevent_req *dcerpc_fss_AbortShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
    1523             :         struct tevent_context *ev,
    1524             :         struct dcerpc_binding_handle *h,
    1525             :         struct fss_AbortShadowCopySet *r)
    1526             : {
    1527           0 :         struct tevent_req *req;
    1528           0 :         struct dcerpc_fss_AbortShadowCopySet_r_state *state;
    1529           0 :         struct tevent_req *subreq;
    1530             : 
    1531           0 :         req = tevent_req_create(mem_ctx, &state,
    1532             :                                 struct dcerpc_fss_AbortShadowCopySet_r_state);
    1533           0 :         if (req == NULL) {
    1534           0 :                 return NULL;
    1535             :         }
    1536             : 
    1537           0 :         state->out_mem_ctx = NULL;
    1538             : 
    1539           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1540             :                         NULL, &ndr_table_FileServerVssAgent,
    1541             :                         NDR_FSS_ABORTSHADOWCOPYSET, state, r);
    1542           0 :         if (tevent_req_nomem(subreq, req)) {
    1543           0 :                 return tevent_req_post(req, ev);
    1544             :         }
    1545           0 :         tevent_req_set_callback(subreq, dcerpc_fss_AbortShadowCopySet_r_done, req);
    1546             : 
    1547           0 :         return req;
    1548             : }
    1549             : 
    1550           0 : static void dcerpc_fss_AbortShadowCopySet_r_done(struct tevent_req *subreq)
    1551             : {
    1552           0 :         struct tevent_req *req =
    1553           0 :                 tevent_req_callback_data(subreq,
    1554             :                 struct tevent_req);
    1555           0 :         NTSTATUS status;
    1556             : 
    1557           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1558           0 :         TALLOC_FREE(subreq);
    1559           0 :         if (tevent_req_nterror(req, status)) {
    1560           0 :                 return;
    1561             :         }
    1562             : 
    1563           0 :         tevent_req_done(req);
    1564             : }
    1565             : 
    1566           0 : NTSTATUS dcerpc_fss_AbortShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1567             : {
    1568           0 :         struct dcerpc_fss_AbortShadowCopySet_r_state *state =
    1569           0 :                 tevent_req_data(req,
    1570             :                 struct dcerpc_fss_AbortShadowCopySet_r_state);
    1571           0 :         NTSTATUS status;
    1572             : 
    1573           0 :         if (tevent_req_is_nterror(req, &status)) {
    1574           0 :                 tevent_req_received(req);
    1575           0 :                 return status;
    1576             :         }
    1577             : 
    1578           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1579             : 
    1580           0 :         tevent_req_received(req);
    1581           0 :         return NT_STATUS_OK;
    1582             : }
    1583             : 
    1584           2 : NTSTATUS dcerpc_fss_AbortShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_AbortShadowCopySet *r)
    1585             : {
    1586           0 :         NTSTATUS status;
    1587             : 
    1588           2 :         status = dcerpc_binding_handle_call(h,
    1589             :                         NULL, &ndr_table_FileServerVssAgent,
    1590             :                         NDR_FSS_ABORTSHADOWCOPYSET, mem_ctx, r);
    1591             : 
    1592           2 :         return status;
    1593             : }
    1594             : 
    1595             : struct dcerpc_fss_AbortShadowCopySet_state {
    1596             :         struct fss_AbortShadowCopySet orig;
    1597             :         struct fss_AbortShadowCopySet tmp;
    1598             :         TALLOC_CTX *out_mem_ctx;
    1599             : };
    1600             : 
    1601             : static void dcerpc_fss_AbortShadowCopySet_done(struct tevent_req *subreq);
    1602             : 
    1603           0 : struct tevent_req *dcerpc_fss_AbortShadowCopySet_send(TALLOC_CTX *mem_ctx,
    1604             :                                                       struct tevent_context *ev,
    1605             :                                                       struct dcerpc_binding_handle *h,
    1606             :                                                       struct GUID _ShadowCopySetId /* [in]  */)
    1607             : {
    1608           0 :         struct tevent_req *req;
    1609           0 :         struct dcerpc_fss_AbortShadowCopySet_state *state;
    1610           0 :         struct tevent_req *subreq;
    1611             : 
    1612           0 :         req = tevent_req_create(mem_ctx, &state,
    1613             :                                 struct dcerpc_fss_AbortShadowCopySet_state);
    1614           0 :         if (req == NULL) {
    1615           0 :                 return NULL;
    1616             :         }
    1617           0 :         state->out_mem_ctx = NULL;
    1618             : 
    1619             :         /* In parameters */
    1620           0 :         state->orig.in.ShadowCopySetId = _ShadowCopySetId;
    1621             : 
    1622             :         /* Out parameters */
    1623             : 
    1624             :         /* Result */
    1625           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1626             : 
    1627             :         /* make a temporary copy, that we pass to the dispatch function */
    1628           0 :         state->tmp = state->orig;
    1629             : 
    1630           0 :         subreq = dcerpc_fss_AbortShadowCopySet_r_send(state, ev, h, &state->tmp);
    1631           0 :         if (tevent_req_nomem(subreq, req)) {
    1632           0 :                 return tevent_req_post(req, ev);
    1633             :         }
    1634           0 :         tevent_req_set_callback(subreq, dcerpc_fss_AbortShadowCopySet_done, req);
    1635           0 :         return req;
    1636             : }
    1637             : 
    1638           0 : static void dcerpc_fss_AbortShadowCopySet_done(struct tevent_req *subreq)
    1639             : {
    1640           0 :         struct tevent_req *req = tevent_req_callback_data(
    1641             :                 subreq, struct tevent_req);
    1642           0 :         struct dcerpc_fss_AbortShadowCopySet_state *state = tevent_req_data(
    1643             :                 req, struct dcerpc_fss_AbortShadowCopySet_state);
    1644           0 :         NTSTATUS status;
    1645           0 :         TALLOC_CTX *mem_ctx;
    1646             : 
    1647           0 :         if (state->out_mem_ctx) {
    1648           0 :                 mem_ctx = state->out_mem_ctx;
    1649             :         } else {
    1650           0 :                 mem_ctx = state;
    1651             :         }
    1652             : 
    1653           0 :         status = dcerpc_fss_AbortShadowCopySet_r_recv(subreq, mem_ctx);
    1654           0 :         TALLOC_FREE(subreq);
    1655           0 :         if (tevent_req_nterror(req, status)) {
    1656           0 :                 return;
    1657             :         }
    1658             : 
    1659             :         /* Copy out parameters */
    1660             : 
    1661             :         /* Copy result */
    1662           0 :         state->orig.out.result = state->tmp.out.result;
    1663             : 
    1664             :         /* Reset temporary structure */
    1665           0 :         NDR_ZERO_STRUCT(state->tmp);
    1666             : 
    1667           0 :         tevent_req_done(req);
    1668             : }
    1669             : 
    1670           0 : NTSTATUS dcerpc_fss_AbortShadowCopySet_recv(struct tevent_req *req,
    1671             :                                             TALLOC_CTX *mem_ctx,
    1672             :                                             uint32_t *result)
    1673             : {
    1674           0 :         struct dcerpc_fss_AbortShadowCopySet_state *state = tevent_req_data(
    1675             :                 req, struct dcerpc_fss_AbortShadowCopySet_state);
    1676           0 :         NTSTATUS status;
    1677             : 
    1678           0 :         if (tevent_req_is_nterror(req, &status)) {
    1679           0 :                 tevent_req_received(req);
    1680           0 :                 return status;
    1681             :         }
    1682             : 
    1683             :         /* Steal possible out parameters to the callers context */
    1684           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1685             : 
    1686             :         /* Return result */
    1687           0 :         *result = state->orig.out.result;
    1688             : 
    1689           0 :         tevent_req_received(req);
    1690           0 :         return NT_STATUS_OK;
    1691             : }
    1692             : 
    1693           0 : NTSTATUS dcerpc_fss_AbortShadowCopySet(struct dcerpc_binding_handle *h,
    1694             :                                        TALLOC_CTX *mem_ctx,
    1695             :                                        struct GUID _ShadowCopySetId /* [in]  */,
    1696             :                                        uint32_t *result)
    1697             : {
    1698           0 :         struct fss_AbortShadowCopySet r;
    1699           0 :         NTSTATUS status;
    1700             : 
    1701             :         /* In parameters */
    1702           0 :         r.in.ShadowCopySetId = _ShadowCopySetId;
    1703             : 
    1704             :         /* Out parameters */
    1705             : 
    1706             :         /* Result */
    1707           0 :         NDR_ZERO_STRUCT(r.out.result);
    1708             : 
    1709           0 :         status = dcerpc_fss_AbortShadowCopySet_r(h, mem_ctx, &r);
    1710           0 :         if (!NT_STATUS_IS_OK(status)) {
    1711           0 :                 return status;
    1712             :         }
    1713             : 
    1714             :         /* Return variables */
    1715             : 
    1716             :         /* Return result */
    1717           0 :         *result = r.out.result;
    1718             : 
    1719           0 :         return NT_STATUS_OK;
    1720             : }
    1721             : 
    1722             : struct dcerpc_fss_IsPathSupported_r_state {
    1723             :         TALLOC_CTX *out_mem_ctx;
    1724             : };
    1725             : 
    1726             : static void dcerpc_fss_IsPathSupported_r_done(struct tevent_req *subreq);
    1727             : 
    1728           0 : struct tevent_req *dcerpc_fss_IsPathSupported_r_send(TALLOC_CTX *mem_ctx,
    1729             :         struct tevent_context *ev,
    1730             :         struct dcerpc_binding_handle *h,
    1731             :         struct fss_IsPathSupported *r)
    1732             : {
    1733           0 :         struct tevent_req *req;
    1734           0 :         struct dcerpc_fss_IsPathSupported_r_state *state;
    1735           0 :         struct tevent_req *subreq;
    1736             : 
    1737           0 :         req = tevent_req_create(mem_ctx, &state,
    1738             :                                 struct dcerpc_fss_IsPathSupported_r_state);
    1739           0 :         if (req == NULL) {
    1740           0 :                 return NULL;
    1741             :         }
    1742             : 
    1743           0 :         state->out_mem_ctx = talloc_new(state);
    1744           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1745           0 :                 return tevent_req_post(req, ev);
    1746             :         }
    1747             : 
    1748           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1749             :                         NULL, &ndr_table_FileServerVssAgent,
    1750           0 :                         NDR_FSS_ISPATHSUPPORTED, state->out_mem_ctx, r);
    1751           0 :         if (tevent_req_nomem(subreq, req)) {
    1752           0 :                 return tevent_req_post(req, ev);
    1753             :         }
    1754           0 :         tevent_req_set_callback(subreq, dcerpc_fss_IsPathSupported_r_done, req);
    1755             : 
    1756           0 :         return req;
    1757             : }
    1758             : 
    1759           0 : static void dcerpc_fss_IsPathSupported_r_done(struct tevent_req *subreq)
    1760             : {
    1761           0 :         struct tevent_req *req =
    1762           0 :                 tevent_req_callback_data(subreq,
    1763             :                 struct tevent_req);
    1764           0 :         NTSTATUS status;
    1765             : 
    1766           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1767           0 :         TALLOC_FREE(subreq);
    1768           0 :         if (tevent_req_nterror(req, status)) {
    1769           0 :                 return;
    1770             :         }
    1771             : 
    1772           0 :         tevent_req_done(req);
    1773             : }
    1774             : 
    1775           0 : NTSTATUS dcerpc_fss_IsPathSupported_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1776             : {
    1777           0 :         struct dcerpc_fss_IsPathSupported_r_state *state =
    1778           0 :                 tevent_req_data(req,
    1779             :                 struct dcerpc_fss_IsPathSupported_r_state);
    1780           0 :         NTSTATUS status;
    1781             : 
    1782           0 :         if (tevent_req_is_nterror(req, &status)) {
    1783           0 :                 tevent_req_received(req);
    1784           0 :                 return status;
    1785             :         }
    1786             : 
    1787           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1788             : 
    1789           0 :         tevent_req_received(req);
    1790           0 :         return NT_STATUS_OK;
    1791             : }
    1792             : 
    1793          28 : NTSTATUS dcerpc_fss_IsPathSupported_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_IsPathSupported *r)
    1794             : {
    1795           0 :         NTSTATUS status;
    1796             : 
    1797          28 :         status = dcerpc_binding_handle_call(h,
    1798             :                         NULL, &ndr_table_FileServerVssAgent,
    1799             :                         NDR_FSS_ISPATHSUPPORTED, mem_ctx, r);
    1800             : 
    1801          28 :         return status;
    1802             : }
    1803             : 
    1804             : struct dcerpc_fss_IsPathSupported_state {
    1805             :         struct fss_IsPathSupported orig;
    1806             :         struct fss_IsPathSupported tmp;
    1807             :         TALLOC_CTX *out_mem_ctx;
    1808             : };
    1809             : 
    1810             : static void dcerpc_fss_IsPathSupported_done(struct tevent_req *subreq);
    1811             : 
    1812           0 : struct tevent_req *dcerpc_fss_IsPathSupported_send(TALLOC_CTX *mem_ctx,
    1813             :                                                    struct tevent_context *ev,
    1814             :                                                    struct dcerpc_binding_handle *h,
    1815             :                                                    const char *_ShareName /* [in] [charset(UTF16),ref] */,
    1816             :                                                    uint32_t *_SupportedByThisProvider /* [out] [ref] */,
    1817             :                                                    const char **_OwnerMachineName /* [out] [charset(UTF16),ref] */)
    1818             : {
    1819           0 :         struct tevent_req *req;
    1820           0 :         struct dcerpc_fss_IsPathSupported_state *state;
    1821           0 :         struct tevent_req *subreq;
    1822             : 
    1823           0 :         req = tevent_req_create(mem_ctx, &state,
    1824             :                                 struct dcerpc_fss_IsPathSupported_state);
    1825           0 :         if (req == NULL) {
    1826           0 :                 return NULL;
    1827             :         }
    1828           0 :         state->out_mem_ctx = NULL;
    1829             : 
    1830             :         /* In parameters */
    1831           0 :         state->orig.in.ShareName = _ShareName;
    1832             : 
    1833             :         /* Out parameters */
    1834           0 :         state->orig.out.SupportedByThisProvider = _SupportedByThisProvider;
    1835           0 :         state->orig.out.OwnerMachineName = _OwnerMachineName;
    1836             : 
    1837             :         /* Result */
    1838           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1839             : 
    1840           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1841             :                              "dcerpc_fss_IsPathSupported_out_memory");
    1842           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1843           0 :                 return tevent_req_post(req, ev);
    1844             :         }
    1845             : 
    1846             :         /* make a temporary copy, that we pass to the dispatch function */
    1847           0 :         state->tmp = state->orig;
    1848             : 
    1849           0 :         subreq = dcerpc_fss_IsPathSupported_r_send(state, ev, h, &state->tmp);
    1850           0 :         if (tevent_req_nomem(subreq, req)) {
    1851           0 :                 return tevent_req_post(req, ev);
    1852             :         }
    1853           0 :         tevent_req_set_callback(subreq, dcerpc_fss_IsPathSupported_done, req);
    1854           0 :         return req;
    1855             : }
    1856             : 
    1857           0 : static void dcerpc_fss_IsPathSupported_done(struct tevent_req *subreq)
    1858             : {
    1859           0 :         struct tevent_req *req = tevent_req_callback_data(
    1860             :                 subreq, struct tevent_req);
    1861           0 :         struct dcerpc_fss_IsPathSupported_state *state = tevent_req_data(
    1862             :                 req, struct dcerpc_fss_IsPathSupported_state);
    1863           0 :         NTSTATUS status;
    1864           0 :         TALLOC_CTX *mem_ctx;
    1865             : 
    1866           0 :         if (state->out_mem_ctx) {
    1867           0 :                 mem_ctx = state->out_mem_ctx;
    1868             :         } else {
    1869           0 :                 mem_ctx = state;
    1870             :         }
    1871             : 
    1872           0 :         status = dcerpc_fss_IsPathSupported_r_recv(subreq, mem_ctx);
    1873           0 :         TALLOC_FREE(subreq);
    1874           0 :         if (tevent_req_nterror(req, status)) {
    1875           0 :                 return;
    1876             :         }
    1877             : 
    1878             :         /* Copy out parameters */
    1879           0 :         *state->orig.out.SupportedByThisProvider = *state->tmp.out.SupportedByThisProvider;
    1880           0 :         *state->orig.out.OwnerMachineName = *state->tmp.out.OwnerMachineName;
    1881             : 
    1882             :         /* Copy result */
    1883           0 :         state->orig.out.result = state->tmp.out.result;
    1884             : 
    1885             :         /* Reset temporary structure */
    1886           0 :         NDR_ZERO_STRUCT(state->tmp);
    1887             : 
    1888           0 :         tevent_req_done(req);
    1889             : }
    1890             : 
    1891           0 : NTSTATUS dcerpc_fss_IsPathSupported_recv(struct tevent_req *req,
    1892             :                                          TALLOC_CTX *mem_ctx,
    1893             :                                          uint32_t *result)
    1894             : {
    1895           0 :         struct dcerpc_fss_IsPathSupported_state *state = tevent_req_data(
    1896             :                 req, struct dcerpc_fss_IsPathSupported_state);
    1897           0 :         NTSTATUS status;
    1898             : 
    1899           0 :         if (tevent_req_is_nterror(req, &status)) {
    1900           0 :                 tevent_req_received(req);
    1901           0 :                 return status;
    1902             :         }
    1903             : 
    1904             :         /* Steal possible out parameters to the callers context */
    1905           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1906             : 
    1907             :         /* Return result */
    1908           0 :         *result = state->orig.out.result;
    1909             : 
    1910           0 :         tevent_req_received(req);
    1911           0 :         return NT_STATUS_OK;
    1912             : }
    1913             : 
    1914           0 : NTSTATUS dcerpc_fss_IsPathSupported(struct dcerpc_binding_handle *h,
    1915             :                                     TALLOC_CTX *mem_ctx,
    1916             :                                     const char *_ShareName /* [in] [charset(UTF16),ref] */,
    1917             :                                     uint32_t *_SupportedByThisProvider /* [out] [ref] */,
    1918             :                                     const char **_OwnerMachineName /* [out] [charset(UTF16),ref] */,
    1919             :                                     uint32_t *result)
    1920             : {
    1921           0 :         struct fss_IsPathSupported r;
    1922           0 :         NTSTATUS status;
    1923             : 
    1924             :         /* In parameters */
    1925           0 :         r.in.ShareName = _ShareName;
    1926             : 
    1927             :         /* Out parameters */
    1928           0 :         r.out.SupportedByThisProvider = _SupportedByThisProvider;
    1929           0 :         r.out.OwnerMachineName = _OwnerMachineName;
    1930             : 
    1931             :         /* Result */
    1932           0 :         NDR_ZERO_STRUCT(r.out.result);
    1933             : 
    1934           0 :         status = dcerpc_fss_IsPathSupported_r(h, mem_ctx, &r);
    1935           0 :         if (!NT_STATUS_IS_OK(status)) {
    1936           0 :                 return status;
    1937             :         }
    1938             : 
    1939             :         /* Return variables */
    1940           0 :         *_SupportedByThisProvider = *r.out.SupportedByThisProvider;
    1941           0 :         *_OwnerMachineName = *r.out.OwnerMachineName;
    1942             : 
    1943             :         /* Return result */
    1944           0 :         *result = r.out.result;
    1945             : 
    1946           0 :         return NT_STATUS_OK;
    1947             : }
    1948             : 
    1949             : struct dcerpc_fss_IsPathShadowCopied_r_state {
    1950             :         TALLOC_CTX *out_mem_ctx;
    1951             : };
    1952             : 
    1953             : static void dcerpc_fss_IsPathShadowCopied_r_done(struct tevent_req *subreq);
    1954             : 
    1955           0 : struct tevent_req *dcerpc_fss_IsPathShadowCopied_r_send(TALLOC_CTX *mem_ctx,
    1956             :         struct tevent_context *ev,
    1957             :         struct dcerpc_binding_handle *h,
    1958             :         struct fss_IsPathShadowCopied *r)
    1959             : {
    1960           0 :         struct tevent_req *req;
    1961           0 :         struct dcerpc_fss_IsPathShadowCopied_r_state *state;
    1962           0 :         struct tevent_req *subreq;
    1963             : 
    1964           0 :         req = tevent_req_create(mem_ctx, &state,
    1965             :                                 struct dcerpc_fss_IsPathShadowCopied_r_state);
    1966           0 :         if (req == NULL) {
    1967           0 :                 return NULL;
    1968             :         }
    1969             : 
    1970           0 :         state->out_mem_ctx = talloc_new(state);
    1971           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1972           0 :                 return tevent_req_post(req, ev);
    1973             :         }
    1974             : 
    1975           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1976             :                         NULL, &ndr_table_FileServerVssAgent,
    1977           0 :                         NDR_FSS_ISPATHSHADOWCOPIED, state->out_mem_ctx, r);
    1978           0 :         if (tevent_req_nomem(subreq, req)) {
    1979           0 :                 return tevent_req_post(req, ev);
    1980             :         }
    1981           0 :         tevent_req_set_callback(subreq, dcerpc_fss_IsPathShadowCopied_r_done, req);
    1982             : 
    1983           0 :         return req;
    1984             : }
    1985             : 
    1986           0 : static void dcerpc_fss_IsPathShadowCopied_r_done(struct tevent_req *subreq)
    1987             : {
    1988           0 :         struct tevent_req *req =
    1989           0 :                 tevent_req_callback_data(subreq,
    1990             :                 struct tevent_req);
    1991           0 :         NTSTATUS status;
    1992             : 
    1993           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1994           0 :         TALLOC_FREE(subreq);
    1995           0 :         if (tevent_req_nterror(req, status)) {
    1996           0 :                 return;
    1997             :         }
    1998             : 
    1999           0 :         tevent_req_done(req);
    2000             : }
    2001             : 
    2002           0 : NTSTATUS dcerpc_fss_IsPathShadowCopied_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2003             : {
    2004           0 :         struct dcerpc_fss_IsPathShadowCopied_r_state *state =
    2005           0 :                 tevent_req_data(req,
    2006             :                 struct dcerpc_fss_IsPathShadowCopied_r_state);
    2007           0 :         NTSTATUS status;
    2008             : 
    2009           0 :         if (tevent_req_is_nterror(req, &status)) {
    2010           0 :                 tevent_req_received(req);
    2011           0 :                 return status;
    2012             :         }
    2013             : 
    2014           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2015             : 
    2016           0 :         tevent_req_received(req);
    2017           0 :         return NT_STATUS_OK;
    2018             : }
    2019             : 
    2020           0 : NTSTATUS dcerpc_fss_IsPathShadowCopied_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_IsPathShadowCopied *r)
    2021             : {
    2022           0 :         NTSTATUS status;
    2023             : 
    2024           0 :         status = dcerpc_binding_handle_call(h,
    2025             :                         NULL, &ndr_table_FileServerVssAgent,
    2026             :                         NDR_FSS_ISPATHSHADOWCOPIED, mem_ctx, r);
    2027             : 
    2028           0 :         return status;
    2029             : }
    2030             : 
    2031             : struct dcerpc_fss_IsPathShadowCopied_state {
    2032             :         struct fss_IsPathShadowCopied orig;
    2033             :         struct fss_IsPathShadowCopied tmp;
    2034             :         TALLOC_CTX *out_mem_ctx;
    2035             : };
    2036             : 
    2037             : static void dcerpc_fss_IsPathShadowCopied_done(struct tevent_req *subreq);
    2038             : 
    2039           0 : struct tevent_req *dcerpc_fss_IsPathShadowCopied_send(TALLOC_CTX *mem_ctx,
    2040             :                                                       struct tevent_context *ev,
    2041             :                                                       struct dcerpc_binding_handle *h,
    2042             :                                                       const char *_ShareName /* [in] [charset(UTF16),ref] */,
    2043             :                                                       uint32_t *_ShadowCopyPresent /* [out] [ref] */,
    2044             :                                                       int32_t *_ShadowCopyCompatibility /* [out] [ref] */)
    2045             : {
    2046           0 :         struct tevent_req *req;
    2047           0 :         struct dcerpc_fss_IsPathShadowCopied_state *state;
    2048           0 :         struct tevent_req *subreq;
    2049             : 
    2050           0 :         req = tevent_req_create(mem_ctx, &state,
    2051             :                                 struct dcerpc_fss_IsPathShadowCopied_state);
    2052           0 :         if (req == NULL) {
    2053           0 :                 return NULL;
    2054             :         }
    2055           0 :         state->out_mem_ctx = NULL;
    2056             : 
    2057             :         /* In parameters */
    2058           0 :         state->orig.in.ShareName = _ShareName;
    2059             : 
    2060             :         /* Out parameters */
    2061           0 :         state->orig.out.ShadowCopyPresent = _ShadowCopyPresent;
    2062           0 :         state->orig.out.ShadowCopyCompatibility = _ShadowCopyCompatibility;
    2063             : 
    2064             :         /* Result */
    2065           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2066             : 
    2067           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2068             :                              "dcerpc_fss_IsPathShadowCopied_out_memory");
    2069           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2070           0 :                 return tevent_req_post(req, ev);
    2071             :         }
    2072             : 
    2073             :         /* make a temporary copy, that we pass to the dispatch function */
    2074           0 :         state->tmp = state->orig;
    2075             : 
    2076           0 :         subreq = dcerpc_fss_IsPathShadowCopied_r_send(state, ev, h, &state->tmp);
    2077           0 :         if (tevent_req_nomem(subreq, req)) {
    2078           0 :                 return tevent_req_post(req, ev);
    2079             :         }
    2080           0 :         tevent_req_set_callback(subreq, dcerpc_fss_IsPathShadowCopied_done, req);
    2081           0 :         return req;
    2082             : }
    2083             : 
    2084           0 : static void dcerpc_fss_IsPathShadowCopied_done(struct tevent_req *subreq)
    2085             : {
    2086           0 :         struct tevent_req *req = tevent_req_callback_data(
    2087             :                 subreq, struct tevent_req);
    2088           0 :         struct dcerpc_fss_IsPathShadowCopied_state *state = tevent_req_data(
    2089             :                 req, struct dcerpc_fss_IsPathShadowCopied_state);
    2090           0 :         NTSTATUS status;
    2091           0 :         TALLOC_CTX *mem_ctx;
    2092             : 
    2093           0 :         if (state->out_mem_ctx) {
    2094           0 :                 mem_ctx = state->out_mem_ctx;
    2095             :         } else {
    2096           0 :                 mem_ctx = state;
    2097             :         }
    2098             : 
    2099           0 :         status = dcerpc_fss_IsPathShadowCopied_r_recv(subreq, mem_ctx);
    2100           0 :         TALLOC_FREE(subreq);
    2101           0 :         if (tevent_req_nterror(req, status)) {
    2102           0 :                 return;
    2103             :         }
    2104             : 
    2105             :         /* Copy out parameters */
    2106           0 :         *state->orig.out.ShadowCopyPresent = *state->tmp.out.ShadowCopyPresent;
    2107           0 :         *state->orig.out.ShadowCopyCompatibility = *state->tmp.out.ShadowCopyCompatibility;
    2108             : 
    2109             :         /* Copy result */
    2110           0 :         state->orig.out.result = state->tmp.out.result;
    2111             : 
    2112             :         /* Reset temporary structure */
    2113           0 :         NDR_ZERO_STRUCT(state->tmp);
    2114             : 
    2115           0 :         tevent_req_done(req);
    2116             : }
    2117             : 
    2118           0 : NTSTATUS dcerpc_fss_IsPathShadowCopied_recv(struct tevent_req *req,
    2119             :                                             TALLOC_CTX *mem_ctx,
    2120             :                                             uint32_t *result)
    2121             : {
    2122           0 :         struct dcerpc_fss_IsPathShadowCopied_state *state = tevent_req_data(
    2123             :                 req, struct dcerpc_fss_IsPathShadowCopied_state);
    2124           0 :         NTSTATUS status;
    2125             : 
    2126           0 :         if (tevent_req_is_nterror(req, &status)) {
    2127           0 :                 tevent_req_received(req);
    2128           0 :                 return status;
    2129             :         }
    2130             : 
    2131             :         /* Steal possible out parameters to the callers context */
    2132           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2133             : 
    2134             :         /* Return result */
    2135           0 :         *result = state->orig.out.result;
    2136             : 
    2137           0 :         tevent_req_received(req);
    2138           0 :         return NT_STATUS_OK;
    2139             : }
    2140             : 
    2141           0 : NTSTATUS dcerpc_fss_IsPathShadowCopied(struct dcerpc_binding_handle *h,
    2142             :                                        TALLOC_CTX *mem_ctx,
    2143             :                                        const char *_ShareName /* [in] [charset(UTF16),ref] */,
    2144             :                                        uint32_t *_ShadowCopyPresent /* [out] [ref] */,
    2145             :                                        int32_t *_ShadowCopyCompatibility /* [out] [ref] */,
    2146             :                                        uint32_t *result)
    2147             : {
    2148           0 :         struct fss_IsPathShadowCopied r;
    2149           0 :         NTSTATUS status;
    2150             : 
    2151             :         /* In parameters */
    2152           0 :         r.in.ShareName = _ShareName;
    2153             : 
    2154             :         /* Out parameters */
    2155           0 :         r.out.ShadowCopyPresent = _ShadowCopyPresent;
    2156           0 :         r.out.ShadowCopyCompatibility = _ShadowCopyCompatibility;
    2157             : 
    2158             :         /* Result */
    2159           0 :         NDR_ZERO_STRUCT(r.out.result);
    2160             : 
    2161           0 :         status = dcerpc_fss_IsPathShadowCopied_r(h, mem_ctx, &r);
    2162           0 :         if (!NT_STATUS_IS_OK(status)) {
    2163           0 :                 return status;
    2164             :         }
    2165             : 
    2166             :         /* Return variables */
    2167           0 :         *_ShadowCopyPresent = *r.out.ShadowCopyPresent;
    2168           0 :         *_ShadowCopyCompatibility = *r.out.ShadowCopyCompatibility;
    2169             : 
    2170             :         /* Return result */
    2171           0 :         *result = r.out.result;
    2172             : 
    2173           0 :         return NT_STATUS_OK;
    2174             : }
    2175             : 
    2176             : struct dcerpc_fss_GetShareMapping_r_state {
    2177             :         TALLOC_CTX *out_mem_ctx;
    2178             : };
    2179             : 
    2180             : static void dcerpc_fss_GetShareMapping_r_done(struct tevent_req *subreq);
    2181             : 
    2182           0 : struct tevent_req *dcerpc_fss_GetShareMapping_r_send(TALLOC_CTX *mem_ctx,
    2183             :         struct tevent_context *ev,
    2184             :         struct dcerpc_binding_handle *h,
    2185             :         struct fss_GetShareMapping *r)
    2186             : {
    2187           0 :         struct tevent_req *req;
    2188           0 :         struct dcerpc_fss_GetShareMapping_r_state *state;
    2189           0 :         struct tevent_req *subreq;
    2190             : 
    2191           0 :         req = tevent_req_create(mem_ctx, &state,
    2192             :                                 struct dcerpc_fss_GetShareMapping_r_state);
    2193           0 :         if (req == NULL) {
    2194           0 :                 return NULL;
    2195             :         }
    2196             : 
    2197           0 :         state->out_mem_ctx = talloc_new(state);
    2198           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2199           0 :                 return tevent_req_post(req, ev);
    2200             :         }
    2201             : 
    2202           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2203             :                         NULL, &ndr_table_FileServerVssAgent,
    2204           0 :                         NDR_FSS_GETSHAREMAPPING, state->out_mem_ctx, r);
    2205           0 :         if (tevent_req_nomem(subreq, req)) {
    2206           0 :                 return tevent_req_post(req, ev);
    2207             :         }
    2208           0 :         tevent_req_set_callback(subreq, dcerpc_fss_GetShareMapping_r_done, req);
    2209             : 
    2210           0 :         return req;
    2211             : }
    2212             : 
    2213           0 : static void dcerpc_fss_GetShareMapping_r_done(struct tevent_req *subreq)
    2214             : {
    2215           0 :         struct tevent_req *req =
    2216           0 :                 tevent_req_callback_data(subreq,
    2217             :                 struct tevent_req);
    2218           0 :         NTSTATUS status;
    2219             : 
    2220           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2221           0 :         TALLOC_FREE(subreq);
    2222           0 :         if (tevent_req_nterror(req, status)) {
    2223           0 :                 return;
    2224             :         }
    2225             : 
    2226           0 :         tevent_req_done(req);
    2227             : }
    2228             : 
    2229           0 : NTSTATUS dcerpc_fss_GetShareMapping_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2230             : {
    2231           0 :         struct dcerpc_fss_GetShareMapping_r_state *state =
    2232           0 :                 tevent_req_data(req,
    2233             :                 struct dcerpc_fss_GetShareMapping_r_state);
    2234           0 :         NTSTATUS status;
    2235             : 
    2236           0 :         if (tevent_req_is_nterror(req, &status)) {
    2237           0 :                 tevent_req_received(req);
    2238           0 :                 return status;
    2239             :         }
    2240             : 
    2241           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2242             : 
    2243           0 :         tevent_req_received(req);
    2244           0 :         return NT_STATUS_OK;
    2245             : }
    2246             : 
    2247          14 : NTSTATUS dcerpc_fss_GetShareMapping_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_GetShareMapping *r)
    2248             : {
    2249           0 :         NTSTATUS status;
    2250             : 
    2251          14 :         status = dcerpc_binding_handle_call(h,
    2252             :                         NULL, &ndr_table_FileServerVssAgent,
    2253             :                         NDR_FSS_GETSHAREMAPPING, mem_ctx, r);
    2254             : 
    2255          14 :         return status;
    2256             : }
    2257             : 
    2258             : struct dcerpc_fss_GetShareMapping_state {
    2259             :         struct fss_GetShareMapping orig;
    2260             :         struct fss_GetShareMapping tmp;
    2261             :         TALLOC_CTX *out_mem_ctx;
    2262             : };
    2263             : 
    2264             : static void dcerpc_fss_GetShareMapping_done(struct tevent_req *subreq);
    2265             : 
    2266           0 : struct tevent_req *dcerpc_fss_GetShareMapping_send(TALLOC_CTX *mem_ctx,
    2267             :                                                    struct tevent_context *ev,
    2268             :                                                    struct dcerpc_binding_handle *h,
    2269             :                                                    struct GUID _ShadowCopyId /* [in]  */,
    2270             :                                                    struct GUID _ShadowCopySetId /* [in]  */,
    2271             :                                                    const char *_ShareName /* [in] [charset(UTF16),ref] */,
    2272             :                                                    uint32_t _Level /* [in]  */,
    2273             :                                                    union fssagent_share_mapping *_ShareMapping /* [out] [ref,switch_is(Level)] */)
    2274             : {
    2275           0 :         struct tevent_req *req;
    2276           0 :         struct dcerpc_fss_GetShareMapping_state *state;
    2277           0 :         struct tevent_req *subreq;
    2278             : 
    2279           0 :         req = tevent_req_create(mem_ctx, &state,
    2280             :                                 struct dcerpc_fss_GetShareMapping_state);
    2281           0 :         if (req == NULL) {
    2282           0 :                 return NULL;
    2283             :         }
    2284           0 :         state->out_mem_ctx = NULL;
    2285             : 
    2286             :         /* In parameters */
    2287           0 :         state->orig.in.ShadowCopyId = _ShadowCopyId;
    2288           0 :         state->orig.in.ShadowCopySetId = _ShadowCopySetId;
    2289           0 :         state->orig.in.ShareName = _ShareName;
    2290           0 :         state->orig.in.Level = _Level;
    2291             : 
    2292             :         /* Out parameters */
    2293           0 :         state->orig.out.ShareMapping = _ShareMapping;
    2294             : 
    2295             :         /* Result */
    2296           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2297             : 
    2298           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2299             :                              "dcerpc_fss_GetShareMapping_out_memory");
    2300           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2301           0 :                 return tevent_req_post(req, ev);
    2302             :         }
    2303             : 
    2304             :         /* make a temporary copy, that we pass to the dispatch function */
    2305           0 :         state->tmp = state->orig;
    2306             : 
    2307           0 :         subreq = dcerpc_fss_GetShareMapping_r_send(state, ev, h, &state->tmp);
    2308           0 :         if (tevent_req_nomem(subreq, req)) {
    2309           0 :                 return tevent_req_post(req, ev);
    2310             :         }
    2311           0 :         tevent_req_set_callback(subreq, dcerpc_fss_GetShareMapping_done, req);
    2312           0 :         return req;
    2313             : }
    2314             : 
    2315           0 : static void dcerpc_fss_GetShareMapping_done(struct tevent_req *subreq)
    2316             : {
    2317           0 :         struct tevent_req *req = tevent_req_callback_data(
    2318             :                 subreq, struct tevent_req);
    2319           0 :         struct dcerpc_fss_GetShareMapping_state *state = tevent_req_data(
    2320             :                 req, struct dcerpc_fss_GetShareMapping_state);
    2321           0 :         NTSTATUS status;
    2322           0 :         TALLOC_CTX *mem_ctx;
    2323             : 
    2324           0 :         if (state->out_mem_ctx) {
    2325           0 :                 mem_ctx = state->out_mem_ctx;
    2326             :         } else {
    2327           0 :                 mem_ctx = state;
    2328             :         }
    2329             : 
    2330           0 :         status = dcerpc_fss_GetShareMapping_r_recv(subreq, mem_ctx);
    2331           0 :         TALLOC_FREE(subreq);
    2332           0 :         if (tevent_req_nterror(req, status)) {
    2333           0 :                 return;
    2334             :         }
    2335             : 
    2336             :         /* Copy out parameters */
    2337           0 :         *state->orig.out.ShareMapping = *state->tmp.out.ShareMapping;
    2338             : 
    2339             :         /* Copy result */
    2340           0 :         state->orig.out.result = state->tmp.out.result;
    2341             : 
    2342             :         /* Reset temporary structure */
    2343           0 :         NDR_ZERO_STRUCT(state->tmp);
    2344             : 
    2345           0 :         tevent_req_done(req);
    2346             : }
    2347             : 
    2348           0 : NTSTATUS dcerpc_fss_GetShareMapping_recv(struct tevent_req *req,
    2349             :                                          TALLOC_CTX *mem_ctx,
    2350             :                                          uint32_t *result)
    2351             : {
    2352           0 :         struct dcerpc_fss_GetShareMapping_state *state = tevent_req_data(
    2353             :                 req, struct dcerpc_fss_GetShareMapping_state);
    2354           0 :         NTSTATUS status;
    2355             : 
    2356           0 :         if (tevent_req_is_nterror(req, &status)) {
    2357           0 :                 tevent_req_received(req);
    2358           0 :                 return status;
    2359             :         }
    2360             : 
    2361             :         /* Steal possible out parameters to the callers context */
    2362           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2363             : 
    2364             :         /* Return result */
    2365           0 :         *result = state->orig.out.result;
    2366             : 
    2367           0 :         tevent_req_received(req);
    2368           0 :         return NT_STATUS_OK;
    2369             : }
    2370             : 
    2371           0 : NTSTATUS dcerpc_fss_GetShareMapping(struct dcerpc_binding_handle *h,
    2372             :                                     TALLOC_CTX *mem_ctx,
    2373             :                                     struct GUID _ShadowCopyId /* [in]  */,
    2374             :                                     struct GUID _ShadowCopySetId /* [in]  */,
    2375             :                                     const char *_ShareName /* [in] [charset(UTF16),ref] */,
    2376             :                                     uint32_t _Level /* [in]  */,
    2377             :                                     union fssagent_share_mapping *_ShareMapping /* [out] [ref,switch_is(Level)] */,
    2378             :                                     uint32_t *result)
    2379             : {
    2380           0 :         struct fss_GetShareMapping r;
    2381           0 :         NTSTATUS status;
    2382             : 
    2383             :         /* In parameters */
    2384           0 :         r.in.ShadowCopyId = _ShadowCopyId;
    2385           0 :         r.in.ShadowCopySetId = _ShadowCopySetId;
    2386           0 :         r.in.ShareName = _ShareName;
    2387           0 :         r.in.Level = _Level;
    2388             : 
    2389             :         /* Out parameters */
    2390           0 :         r.out.ShareMapping = _ShareMapping;
    2391             : 
    2392             :         /* Result */
    2393           0 :         NDR_ZERO_STRUCT(r.out.result);
    2394             : 
    2395           0 :         status = dcerpc_fss_GetShareMapping_r(h, mem_ctx, &r);
    2396           0 :         if (!NT_STATUS_IS_OK(status)) {
    2397           0 :                 return status;
    2398             :         }
    2399             : 
    2400             :         /* Return variables */
    2401           0 :         *_ShareMapping = *r.out.ShareMapping;
    2402             : 
    2403             :         /* Return result */
    2404           0 :         *result = r.out.result;
    2405             : 
    2406           0 :         return NT_STATUS_OK;
    2407             : }
    2408             : 
    2409             : struct dcerpc_fss_DeleteShareMapping_r_state {
    2410             :         TALLOC_CTX *out_mem_ctx;
    2411             : };
    2412             : 
    2413             : static void dcerpc_fss_DeleteShareMapping_r_done(struct tevent_req *subreq);
    2414             : 
    2415           0 : struct tevent_req *dcerpc_fss_DeleteShareMapping_r_send(TALLOC_CTX *mem_ctx,
    2416             :         struct tevent_context *ev,
    2417             :         struct dcerpc_binding_handle *h,
    2418             :         struct fss_DeleteShareMapping *r)
    2419             : {
    2420           0 :         struct tevent_req *req;
    2421           0 :         struct dcerpc_fss_DeleteShareMapping_r_state *state;
    2422           0 :         struct tevent_req *subreq;
    2423             : 
    2424           0 :         req = tevent_req_create(mem_ctx, &state,
    2425             :                                 struct dcerpc_fss_DeleteShareMapping_r_state);
    2426           0 :         if (req == NULL) {
    2427           0 :                 return NULL;
    2428             :         }
    2429             : 
    2430           0 :         state->out_mem_ctx = NULL;
    2431             : 
    2432           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2433             :                         NULL, &ndr_table_FileServerVssAgent,
    2434             :                         NDR_FSS_DELETESHAREMAPPING, state, r);
    2435           0 :         if (tevent_req_nomem(subreq, req)) {
    2436           0 :                 return tevent_req_post(req, ev);
    2437             :         }
    2438           0 :         tevent_req_set_callback(subreq, dcerpc_fss_DeleteShareMapping_r_done, req);
    2439             : 
    2440           0 :         return req;
    2441             : }
    2442             : 
    2443           0 : static void dcerpc_fss_DeleteShareMapping_r_done(struct tevent_req *subreq)
    2444             : {
    2445           0 :         struct tevent_req *req =
    2446           0 :                 tevent_req_callback_data(subreq,
    2447             :                 struct tevent_req);
    2448           0 :         NTSTATUS status;
    2449             : 
    2450           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2451           0 :         TALLOC_FREE(subreq);
    2452           0 :         if (tevent_req_nterror(req, status)) {
    2453           0 :                 return;
    2454             :         }
    2455             : 
    2456           0 :         tevent_req_done(req);
    2457             : }
    2458             : 
    2459           0 : NTSTATUS dcerpc_fss_DeleteShareMapping_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2460             : {
    2461           0 :         struct dcerpc_fss_DeleteShareMapping_r_state *state =
    2462           0 :                 tevent_req_data(req,
    2463             :                 struct dcerpc_fss_DeleteShareMapping_r_state);
    2464           0 :         NTSTATUS status;
    2465             : 
    2466           0 :         if (tevent_req_is_nterror(req, &status)) {
    2467           0 :                 tevent_req_received(req);
    2468           0 :                 return status;
    2469             :         }
    2470             : 
    2471           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2472             : 
    2473           0 :         tevent_req_received(req);
    2474           0 :         return NT_STATUS_OK;
    2475             : }
    2476             : 
    2477          14 : NTSTATUS dcerpc_fss_DeleteShareMapping_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_DeleteShareMapping *r)
    2478             : {
    2479           0 :         NTSTATUS status;
    2480             : 
    2481          14 :         status = dcerpc_binding_handle_call(h,
    2482             :                         NULL, &ndr_table_FileServerVssAgent,
    2483             :                         NDR_FSS_DELETESHAREMAPPING, mem_ctx, r);
    2484             : 
    2485          14 :         return status;
    2486             : }
    2487             : 
    2488             : struct dcerpc_fss_DeleteShareMapping_state {
    2489             :         struct fss_DeleteShareMapping orig;
    2490             :         struct fss_DeleteShareMapping tmp;
    2491             :         TALLOC_CTX *out_mem_ctx;
    2492             : };
    2493             : 
    2494             : static void dcerpc_fss_DeleteShareMapping_done(struct tevent_req *subreq);
    2495             : 
    2496           0 : struct tevent_req *dcerpc_fss_DeleteShareMapping_send(TALLOC_CTX *mem_ctx,
    2497             :                                                       struct tevent_context *ev,
    2498             :                                                       struct dcerpc_binding_handle *h,
    2499             :                                                       struct GUID _ShadowCopySetId /* [in]  */,
    2500             :                                                       struct GUID _ShadowCopyId /* [in]  */,
    2501             :                                                       const char *_ShareName /* [in] [charset(UTF16),ref] */)
    2502             : {
    2503           0 :         struct tevent_req *req;
    2504           0 :         struct dcerpc_fss_DeleteShareMapping_state *state;
    2505           0 :         struct tevent_req *subreq;
    2506             : 
    2507           0 :         req = tevent_req_create(mem_ctx, &state,
    2508             :                                 struct dcerpc_fss_DeleteShareMapping_state);
    2509           0 :         if (req == NULL) {
    2510           0 :                 return NULL;
    2511             :         }
    2512           0 :         state->out_mem_ctx = NULL;
    2513             : 
    2514             :         /* In parameters */
    2515           0 :         state->orig.in.ShadowCopySetId = _ShadowCopySetId;
    2516           0 :         state->orig.in.ShadowCopyId = _ShadowCopyId;
    2517           0 :         state->orig.in.ShareName = _ShareName;
    2518             : 
    2519             :         /* Out parameters */
    2520             : 
    2521             :         /* Result */
    2522           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2523             : 
    2524             :         /* make a temporary copy, that we pass to the dispatch function */
    2525           0 :         state->tmp = state->orig;
    2526             : 
    2527           0 :         subreq = dcerpc_fss_DeleteShareMapping_r_send(state, ev, h, &state->tmp);
    2528           0 :         if (tevent_req_nomem(subreq, req)) {
    2529           0 :                 return tevent_req_post(req, ev);
    2530             :         }
    2531           0 :         tevent_req_set_callback(subreq, dcerpc_fss_DeleteShareMapping_done, req);
    2532           0 :         return req;
    2533             : }
    2534             : 
    2535           0 : static void dcerpc_fss_DeleteShareMapping_done(struct tevent_req *subreq)
    2536             : {
    2537           0 :         struct tevent_req *req = tevent_req_callback_data(
    2538             :                 subreq, struct tevent_req);
    2539           0 :         struct dcerpc_fss_DeleteShareMapping_state *state = tevent_req_data(
    2540             :                 req, struct dcerpc_fss_DeleteShareMapping_state);
    2541           0 :         NTSTATUS status;
    2542           0 :         TALLOC_CTX *mem_ctx;
    2543             : 
    2544           0 :         if (state->out_mem_ctx) {
    2545           0 :                 mem_ctx = state->out_mem_ctx;
    2546             :         } else {
    2547           0 :                 mem_ctx = state;
    2548             :         }
    2549             : 
    2550           0 :         status = dcerpc_fss_DeleteShareMapping_r_recv(subreq, mem_ctx);
    2551           0 :         TALLOC_FREE(subreq);
    2552           0 :         if (tevent_req_nterror(req, status)) {
    2553           0 :                 return;
    2554             :         }
    2555             : 
    2556             :         /* Copy out parameters */
    2557             : 
    2558             :         /* Copy result */
    2559           0 :         state->orig.out.result = state->tmp.out.result;
    2560             : 
    2561             :         /* Reset temporary structure */
    2562           0 :         NDR_ZERO_STRUCT(state->tmp);
    2563             : 
    2564           0 :         tevent_req_done(req);
    2565             : }
    2566             : 
    2567           0 : NTSTATUS dcerpc_fss_DeleteShareMapping_recv(struct tevent_req *req,
    2568             :                                             TALLOC_CTX *mem_ctx,
    2569             :                                             uint32_t *result)
    2570             : {
    2571           0 :         struct dcerpc_fss_DeleteShareMapping_state *state = tevent_req_data(
    2572             :                 req, struct dcerpc_fss_DeleteShareMapping_state);
    2573           0 :         NTSTATUS status;
    2574             : 
    2575           0 :         if (tevent_req_is_nterror(req, &status)) {
    2576           0 :                 tevent_req_received(req);
    2577           0 :                 return status;
    2578             :         }
    2579             : 
    2580             :         /* Steal possible out parameters to the callers context */
    2581           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2582             : 
    2583             :         /* Return result */
    2584           0 :         *result = state->orig.out.result;
    2585             : 
    2586           0 :         tevent_req_received(req);
    2587           0 :         return NT_STATUS_OK;
    2588             : }
    2589             : 
    2590           0 : NTSTATUS dcerpc_fss_DeleteShareMapping(struct dcerpc_binding_handle *h,
    2591             :                                        TALLOC_CTX *mem_ctx,
    2592             :                                        struct GUID _ShadowCopySetId /* [in]  */,
    2593             :                                        struct GUID _ShadowCopyId /* [in]  */,
    2594             :                                        const char *_ShareName /* [in] [charset(UTF16),ref] */,
    2595             :                                        uint32_t *result)
    2596             : {
    2597           0 :         struct fss_DeleteShareMapping r;
    2598           0 :         NTSTATUS status;
    2599             : 
    2600             :         /* In parameters */
    2601           0 :         r.in.ShadowCopySetId = _ShadowCopySetId;
    2602           0 :         r.in.ShadowCopyId = _ShadowCopyId;
    2603           0 :         r.in.ShareName = _ShareName;
    2604             : 
    2605             :         /* Out parameters */
    2606             : 
    2607             :         /* Result */
    2608           0 :         NDR_ZERO_STRUCT(r.out.result);
    2609             : 
    2610           0 :         status = dcerpc_fss_DeleteShareMapping_r(h, mem_ctx, &r);
    2611           0 :         if (!NT_STATUS_IS_OK(status)) {
    2612           0 :                 return status;
    2613             :         }
    2614             : 
    2615             :         /* Return variables */
    2616             : 
    2617             :         /* Return result */
    2618           0 :         *result = r.out.result;
    2619             : 
    2620           0 :         return NT_STATUS_OK;
    2621             : }
    2622             : 
    2623             : struct dcerpc_fss_PrepareShadowCopySet_r_state {
    2624             :         TALLOC_CTX *out_mem_ctx;
    2625             : };
    2626             : 
    2627             : static void dcerpc_fss_PrepareShadowCopySet_r_done(struct tevent_req *subreq);
    2628             : 
    2629           0 : struct tevent_req *dcerpc_fss_PrepareShadowCopySet_r_send(TALLOC_CTX *mem_ctx,
    2630             :         struct tevent_context *ev,
    2631             :         struct dcerpc_binding_handle *h,
    2632             :         struct fss_PrepareShadowCopySet *r)
    2633             : {
    2634           0 :         struct tevent_req *req;
    2635           0 :         struct dcerpc_fss_PrepareShadowCopySet_r_state *state;
    2636           0 :         struct tevent_req *subreq;
    2637             : 
    2638           0 :         req = tevent_req_create(mem_ctx, &state,
    2639             :                                 struct dcerpc_fss_PrepareShadowCopySet_r_state);
    2640           0 :         if (req == NULL) {
    2641           0 :                 return NULL;
    2642             :         }
    2643             : 
    2644           0 :         state->out_mem_ctx = NULL;
    2645             : 
    2646           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2647             :                         NULL, &ndr_table_FileServerVssAgent,
    2648             :                         NDR_FSS_PREPARESHADOWCOPYSET, state, r);
    2649           0 :         if (tevent_req_nomem(subreq, req)) {
    2650           0 :                 return tevent_req_post(req, ev);
    2651             :         }
    2652           0 :         tevent_req_set_callback(subreq, dcerpc_fss_PrepareShadowCopySet_r_done, req);
    2653             : 
    2654           0 :         return req;
    2655             : }
    2656             : 
    2657           0 : static void dcerpc_fss_PrepareShadowCopySet_r_done(struct tevent_req *subreq)
    2658             : {
    2659           0 :         struct tevent_req *req =
    2660           0 :                 tevent_req_callback_data(subreq,
    2661             :                 struct tevent_req);
    2662           0 :         NTSTATUS status;
    2663             : 
    2664           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2665           0 :         TALLOC_FREE(subreq);
    2666           0 :         if (tevent_req_nterror(req, status)) {
    2667           0 :                 return;
    2668             :         }
    2669             : 
    2670           0 :         tevent_req_done(req);
    2671             : }
    2672             : 
    2673           0 : NTSTATUS dcerpc_fss_PrepareShadowCopySet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2674             : {
    2675           0 :         struct dcerpc_fss_PrepareShadowCopySet_r_state *state =
    2676           0 :                 tevent_req_data(req,
    2677             :                 struct dcerpc_fss_PrepareShadowCopySet_r_state);
    2678           0 :         NTSTATUS status;
    2679             : 
    2680           0 :         if (tevent_req_is_nterror(req, &status)) {
    2681           0 :                 tevent_req_received(req);
    2682           0 :                 return status;
    2683             :         }
    2684             : 
    2685           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2686             : 
    2687           0 :         tevent_req_received(req);
    2688           0 :         return NT_STATUS_OK;
    2689             : }
    2690             : 
    2691          20 : NTSTATUS dcerpc_fss_PrepareShadowCopySet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct fss_PrepareShadowCopySet *r)
    2692             : {
    2693           0 :         NTSTATUS status;
    2694             : 
    2695          20 :         status = dcerpc_binding_handle_call(h,
    2696             :                         NULL, &ndr_table_FileServerVssAgent,
    2697             :                         NDR_FSS_PREPARESHADOWCOPYSET, mem_ctx, r);
    2698             : 
    2699          20 :         return status;
    2700             : }
    2701             : 
    2702             : struct dcerpc_fss_PrepareShadowCopySet_state {
    2703             :         struct fss_PrepareShadowCopySet orig;
    2704             :         struct fss_PrepareShadowCopySet tmp;
    2705             :         TALLOC_CTX *out_mem_ctx;
    2706             : };
    2707             : 
    2708             : static void dcerpc_fss_PrepareShadowCopySet_done(struct tevent_req *subreq);
    2709             : 
    2710           0 : struct tevent_req *dcerpc_fss_PrepareShadowCopySet_send(TALLOC_CTX *mem_ctx,
    2711             :                                                         struct tevent_context *ev,
    2712             :                                                         struct dcerpc_binding_handle *h,
    2713             :                                                         struct GUID _ShadowCopySetId /* [in]  */,
    2714             :                                                         uint32_t _TimeOutInMilliseconds /* [in]  */)
    2715             : {
    2716           0 :         struct tevent_req *req;
    2717           0 :         struct dcerpc_fss_PrepareShadowCopySet_state *state;
    2718           0 :         struct tevent_req *subreq;
    2719             : 
    2720           0 :         req = tevent_req_create(mem_ctx, &state,
    2721             :                                 struct dcerpc_fss_PrepareShadowCopySet_state);
    2722           0 :         if (req == NULL) {
    2723           0 :                 return NULL;
    2724             :         }
    2725           0 :         state->out_mem_ctx = NULL;
    2726             : 
    2727             :         /* In parameters */
    2728           0 :         state->orig.in.ShadowCopySetId = _ShadowCopySetId;
    2729           0 :         state->orig.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
    2730             : 
    2731             :         /* Out parameters */
    2732             : 
    2733             :         /* Result */
    2734           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2735             : 
    2736             :         /* make a temporary copy, that we pass to the dispatch function */
    2737           0 :         state->tmp = state->orig;
    2738             : 
    2739           0 :         subreq = dcerpc_fss_PrepareShadowCopySet_r_send(state, ev, h, &state->tmp);
    2740           0 :         if (tevent_req_nomem(subreq, req)) {
    2741           0 :                 return tevent_req_post(req, ev);
    2742             :         }
    2743           0 :         tevent_req_set_callback(subreq, dcerpc_fss_PrepareShadowCopySet_done, req);
    2744           0 :         return req;
    2745             : }
    2746             : 
    2747           0 : static void dcerpc_fss_PrepareShadowCopySet_done(struct tevent_req *subreq)
    2748             : {
    2749           0 :         struct tevent_req *req = tevent_req_callback_data(
    2750             :                 subreq, struct tevent_req);
    2751           0 :         struct dcerpc_fss_PrepareShadowCopySet_state *state = tevent_req_data(
    2752             :                 req, struct dcerpc_fss_PrepareShadowCopySet_state);
    2753           0 :         NTSTATUS status;
    2754           0 :         TALLOC_CTX *mem_ctx;
    2755             : 
    2756           0 :         if (state->out_mem_ctx) {
    2757           0 :                 mem_ctx = state->out_mem_ctx;
    2758             :         } else {
    2759           0 :                 mem_ctx = state;
    2760             :         }
    2761             : 
    2762           0 :         status = dcerpc_fss_PrepareShadowCopySet_r_recv(subreq, mem_ctx);
    2763           0 :         TALLOC_FREE(subreq);
    2764           0 :         if (tevent_req_nterror(req, status)) {
    2765           0 :                 return;
    2766             :         }
    2767             : 
    2768             :         /* Copy out parameters */
    2769             : 
    2770             :         /* Copy result */
    2771           0 :         state->orig.out.result = state->tmp.out.result;
    2772             : 
    2773             :         /* Reset temporary structure */
    2774           0 :         NDR_ZERO_STRUCT(state->tmp);
    2775             : 
    2776           0 :         tevent_req_done(req);
    2777             : }
    2778             : 
    2779           0 : NTSTATUS dcerpc_fss_PrepareShadowCopySet_recv(struct tevent_req *req,
    2780             :                                               TALLOC_CTX *mem_ctx,
    2781             :                                               uint32_t *result)
    2782             : {
    2783           0 :         struct dcerpc_fss_PrepareShadowCopySet_state *state = tevent_req_data(
    2784             :                 req, struct dcerpc_fss_PrepareShadowCopySet_state);
    2785           0 :         NTSTATUS status;
    2786             : 
    2787           0 :         if (tevent_req_is_nterror(req, &status)) {
    2788           0 :                 tevent_req_received(req);
    2789           0 :                 return status;
    2790             :         }
    2791             : 
    2792             :         /* Steal possible out parameters to the callers context */
    2793           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2794             : 
    2795             :         /* Return result */
    2796           0 :         *result = state->orig.out.result;
    2797             : 
    2798           0 :         tevent_req_received(req);
    2799           0 :         return NT_STATUS_OK;
    2800             : }
    2801             : 
    2802           0 : NTSTATUS dcerpc_fss_PrepareShadowCopySet(struct dcerpc_binding_handle *h,
    2803             :                                          TALLOC_CTX *mem_ctx,
    2804             :                                          struct GUID _ShadowCopySetId /* [in]  */,
    2805             :                                          uint32_t _TimeOutInMilliseconds /* [in]  */,
    2806             :                                          uint32_t *result)
    2807             : {
    2808           0 :         struct fss_PrepareShadowCopySet r;
    2809           0 :         NTSTATUS status;
    2810             : 
    2811             :         /* In parameters */
    2812           0 :         r.in.ShadowCopySetId = _ShadowCopySetId;
    2813           0 :         r.in.TimeOutInMilliseconds = _TimeOutInMilliseconds;
    2814             : 
    2815             :         /* Out parameters */
    2816             : 
    2817             :         /* Result */
    2818           0 :         NDR_ZERO_STRUCT(r.out.result);
    2819             : 
    2820           0 :         status = dcerpc_fss_PrepareShadowCopySet_r(h, mem_ctx, &r);
    2821           0 :         if (!NT_STATUS_IS_OK(status)) {
    2822           0 :                 return status;
    2823             :         }
    2824             : 
    2825             :         /* Return variables */
    2826             : 
    2827             :         /* Return result */
    2828           0 :         *result = r.out.result;
    2829             : 
    2830           0 :         return NT_STATUS_OK;
    2831             : }
    2832             : 

Generated by: LCOV version 1.14