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

          Line data    Source code
       1             : /* client functions auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include <tevent.h>
       5             : #include "lib/util/tevent_ntstatus.h"
       6             : #include "bin/default/librpc/gen_ndr/ndr_dfs.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_dfs_c.h"
       8             : 
       9             : /* netdfs - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_dfs_GetManagerVersion_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_dfs_GetManagerVersion_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_dfs_GetManagerVersion_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct dfs_GetManagerVersion *r)
      21             : {
      22             :         struct tevent_req *req;
      23             :         struct dcerpc_dfs_GetManagerVersion_r_state *state;
      24             :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_dfs_GetManagerVersion_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_netdfs,
      39           0 :                         NDR_DFS_GETMANAGERVERSION, 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_dfs_GetManagerVersion_r_done, req);
      44             : 
      45           0 :         return req;
      46             : }
      47             : 
      48           0 : static void dcerpc_dfs_GetManagerVersion_r_done(struct tevent_req *subreq)
      49             : {
      50           0 :         struct tevent_req *req =
      51           0 :                 tevent_req_callback_data(subreq,
      52             :                 struct tevent_req);
      53             :         NTSTATUS status;
      54             : 
      55           0 :         status = dcerpc_binding_handle_call_recv(subreq);
      56           0 :         TALLOC_FREE(subreq);
      57           0 :         if (tevent_req_nterror(req, status)) {
      58           0 :                 return;
      59             :         }
      60             : 
      61           0 :         tevent_req_done(req);
      62             : }
      63             : 
      64           0 : NTSTATUS dcerpc_dfs_GetManagerVersion_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_dfs_GetManagerVersion_r_state *state =
      67           0 :                 tevent_req_data(req,
      68             :                 struct dcerpc_dfs_GetManagerVersion_r_state);
      69             :         NTSTATUS status;
      70             : 
      71           0 :         if (tevent_req_is_nterror(req, &status)) {
      72           0 :                 tevent_req_received(req);
      73           0 :                 return status;
      74             :         }
      75             : 
      76           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      77             : 
      78           0 :         tevent_req_received(req);
      79           0 :         return NT_STATUS_OK;
      80             : }
      81             : 
      82           0 : NTSTATUS dcerpc_dfs_GetManagerVersion_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_GetManagerVersion *r)
      83             : {
      84             :         NTSTATUS status;
      85             : 
      86           0 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_netdfs,
      88             :                         NDR_DFS_GETMANAGERVERSION, mem_ctx, r);
      89             : 
      90           0 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_dfs_GetManagerVersion_state {
      94             :         struct dfs_GetManagerVersion orig;
      95             :         struct dfs_GetManagerVersion tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_dfs_GetManagerVersion_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_dfs_GetManagerVersion_send(TALLOC_CTX *mem_ctx,
     102             :                                                      struct tevent_context *ev,
     103             :                                                      struct dcerpc_binding_handle *h,
     104             :                                                      enum dfs_ManagerVersion *_version /* [out] [ref] */)
     105             : {
     106             :         struct tevent_req *req;
     107             :         struct dcerpc_dfs_GetManagerVersion_state *state;
     108             :         struct tevent_req *subreq;
     109             : 
     110           0 :         req = tevent_req_create(mem_ctx, &state,
     111             :                                 struct dcerpc_dfs_GetManagerVersion_state);
     112           0 :         if (req == NULL) {
     113           0 :                 return NULL;
     114             :         }
     115           0 :         state->out_mem_ctx = NULL;
     116             : 
     117             :         /* In parameters */
     118             : 
     119             :         /* Out parameters */
     120           0 :         state->orig.out.version = _version;
     121             : 
     122           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     123             :                              "dcerpc_dfs_GetManagerVersion_out_memory");
     124           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     125           0 :                 return tevent_req_post(req, ev);
     126             :         }
     127             : 
     128             :         /* make a temporary copy, that we pass to the dispatch function */
     129           0 :         state->tmp = state->orig;
     130             : 
     131           0 :         subreq = dcerpc_dfs_GetManagerVersion_r_send(state, ev, h, &state->tmp);
     132           0 :         if (tevent_req_nomem(subreq, req)) {
     133           0 :                 return tevent_req_post(req, ev);
     134             :         }
     135           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_GetManagerVersion_done, req);
     136           0 :         return req;
     137             : }
     138             : 
     139           0 : static void dcerpc_dfs_GetManagerVersion_done(struct tevent_req *subreq)
     140             : {
     141           0 :         struct tevent_req *req = tevent_req_callback_data(
     142             :                 subreq, struct tevent_req);
     143           0 :         struct dcerpc_dfs_GetManagerVersion_state *state = tevent_req_data(
     144             :                 req, struct dcerpc_dfs_GetManagerVersion_state);
     145             :         NTSTATUS status;
     146             :         TALLOC_CTX *mem_ctx;
     147             : 
     148           0 :         if (state->out_mem_ctx) {
     149           0 :                 mem_ctx = state->out_mem_ctx;
     150             :         } else {
     151           0 :                 mem_ctx = state;
     152             :         }
     153             : 
     154           0 :         status = dcerpc_dfs_GetManagerVersion_r_recv(subreq, mem_ctx);
     155           0 :         TALLOC_FREE(subreq);
     156           0 :         if (tevent_req_nterror(req, status)) {
     157           0 :                 return;
     158             :         }
     159             : 
     160             :         /* Copy out parameters */
     161           0 :         *state->orig.out.version = *state->tmp.out.version;
     162             : 
     163             :         /* Reset temporary structure */
     164           0 :         NDR_ZERO_STRUCT(state->tmp);
     165             : 
     166           0 :         tevent_req_done(req);
     167             : }
     168             : 
     169           0 : NTSTATUS dcerpc_dfs_GetManagerVersion_recv(struct tevent_req *req,
     170             :                                            TALLOC_CTX *mem_ctx)
     171             : {
     172           0 :         struct dcerpc_dfs_GetManagerVersion_state *state = tevent_req_data(
     173             :                 req, struct dcerpc_dfs_GetManagerVersion_state);
     174             :         NTSTATUS status;
     175             : 
     176           0 :         if (tevent_req_is_nterror(req, &status)) {
     177           0 :                 tevent_req_received(req);
     178           0 :                 return status;
     179             :         }
     180             : 
     181             :         /* Steal possible out parameters to the callers context */
     182           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     183             : 
     184           0 :         tevent_req_received(req);
     185           0 :         return NT_STATUS_OK;
     186             : }
     187             : 
     188           0 : NTSTATUS dcerpc_dfs_GetManagerVersion(struct dcerpc_binding_handle *h,
     189             :                                       TALLOC_CTX *mem_ctx,
     190             :                                       enum dfs_ManagerVersion *_version /* [out] [ref] */)
     191             : {
     192             :         struct dfs_GetManagerVersion r;
     193             :         NTSTATUS status;
     194             : 
     195             :         /* In parameters */
     196             : 
     197             :         /* Out parameters */
     198           0 :         r.out.version = _version;
     199             : 
     200           0 :         status = dcerpc_dfs_GetManagerVersion_r(h, mem_ctx, &r);
     201           0 :         if (!NT_STATUS_IS_OK(status)) {
     202           0 :                 return status;
     203             :         }
     204             : 
     205             :         /* Return variables */
     206           0 :         *_version = *r.out.version;
     207             : 
     208             :         /* Return result */
     209             : 
     210           0 :         return NT_STATUS_OK;
     211             : }
     212             : 
     213             : struct dcerpc_dfs_Add_r_state {
     214             :         TALLOC_CTX *out_mem_ctx;
     215             : };
     216             : 
     217             : static void dcerpc_dfs_Add_r_done(struct tevent_req *subreq);
     218             : 
     219           0 : struct tevent_req *dcerpc_dfs_Add_r_send(TALLOC_CTX *mem_ctx,
     220             :         struct tevent_context *ev,
     221             :         struct dcerpc_binding_handle *h,
     222             :         struct dfs_Add *r)
     223             : {
     224             :         struct tevent_req *req;
     225             :         struct dcerpc_dfs_Add_r_state *state;
     226             :         struct tevent_req *subreq;
     227             : 
     228           0 :         req = tevent_req_create(mem_ctx, &state,
     229             :                                 struct dcerpc_dfs_Add_r_state);
     230           0 :         if (req == NULL) {
     231           0 :                 return NULL;
     232             :         }
     233             : 
     234           0 :         state->out_mem_ctx = NULL;
     235             : 
     236           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     237             :                         NULL, &ndr_table_netdfs,
     238             :                         NDR_DFS_ADD, state, r);
     239           0 :         if (tevent_req_nomem(subreq, req)) {
     240           0 :                 return tevent_req_post(req, ev);
     241             :         }
     242           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_Add_r_done, req);
     243             : 
     244           0 :         return req;
     245             : }
     246             : 
     247           0 : static void dcerpc_dfs_Add_r_done(struct tevent_req *subreq)
     248             : {
     249           0 :         struct tevent_req *req =
     250           0 :                 tevent_req_callback_data(subreq,
     251             :                 struct tevent_req);
     252             :         NTSTATUS status;
     253             : 
     254           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     255           0 :         TALLOC_FREE(subreq);
     256           0 :         if (tevent_req_nterror(req, status)) {
     257           0 :                 return;
     258             :         }
     259             : 
     260           0 :         tevent_req_done(req);
     261             : }
     262             : 
     263           0 : NTSTATUS dcerpc_dfs_Add_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     264             : {
     265           0 :         struct dcerpc_dfs_Add_r_state *state =
     266           0 :                 tevent_req_data(req,
     267             :                 struct dcerpc_dfs_Add_r_state);
     268             :         NTSTATUS status;
     269             : 
     270           0 :         if (tevent_req_is_nterror(req, &status)) {
     271           0 :                 tevent_req_received(req);
     272           0 :                 return status;
     273             :         }
     274             : 
     275           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     276             : 
     277           0 :         tevent_req_received(req);
     278           0 :         return NT_STATUS_OK;
     279             : }
     280             : 
     281           0 : NTSTATUS dcerpc_dfs_Add_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_Add *r)
     282             : {
     283             :         NTSTATUS status;
     284             : 
     285           0 :         status = dcerpc_binding_handle_call(h,
     286             :                         NULL, &ndr_table_netdfs,
     287             :                         NDR_DFS_ADD, mem_ctx, r);
     288             : 
     289           0 :         return status;
     290             : }
     291             : 
     292             : struct dcerpc_dfs_Add_state {
     293             :         struct dfs_Add orig;
     294             :         struct dfs_Add tmp;
     295             :         TALLOC_CTX *out_mem_ctx;
     296             : };
     297             : 
     298             : static void dcerpc_dfs_Add_done(struct tevent_req *subreq);
     299             : 
     300           0 : struct tevent_req *dcerpc_dfs_Add_send(TALLOC_CTX *mem_ctx,
     301             :                                        struct tevent_context *ev,
     302             :                                        struct dcerpc_binding_handle *h,
     303             :                                        const char *_path /* [in] [charset(UTF16),ref] */,
     304             :                                        const char *_server /* [in] [charset(UTF16),ref] */,
     305             :                                        const char *_share /* [in] [charset(UTF16),unique] */,
     306             :                                        const char *_comment /* [in] [charset(UTF16),unique] */,
     307             :                                        uint32_t _flags /* [in]  */)
     308             : {
     309             :         struct tevent_req *req;
     310             :         struct dcerpc_dfs_Add_state *state;
     311             :         struct tevent_req *subreq;
     312             : 
     313           0 :         req = tevent_req_create(mem_ctx, &state,
     314             :                                 struct dcerpc_dfs_Add_state);
     315           0 :         if (req == NULL) {
     316           0 :                 return NULL;
     317             :         }
     318           0 :         state->out_mem_ctx = NULL;
     319             : 
     320             :         /* In parameters */
     321           0 :         state->orig.in.path = _path;
     322           0 :         state->orig.in.server = _server;
     323           0 :         state->orig.in.share = _share;
     324           0 :         state->orig.in.comment = _comment;
     325           0 :         state->orig.in.flags = _flags;
     326             : 
     327             :         /* Out parameters */
     328             : 
     329             :         /* Result */
     330           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     331             : 
     332             :         /* make a temporary copy, that we pass to the dispatch function */
     333           0 :         state->tmp = state->orig;
     334             : 
     335           0 :         subreq = dcerpc_dfs_Add_r_send(state, ev, h, &state->tmp);
     336           0 :         if (tevent_req_nomem(subreq, req)) {
     337           0 :                 return tevent_req_post(req, ev);
     338             :         }
     339           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_Add_done, req);
     340           0 :         return req;
     341             : }
     342             : 
     343           0 : static void dcerpc_dfs_Add_done(struct tevent_req *subreq)
     344             : {
     345           0 :         struct tevent_req *req = tevent_req_callback_data(
     346             :                 subreq, struct tevent_req);
     347           0 :         struct dcerpc_dfs_Add_state *state = tevent_req_data(
     348             :                 req, struct dcerpc_dfs_Add_state);
     349             :         NTSTATUS status;
     350             :         TALLOC_CTX *mem_ctx;
     351             : 
     352           0 :         if (state->out_mem_ctx) {
     353           0 :                 mem_ctx = state->out_mem_ctx;
     354             :         } else {
     355           0 :                 mem_ctx = state;
     356             :         }
     357             : 
     358           0 :         status = dcerpc_dfs_Add_r_recv(subreq, mem_ctx);
     359           0 :         TALLOC_FREE(subreq);
     360           0 :         if (tevent_req_nterror(req, status)) {
     361           0 :                 return;
     362             :         }
     363             : 
     364             :         /* Copy out parameters */
     365             : 
     366             :         /* Copy result */
     367           0 :         state->orig.out.result = state->tmp.out.result;
     368             : 
     369             :         /* Reset temporary structure */
     370           0 :         NDR_ZERO_STRUCT(state->tmp);
     371             : 
     372           0 :         tevent_req_done(req);
     373             : }
     374             : 
     375           0 : NTSTATUS dcerpc_dfs_Add_recv(struct tevent_req *req,
     376             :                              TALLOC_CTX *mem_ctx,
     377             :                              WERROR *result)
     378             : {
     379           0 :         struct dcerpc_dfs_Add_state *state = tevent_req_data(
     380             :                 req, struct dcerpc_dfs_Add_state);
     381             :         NTSTATUS status;
     382             : 
     383           0 :         if (tevent_req_is_nterror(req, &status)) {
     384           0 :                 tevent_req_received(req);
     385           0 :                 return status;
     386             :         }
     387             : 
     388             :         /* Steal possible out parameters to the callers context */
     389           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     390             : 
     391             :         /* Return result */
     392           0 :         *result = state->orig.out.result;
     393             : 
     394           0 :         tevent_req_received(req);
     395           0 :         return NT_STATUS_OK;
     396             : }
     397             : 
     398           0 : NTSTATUS dcerpc_dfs_Add(struct dcerpc_binding_handle *h,
     399             :                         TALLOC_CTX *mem_ctx,
     400             :                         const char *_path /* [in] [charset(UTF16),ref] */,
     401             :                         const char *_server /* [in] [charset(UTF16),ref] */,
     402             :                         const char *_share /* [in] [charset(UTF16),unique] */,
     403             :                         const char *_comment /* [in] [charset(UTF16),unique] */,
     404             :                         uint32_t _flags /* [in]  */,
     405             :                         WERROR *result)
     406             : {
     407             :         struct dfs_Add r;
     408             :         NTSTATUS status;
     409             : 
     410             :         /* In parameters */
     411           0 :         r.in.path = _path;
     412           0 :         r.in.server = _server;
     413           0 :         r.in.share = _share;
     414           0 :         r.in.comment = _comment;
     415           0 :         r.in.flags = _flags;
     416             : 
     417             :         /* Out parameters */
     418             : 
     419             :         /* Result */
     420           0 :         NDR_ZERO_STRUCT(r.out.result);
     421             : 
     422           0 :         status = dcerpc_dfs_Add_r(h, mem_ctx, &r);
     423           0 :         if (!NT_STATUS_IS_OK(status)) {
     424           0 :                 return status;
     425             :         }
     426             : 
     427             :         /* Return variables */
     428             : 
     429             :         /* Return result */
     430           0 :         *result = r.out.result;
     431             : 
     432           0 :         return NT_STATUS_OK;
     433             : }
     434             : 
     435             : struct dcerpc_dfs_Remove_r_state {
     436             :         TALLOC_CTX *out_mem_ctx;
     437             : };
     438             : 
     439             : static void dcerpc_dfs_Remove_r_done(struct tevent_req *subreq);
     440             : 
     441           0 : struct tevent_req *dcerpc_dfs_Remove_r_send(TALLOC_CTX *mem_ctx,
     442             :         struct tevent_context *ev,
     443             :         struct dcerpc_binding_handle *h,
     444             :         struct dfs_Remove *r)
     445             : {
     446             :         struct tevent_req *req;
     447             :         struct dcerpc_dfs_Remove_r_state *state;
     448             :         struct tevent_req *subreq;
     449             : 
     450           0 :         req = tevent_req_create(mem_ctx, &state,
     451             :                                 struct dcerpc_dfs_Remove_r_state);
     452           0 :         if (req == NULL) {
     453           0 :                 return NULL;
     454             :         }
     455             : 
     456           0 :         state->out_mem_ctx = NULL;
     457             : 
     458           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     459             :                         NULL, &ndr_table_netdfs,
     460             :                         NDR_DFS_REMOVE, state, r);
     461           0 :         if (tevent_req_nomem(subreq, req)) {
     462           0 :                 return tevent_req_post(req, ev);
     463             :         }
     464           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_Remove_r_done, req);
     465             : 
     466           0 :         return req;
     467             : }
     468             : 
     469           0 : static void dcerpc_dfs_Remove_r_done(struct tevent_req *subreq)
     470             : {
     471           0 :         struct tevent_req *req =
     472           0 :                 tevent_req_callback_data(subreq,
     473             :                 struct tevent_req);
     474             :         NTSTATUS status;
     475             : 
     476           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     477           0 :         TALLOC_FREE(subreq);
     478           0 :         if (tevent_req_nterror(req, status)) {
     479           0 :                 return;
     480             :         }
     481             : 
     482           0 :         tevent_req_done(req);
     483             : }
     484             : 
     485           0 : NTSTATUS dcerpc_dfs_Remove_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     486             : {
     487           0 :         struct dcerpc_dfs_Remove_r_state *state =
     488           0 :                 tevent_req_data(req,
     489             :                 struct dcerpc_dfs_Remove_r_state);
     490             :         NTSTATUS status;
     491             : 
     492           0 :         if (tevent_req_is_nterror(req, &status)) {
     493           0 :                 tevent_req_received(req);
     494           0 :                 return status;
     495             :         }
     496             : 
     497           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     498             : 
     499           0 :         tevent_req_received(req);
     500           0 :         return NT_STATUS_OK;
     501             : }
     502             : 
     503           0 : NTSTATUS dcerpc_dfs_Remove_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_Remove *r)
     504             : {
     505             :         NTSTATUS status;
     506             : 
     507           0 :         status = dcerpc_binding_handle_call(h,
     508             :                         NULL, &ndr_table_netdfs,
     509             :                         NDR_DFS_REMOVE, mem_ctx, r);
     510             : 
     511           0 :         return status;
     512             : }
     513             : 
     514             : struct dcerpc_dfs_Remove_state {
     515             :         struct dfs_Remove orig;
     516             :         struct dfs_Remove tmp;
     517             :         TALLOC_CTX *out_mem_ctx;
     518             : };
     519             : 
     520             : static void dcerpc_dfs_Remove_done(struct tevent_req *subreq);
     521             : 
     522           0 : struct tevent_req *dcerpc_dfs_Remove_send(TALLOC_CTX *mem_ctx,
     523             :                                           struct tevent_context *ev,
     524             :                                           struct dcerpc_binding_handle *h,
     525             :                                           const char *_dfs_entry_path /* [in] [charset(UTF16),ref] */,
     526             :                                           const char *_servername /* [in] [charset(UTF16),unique] */,
     527             :                                           const char *_sharename /* [in] [charset(UTF16),unique] */)
     528             : {
     529             :         struct tevent_req *req;
     530             :         struct dcerpc_dfs_Remove_state *state;
     531             :         struct tevent_req *subreq;
     532             : 
     533           0 :         req = tevent_req_create(mem_ctx, &state,
     534             :                                 struct dcerpc_dfs_Remove_state);
     535           0 :         if (req == NULL) {
     536           0 :                 return NULL;
     537             :         }
     538           0 :         state->out_mem_ctx = NULL;
     539             : 
     540             :         /* In parameters */
     541           0 :         state->orig.in.dfs_entry_path = _dfs_entry_path;
     542           0 :         state->orig.in.servername = _servername;
     543           0 :         state->orig.in.sharename = _sharename;
     544             : 
     545             :         /* Out parameters */
     546             : 
     547             :         /* Result */
     548           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     549             : 
     550             :         /* make a temporary copy, that we pass to the dispatch function */
     551           0 :         state->tmp = state->orig;
     552             : 
     553           0 :         subreq = dcerpc_dfs_Remove_r_send(state, ev, h, &state->tmp);
     554           0 :         if (tevent_req_nomem(subreq, req)) {
     555           0 :                 return tevent_req_post(req, ev);
     556             :         }
     557           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_Remove_done, req);
     558           0 :         return req;
     559             : }
     560             : 
     561           0 : static void dcerpc_dfs_Remove_done(struct tevent_req *subreq)
     562             : {
     563           0 :         struct tevent_req *req = tevent_req_callback_data(
     564             :                 subreq, struct tevent_req);
     565           0 :         struct dcerpc_dfs_Remove_state *state = tevent_req_data(
     566             :                 req, struct dcerpc_dfs_Remove_state);
     567             :         NTSTATUS status;
     568             :         TALLOC_CTX *mem_ctx;
     569             : 
     570           0 :         if (state->out_mem_ctx) {
     571           0 :                 mem_ctx = state->out_mem_ctx;
     572             :         } else {
     573           0 :                 mem_ctx = state;
     574             :         }
     575             : 
     576           0 :         status = dcerpc_dfs_Remove_r_recv(subreq, mem_ctx);
     577           0 :         TALLOC_FREE(subreq);
     578           0 :         if (tevent_req_nterror(req, status)) {
     579           0 :                 return;
     580             :         }
     581             : 
     582             :         /* Copy out parameters */
     583             : 
     584             :         /* Copy result */
     585           0 :         state->orig.out.result = state->tmp.out.result;
     586             : 
     587             :         /* Reset temporary structure */
     588           0 :         NDR_ZERO_STRUCT(state->tmp);
     589             : 
     590           0 :         tevent_req_done(req);
     591             : }
     592             : 
     593           0 : NTSTATUS dcerpc_dfs_Remove_recv(struct tevent_req *req,
     594             :                                 TALLOC_CTX *mem_ctx,
     595             :                                 WERROR *result)
     596             : {
     597           0 :         struct dcerpc_dfs_Remove_state *state = tevent_req_data(
     598             :                 req, struct dcerpc_dfs_Remove_state);
     599             :         NTSTATUS status;
     600             : 
     601           0 :         if (tevent_req_is_nterror(req, &status)) {
     602           0 :                 tevent_req_received(req);
     603           0 :                 return status;
     604             :         }
     605             : 
     606             :         /* Steal possible out parameters to the callers context */
     607           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     608             : 
     609             :         /* Return result */
     610           0 :         *result = state->orig.out.result;
     611             : 
     612           0 :         tevent_req_received(req);
     613           0 :         return NT_STATUS_OK;
     614             : }
     615             : 
     616           0 : NTSTATUS dcerpc_dfs_Remove(struct dcerpc_binding_handle *h,
     617             :                            TALLOC_CTX *mem_ctx,
     618             :                            const char *_dfs_entry_path /* [in] [charset(UTF16),ref] */,
     619             :                            const char *_servername /* [in] [charset(UTF16),unique] */,
     620             :                            const char *_sharename /* [in] [charset(UTF16),unique] */,
     621             :                            WERROR *result)
     622             : {
     623             :         struct dfs_Remove r;
     624             :         NTSTATUS status;
     625             : 
     626             :         /* In parameters */
     627           0 :         r.in.dfs_entry_path = _dfs_entry_path;
     628           0 :         r.in.servername = _servername;
     629           0 :         r.in.sharename = _sharename;
     630             : 
     631             :         /* Out parameters */
     632             : 
     633             :         /* Result */
     634           0 :         NDR_ZERO_STRUCT(r.out.result);
     635             : 
     636           0 :         status = dcerpc_dfs_Remove_r(h, mem_ctx, &r);
     637           0 :         if (!NT_STATUS_IS_OK(status)) {
     638           0 :                 return status;
     639             :         }
     640             : 
     641             :         /* Return variables */
     642             : 
     643             :         /* Return result */
     644           0 :         *result = r.out.result;
     645             : 
     646           0 :         return NT_STATUS_OK;
     647             : }
     648             : 
     649             : struct dcerpc_dfs_SetInfo_r_state {
     650             :         TALLOC_CTX *out_mem_ctx;
     651             : };
     652             : 
     653             : static void dcerpc_dfs_SetInfo_r_done(struct tevent_req *subreq);
     654             : 
     655           0 : struct tevent_req *dcerpc_dfs_SetInfo_r_send(TALLOC_CTX *mem_ctx,
     656             :         struct tevent_context *ev,
     657             :         struct dcerpc_binding_handle *h,
     658             :         struct dfs_SetInfo *r)
     659             : {
     660             :         struct tevent_req *req;
     661             :         struct dcerpc_dfs_SetInfo_r_state *state;
     662             :         struct tevent_req *subreq;
     663             : 
     664           0 :         req = tevent_req_create(mem_ctx, &state,
     665             :                                 struct dcerpc_dfs_SetInfo_r_state);
     666           0 :         if (req == NULL) {
     667           0 :                 return NULL;
     668             :         }
     669             : 
     670           0 :         state->out_mem_ctx = NULL;
     671             : 
     672           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     673             :                         NULL, &ndr_table_netdfs,
     674             :                         NDR_DFS_SETINFO, state, r);
     675           0 :         if (tevent_req_nomem(subreq, req)) {
     676           0 :                 return tevent_req_post(req, ev);
     677             :         }
     678           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_SetInfo_r_done, req);
     679             : 
     680           0 :         return req;
     681             : }
     682             : 
     683           0 : static void dcerpc_dfs_SetInfo_r_done(struct tevent_req *subreq)
     684             : {
     685           0 :         struct tevent_req *req =
     686           0 :                 tevent_req_callback_data(subreq,
     687             :                 struct tevent_req);
     688             :         NTSTATUS status;
     689             : 
     690           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     691           0 :         TALLOC_FREE(subreq);
     692           0 :         if (tevent_req_nterror(req, status)) {
     693           0 :                 return;
     694             :         }
     695             : 
     696           0 :         tevent_req_done(req);
     697             : }
     698             : 
     699           0 : NTSTATUS dcerpc_dfs_SetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     700             : {
     701           0 :         struct dcerpc_dfs_SetInfo_r_state *state =
     702           0 :                 tevent_req_data(req,
     703             :                 struct dcerpc_dfs_SetInfo_r_state);
     704             :         NTSTATUS status;
     705             : 
     706           0 :         if (tevent_req_is_nterror(req, &status)) {
     707           0 :                 tevent_req_received(req);
     708           0 :                 return status;
     709             :         }
     710             : 
     711           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     712             : 
     713           0 :         tevent_req_received(req);
     714           0 :         return NT_STATUS_OK;
     715             : }
     716             : 
     717           0 : NTSTATUS dcerpc_dfs_SetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_SetInfo *r)
     718             : {
     719             :         NTSTATUS status;
     720             : 
     721           0 :         status = dcerpc_binding_handle_call(h,
     722             :                         NULL, &ndr_table_netdfs,
     723             :                         NDR_DFS_SETINFO, mem_ctx, r);
     724             : 
     725           0 :         return status;
     726             : }
     727             : 
     728             : struct dcerpc_dfs_SetInfo_state {
     729             :         struct dfs_SetInfo orig;
     730             :         struct dfs_SetInfo tmp;
     731             :         TALLOC_CTX *out_mem_ctx;
     732             : };
     733             : 
     734             : static void dcerpc_dfs_SetInfo_done(struct tevent_req *subreq);
     735             : 
     736           0 : struct tevent_req *dcerpc_dfs_SetInfo_send(TALLOC_CTX *mem_ctx,
     737             :                                            struct tevent_context *ev,
     738             :                                            struct dcerpc_binding_handle *h,
     739             :                                            const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
     740             :                                            const char *_servername /* [in] [charset(UTF16),unique] */,
     741             :                                            const char *_sharename /* [in] [charset(UTF16),unique] */,
     742             :                                            uint32_t _level /* [in]  */,
     743             :                                            union dfs_Info *_info /* [in] [ref,switch_is(level)] */)
     744             : {
     745             :         struct tevent_req *req;
     746             :         struct dcerpc_dfs_SetInfo_state *state;
     747             :         struct tevent_req *subreq;
     748             : 
     749           0 :         req = tevent_req_create(mem_ctx, &state,
     750             :                                 struct dcerpc_dfs_SetInfo_state);
     751           0 :         if (req == NULL) {
     752           0 :                 return NULL;
     753             :         }
     754           0 :         state->out_mem_ctx = NULL;
     755             : 
     756             :         /* In parameters */
     757           0 :         state->orig.in.dfs_entry_path = _dfs_entry_path;
     758           0 :         state->orig.in.servername = _servername;
     759           0 :         state->orig.in.sharename = _sharename;
     760           0 :         state->orig.in.level = _level;
     761           0 :         state->orig.in.info = _info;
     762             : 
     763             :         /* Out parameters */
     764             : 
     765             :         /* Result */
     766           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     767             : 
     768             :         /* make a temporary copy, that we pass to the dispatch function */
     769           0 :         state->tmp = state->orig;
     770             : 
     771           0 :         subreq = dcerpc_dfs_SetInfo_r_send(state, ev, h, &state->tmp);
     772           0 :         if (tevent_req_nomem(subreq, req)) {
     773           0 :                 return tevent_req_post(req, ev);
     774             :         }
     775           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_SetInfo_done, req);
     776           0 :         return req;
     777             : }
     778             : 
     779           0 : static void dcerpc_dfs_SetInfo_done(struct tevent_req *subreq)
     780             : {
     781           0 :         struct tevent_req *req = tevent_req_callback_data(
     782             :                 subreq, struct tevent_req);
     783           0 :         struct dcerpc_dfs_SetInfo_state *state = tevent_req_data(
     784             :                 req, struct dcerpc_dfs_SetInfo_state);
     785             :         NTSTATUS status;
     786             :         TALLOC_CTX *mem_ctx;
     787             : 
     788           0 :         if (state->out_mem_ctx) {
     789           0 :                 mem_ctx = state->out_mem_ctx;
     790             :         } else {
     791           0 :                 mem_ctx = state;
     792             :         }
     793             : 
     794           0 :         status = dcerpc_dfs_SetInfo_r_recv(subreq, mem_ctx);
     795           0 :         TALLOC_FREE(subreq);
     796           0 :         if (tevent_req_nterror(req, status)) {
     797           0 :                 return;
     798             :         }
     799             : 
     800             :         /* Copy out parameters */
     801             : 
     802             :         /* Copy result */
     803           0 :         state->orig.out.result = state->tmp.out.result;
     804             : 
     805             :         /* Reset temporary structure */
     806           0 :         NDR_ZERO_STRUCT(state->tmp);
     807             : 
     808           0 :         tevent_req_done(req);
     809             : }
     810             : 
     811           0 : NTSTATUS dcerpc_dfs_SetInfo_recv(struct tevent_req *req,
     812             :                                  TALLOC_CTX *mem_ctx,
     813             :                                  WERROR *result)
     814             : {
     815           0 :         struct dcerpc_dfs_SetInfo_state *state = tevent_req_data(
     816             :                 req, struct dcerpc_dfs_SetInfo_state);
     817             :         NTSTATUS status;
     818             : 
     819           0 :         if (tevent_req_is_nterror(req, &status)) {
     820           0 :                 tevent_req_received(req);
     821           0 :                 return status;
     822             :         }
     823             : 
     824             :         /* Steal possible out parameters to the callers context */
     825           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     826             : 
     827             :         /* Return result */
     828           0 :         *result = state->orig.out.result;
     829             : 
     830           0 :         tevent_req_received(req);
     831           0 :         return NT_STATUS_OK;
     832             : }
     833             : 
     834           0 : NTSTATUS dcerpc_dfs_SetInfo(struct dcerpc_binding_handle *h,
     835             :                             TALLOC_CTX *mem_ctx,
     836             :                             const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
     837             :                             const char *_servername /* [in] [charset(UTF16),unique] */,
     838             :                             const char *_sharename /* [in] [charset(UTF16),unique] */,
     839             :                             uint32_t _level /* [in]  */,
     840             :                             union dfs_Info *_info /* [in] [ref,switch_is(level)] */,
     841             :                             WERROR *result)
     842             : {
     843             :         struct dfs_SetInfo r;
     844             :         NTSTATUS status;
     845             : 
     846             :         /* In parameters */
     847           0 :         r.in.dfs_entry_path = _dfs_entry_path;
     848           0 :         r.in.servername = _servername;
     849           0 :         r.in.sharename = _sharename;
     850           0 :         r.in.level = _level;
     851           0 :         r.in.info = _info;
     852             : 
     853             :         /* Out parameters */
     854             : 
     855             :         /* Result */
     856           0 :         NDR_ZERO_STRUCT(r.out.result);
     857             : 
     858           0 :         status = dcerpc_dfs_SetInfo_r(h, mem_ctx, &r);
     859           0 :         if (!NT_STATUS_IS_OK(status)) {
     860           0 :                 return status;
     861             :         }
     862             : 
     863             :         /* Return variables */
     864             : 
     865             :         /* Return result */
     866           0 :         *result = r.out.result;
     867             : 
     868           0 :         return NT_STATUS_OK;
     869             : }
     870             : 
     871             : struct dcerpc_dfs_GetInfo_r_state {
     872             :         TALLOC_CTX *out_mem_ctx;
     873             : };
     874             : 
     875             : static void dcerpc_dfs_GetInfo_r_done(struct tevent_req *subreq);
     876             : 
     877           0 : struct tevent_req *dcerpc_dfs_GetInfo_r_send(TALLOC_CTX *mem_ctx,
     878             :         struct tevent_context *ev,
     879             :         struct dcerpc_binding_handle *h,
     880             :         struct dfs_GetInfo *r)
     881             : {
     882             :         struct tevent_req *req;
     883             :         struct dcerpc_dfs_GetInfo_r_state *state;
     884             :         struct tevent_req *subreq;
     885             : 
     886           0 :         req = tevent_req_create(mem_ctx, &state,
     887             :                                 struct dcerpc_dfs_GetInfo_r_state);
     888           0 :         if (req == NULL) {
     889           0 :                 return NULL;
     890             :         }
     891             : 
     892           0 :         state->out_mem_ctx = talloc_new(state);
     893           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     894           0 :                 return tevent_req_post(req, ev);
     895             :         }
     896             : 
     897           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     898             :                         NULL, &ndr_table_netdfs,
     899           0 :                         NDR_DFS_GETINFO, state->out_mem_ctx, r);
     900           0 :         if (tevent_req_nomem(subreq, req)) {
     901           0 :                 return tevent_req_post(req, ev);
     902             :         }
     903           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_GetInfo_r_done, req);
     904             : 
     905           0 :         return req;
     906             : }
     907             : 
     908           0 : static void dcerpc_dfs_GetInfo_r_done(struct tevent_req *subreq)
     909             : {
     910           0 :         struct tevent_req *req =
     911           0 :                 tevent_req_callback_data(subreq,
     912             :                 struct tevent_req);
     913             :         NTSTATUS status;
     914             : 
     915           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     916           0 :         TALLOC_FREE(subreq);
     917           0 :         if (tevent_req_nterror(req, status)) {
     918           0 :                 return;
     919             :         }
     920             : 
     921           0 :         tevent_req_done(req);
     922             : }
     923             : 
     924           0 : NTSTATUS dcerpc_dfs_GetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     925             : {
     926           0 :         struct dcerpc_dfs_GetInfo_r_state *state =
     927           0 :                 tevent_req_data(req,
     928             :                 struct dcerpc_dfs_GetInfo_r_state);
     929             :         NTSTATUS status;
     930             : 
     931           0 :         if (tevent_req_is_nterror(req, &status)) {
     932           0 :                 tevent_req_received(req);
     933           0 :                 return status;
     934             :         }
     935             : 
     936           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     937             : 
     938           0 :         tevent_req_received(req);
     939           0 :         return NT_STATUS_OK;
     940             : }
     941             : 
     942           0 : NTSTATUS dcerpc_dfs_GetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_GetInfo *r)
     943             : {
     944             :         NTSTATUS status;
     945             : 
     946           0 :         status = dcerpc_binding_handle_call(h,
     947             :                         NULL, &ndr_table_netdfs,
     948             :                         NDR_DFS_GETINFO, mem_ctx, r);
     949             : 
     950           0 :         return status;
     951             : }
     952             : 
     953             : struct dcerpc_dfs_GetInfo_state {
     954             :         struct dfs_GetInfo orig;
     955             :         struct dfs_GetInfo tmp;
     956             :         TALLOC_CTX *out_mem_ctx;
     957             : };
     958             : 
     959             : static void dcerpc_dfs_GetInfo_done(struct tevent_req *subreq);
     960             : 
     961           0 : struct tevent_req *dcerpc_dfs_GetInfo_send(TALLOC_CTX *mem_ctx,
     962             :                                            struct tevent_context *ev,
     963             :                                            struct dcerpc_binding_handle *h,
     964             :                                            const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
     965             :                                            const char *_servername /* [in] [charset(UTF16),unique] */,
     966             :                                            const char *_sharename /* [in] [charset(UTF16),unique] */,
     967             :                                            uint32_t _level /* [in]  */,
     968             :                                            union dfs_Info *_info /* [out] [ref,switch_is(level)] */)
     969             : {
     970             :         struct tevent_req *req;
     971             :         struct dcerpc_dfs_GetInfo_state *state;
     972             :         struct tevent_req *subreq;
     973             : 
     974           0 :         req = tevent_req_create(mem_ctx, &state,
     975             :                                 struct dcerpc_dfs_GetInfo_state);
     976           0 :         if (req == NULL) {
     977           0 :                 return NULL;
     978             :         }
     979           0 :         state->out_mem_ctx = NULL;
     980             : 
     981             :         /* In parameters */
     982           0 :         state->orig.in.dfs_entry_path = _dfs_entry_path;
     983           0 :         state->orig.in.servername = _servername;
     984           0 :         state->orig.in.sharename = _sharename;
     985           0 :         state->orig.in.level = _level;
     986             : 
     987             :         /* Out parameters */
     988           0 :         state->orig.out.info = _info;
     989             : 
     990             :         /* Result */
     991           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     992             : 
     993           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     994             :                              "dcerpc_dfs_GetInfo_out_memory");
     995           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     996           0 :                 return tevent_req_post(req, ev);
     997             :         }
     998             : 
     999             :         /* make a temporary copy, that we pass to the dispatch function */
    1000           0 :         state->tmp = state->orig;
    1001             : 
    1002           0 :         subreq = dcerpc_dfs_GetInfo_r_send(state, ev, h, &state->tmp);
    1003           0 :         if (tevent_req_nomem(subreq, req)) {
    1004           0 :                 return tevent_req_post(req, ev);
    1005             :         }
    1006           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_GetInfo_done, req);
    1007           0 :         return req;
    1008             : }
    1009             : 
    1010           0 : static void dcerpc_dfs_GetInfo_done(struct tevent_req *subreq)
    1011             : {
    1012           0 :         struct tevent_req *req = tevent_req_callback_data(
    1013             :                 subreq, struct tevent_req);
    1014           0 :         struct dcerpc_dfs_GetInfo_state *state = tevent_req_data(
    1015             :                 req, struct dcerpc_dfs_GetInfo_state);
    1016             :         NTSTATUS status;
    1017             :         TALLOC_CTX *mem_ctx;
    1018             : 
    1019           0 :         if (state->out_mem_ctx) {
    1020           0 :                 mem_ctx = state->out_mem_ctx;
    1021             :         } else {
    1022           0 :                 mem_ctx = state;
    1023             :         }
    1024             : 
    1025           0 :         status = dcerpc_dfs_GetInfo_r_recv(subreq, mem_ctx);
    1026           0 :         TALLOC_FREE(subreq);
    1027           0 :         if (tevent_req_nterror(req, status)) {
    1028           0 :                 return;
    1029             :         }
    1030             : 
    1031             :         /* Copy out parameters */
    1032           0 :         *state->orig.out.info = *state->tmp.out.info;
    1033             : 
    1034             :         /* Copy result */
    1035           0 :         state->orig.out.result = state->tmp.out.result;
    1036             : 
    1037             :         /* Reset temporary structure */
    1038           0 :         NDR_ZERO_STRUCT(state->tmp);
    1039             : 
    1040           0 :         tevent_req_done(req);
    1041             : }
    1042             : 
    1043           0 : NTSTATUS dcerpc_dfs_GetInfo_recv(struct tevent_req *req,
    1044             :                                  TALLOC_CTX *mem_ctx,
    1045             :                                  WERROR *result)
    1046             : {
    1047           0 :         struct dcerpc_dfs_GetInfo_state *state = tevent_req_data(
    1048             :                 req, struct dcerpc_dfs_GetInfo_state);
    1049             :         NTSTATUS status;
    1050             : 
    1051           0 :         if (tevent_req_is_nterror(req, &status)) {
    1052           0 :                 tevent_req_received(req);
    1053           0 :                 return status;
    1054             :         }
    1055             : 
    1056             :         /* Steal possible out parameters to the callers context */
    1057           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1058             : 
    1059             :         /* Return result */
    1060           0 :         *result = state->orig.out.result;
    1061             : 
    1062           0 :         tevent_req_received(req);
    1063           0 :         return NT_STATUS_OK;
    1064             : }
    1065             : 
    1066           0 : NTSTATUS dcerpc_dfs_GetInfo(struct dcerpc_binding_handle *h,
    1067             :                             TALLOC_CTX *mem_ctx,
    1068             :                             const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
    1069             :                             const char *_servername /* [in] [charset(UTF16),unique] */,
    1070             :                             const char *_sharename /* [in] [charset(UTF16),unique] */,
    1071             :                             uint32_t _level /* [in]  */,
    1072             :                             union dfs_Info *_info /* [out] [ref,switch_is(level)] */,
    1073             :                             WERROR *result)
    1074             : {
    1075             :         struct dfs_GetInfo r;
    1076             :         NTSTATUS status;
    1077             : 
    1078             :         /* In parameters */
    1079           0 :         r.in.dfs_entry_path = _dfs_entry_path;
    1080           0 :         r.in.servername = _servername;
    1081           0 :         r.in.sharename = _sharename;
    1082           0 :         r.in.level = _level;
    1083             : 
    1084             :         /* Out parameters */
    1085           0 :         r.out.info = _info;
    1086             : 
    1087             :         /* Result */
    1088           0 :         NDR_ZERO_STRUCT(r.out.result);
    1089             : 
    1090           0 :         status = dcerpc_dfs_GetInfo_r(h, mem_ctx, &r);
    1091           0 :         if (!NT_STATUS_IS_OK(status)) {
    1092           0 :                 return status;
    1093             :         }
    1094             : 
    1095             :         /* Return variables */
    1096           0 :         *_info = *r.out.info;
    1097             : 
    1098             :         /* Return result */
    1099           0 :         *result = r.out.result;
    1100             : 
    1101           0 :         return NT_STATUS_OK;
    1102             : }
    1103             : 
    1104             : struct dcerpc_dfs_Enum_r_state {
    1105             :         TALLOC_CTX *out_mem_ctx;
    1106             : };
    1107             : 
    1108             : static void dcerpc_dfs_Enum_r_done(struct tevent_req *subreq);
    1109             : 
    1110           0 : struct tevent_req *dcerpc_dfs_Enum_r_send(TALLOC_CTX *mem_ctx,
    1111             :         struct tevent_context *ev,
    1112             :         struct dcerpc_binding_handle *h,
    1113             :         struct dfs_Enum *r)
    1114             : {
    1115             :         struct tevent_req *req;
    1116             :         struct dcerpc_dfs_Enum_r_state *state;
    1117             :         struct tevent_req *subreq;
    1118             : 
    1119           0 :         req = tevent_req_create(mem_ctx, &state,
    1120             :                                 struct dcerpc_dfs_Enum_r_state);
    1121           0 :         if (req == NULL) {
    1122           0 :                 return NULL;
    1123             :         }
    1124             : 
    1125           0 :         state->out_mem_ctx = talloc_new(state);
    1126           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1127           0 :                 return tevent_req_post(req, ev);
    1128             :         }
    1129             : 
    1130           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1131             :                         NULL, &ndr_table_netdfs,
    1132           0 :                         NDR_DFS_ENUM, state->out_mem_ctx, r);
    1133           0 :         if (tevent_req_nomem(subreq, req)) {
    1134           0 :                 return tevent_req_post(req, ev);
    1135             :         }
    1136           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_Enum_r_done, req);
    1137             : 
    1138           0 :         return req;
    1139             : }
    1140             : 
    1141           0 : static void dcerpc_dfs_Enum_r_done(struct tevent_req *subreq)
    1142             : {
    1143           0 :         struct tevent_req *req =
    1144           0 :                 tevent_req_callback_data(subreq,
    1145             :                 struct tevent_req);
    1146             :         NTSTATUS status;
    1147             : 
    1148           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1149           0 :         TALLOC_FREE(subreq);
    1150           0 :         if (tevent_req_nterror(req, status)) {
    1151           0 :                 return;
    1152             :         }
    1153             : 
    1154           0 :         tevent_req_done(req);
    1155             : }
    1156             : 
    1157           0 : NTSTATUS dcerpc_dfs_Enum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1158             : {
    1159           0 :         struct dcerpc_dfs_Enum_r_state *state =
    1160           0 :                 tevent_req_data(req,
    1161             :                 struct dcerpc_dfs_Enum_r_state);
    1162             :         NTSTATUS status;
    1163             : 
    1164           0 :         if (tevent_req_is_nterror(req, &status)) {
    1165           0 :                 tevent_req_received(req);
    1166           0 :                 return status;
    1167             :         }
    1168             : 
    1169           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1170             : 
    1171           0 :         tevent_req_received(req);
    1172           0 :         return NT_STATUS_OK;
    1173             : }
    1174             : 
    1175           0 : NTSTATUS dcerpc_dfs_Enum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_Enum *r)
    1176             : {
    1177             :         NTSTATUS status;
    1178             : 
    1179           0 :         status = dcerpc_binding_handle_call(h,
    1180             :                         NULL, &ndr_table_netdfs,
    1181             :                         NDR_DFS_ENUM, mem_ctx, r);
    1182             : 
    1183           0 :         return status;
    1184             : }
    1185             : 
    1186             : struct dcerpc_dfs_Enum_state {
    1187             :         struct dfs_Enum orig;
    1188             :         struct dfs_Enum tmp;
    1189             :         TALLOC_CTX *out_mem_ctx;
    1190             : };
    1191             : 
    1192             : static void dcerpc_dfs_Enum_done(struct tevent_req *subreq);
    1193             : 
    1194           0 : struct tevent_req *dcerpc_dfs_Enum_send(TALLOC_CTX *mem_ctx,
    1195             :                                         struct tevent_context *ev,
    1196             :                                         struct dcerpc_binding_handle *h,
    1197             :                                         uint32_t _level /* [in]  */,
    1198             :                                         uint32_t _bufsize /* [in]  */,
    1199             :                                         struct dfs_EnumStruct *_info /* [in,out] [unique] */,
    1200             :                                         uint32_t *_total /* [in,out] [unique] */)
    1201             : {
    1202             :         struct tevent_req *req;
    1203             :         struct dcerpc_dfs_Enum_state *state;
    1204             :         struct tevent_req *subreq;
    1205             : 
    1206           0 :         req = tevent_req_create(mem_ctx, &state,
    1207             :                                 struct dcerpc_dfs_Enum_state);
    1208           0 :         if (req == NULL) {
    1209           0 :                 return NULL;
    1210             :         }
    1211           0 :         state->out_mem_ctx = NULL;
    1212             : 
    1213             :         /* In parameters */
    1214           0 :         state->orig.in.level = _level;
    1215           0 :         state->orig.in.bufsize = _bufsize;
    1216           0 :         state->orig.in.info = _info;
    1217           0 :         state->orig.in.total = _total;
    1218             : 
    1219             :         /* Out parameters */
    1220           0 :         state->orig.out.info = _info;
    1221           0 :         state->orig.out.total = _total;
    1222             : 
    1223             :         /* Result */
    1224           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1225             : 
    1226           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1227             :                              "dcerpc_dfs_Enum_out_memory");
    1228           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1229           0 :                 return tevent_req_post(req, ev);
    1230             :         }
    1231             : 
    1232             :         /* make a temporary copy, that we pass to the dispatch function */
    1233           0 :         state->tmp = state->orig;
    1234             : 
    1235           0 :         subreq = dcerpc_dfs_Enum_r_send(state, ev, h, &state->tmp);
    1236           0 :         if (tevent_req_nomem(subreq, req)) {
    1237           0 :                 return tevent_req_post(req, ev);
    1238             :         }
    1239           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_Enum_done, req);
    1240           0 :         return req;
    1241             : }
    1242             : 
    1243           0 : static void dcerpc_dfs_Enum_done(struct tevent_req *subreq)
    1244             : {
    1245           0 :         struct tevent_req *req = tevent_req_callback_data(
    1246             :                 subreq, struct tevent_req);
    1247           0 :         struct dcerpc_dfs_Enum_state *state = tevent_req_data(
    1248             :                 req, struct dcerpc_dfs_Enum_state);
    1249             :         NTSTATUS status;
    1250             :         TALLOC_CTX *mem_ctx;
    1251             : 
    1252           0 :         if (state->out_mem_ctx) {
    1253           0 :                 mem_ctx = state->out_mem_ctx;
    1254             :         } else {
    1255           0 :                 mem_ctx = state;
    1256             :         }
    1257             : 
    1258           0 :         status = dcerpc_dfs_Enum_r_recv(subreq, mem_ctx);
    1259           0 :         TALLOC_FREE(subreq);
    1260           0 :         if (tevent_req_nterror(req, status)) {
    1261           0 :                 return;
    1262             :         }
    1263             : 
    1264             :         /* Copy out parameters */
    1265           0 :         if (state->orig.out.info && state->tmp.out.info) {
    1266           0 :                 *state->orig.out.info = *state->tmp.out.info;
    1267             :         }
    1268           0 :         if (state->orig.out.total && state->tmp.out.total) {
    1269           0 :                 *state->orig.out.total = *state->tmp.out.total;
    1270             :         }
    1271             : 
    1272             :         /* Copy result */
    1273           0 :         state->orig.out.result = state->tmp.out.result;
    1274             : 
    1275             :         /* Reset temporary structure */
    1276           0 :         NDR_ZERO_STRUCT(state->tmp);
    1277             : 
    1278           0 :         tevent_req_done(req);
    1279             : }
    1280             : 
    1281           0 : NTSTATUS dcerpc_dfs_Enum_recv(struct tevent_req *req,
    1282             :                               TALLOC_CTX *mem_ctx,
    1283             :                               WERROR *result)
    1284             : {
    1285           0 :         struct dcerpc_dfs_Enum_state *state = tevent_req_data(
    1286             :                 req, struct dcerpc_dfs_Enum_state);
    1287             :         NTSTATUS status;
    1288             : 
    1289           0 :         if (tevent_req_is_nterror(req, &status)) {
    1290           0 :                 tevent_req_received(req);
    1291           0 :                 return status;
    1292             :         }
    1293             : 
    1294             :         /* Steal possible out parameters to the callers context */
    1295           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1296             : 
    1297             :         /* Return result */
    1298           0 :         *result = state->orig.out.result;
    1299             : 
    1300           0 :         tevent_req_received(req);
    1301           0 :         return NT_STATUS_OK;
    1302             : }
    1303             : 
    1304           0 : NTSTATUS dcerpc_dfs_Enum(struct dcerpc_binding_handle *h,
    1305             :                          TALLOC_CTX *mem_ctx,
    1306             :                          uint32_t _level /* [in]  */,
    1307             :                          uint32_t _bufsize /* [in]  */,
    1308             :                          struct dfs_EnumStruct *_info /* [in,out] [unique] */,
    1309             :                          uint32_t *_total /* [in,out] [unique] */,
    1310             :                          WERROR *result)
    1311             : {
    1312             :         struct dfs_Enum r;
    1313             :         NTSTATUS status;
    1314             : 
    1315             :         /* In parameters */
    1316           0 :         r.in.level = _level;
    1317           0 :         r.in.bufsize = _bufsize;
    1318           0 :         r.in.info = _info;
    1319           0 :         r.in.total = _total;
    1320             : 
    1321             :         /* Out parameters */
    1322           0 :         r.out.info = _info;
    1323           0 :         r.out.total = _total;
    1324             : 
    1325             :         /* Result */
    1326           0 :         NDR_ZERO_STRUCT(r.out.result);
    1327             : 
    1328           0 :         status = dcerpc_dfs_Enum_r(h, mem_ctx, &r);
    1329           0 :         if (!NT_STATUS_IS_OK(status)) {
    1330           0 :                 return status;
    1331             :         }
    1332             : 
    1333             :         /* Return variables */
    1334           0 :         if (_info && r.out.info) {
    1335           0 :                 *_info = *r.out.info;
    1336             :         }
    1337           0 :         if (_total && r.out.total) {
    1338           0 :                 *_total = *r.out.total;
    1339             :         }
    1340             : 
    1341             :         /* Return result */
    1342           0 :         *result = r.out.result;
    1343             : 
    1344           0 :         return NT_STATUS_OK;
    1345             : }
    1346             : 
    1347             : struct dcerpc_dfs_AddFtRoot_r_state {
    1348             :         TALLOC_CTX *out_mem_ctx;
    1349             : };
    1350             : 
    1351             : static void dcerpc_dfs_AddFtRoot_r_done(struct tevent_req *subreq);
    1352             : 
    1353           0 : struct tevent_req *dcerpc_dfs_AddFtRoot_r_send(TALLOC_CTX *mem_ctx,
    1354             :         struct tevent_context *ev,
    1355             :         struct dcerpc_binding_handle *h,
    1356             :         struct dfs_AddFtRoot *r)
    1357             : {
    1358             :         struct tevent_req *req;
    1359             :         struct dcerpc_dfs_AddFtRoot_r_state *state;
    1360             :         struct tevent_req *subreq;
    1361             : 
    1362           0 :         req = tevent_req_create(mem_ctx, &state,
    1363             :                                 struct dcerpc_dfs_AddFtRoot_r_state);
    1364           0 :         if (req == NULL) {
    1365           0 :                 return NULL;
    1366             :         }
    1367             : 
    1368           0 :         state->out_mem_ctx = talloc_new(state);
    1369           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1370           0 :                 return tevent_req_post(req, ev);
    1371             :         }
    1372             : 
    1373           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1374             :                         NULL, &ndr_table_netdfs,
    1375           0 :                         NDR_DFS_ADDFTROOT, state->out_mem_ctx, r);
    1376           0 :         if (tevent_req_nomem(subreq, req)) {
    1377           0 :                 return tevent_req_post(req, ev);
    1378             :         }
    1379           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_AddFtRoot_r_done, req);
    1380             : 
    1381           0 :         return req;
    1382             : }
    1383             : 
    1384           0 : static void dcerpc_dfs_AddFtRoot_r_done(struct tevent_req *subreq)
    1385             : {
    1386           0 :         struct tevent_req *req =
    1387           0 :                 tevent_req_callback_data(subreq,
    1388             :                 struct tevent_req);
    1389             :         NTSTATUS status;
    1390             : 
    1391           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1392           0 :         TALLOC_FREE(subreq);
    1393           0 :         if (tevent_req_nterror(req, status)) {
    1394           0 :                 return;
    1395             :         }
    1396             : 
    1397           0 :         tevent_req_done(req);
    1398             : }
    1399             : 
    1400           0 : NTSTATUS dcerpc_dfs_AddFtRoot_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1401             : {
    1402           0 :         struct dcerpc_dfs_AddFtRoot_r_state *state =
    1403           0 :                 tevent_req_data(req,
    1404             :                 struct dcerpc_dfs_AddFtRoot_r_state);
    1405             :         NTSTATUS status;
    1406             : 
    1407           0 :         if (tevent_req_is_nterror(req, &status)) {
    1408           0 :                 tevent_req_received(req);
    1409           0 :                 return status;
    1410             :         }
    1411             : 
    1412           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1413             : 
    1414           0 :         tevent_req_received(req);
    1415           0 :         return NT_STATUS_OK;
    1416             : }
    1417             : 
    1418           0 : NTSTATUS dcerpc_dfs_AddFtRoot_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_AddFtRoot *r)
    1419             : {
    1420             :         NTSTATUS status;
    1421             : 
    1422           0 :         status = dcerpc_binding_handle_call(h,
    1423             :                         NULL, &ndr_table_netdfs,
    1424             :                         NDR_DFS_ADDFTROOT, mem_ctx, r);
    1425             : 
    1426           0 :         return status;
    1427             : }
    1428             : 
    1429             : struct dcerpc_dfs_AddFtRoot_state {
    1430             :         struct dfs_AddFtRoot orig;
    1431             :         struct dfs_AddFtRoot tmp;
    1432             :         TALLOC_CTX *out_mem_ctx;
    1433             : };
    1434             : 
    1435             : static void dcerpc_dfs_AddFtRoot_done(struct tevent_req *subreq);
    1436             : 
    1437           0 : struct tevent_req *dcerpc_dfs_AddFtRoot_send(TALLOC_CTX *mem_ctx,
    1438             :                                              struct tevent_context *ev,
    1439             :                                              struct dcerpc_binding_handle *h,
    1440             :                                              const char *_servername /* [in] [charset(UTF16)] */,
    1441             :                                              const char *_dns_servername /* [in] [charset(UTF16)] */,
    1442             :                                              const char *_dfsname /* [in] [charset(UTF16)] */,
    1443             :                                              const char *_rootshare /* [in] [charset(UTF16)] */,
    1444             :                                              const char *_comment /* [in] [charset(UTF16)] */,
    1445             :                                              const char *_dfs_config_dn /* [in] [charset(UTF16)] */,
    1446             :                                              uint8_t _unknown1 /* [in]  */,
    1447             :                                              uint32_t _flags /* [in]  */,
    1448             :                                              struct dfs_UnknownStruct **_unknown2 /* [in,out] [unique] */)
    1449             : {
    1450             :         struct tevent_req *req;
    1451             :         struct dcerpc_dfs_AddFtRoot_state *state;
    1452             :         struct tevent_req *subreq;
    1453             : 
    1454           0 :         req = tevent_req_create(mem_ctx, &state,
    1455             :                                 struct dcerpc_dfs_AddFtRoot_state);
    1456           0 :         if (req == NULL) {
    1457           0 :                 return NULL;
    1458             :         }
    1459           0 :         state->out_mem_ctx = NULL;
    1460             : 
    1461             :         /* In parameters */
    1462           0 :         state->orig.in.servername = _servername;
    1463           0 :         state->orig.in.dns_servername = _dns_servername;
    1464           0 :         state->orig.in.dfsname = _dfsname;
    1465           0 :         state->orig.in.rootshare = _rootshare;
    1466           0 :         state->orig.in.comment = _comment;
    1467           0 :         state->orig.in.dfs_config_dn = _dfs_config_dn;
    1468           0 :         state->orig.in.unknown1 = _unknown1;
    1469           0 :         state->orig.in.flags = _flags;
    1470           0 :         state->orig.in.unknown2 = _unknown2;
    1471             : 
    1472             :         /* Out parameters */
    1473           0 :         state->orig.out.unknown2 = _unknown2;
    1474             : 
    1475             :         /* Result */
    1476           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1477             : 
    1478           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1479             :                              "dcerpc_dfs_AddFtRoot_out_memory");
    1480           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1481           0 :                 return tevent_req_post(req, ev);
    1482             :         }
    1483             : 
    1484             :         /* make a temporary copy, that we pass to the dispatch function */
    1485           0 :         state->tmp = state->orig;
    1486             : 
    1487           0 :         subreq = dcerpc_dfs_AddFtRoot_r_send(state, ev, h, &state->tmp);
    1488           0 :         if (tevent_req_nomem(subreq, req)) {
    1489           0 :                 return tevent_req_post(req, ev);
    1490             :         }
    1491           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_AddFtRoot_done, req);
    1492           0 :         return req;
    1493             : }
    1494             : 
    1495           0 : static void dcerpc_dfs_AddFtRoot_done(struct tevent_req *subreq)
    1496             : {
    1497           0 :         struct tevent_req *req = tevent_req_callback_data(
    1498             :                 subreq, struct tevent_req);
    1499           0 :         struct dcerpc_dfs_AddFtRoot_state *state = tevent_req_data(
    1500             :                 req, struct dcerpc_dfs_AddFtRoot_state);
    1501             :         NTSTATUS status;
    1502             :         TALLOC_CTX *mem_ctx;
    1503             : 
    1504           0 :         if (state->out_mem_ctx) {
    1505           0 :                 mem_ctx = state->out_mem_ctx;
    1506             :         } else {
    1507           0 :                 mem_ctx = state;
    1508             :         }
    1509             : 
    1510           0 :         status = dcerpc_dfs_AddFtRoot_r_recv(subreq, mem_ctx);
    1511           0 :         TALLOC_FREE(subreq);
    1512           0 :         if (tevent_req_nterror(req, status)) {
    1513           0 :                 return;
    1514             :         }
    1515             : 
    1516             :         /* Copy out parameters */
    1517           0 :         if (state->orig.out.unknown2 && state->tmp.out.unknown2) {
    1518           0 :                 *state->orig.out.unknown2 = *state->tmp.out.unknown2;
    1519             :         }
    1520             : 
    1521             :         /* Copy result */
    1522           0 :         state->orig.out.result = state->tmp.out.result;
    1523             : 
    1524             :         /* Reset temporary structure */
    1525           0 :         NDR_ZERO_STRUCT(state->tmp);
    1526             : 
    1527           0 :         tevent_req_done(req);
    1528             : }
    1529             : 
    1530           0 : NTSTATUS dcerpc_dfs_AddFtRoot_recv(struct tevent_req *req,
    1531             :                                    TALLOC_CTX *mem_ctx,
    1532             :                                    WERROR *result)
    1533             : {
    1534           0 :         struct dcerpc_dfs_AddFtRoot_state *state = tevent_req_data(
    1535             :                 req, struct dcerpc_dfs_AddFtRoot_state);
    1536             :         NTSTATUS status;
    1537             : 
    1538           0 :         if (tevent_req_is_nterror(req, &status)) {
    1539           0 :                 tevent_req_received(req);
    1540           0 :                 return status;
    1541             :         }
    1542             : 
    1543             :         /* Steal possible out parameters to the callers context */
    1544           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1545             : 
    1546             :         /* Return result */
    1547           0 :         *result = state->orig.out.result;
    1548             : 
    1549           0 :         tevent_req_received(req);
    1550           0 :         return NT_STATUS_OK;
    1551             : }
    1552             : 
    1553           0 : NTSTATUS dcerpc_dfs_AddFtRoot(struct dcerpc_binding_handle *h,
    1554             :                               TALLOC_CTX *mem_ctx,
    1555             :                               const char *_servername /* [in] [charset(UTF16)] */,
    1556             :                               const char *_dns_servername /* [in] [charset(UTF16)] */,
    1557             :                               const char *_dfsname /* [in] [charset(UTF16)] */,
    1558             :                               const char *_rootshare /* [in] [charset(UTF16)] */,
    1559             :                               const char *_comment /* [in] [charset(UTF16)] */,
    1560             :                               const char *_dfs_config_dn /* [in] [charset(UTF16)] */,
    1561             :                               uint8_t _unknown1 /* [in]  */,
    1562             :                               uint32_t _flags /* [in]  */,
    1563             :                               struct dfs_UnknownStruct **_unknown2 /* [in,out] [unique] */,
    1564             :                               WERROR *result)
    1565             : {
    1566             :         struct dfs_AddFtRoot r;
    1567             :         NTSTATUS status;
    1568             : 
    1569             :         /* In parameters */
    1570           0 :         r.in.servername = _servername;
    1571           0 :         r.in.dns_servername = _dns_servername;
    1572           0 :         r.in.dfsname = _dfsname;
    1573           0 :         r.in.rootshare = _rootshare;
    1574           0 :         r.in.comment = _comment;
    1575           0 :         r.in.dfs_config_dn = _dfs_config_dn;
    1576           0 :         r.in.unknown1 = _unknown1;
    1577           0 :         r.in.flags = _flags;
    1578           0 :         r.in.unknown2 = _unknown2;
    1579             : 
    1580             :         /* Out parameters */
    1581           0 :         r.out.unknown2 = _unknown2;
    1582             : 
    1583             :         /* Result */
    1584           0 :         NDR_ZERO_STRUCT(r.out.result);
    1585             : 
    1586           0 :         status = dcerpc_dfs_AddFtRoot_r(h, mem_ctx, &r);
    1587           0 :         if (!NT_STATUS_IS_OK(status)) {
    1588           0 :                 return status;
    1589             :         }
    1590             : 
    1591             :         /* Return variables */
    1592           0 :         if (_unknown2 && r.out.unknown2) {
    1593           0 :                 *_unknown2 = *r.out.unknown2;
    1594             :         }
    1595             : 
    1596             :         /* Return result */
    1597           0 :         *result = r.out.result;
    1598             : 
    1599           0 :         return NT_STATUS_OK;
    1600             : }
    1601             : 
    1602             : struct dcerpc_dfs_RemoveFtRoot_r_state {
    1603             :         TALLOC_CTX *out_mem_ctx;
    1604             : };
    1605             : 
    1606             : static void dcerpc_dfs_RemoveFtRoot_r_done(struct tevent_req *subreq);
    1607             : 
    1608           0 : struct tevent_req *dcerpc_dfs_RemoveFtRoot_r_send(TALLOC_CTX *mem_ctx,
    1609             :         struct tevent_context *ev,
    1610             :         struct dcerpc_binding_handle *h,
    1611             :         struct dfs_RemoveFtRoot *r)
    1612             : {
    1613             :         struct tevent_req *req;
    1614             :         struct dcerpc_dfs_RemoveFtRoot_r_state *state;
    1615             :         struct tevent_req *subreq;
    1616             : 
    1617           0 :         req = tevent_req_create(mem_ctx, &state,
    1618             :                                 struct dcerpc_dfs_RemoveFtRoot_r_state);
    1619           0 :         if (req == NULL) {
    1620           0 :                 return NULL;
    1621             :         }
    1622             : 
    1623           0 :         state->out_mem_ctx = talloc_new(state);
    1624           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1625           0 :                 return tevent_req_post(req, ev);
    1626             :         }
    1627             : 
    1628           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1629             :                         NULL, &ndr_table_netdfs,
    1630           0 :                         NDR_DFS_REMOVEFTROOT, state->out_mem_ctx, r);
    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_dfs_RemoveFtRoot_r_done, req);
    1635             : 
    1636           0 :         return req;
    1637             : }
    1638             : 
    1639           0 : static void dcerpc_dfs_RemoveFtRoot_r_done(struct tevent_req *subreq)
    1640             : {
    1641           0 :         struct tevent_req *req =
    1642           0 :                 tevent_req_callback_data(subreq,
    1643             :                 struct tevent_req);
    1644             :         NTSTATUS status;
    1645             : 
    1646           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1647           0 :         TALLOC_FREE(subreq);
    1648           0 :         if (tevent_req_nterror(req, status)) {
    1649           0 :                 return;
    1650             :         }
    1651             : 
    1652           0 :         tevent_req_done(req);
    1653             : }
    1654             : 
    1655           0 : NTSTATUS dcerpc_dfs_RemoveFtRoot_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1656             : {
    1657           0 :         struct dcerpc_dfs_RemoveFtRoot_r_state *state =
    1658           0 :                 tevent_req_data(req,
    1659             :                 struct dcerpc_dfs_RemoveFtRoot_r_state);
    1660             :         NTSTATUS status;
    1661             : 
    1662           0 :         if (tevent_req_is_nterror(req, &status)) {
    1663           0 :                 tevent_req_received(req);
    1664           0 :                 return status;
    1665             :         }
    1666             : 
    1667           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1668             : 
    1669           0 :         tevent_req_received(req);
    1670           0 :         return NT_STATUS_OK;
    1671             : }
    1672             : 
    1673           0 : NTSTATUS dcerpc_dfs_RemoveFtRoot_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_RemoveFtRoot *r)
    1674             : {
    1675             :         NTSTATUS status;
    1676             : 
    1677           0 :         status = dcerpc_binding_handle_call(h,
    1678             :                         NULL, &ndr_table_netdfs,
    1679             :                         NDR_DFS_REMOVEFTROOT, mem_ctx, r);
    1680             : 
    1681           0 :         return status;
    1682             : }
    1683             : 
    1684             : struct dcerpc_dfs_RemoveFtRoot_state {
    1685             :         struct dfs_RemoveFtRoot orig;
    1686             :         struct dfs_RemoveFtRoot tmp;
    1687             :         TALLOC_CTX *out_mem_ctx;
    1688             : };
    1689             : 
    1690             : static void dcerpc_dfs_RemoveFtRoot_done(struct tevent_req *subreq);
    1691             : 
    1692           0 : struct tevent_req *dcerpc_dfs_RemoveFtRoot_send(TALLOC_CTX *mem_ctx,
    1693             :                                                 struct tevent_context *ev,
    1694             :                                                 struct dcerpc_binding_handle *h,
    1695             :                                                 const char *_servername /* [in] [charset(UTF16)] */,
    1696             :                                                 const char *_dns_servername /* [in] [charset(UTF16)] */,
    1697             :                                                 const char *_dfsname /* [in] [charset(UTF16)] */,
    1698             :                                                 const char *_rootshare /* [in] [charset(UTF16)] */,
    1699             :                                                 uint32_t _flags /* [in]  */,
    1700             :                                                 struct dfs_UnknownStruct **_unknown /* [in,out] [unique] */)
    1701             : {
    1702             :         struct tevent_req *req;
    1703             :         struct dcerpc_dfs_RemoveFtRoot_state *state;
    1704             :         struct tevent_req *subreq;
    1705             : 
    1706           0 :         req = tevent_req_create(mem_ctx, &state,
    1707             :                                 struct dcerpc_dfs_RemoveFtRoot_state);
    1708           0 :         if (req == NULL) {
    1709           0 :                 return NULL;
    1710             :         }
    1711           0 :         state->out_mem_ctx = NULL;
    1712             : 
    1713             :         /* In parameters */
    1714           0 :         state->orig.in.servername = _servername;
    1715           0 :         state->orig.in.dns_servername = _dns_servername;
    1716           0 :         state->orig.in.dfsname = _dfsname;
    1717           0 :         state->orig.in.rootshare = _rootshare;
    1718           0 :         state->orig.in.flags = _flags;
    1719           0 :         state->orig.in.unknown = _unknown;
    1720             : 
    1721             :         /* Out parameters */
    1722           0 :         state->orig.out.unknown = _unknown;
    1723             : 
    1724             :         /* Result */
    1725           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1726             : 
    1727           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1728             :                              "dcerpc_dfs_RemoveFtRoot_out_memory");
    1729           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1730           0 :                 return tevent_req_post(req, ev);
    1731             :         }
    1732             : 
    1733             :         /* make a temporary copy, that we pass to the dispatch function */
    1734           0 :         state->tmp = state->orig;
    1735             : 
    1736           0 :         subreq = dcerpc_dfs_RemoveFtRoot_r_send(state, ev, h, &state->tmp);
    1737           0 :         if (tevent_req_nomem(subreq, req)) {
    1738           0 :                 return tevent_req_post(req, ev);
    1739             :         }
    1740           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_RemoveFtRoot_done, req);
    1741           0 :         return req;
    1742             : }
    1743             : 
    1744           0 : static void dcerpc_dfs_RemoveFtRoot_done(struct tevent_req *subreq)
    1745             : {
    1746           0 :         struct tevent_req *req = tevent_req_callback_data(
    1747             :                 subreq, struct tevent_req);
    1748           0 :         struct dcerpc_dfs_RemoveFtRoot_state *state = tevent_req_data(
    1749             :                 req, struct dcerpc_dfs_RemoveFtRoot_state);
    1750             :         NTSTATUS status;
    1751             :         TALLOC_CTX *mem_ctx;
    1752             : 
    1753           0 :         if (state->out_mem_ctx) {
    1754           0 :                 mem_ctx = state->out_mem_ctx;
    1755             :         } else {
    1756           0 :                 mem_ctx = state;
    1757             :         }
    1758             : 
    1759           0 :         status = dcerpc_dfs_RemoveFtRoot_r_recv(subreq, mem_ctx);
    1760           0 :         TALLOC_FREE(subreq);
    1761           0 :         if (tevent_req_nterror(req, status)) {
    1762           0 :                 return;
    1763             :         }
    1764             : 
    1765             :         /* Copy out parameters */
    1766           0 :         if (state->orig.out.unknown && state->tmp.out.unknown) {
    1767           0 :                 *state->orig.out.unknown = *state->tmp.out.unknown;
    1768             :         }
    1769             : 
    1770             :         /* Copy result */
    1771           0 :         state->orig.out.result = state->tmp.out.result;
    1772             : 
    1773             :         /* Reset temporary structure */
    1774           0 :         NDR_ZERO_STRUCT(state->tmp);
    1775             : 
    1776           0 :         tevent_req_done(req);
    1777             : }
    1778             : 
    1779           0 : NTSTATUS dcerpc_dfs_RemoveFtRoot_recv(struct tevent_req *req,
    1780             :                                       TALLOC_CTX *mem_ctx,
    1781             :                                       WERROR *result)
    1782             : {
    1783           0 :         struct dcerpc_dfs_RemoveFtRoot_state *state = tevent_req_data(
    1784             :                 req, struct dcerpc_dfs_RemoveFtRoot_state);
    1785             :         NTSTATUS status;
    1786             : 
    1787           0 :         if (tevent_req_is_nterror(req, &status)) {
    1788           0 :                 tevent_req_received(req);
    1789           0 :                 return status;
    1790             :         }
    1791             : 
    1792             :         /* Steal possible out parameters to the callers context */
    1793           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1794             : 
    1795             :         /* Return result */
    1796           0 :         *result = state->orig.out.result;
    1797             : 
    1798           0 :         tevent_req_received(req);
    1799           0 :         return NT_STATUS_OK;
    1800             : }
    1801             : 
    1802           0 : NTSTATUS dcerpc_dfs_RemoveFtRoot(struct dcerpc_binding_handle *h,
    1803             :                                  TALLOC_CTX *mem_ctx,
    1804             :                                  const char *_servername /* [in] [charset(UTF16)] */,
    1805             :                                  const char *_dns_servername /* [in] [charset(UTF16)] */,
    1806             :                                  const char *_dfsname /* [in] [charset(UTF16)] */,
    1807             :                                  const char *_rootshare /* [in] [charset(UTF16)] */,
    1808             :                                  uint32_t _flags /* [in]  */,
    1809             :                                  struct dfs_UnknownStruct **_unknown /* [in,out] [unique] */,
    1810             :                                  WERROR *result)
    1811             : {
    1812             :         struct dfs_RemoveFtRoot r;
    1813             :         NTSTATUS status;
    1814             : 
    1815             :         /* In parameters */
    1816           0 :         r.in.servername = _servername;
    1817           0 :         r.in.dns_servername = _dns_servername;
    1818           0 :         r.in.dfsname = _dfsname;
    1819           0 :         r.in.rootshare = _rootshare;
    1820           0 :         r.in.flags = _flags;
    1821           0 :         r.in.unknown = _unknown;
    1822             : 
    1823             :         /* Out parameters */
    1824           0 :         r.out.unknown = _unknown;
    1825             : 
    1826             :         /* Result */
    1827           0 :         NDR_ZERO_STRUCT(r.out.result);
    1828             : 
    1829           0 :         status = dcerpc_dfs_RemoveFtRoot_r(h, mem_ctx, &r);
    1830           0 :         if (!NT_STATUS_IS_OK(status)) {
    1831           0 :                 return status;
    1832             :         }
    1833             : 
    1834             :         /* Return variables */
    1835           0 :         if (_unknown && r.out.unknown) {
    1836           0 :                 *_unknown = *r.out.unknown;
    1837             :         }
    1838             : 
    1839             :         /* Return result */
    1840           0 :         *result = r.out.result;
    1841             : 
    1842           0 :         return NT_STATUS_OK;
    1843             : }
    1844             : 
    1845             : struct dcerpc_dfs_AddStdRoot_r_state {
    1846             :         TALLOC_CTX *out_mem_ctx;
    1847             : };
    1848             : 
    1849             : static void dcerpc_dfs_AddStdRoot_r_done(struct tevent_req *subreq);
    1850             : 
    1851           0 : struct tevent_req *dcerpc_dfs_AddStdRoot_r_send(TALLOC_CTX *mem_ctx,
    1852             :         struct tevent_context *ev,
    1853             :         struct dcerpc_binding_handle *h,
    1854             :         struct dfs_AddStdRoot *r)
    1855             : {
    1856             :         struct tevent_req *req;
    1857             :         struct dcerpc_dfs_AddStdRoot_r_state *state;
    1858             :         struct tevent_req *subreq;
    1859             : 
    1860           0 :         req = tevent_req_create(mem_ctx, &state,
    1861             :                                 struct dcerpc_dfs_AddStdRoot_r_state);
    1862           0 :         if (req == NULL) {
    1863           0 :                 return NULL;
    1864             :         }
    1865             : 
    1866           0 :         state->out_mem_ctx = NULL;
    1867             : 
    1868           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1869             :                         NULL, &ndr_table_netdfs,
    1870             :                         NDR_DFS_ADDSTDROOT, state, r);
    1871           0 :         if (tevent_req_nomem(subreq, req)) {
    1872           0 :                 return tevent_req_post(req, ev);
    1873             :         }
    1874           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_AddStdRoot_r_done, req);
    1875             : 
    1876           0 :         return req;
    1877             : }
    1878             : 
    1879           0 : static void dcerpc_dfs_AddStdRoot_r_done(struct tevent_req *subreq)
    1880             : {
    1881           0 :         struct tevent_req *req =
    1882           0 :                 tevent_req_callback_data(subreq,
    1883             :                 struct tevent_req);
    1884             :         NTSTATUS status;
    1885             : 
    1886           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1887           0 :         TALLOC_FREE(subreq);
    1888           0 :         if (tevent_req_nterror(req, status)) {
    1889           0 :                 return;
    1890             :         }
    1891             : 
    1892           0 :         tevent_req_done(req);
    1893             : }
    1894             : 
    1895           0 : NTSTATUS dcerpc_dfs_AddStdRoot_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1896             : {
    1897           0 :         struct dcerpc_dfs_AddStdRoot_r_state *state =
    1898           0 :                 tevent_req_data(req,
    1899             :                 struct dcerpc_dfs_AddStdRoot_r_state);
    1900             :         NTSTATUS status;
    1901             : 
    1902           0 :         if (tevent_req_is_nterror(req, &status)) {
    1903           0 :                 tevent_req_received(req);
    1904           0 :                 return status;
    1905             :         }
    1906             : 
    1907           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1908             : 
    1909           0 :         tevent_req_received(req);
    1910           0 :         return NT_STATUS_OK;
    1911             : }
    1912             : 
    1913           0 : NTSTATUS dcerpc_dfs_AddStdRoot_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_AddStdRoot *r)
    1914             : {
    1915             :         NTSTATUS status;
    1916             : 
    1917           0 :         status = dcerpc_binding_handle_call(h,
    1918             :                         NULL, &ndr_table_netdfs,
    1919             :                         NDR_DFS_ADDSTDROOT, mem_ctx, r);
    1920             : 
    1921           0 :         return status;
    1922             : }
    1923             : 
    1924             : struct dcerpc_dfs_AddStdRoot_state {
    1925             :         struct dfs_AddStdRoot orig;
    1926             :         struct dfs_AddStdRoot tmp;
    1927             :         TALLOC_CTX *out_mem_ctx;
    1928             : };
    1929             : 
    1930             : static void dcerpc_dfs_AddStdRoot_done(struct tevent_req *subreq);
    1931             : 
    1932           0 : struct tevent_req *dcerpc_dfs_AddStdRoot_send(TALLOC_CTX *mem_ctx,
    1933             :                                               struct tevent_context *ev,
    1934             :                                               struct dcerpc_binding_handle *h,
    1935             :                                               const char *_servername /* [in] [charset(UTF16)] */,
    1936             :                                               const char *_rootshare /* [in] [charset(UTF16)] */,
    1937             :                                               const char *_comment /* [in] [charset(UTF16)] */,
    1938             :                                               uint32_t _flags /* [in]  */)
    1939             : {
    1940             :         struct tevent_req *req;
    1941             :         struct dcerpc_dfs_AddStdRoot_state *state;
    1942             :         struct tevent_req *subreq;
    1943             : 
    1944           0 :         req = tevent_req_create(mem_ctx, &state,
    1945             :                                 struct dcerpc_dfs_AddStdRoot_state);
    1946           0 :         if (req == NULL) {
    1947           0 :                 return NULL;
    1948             :         }
    1949           0 :         state->out_mem_ctx = NULL;
    1950             : 
    1951             :         /* In parameters */
    1952           0 :         state->orig.in.servername = _servername;
    1953           0 :         state->orig.in.rootshare = _rootshare;
    1954           0 :         state->orig.in.comment = _comment;
    1955           0 :         state->orig.in.flags = _flags;
    1956             : 
    1957             :         /* Out parameters */
    1958             : 
    1959             :         /* Result */
    1960           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1961             : 
    1962             :         /* make a temporary copy, that we pass to the dispatch function */
    1963           0 :         state->tmp = state->orig;
    1964             : 
    1965           0 :         subreq = dcerpc_dfs_AddStdRoot_r_send(state, ev, h, &state->tmp);
    1966           0 :         if (tevent_req_nomem(subreq, req)) {
    1967           0 :                 return tevent_req_post(req, ev);
    1968             :         }
    1969           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_AddStdRoot_done, req);
    1970           0 :         return req;
    1971             : }
    1972             : 
    1973           0 : static void dcerpc_dfs_AddStdRoot_done(struct tevent_req *subreq)
    1974             : {
    1975           0 :         struct tevent_req *req = tevent_req_callback_data(
    1976             :                 subreq, struct tevent_req);
    1977           0 :         struct dcerpc_dfs_AddStdRoot_state *state = tevent_req_data(
    1978             :                 req, struct dcerpc_dfs_AddStdRoot_state);
    1979             :         NTSTATUS status;
    1980             :         TALLOC_CTX *mem_ctx;
    1981             : 
    1982           0 :         if (state->out_mem_ctx) {
    1983           0 :                 mem_ctx = state->out_mem_ctx;
    1984             :         } else {
    1985           0 :                 mem_ctx = state;
    1986             :         }
    1987             : 
    1988           0 :         status = dcerpc_dfs_AddStdRoot_r_recv(subreq, mem_ctx);
    1989           0 :         TALLOC_FREE(subreq);
    1990           0 :         if (tevent_req_nterror(req, status)) {
    1991           0 :                 return;
    1992             :         }
    1993             : 
    1994             :         /* Copy out parameters */
    1995             : 
    1996             :         /* Copy result */
    1997           0 :         state->orig.out.result = state->tmp.out.result;
    1998             : 
    1999             :         /* Reset temporary structure */
    2000           0 :         NDR_ZERO_STRUCT(state->tmp);
    2001             : 
    2002           0 :         tevent_req_done(req);
    2003             : }
    2004             : 
    2005           0 : NTSTATUS dcerpc_dfs_AddStdRoot_recv(struct tevent_req *req,
    2006             :                                     TALLOC_CTX *mem_ctx,
    2007             :                                     WERROR *result)
    2008             : {
    2009           0 :         struct dcerpc_dfs_AddStdRoot_state *state = tevent_req_data(
    2010             :                 req, struct dcerpc_dfs_AddStdRoot_state);
    2011             :         NTSTATUS status;
    2012             : 
    2013           0 :         if (tevent_req_is_nterror(req, &status)) {
    2014           0 :                 tevent_req_received(req);
    2015           0 :                 return status;
    2016             :         }
    2017             : 
    2018             :         /* Steal possible out parameters to the callers context */
    2019           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2020             : 
    2021             :         /* Return result */
    2022           0 :         *result = state->orig.out.result;
    2023             : 
    2024           0 :         tevent_req_received(req);
    2025           0 :         return NT_STATUS_OK;
    2026             : }
    2027             : 
    2028           0 : NTSTATUS dcerpc_dfs_AddStdRoot(struct dcerpc_binding_handle *h,
    2029             :                                TALLOC_CTX *mem_ctx,
    2030             :                                const char *_servername /* [in] [charset(UTF16)] */,
    2031             :                                const char *_rootshare /* [in] [charset(UTF16)] */,
    2032             :                                const char *_comment /* [in] [charset(UTF16)] */,
    2033             :                                uint32_t _flags /* [in]  */,
    2034             :                                WERROR *result)
    2035             : {
    2036             :         struct dfs_AddStdRoot r;
    2037             :         NTSTATUS status;
    2038             : 
    2039             :         /* In parameters */
    2040           0 :         r.in.servername = _servername;
    2041           0 :         r.in.rootshare = _rootshare;
    2042           0 :         r.in.comment = _comment;
    2043           0 :         r.in.flags = _flags;
    2044             : 
    2045             :         /* Out parameters */
    2046             : 
    2047             :         /* Result */
    2048           0 :         NDR_ZERO_STRUCT(r.out.result);
    2049             : 
    2050           0 :         status = dcerpc_dfs_AddStdRoot_r(h, mem_ctx, &r);
    2051           0 :         if (!NT_STATUS_IS_OK(status)) {
    2052           0 :                 return status;
    2053             :         }
    2054             : 
    2055             :         /* Return variables */
    2056             : 
    2057             :         /* Return result */
    2058           0 :         *result = r.out.result;
    2059             : 
    2060           0 :         return NT_STATUS_OK;
    2061             : }
    2062             : 
    2063             : struct dcerpc_dfs_RemoveStdRoot_r_state {
    2064             :         TALLOC_CTX *out_mem_ctx;
    2065             : };
    2066             : 
    2067             : static void dcerpc_dfs_RemoveStdRoot_r_done(struct tevent_req *subreq);
    2068             : 
    2069           0 : struct tevent_req *dcerpc_dfs_RemoveStdRoot_r_send(TALLOC_CTX *mem_ctx,
    2070             :         struct tevent_context *ev,
    2071             :         struct dcerpc_binding_handle *h,
    2072             :         struct dfs_RemoveStdRoot *r)
    2073             : {
    2074             :         struct tevent_req *req;
    2075             :         struct dcerpc_dfs_RemoveStdRoot_r_state *state;
    2076             :         struct tevent_req *subreq;
    2077             : 
    2078           0 :         req = tevent_req_create(mem_ctx, &state,
    2079             :                                 struct dcerpc_dfs_RemoveStdRoot_r_state);
    2080           0 :         if (req == NULL) {
    2081           0 :                 return NULL;
    2082             :         }
    2083             : 
    2084           0 :         state->out_mem_ctx = NULL;
    2085             : 
    2086           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2087             :                         NULL, &ndr_table_netdfs,
    2088             :                         NDR_DFS_REMOVESTDROOT, state, r);
    2089           0 :         if (tevent_req_nomem(subreq, req)) {
    2090           0 :                 return tevent_req_post(req, ev);
    2091             :         }
    2092           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_RemoveStdRoot_r_done, req);
    2093             : 
    2094           0 :         return req;
    2095             : }
    2096             : 
    2097           0 : static void dcerpc_dfs_RemoveStdRoot_r_done(struct tevent_req *subreq)
    2098             : {
    2099           0 :         struct tevent_req *req =
    2100           0 :                 tevent_req_callback_data(subreq,
    2101             :                 struct tevent_req);
    2102             :         NTSTATUS status;
    2103             : 
    2104           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2105           0 :         TALLOC_FREE(subreq);
    2106           0 :         if (tevent_req_nterror(req, status)) {
    2107           0 :                 return;
    2108             :         }
    2109             : 
    2110           0 :         tevent_req_done(req);
    2111             : }
    2112             : 
    2113           0 : NTSTATUS dcerpc_dfs_RemoveStdRoot_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2114             : {
    2115           0 :         struct dcerpc_dfs_RemoveStdRoot_r_state *state =
    2116           0 :                 tevent_req_data(req,
    2117             :                 struct dcerpc_dfs_RemoveStdRoot_r_state);
    2118             :         NTSTATUS status;
    2119             : 
    2120           0 :         if (tevent_req_is_nterror(req, &status)) {
    2121           0 :                 tevent_req_received(req);
    2122           0 :                 return status;
    2123             :         }
    2124             : 
    2125           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2126             : 
    2127           0 :         tevent_req_received(req);
    2128           0 :         return NT_STATUS_OK;
    2129             : }
    2130             : 
    2131           0 : NTSTATUS dcerpc_dfs_RemoveStdRoot_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_RemoveStdRoot *r)
    2132             : {
    2133             :         NTSTATUS status;
    2134             : 
    2135           0 :         status = dcerpc_binding_handle_call(h,
    2136             :                         NULL, &ndr_table_netdfs,
    2137             :                         NDR_DFS_REMOVESTDROOT, mem_ctx, r);
    2138             : 
    2139           0 :         return status;
    2140             : }
    2141             : 
    2142             : struct dcerpc_dfs_RemoveStdRoot_state {
    2143             :         struct dfs_RemoveStdRoot orig;
    2144             :         struct dfs_RemoveStdRoot tmp;
    2145             :         TALLOC_CTX *out_mem_ctx;
    2146             : };
    2147             : 
    2148             : static void dcerpc_dfs_RemoveStdRoot_done(struct tevent_req *subreq);
    2149             : 
    2150           0 : struct tevent_req *dcerpc_dfs_RemoveStdRoot_send(TALLOC_CTX *mem_ctx,
    2151             :                                                  struct tevent_context *ev,
    2152             :                                                  struct dcerpc_binding_handle *h,
    2153             :                                                  const char *_servername /* [in] [charset(UTF16)] */,
    2154             :                                                  const char *_rootshare /* [in] [charset(UTF16)] */,
    2155             :                                                  uint32_t _flags /* [in]  */)
    2156             : {
    2157             :         struct tevent_req *req;
    2158             :         struct dcerpc_dfs_RemoveStdRoot_state *state;
    2159             :         struct tevent_req *subreq;
    2160             : 
    2161           0 :         req = tevent_req_create(mem_ctx, &state,
    2162             :                                 struct dcerpc_dfs_RemoveStdRoot_state);
    2163           0 :         if (req == NULL) {
    2164           0 :                 return NULL;
    2165             :         }
    2166           0 :         state->out_mem_ctx = NULL;
    2167             : 
    2168             :         /* In parameters */
    2169           0 :         state->orig.in.servername = _servername;
    2170           0 :         state->orig.in.rootshare = _rootshare;
    2171           0 :         state->orig.in.flags = _flags;
    2172             : 
    2173             :         /* Out parameters */
    2174             : 
    2175             :         /* Result */
    2176           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2177             : 
    2178             :         /* make a temporary copy, that we pass to the dispatch function */
    2179           0 :         state->tmp = state->orig;
    2180             : 
    2181           0 :         subreq = dcerpc_dfs_RemoveStdRoot_r_send(state, ev, h, &state->tmp);
    2182           0 :         if (tevent_req_nomem(subreq, req)) {
    2183           0 :                 return tevent_req_post(req, ev);
    2184             :         }
    2185           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_RemoveStdRoot_done, req);
    2186           0 :         return req;
    2187             : }
    2188             : 
    2189           0 : static void dcerpc_dfs_RemoveStdRoot_done(struct tevent_req *subreq)
    2190             : {
    2191           0 :         struct tevent_req *req = tevent_req_callback_data(
    2192             :                 subreq, struct tevent_req);
    2193           0 :         struct dcerpc_dfs_RemoveStdRoot_state *state = tevent_req_data(
    2194             :                 req, struct dcerpc_dfs_RemoveStdRoot_state);
    2195             :         NTSTATUS status;
    2196             :         TALLOC_CTX *mem_ctx;
    2197             : 
    2198           0 :         if (state->out_mem_ctx) {
    2199           0 :                 mem_ctx = state->out_mem_ctx;
    2200             :         } else {
    2201           0 :                 mem_ctx = state;
    2202             :         }
    2203             : 
    2204           0 :         status = dcerpc_dfs_RemoveStdRoot_r_recv(subreq, mem_ctx);
    2205           0 :         TALLOC_FREE(subreq);
    2206           0 :         if (tevent_req_nterror(req, status)) {
    2207           0 :                 return;
    2208             :         }
    2209             : 
    2210             :         /* Copy out parameters */
    2211             : 
    2212             :         /* Copy result */
    2213           0 :         state->orig.out.result = state->tmp.out.result;
    2214             : 
    2215             :         /* Reset temporary structure */
    2216           0 :         NDR_ZERO_STRUCT(state->tmp);
    2217             : 
    2218           0 :         tevent_req_done(req);
    2219             : }
    2220             : 
    2221           0 : NTSTATUS dcerpc_dfs_RemoveStdRoot_recv(struct tevent_req *req,
    2222             :                                        TALLOC_CTX *mem_ctx,
    2223             :                                        WERROR *result)
    2224             : {
    2225           0 :         struct dcerpc_dfs_RemoveStdRoot_state *state = tevent_req_data(
    2226             :                 req, struct dcerpc_dfs_RemoveStdRoot_state);
    2227             :         NTSTATUS status;
    2228             : 
    2229           0 :         if (tevent_req_is_nterror(req, &status)) {
    2230           0 :                 tevent_req_received(req);
    2231           0 :                 return status;
    2232             :         }
    2233             : 
    2234             :         /* Steal possible out parameters to the callers context */
    2235           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2236             : 
    2237             :         /* Return result */
    2238           0 :         *result = state->orig.out.result;
    2239             : 
    2240           0 :         tevent_req_received(req);
    2241           0 :         return NT_STATUS_OK;
    2242             : }
    2243             : 
    2244           0 : NTSTATUS dcerpc_dfs_RemoveStdRoot(struct dcerpc_binding_handle *h,
    2245             :                                   TALLOC_CTX *mem_ctx,
    2246             :                                   const char *_servername /* [in] [charset(UTF16)] */,
    2247             :                                   const char *_rootshare /* [in] [charset(UTF16)] */,
    2248             :                                   uint32_t _flags /* [in]  */,
    2249             :                                   WERROR *result)
    2250             : {
    2251             :         struct dfs_RemoveStdRoot r;
    2252             :         NTSTATUS status;
    2253             : 
    2254             :         /* In parameters */
    2255           0 :         r.in.servername = _servername;
    2256           0 :         r.in.rootshare = _rootshare;
    2257           0 :         r.in.flags = _flags;
    2258             : 
    2259             :         /* Out parameters */
    2260             : 
    2261             :         /* Result */
    2262           0 :         NDR_ZERO_STRUCT(r.out.result);
    2263             : 
    2264           0 :         status = dcerpc_dfs_RemoveStdRoot_r(h, mem_ctx, &r);
    2265           0 :         if (!NT_STATUS_IS_OK(status)) {
    2266           0 :                 return status;
    2267             :         }
    2268             : 
    2269             :         /* Return variables */
    2270             : 
    2271             :         /* Return result */
    2272           0 :         *result = r.out.result;
    2273             : 
    2274           0 :         return NT_STATUS_OK;
    2275             : }
    2276             : 
    2277             : struct dcerpc_dfs_ManagerInitialize_r_state {
    2278             :         TALLOC_CTX *out_mem_ctx;
    2279             : };
    2280             : 
    2281             : static void dcerpc_dfs_ManagerInitialize_r_done(struct tevent_req *subreq);
    2282             : 
    2283           0 : struct tevent_req *dcerpc_dfs_ManagerInitialize_r_send(TALLOC_CTX *mem_ctx,
    2284             :         struct tevent_context *ev,
    2285             :         struct dcerpc_binding_handle *h,
    2286             :         struct dfs_ManagerInitialize *r)
    2287             : {
    2288             :         struct tevent_req *req;
    2289             :         struct dcerpc_dfs_ManagerInitialize_r_state *state;
    2290             :         struct tevent_req *subreq;
    2291             : 
    2292           0 :         req = tevent_req_create(mem_ctx, &state,
    2293             :                                 struct dcerpc_dfs_ManagerInitialize_r_state);
    2294           0 :         if (req == NULL) {
    2295           0 :                 return NULL;
    2296             :         }
    2297             : 
    2298           0 :         state->out_mem_ctx = NULL;
    2299             : 
    2300           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2301             :                         NULL, &ndr_table_netdfs,
    2302             :                         NDR_DFS_MANAGERINITIALIZE, state, r);
    2303           0 :         if (tevent_req_nomem(subreq, req)) {
    2304           0 :                 return tevent_req_post(req, ev);
    2305             :         }
    2306           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_ManagerInitialize_r_done, req);
    2307             : 
    2308           0 :         return req;
    2309             : }
    2310             : 
    2311           0 : static void dcerpc_dfs_ManagerInitialize_r_done(struct tevent_req *subreq)
    2312             : {
    2313           0 :         struct tevent_req *req =
    2314           0 :                 tevent_req_callback_data(subreq,
    2315             :                 struct tevent_req);
    2316             :         NTSTATUS status;
    2317             : 
    2318           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2319           0 :         TALLOC_FREE(subreq);
    2320           0 :         if (tevent_req_nterror(req, status)) {
    2321           0 :                 return;
    2322             :         }
    2323             : 
    2324           0 :         tevent_req_done(req);
    2325             : }
    2326             : 
    2327           0 : NTSTATUS dcerpc_dfs_ManagerInitialize_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2328             : {
    2329           0 :         struct dcerpc_dfs_ManagerInitialize_r_state *state =
    2330           0 :                 tevent_req_data(req,
    2331             :                 struct dcerpc_dfs_ManagerInitialize_r_state);
    2332             :         NTSTATUS status;
    2333             : 
    2334           0 :         if (tevent_req_is_nterror(req, &status)) {
    2335           0 :                 tevent_req_received(req);
    2336           0 :                 return status;
    2337             :         }
    2338             : 
    2339           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2340             : 
    2341           0 :         tevent_req_received(req);
    2342           0 :         return NT_STATUS_OK;
    2343             : }
    2344             : 
    2345           0 : NTSTATUS dcerpc_dfs_ManagerInitialize_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_ManagerInitialize *r)
    2346             : {
    2347             :         NTSTATUS status;
    2348             : 
    2349           0 :         status = dcerpc_binding_handle_call(h,
    2350             :                         NULL, &ndr_table_netdfs,
    2351             :                         NDR_DFS_MANAGERINITIALIZE, mem_ctx, r);
    2352             : 
    2353           0 :         return status;
    2354             : }
    2355             : 
    2356             : struct dcerpc_dfs_ManagerInitialize_state {
    2357             :         struct dfs_ManagerInitialize orig;
    2358             :         struct dfs_ManagerInitialize tmp;
    2359             :         TALLOC_CTX *out_mem_ctx;
    2360             : };
    2361             : 
    2362             : static void dcerpc_dfs_ManagerInitialize_done(struct tevent_req *subreq);
    2363             : 
    2364           0 : struct tevent_req *dcerpc_dfs_ManagerInitialize_send(TALLOC_CTX *mem_ctx,
    2365             :                                                      struct tevent_context *ev,
    2366             :                                                      struct dcerpc_binding_handle *h,
    2367             :                                                      const char *_servername /* [in] [charset(UTF16),ref] */,
    2368             :                                                      uint32_t _flags /* [in]  */)
    2369             : {
    2370             :         struct tevent_req *req;
    2371             :         struct dcerpc_dfs_ManagerInitialize_state *state;
    2372             :         struct tevent_req *subreq;
    2373             : 
    2374           0 :         req = tevent_req_create(mem_ctx, &state,
    2375             :                                 struct dcerpc_dfs_ManagerInitialize_state);
    2376           0 :         if (req == NULL) {
    2377           0 :                 return NULL;
    2378             :         }
    2379           0 :         state->out_mem_ctx = NULL;
    2380             : 
    2381             :         /* In parameters */
    2382           0 :         state->orig.in.servername = _servername;
    2383           0 :         state->orig.in.flags = _flags;
    2384             : 
    2385             :         /* Out parameters */
    2386             : 
    2387             :         /* Result */
    2388           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2389             : 
    2390             :         /* make a temporary copy, that we pass to the dispatch function */
    2391           0 :         state->tmp = state->orig;
    2392             : 
    2393           0 :         subreq = dcerpc_dfs_ManagerInitialize_r_send(state, ev, h, &state->tmp);
    2394           0 :         if (tevent_req_nomem(subreq, req)) {
    2395           0 :                 return tevent_req_post(req, ev);
    2396             :         }
    2397           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_ManagerInitialize_done, req);
    2398           0 :         return req;
    2399             : }
    2400             : 
    2401           0 : static void dcerpc_dfs_ManagerInitialize_done(struct tevent_req *subreq)
    2402             : {
    2403           0 :         struct tevent_req *req = tevent_req_callback_data(
    2404             :                 subreq, struct tevent_req);
    2405           0 :         struct dcerpc_dfs_ManagerInitialize_state *state = tevent_req_data(
    2406             :                 req, struct dcerpc_dfs_ManagerInitialize_state);
    2407             :         NTSTATUS status;
    2408             :         TALLOC_CTX *mem_ctx;
    2409             : 
    2410           0 :         if (state->out_mem_ctx) {
    2411           0 :                 mem_ctx = state->out_mem_ctx;
    2412             :         } else {
    2413           0 :                 mem_ctx = state;
    2414             :         }
    2415             : 
    2416           0 :         status = dcerpc_dfs_ManagerInitialize_r_recv(subreq, mem_ctx);
    2417           0 :         TALLOC_FREE(subreq);
    2418           0 :         if (tevent_req_nterror(req, status)) {
    2419           0 :                 return;
    2420             :         }
    2421             : 
    2422             :         /* Copy out parameters */
    2423             : 
    2424             :         /* Copy result */
    2425           0 :         state->orig.out.result = state->tmp.out.result;
    2426             : 
    2427             :         /* Reset temporary structure */
    2428           0 :         NDR_ZERO_STRUCT(state->tmp);
    2429             : 
    2430           0 :         tevent_req_done(req);
    2431             : }
    2432             : 
    2433           0 : NTSTATUS dcerpc_dfs_ManagerInitialize_recv(struct tevent_req *req,
    2434             :                                            TALLOC_CTX *mem_ctx,
    2435             :                                            WERROR *result)
    2436             : {
    2437           0 :         struct dcerpc_dfs_ManagerInitialize_state *state = tevent_req_data(
    2438             :                 req, struct dcerpc_dfs_ManagerInitialize_state);
    2439             :         NTSTATUS status;
    2440             : 
    2441           0 :         if (tevent_req_is_nterror(req, &status)) {
    2442           0 :                 tevent_req_received(req);
    2443           0 :                 return status;
    2444             :         }
    2445             : 
    2446             :         /* Steal possible out parameters to the callers context */
    2447           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2448             : 
    2449             :         /* Return result */
    2450           0 :         *result = state->orig.out.result;
    2451             : 
    2452           0 :         tevent_req_received(req);
    2453           0 :         return NT_STATUS_OK;
    2454             : }
    2455             : 
    2456           0 : NTSTATUS dcerpc_dfs_ManagerInitialize(struct dcerpc_binding_handle *h,
    2457             :                                       TALLOC_CTX *mem_ctx,
    2458             :                                       const char *_servername /* [in] [charset(UTF16),ref] */,
    2459             :                                       uint32_t _flags /* [in]  */,
    2460             :                                       WERROR *result)
    2461             : {
    2462             :         struct dfs_ManagerInitialize r;
    2463             :         NTSTATUS status;
    2464             : 
    2465             :         /* In parameters */
    2466           0 :         r.in.servername = _servername;
    2467           0 :         r.in.flags = _flags;
    2468             : 
    2469             :         /* Out parameters */
    2470             : 
    2471             :         /* Result */
    2472           0 :         NDR_ZERO_STRUCT(r.out.result);
    2473             : 
    2474           0 :         status = dcerpc_dfs_ManagerInitialize_r(h, mem_ctx, &r);
    2475           0 :         if (!NT_STATUS_IS_OK(status)) {
    2476           0 :                 return status;
    2477             :         }
    2478             : 
    2479             :         /* Return variables */
    2480             : 
    2481             :         /* Return result */
    2482           0 :         *result = r.out.result;
    2483             : 
    2484           0 :         return NT_STATUS_OK;
    2485             : }
    2486             : 
    2487             : struct dcerpc_dfs_AddStdRootForced_r_state {
    2488             :         TALLOC_CTX *out_mem_ctx;
    2489             : };
    2490             : 
    2491             : static void dcerpc_dfs_AddStdRootForced_r_done(struct tevent_req *subreq);
    2492             : 
    2493           0 : struct tevent_req *dcerpc_dfs_AddStdRootForced_r_send(TALLOC_CTX *mem_ctx,
    2494             :         struct tevent_context *ev,
    2495             :         struct dcerpc_binding_handle *h,
    2496             :         struct dfs_AddStdRootForced *r)
    2497             : {
    2498             :         struct tevent_req *req;
    2499             :         struct dcerpc_dfs_AddStdRootForced_r_state *state;
    2500             :         struct tevent_req *subreq;
    2501             : 
    2502           0 :         req = tevent_req_create(mem_ctx, &state,
    2503             :                                 struct dcerpc_dfs_AddStdRootForced_r_state);
    2504           0 :         if (req == NULL) {
    2505           0 :                 return NULL;
    2506             :         }
    2507             : 
    2508           0 :         state->out_mem_ctx = NULL;
    2509             : 
    2510           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2511             :                         NULL, &ndr_table_netdfs,
    2512             :                         NDR_DFS_ADDSTDROOTFORCED, state, r);
    2513           0 :         if (tevent_req_nomem(subreq, req)) {
    2514           0 :                 return tevent_req_post(req, ev);
    2515             :         }
    2516           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_AddStdRootForced_r_done, req);
    2517             : 
    2518           0 :         return req;
    2519             : }
    2520             : 
    2521           0 : static void dcerpc_dfs_AddStdRootForced_r_done(struct tevent_req *subreq)
    2522             : {
    2523           0 :         struct tevent_req *req =
    2524           0 :                 tevent_req_callback_data(subreq,
    2525             :                 struct tevent_req);
    2526             :         NTSTATUS status;
    2527             : 
    2528           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2529           0 :         TALLOC_FREE(subreq);
    2530           0 :         if (tevent_req_nterror(req, status)) {
    2531           0 :                 return;
    2532             :         }
    2533             : 
    2534           0 :         tevent_req_done(req);
    2535             : }
    2536             : 
    2537           0 : NTSTATUS dcerpc_dfs_AddStdRootForced_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2538             : {
    2539           0 :         struct dcerpc_dfs_AddStdRootForced_r_state *state =
    2540           0 :                 tevent_req_data(req,
    2541             :                 struct dcerpc_dfs_AddStdRootForced_r_state);
    2542             :         NTSTATUS status;
    2543             : 
    2544           0 :         if (tevent_req_is_nterror(req, &status)) {
    2545           0 :                 tevent_req_received(req);
    2546           0 :                 return status;
    2547             :         }
    2548             : 
    2549           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2550             : 
    2551           0 :         tevent_req_received(req);
    2552           0 :         return NT_STATUS_OK;
    2553             : }
    2554             : 
    2555           0 : NTSTATUS dcerpc_dfs_AddStdRootForced_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_AddStdRootForced *r)
    2556             : {
    2557             :         NTSTATUS status;
    2558             : 
    2559           0 :         status = dcerpc_binding_handle_call(h,
    2560             :                         NULL, &ndr_table_netdfs,
    2561             :                         NDR_DFS_ADDSTDROOTFORCED, mem_ctx, r);
    2562             : 
    2563           0 :         return status;
    2564             : }
    2565             : 
    2566             : struct dcerpc_dfs_AddStdRootForced_state {
    2567             :         struct dfs_AddStdRootForced orig;
    2568             :         struct dfs_AddStdRootForced tmp;
    2569             :         TALLOC_CTX *out_mem_ctx;
    2570             : };
    2571             : 
    2572             : static void dcerpc_dfs_AddStdRootForced_done(struct tevent_req *subreq);
    2573             : 
    2574           0 : struct tevent_req *dcerpc_dfs_AddStdRootForced_send(TALLOC_CTX *mem_ctx,
    2575             :                                                     struct tevent_context *ev,
    2576             :                                                     struct dcerpc_binding_handle *h,
    2577             :                                                     const char *_servername /* [in] [charset(UTF16)] */,
    2578             :                                                     const char *_rootshare /* [in] [charset(UTF16)] */,
    2579             :                                                     const char *_comment /* [in] [charset(UTF16)] */,
    2580             :                                                     const char *_store /* [in] [charset(UTF16)] */)
    2581             : {
    2582             :         struct tevent_req *req;
    2583             :         struct dcerpc_dfs_AddStdRootForced_state *state;
    2584             :         struct tevent_req *subreq;
    2585             : 
    2586           0 :         req = tevent_req_create(mem_ctx, &state,
    2587             :                                 struct dcerpc_dfs_AddStdRootForced_state);
    2588           0 :         if (req == NULL) {
    2589           0 :                 return NULL;
    2590             :         }
    2591           0 :         state->out_mem_ctx = NULL;
    2592             : 
    2593             :         /* In parameters */
    2594           0 :         state->orig.in.servername = _servername;
    2595           0 :         state->orig.in.rootshare = _rootshare;
    2596           0 :         state->orig.in.comment = _comment;
    2597           0 :         state->orig.in.store = _store;
    2598             : 
    2599             :         /* Out parameters */
    2600             : 
    2601             :         /* Result */
    2602           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2603             : 
    2604             :         /* make a temporary copy, that we pass to the dispatch function */
    2605           0 :         state->tmp = state->orig;
    2606             : 
    2607           0 :         subreq = dcerpc_dfs_AddStdRootForced_r_send(state, ev, h, &state->tmp);
    2608           0 :         if (tevent_req_nomem(subreq, req)) {
    2609           0 :                 return tevent_req_post(req, ev);
    2610             :         }
    2611           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_AddStdRootForced_done, req);
    2612           0 :         return req;
    2613             : }
    2614             : 
    2615           0 : static void dcerpc_dfs_AddStdRootForced_done(struct tevent_req *subreq)
    2616             : {
    2617           0 :         struct tevent_req *req = tevent_req_callback_data(
    2618             :                 subreq, struct tevent_req);
    2619           0 :         struct dcerpc_dfs_AddStdRootForced_state *state = tevent_req_data(
    2620             :                 req, struct dcerpc_dfs_AddStdRootForced_state);
    2621             :         NTSTATUS status;
    2622             :         TALLOC_CTX *mem_ctx;
    2623             : 
    2624           0 :         if (state->out_mem_ctx) {
    2625           0 :                 mem_ctx = state->out_mem_ctx;
    2626             :         } else {
    2627           0 :                 mem_ctx = state;
    2628             :         }
    2629             : 
    2630           0 :         status = dcerpc_dfs_AddStdRootForced_r_recv(subreq, mem_ctx);
    2631           0 :         TALLOC_FREE(subreq);
    2632           0 :         if (tevent_req_nterror(req, status)) {
    2633           0 :                 return;
    2634             :         }
    2635             : 
    2636             :         /* Copy out parameters */
    2637             : 
    2638             :         /* Copy result */
    2639           0 :         state->orig.out.result = state->tmp.out.result;
    2640             : 
    2641             :         /* Reset temporary structure */
    2642           0 :         NDR_ZERO_STRUCT(state->tmp);
    2643             : 
    2644           0 :         tevent_req_done(req);
    2645             : }
    2646             : 
    2647           0 : NTSTATUS dcerpc_dfs_AddStdRootForced_recv(struct tevent_req *req,
    2648             :                                           TALLOC_CTX *mem_ctx,
    2649             :                                           WERROR *result)
    2650             : {
    2651           0 :         struct dcerpc_dfs_AddStdRootForced_state *state = tevent_req_data(
    2652             :                 req, struct dcerpc_dfs_AddStdRootForced_state);
    2653             :         NTSTATUS status;
    2654             : 
    2655           0 :         if (tevent_req_is_nterror(req, &status)) {
    2656           0 :                 tevent_req_received(req);
    2657           0 :                 return status;
    2658             :         }
    2659             : 
    2660             :         /* Steal possible out parameters to the callers context */
    2661           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2662             : 
    2663             :         /* Return result */
    2664           0 :         *result = state->orig.out.result;
    2665             : 
    2666           0 :         tevent_req_received(req);
    2667           0 :         return NT_STATUS_OK;
    2668             : }
    2669             : 
    2670           0 : NTSTATUS dcerpc_dfs_AddStdRootForced(struct dcerpc_binding_handle *h,
    2671             :                                      TALLOC_CTX *mem_ctx,
    2672             :                                      const char *_servername /* [in] [charset(UTF16)] */,
    2673             :                                      const char *_rootshare /* [in] [charset(UTF16)] */,
    2674             :                                      const char *_comment /* [in] [charset(UTF16)] */,
    2675             :                                      const char *_store /* [in] [charset(UTF16)] */,
    2676             :                                      WERROR *result)
    2677             : {
    2678             :         struct dfs_AddStdRootForced r;
    2679             :         NTSTATUS status;
    2680             : 
    2681             :         /* In parameters */
    2682           0 :         r.in.servername = _servername;
    2683           0 :         r.in.rootshare = _rootshare;
    2684           0 :         r.in.comment = _comment;
    2685           0 :         r.in.store = _store;
    2686             : 
    2687             :         /* Out parameters */
    2688             : 
    2689             :         /* Result */
    2690           0 :         NDR_ZERO_STRUCT(r.out.result);
    2691             : 
    2692           0 :         status = dcerpc_dfs_AddStdRootForced_r(h, mem_ctx, &r);
    2693           0 :         if (!NT_STATUS_IS_OK(status)) {
    2694           0 :                 return status;
    2695             :         }
    2696             : 
    2697             :         /* Return variables */
    2698             : 
    2699             :         /* Return result */
    2700           0 :         *result = r.out.result;
    2701             : 
    2702           0 :         return NT_STATUS_OK;
    2703             : }
    2704             : 
    2705             : struct dcerpc_dfs_GetDcAddress_r_state {
    2706             :         TALLOC_CTX *out_mem_ctx;
    2707             : };
    2708             : 
    2709             : static void dcerpc_dfs_GetDcAddress_r_done(struct tevent_req *subreq);
    2710             : 
    2711           0 : struct tevent_req *dcerpc_dfs_GetDcAddress_r_send(TALLOC_CTX *mem_ctx,
    2712             :         struct tevent_context *ev,
    2713             :         struct dcerpc_binding_handle *h,
    2714             :         struct dfs_GetDcAddress *r)
    2715             : {
    2716             :         struct tevent_req *req;
    2717             :         struct dcerpc_dfs_GetDcAddress_r_state *state;
    2718             :         struct tevent_req *subreq;
    2719             : 
    2720           0 :         req = tevent_req_create(mem_ctx, &state,
    2721             :                                 struct dcerpc_dfs_GetDcAddress_r_state);
    2722           0 :         if (req == NULL) {
    2723           0 :                 return NULL;
    2724             :         }
    2725             : 
    2726           0 :         state->out_mem_ctx = talloc_new(state);
    2727           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2728           0 :                 return tevent_req_post(req, ev);
    2729             :         }
    2730             : 
    2731           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2732             :                         NULL, &ndr_table_netdfs,
    2733           0 :                         NDR_DFS_GETDCADDRESS, state->out_mem_ctx, r);
    2734           0 :         if (tevent_req_nomem(subreq, req)) {
    2735           0 :                 return tevent_req_post(req, ev);
    2736             :         }
    2737           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_GetDcAddress_r_done, req);
    2738             : 
    2739           0 :         return req;
    2740             : }
    2741             : 
    2742           0 : static void dcerpc_dfs_GetDcAddress_r_done(struct tevent_req *subreq)
    2743             : {
    2744           0 :         struct tevent_req *req =
    2745           0 :                 tevent_req_callback_data(subreq,
    2746             :                 struct tevent_req);
    2747             :         NTSTATUS status;
    2748             : 
    2749           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2750           0 :         TALLOC_FREE(subreq);
    2751           0 :         if (tevent_req_nterror(req, status)) {
    2752           0 :                 return;
    2753             :         }
    2754             : 
    2755           0 :         tevent_req_done(req);
    2756             : }
    2757             : 
    2758           0 : NTSTATUS dcerpc_dfs_GetDcAddress_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2759             : {
    2760           0 :         struct dcerpc_dfs_GetDcAddress_r_state *state =
    2761           0 :                 tevent_req_data(req,
    2762             :                 struct dcerpc_dfs_GetDcAddress_r_state);
    2763             :         NTSTATUS status;
    2764             : 
    2765           0 :         if (tevent_req_is_nterror(req, &status)) {
    2766           0 :                 tevent_req_received(req);
    2767           0 :                 return status;
    2768             :         }
    2769             : 
    2770           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2771             : 
    2772           0 :         tevent_req_received(req);
    2773           0 :         return NT_STATUS_OK;
    2774             : }
    2775             : 
    2776           0 : NTSTATUS dcerpc_dfs_GetDcAddress_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_GetDcAddress *r)
    2777             : {
    2778             :         NTSTATUS status;
    2779             : 
    2780           0 :         status = dcerpc_binding_handle_call(h,
    2781             :                         NULL, &ndr_table_netdfs,
    2782             :                         NDR_DFS_GETDCADDRESS, mem_ctx, r);
    2783             : 
    2784           0 :         return status;
    2785             : }
    2786             : 
    2787             : struct dcerpc_dfs_GetDcAddress_state {
    2788             :         struct dfs_GetDcAddress orig;
    2789             :         struct dfs_GetDcAddress tmp;
    2790             :         TALLOC_CTX *out_mem_ctx;
    2791             : };
    2792             : 
    2793             : static void dcerpc_dfs_GetDcAddress_done(struct tevent_req *subreq);
    2794             : 
    2795           0 : struct tevent_req *dcerpc_dfs_GetDcAddress_send(TALLOC_CTX *mem_ctx,
    2796             :                                                 struct tevent_context *ev,
    2797             :                                                 struct dcerpc_binding_handle *h,
    2798             :                                                 const char *_servername /* [in] [charset(UTF16)] */,
    2799             :                                                 const char **_server_fullname /* [in,out] [charset(UTF16),ref] */,
    2800             :                                                 uint8_t *_is_root /* [in,out] [ref] */,
    2801             :                                                 uint32_t *_ttl /* [in,out] [ref] */)
    2802             : {
    2803             :         struct tevent_req *req;
    2804             :         struct dcerpc_dfs_GetDcAddress_state *state;
    2805             :         struct tevent_req *subreq;
    2806             : 
    2807           0 :         req = tevent_req_create(mem_ctx, &state,
    2808             :                                 struct dcerpc_dfs_GetDcAddress_state);
    2809           0 :         if (req == NULL) {
    2810           0 :                 return NULL;
    2811             :         }
    2812           0 :         state->out_mem_ctx = NULL;
    2813             : 
    2814             :         /* In parameters */
    2815           0 :         state->orig.in.servername = _servername;
    2816           0 :         state->orig.in.server_fullname = _server_fullname;
    2817           0 :         state->orig.in.is_root = _is_root;
    2818           0 :         state->orig.in.ttl = _ttl;
    2819             : 
    2820             :         /* Out parameters */
    2821           0 :         state->orig.out.server_fullname = _server_fullname;
    2822           0 :         state->orig.out.is_root = _is_root;
    2823           0 :         state->orig.out.ttl = _ttl;
    2824             : 
    2825             :         /* Result */
    2826           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2827             : 
    2828           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2829             :                              "dcerpc_dfs_GetDcAddress_out_memory");
    2830           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2831           0 :                 return tevent_req_post(req, ev);
    2832             :         }
    2833             : 
    2834             :         /* make a temporary copy, that we pass to the dispatch function */
    2835           0 :         state->tmp = state->orig;
    2836             : 
    2837           0 :         subreq = dcerpc_dfs_GetDcAddress_r_send(state, ev, h, &state->tmp);
    2838           0 :         if (tevent_req_nomem(subreq, req)) {
    2839           0 :                 return tevent_req_post(req, ev);
    2840             :         }
    2841           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_GetDcAddress_done, req);
    2842           0 :         return req;
    2843             : }
    2844             : 
    2845           0 : static void dcerpc_dfs_GetDcAddress_done(struct tevent_req *subreq)
    2846             : {
    2847           0 :         struct tevent_req *req = tevent_req_callback_data(
    2848             :                 subreq, struct tevent_req);
    2849           0 :         struct dcerpc_dfs_GetDcAddress_state *state = tevent_req_data(
    2850             :                 req, struct dcerpc_dfs_GetDcAddress_state);
    2851             :         NTSTATUS status;
    2852             :         TALLOC_CTX *mem_ctx;
    2853             : 
    2854           0 :         if (state->out_mem_ctx) {
    2855           0 :                 mem_ctx = state->out_mem_ctx;
    2856             :         } else {
    2857           0 :                 mem_ctx = state;
    2858             :         }
    2859             : 
    2860           0 :         status = dcerpc_dfs_GetDcAddress_r_recv(subreq, mem_ctx);
    2861           0 :         TALLOC_FREE(subreq);
    2862           0 :         if (tevent_req_nterror(req, status)) {
    2863           0 :                 return;
    2864             :         }
    2865             : 
    2866             :         /* Copy out parameters */
    2867           0 :         *state->orig.out.server_fullname = *state->tmp.out.server_fullname;
    2868           0 :         *state->orig.out.is_root = *state->tmp.out.is_root;
    2869           0 :         *state->orig.out.ttl = *state->tmp.out.ttl;
    2870             : 
    2871             :         /* Copy result */
    2872           0 :         state->orig.out.result = state->tmp.out.result;
    2873             : 
    2874             :         /* Reset temporary structure */
    2875           0 :         NDR_ZERO_STRUCT(state->tmp);
    2876             : 
    2877           0 :         tevent_req_done(req);
    2878             : }
    2879             : 
    2880           0 : NTSTATUS dcerpc_dfs_GetDcAddress_recv(struct tevent_req *req,
    2881             :                                       TALLOC_CTX *mem_ctx,
    2882             :                                       WERROR *result)
    2883             : {
    2884           0 :         struct dcerpc_dfs_GetDcAddress_state *state = tevent_req_data(
    2885             :                 req, struct dcerpc_dfs_GetDcAddress_state);
    2886             :         NTSTATUS status;
    2887             : 
    2888           0 :         if (tevent_req_is_nterror(req, &status)) {
    2889           0 :                 tevent_req_received(req);
    2890           0 :                 return status;
    2891             :         }
    2892             : 
    2893             :         /* Steal possible out parameters to the callers context */
    2894           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2895             : 
    2896             :         /* Return result */
    2897           0 :         *result = state->orig.out.result;
    2898             : 
    2899           0 :         tevent_req_received(req);
    2900           0 :         return NT_STATUS_OK;
    2901             : }
    2902             : 
    2903           0 : NTSTATUS dcerpc_dfs_GetDcAddress(struct dcerpc_binding_handle *h,
    2904             :                                  TALLOC_CTX *mem_ctx,
    2905             :                                  const char *_servername /* [in] [charset(UTF16)] */,
    2906             :                                  const char **_server_fullname /* [in,out] [charset(UTF16),ref] */,
    2907             :                                  uint8_t *_is_root /* [in,out] [ref] */,
    2908             :                                  uint32_t *_ttl /* [in,out] [ref] */,
    2909             :                                  WERROR *result)
    2910             : {
    2911             :         struct dfs_GetDcAddress r;
    2912             :         NTSTATUS status;
    2913             : 
    2914             :         /* In parameters */
    2915           0 :         r.in.servername = _servername;
    2916           0 :         r.in.server_fullname = _server_fullname;
    2917           0 :         r.in.is_root = _is_root;
    2918           0 :         r.in.ttl = _ttl;
    2919             : 
    2920             :         /* Out parameters */
    2921           0 :         r.out.server_fullname = _server_fullname;
    2922           0 :         r.out.is_root = _is_root;
    2923           0 :         r.out.ttl = _ttl;
    2924             : 
    2925             :         /* Result */
    2926           0 :         NDR_ZERO_STRUCT(r.out.result);
    2927             : 
    2928           0 :         status = dcerpc_dfs_GetDcAddress_r(h, mem_ctx, &r);
    2929           0 :         if (!NT_STATUS_IS_OK(status)) {
    2930           0 :                 return status;
    2931             :         }
    2932             : 
    2933             :         /* Return variables */
    2934           0 :         *_server_fullname = *r.out.server_fullname;
    2935           0 :         *_is_root = *r.out.is_root;
    2936           0 :         *_ttl = *r.out.ttl;
    2937             : 
    2938             :         /* Return result */
    2939           0 :         *result = r.out.result;
    2940             : 
    2941           0 :         return NT_STATUS_OK;
    2942             : }
    2943             : 
    2944             : struct dcerpc_dfs_SetDcAddress_r_state {
    2945             :         TALLOC_CTX *out_mem_ctx;
    2946             : };
    2947             : 
    2948             : static void dcerpc_dfs_SetDcAddress_r_done(struct tevent_req *subreq);
    2949             : 
    2950           0 : struct tevent_req *dcerpc_dfs_SetDcAddress_r_send(TALLOC_CTX *mem_ctx,
    2951             :         struct tevent_context *ev,
    2952             :         struct dcerpc_binding_handle *h,
    2953             :         struct dfs_SetDcAddress *r)
    2954             : {
    2955             :         struct tevent_req *req;
    2956             :         struct dcerpc_dfs_SetDcAddress_r_state *state;
    2957             :         struct tevent_req *subreq;
    2958             : 
    2959           0 :         req = tevent_req_create(mem_ctx, &state,
    2960             :                                 struct dcerpc_dfs_SetDcAddress_r_state);
    2961           0 :         if (req == NULL) {
    2962           0 :                 return NULL;
    2963             :         }
    2964             : 
    2965           0 :         state->out_mem_ctx = NULL;
    2966             : 
    2967           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2968             :                         NULL, &ndr_table_netdfs,
    2969             :                         NDR_DFS_SETDCADDRESS, state, r);
    2970           0 :         if (tevent_req_nomem(subreq, req)) {
    2971           0 :                 return tevent_req_post(req, ev);
    2972             :         }
    2973           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_SetDcAddress_r_done, req);
    2974             : 
    2975           0 :         return req;
    2976             : }
    2977             : 
    2978           0 : static void dcerpc_dfs_SetDcAddress_r_done(struct tevent_req *subreq)
    2979             : {
    2980           0 :         struct tevent_req *req =
    2981           0 :                 tevent_req_callback_data(subreq,
    2982             :                 struct tevent_req);
    2983             :         NTSTATUS status;
    2984             : 
    2985           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2986           0 :         TALLOC_FREE(subreq);
    2987           0 :         if (tevent_req_nterror(req, status)) {
    2988           0 :                 return;
    2989             :         }
    2990             : 
    2991           0 :         tevent_req_done(req);
    2992             : }
    2993             : 
    2994           0 : NTSTATUS dcerpc_dfs_SetDcAddress_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2995             : {
    2996           0 :         struct dcerpc_dfs_SetDcAddress_r_state *state =
    2997           0 :                 tevent_req_data(req,
    2998             :                 struct dcerpc_dfs_SetDcAddress_r_state);
    2999             :         NTSTATUS status;
    3000             : 
    3001           0 :         if (tevent_req_is_nterror(req, &status)) {
    3002           0 :                 tevent_req_received(req);
    3003           0 :                 return status;
    3004             :         }
    3005             : 
    3006           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3007             : 
    3008           0 :         tevent_req_received(req);
    3009           0 :         return NT_STATUS_OK;
    3010             : }
    3011             : 
    3012           0 : NTSTATUS dcerpc_dfs_SetDcAddress_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_SetDcAddress *r)
    3013             : {
    3014             :         NTSTATUS status;
    3015             : 
    3016           0 :         status = dcerpc_binding_handle_call(h,
    3017             :                         NULL, &ndr_table_netdfs,
    3018             :                         NDR_DFS_SETDCADDRESS, mem_ctx, r);
    3019             : 
    3020           0 :         return status;
    3021             : }
    3022             : 
    3023             : struct dcerpc_dfs_SetDcAddress_state {
    3024             :         struct dfs_SetDcAddress orig;
    3025             :         struct dfs_SetDcAddress tmp;
    3026             :         TALLOC_CTX *out_mem_ctx;
    3027             : };
    3028             : 
    3029             : static void dcerpc_dfs_SetDcAddress_done(struct tevent_req *subreq);
    3030             : 
    3031           0 : struct tevent_req *dcerpc_dfs_SetDcAddress_send(TALLOC_CTX *mem_ctx,
    3032             :                                                 struct tevent_context *ev,
    3033             :                                                 struct dcerpc_binding_handle *h,
    3034             :                                                 const char *_servername /* [in] [charset(UTF16)] */,
    3035             :                                                 const char *_server_fullname /* [in] [charset(UTF16)] */,
    3036             :                                                 uint32_t _flags /* [in]  */,
    3037             :                                                 uint32_t _ttl /* [in]  */)
    3038             : {
    3039             :         struct tevent_req *req;
    3040             :         struct dcerpc_dfs_SetDcAddress_state *state;
    3041             :         struct tevent_req *subreq;
    3042             : 
    3043           0 :         req = tevent_req_create(mem_ctx, &state,
    3044             :                                 struct dcerpc_dfs_SetDcAddress_state);
    3045           0 :         if (req == NULL) {
    3046           0 :                 return NULL;
    3047             :         }
    3048           0 :         state->out_mem_ctx = NULL;
    3049             : 
    3050             :         /* In parameters */
    3051           0 :         state->orig.in.servername = _servername;
    3052           0 :         state->orig.in.server_fullname = _server_fullname;
    3053           0 :         state->orig.in.flags = _flags;
    3054           0 :         state->orig.in.ttl = _ttl;
    3055             : 
    3056             :         /* Out parameters */
    3057             : 
    3058             :         /* Result */
    3059           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3060             : 
    3061             :         /* make a temporary copy, that we pass to the dispatch function */
    3062           0 :         state->tmp = state->orig;
    3063             : 
    3064           0 :         subreq = dcerpc_dfs_SetDcAddress_r_send(state, ev, h, &state->tmp);
    3065           0 :         if (tevent_req_nomem(subreq, req)) {
    3066           0 :                 return tevent_req_post(req, ev);
    3067             :         }
    3068           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_SetDcAddress_done, req);
    3069           0 :         return req;
    3070             : }
    3071             : 
    3072           0 : static void dcerpc_dfs_SetDcAddress_done(struct tevent_req *subreq)
    3073             : {
    3074           0 :         struct tevent_req *req = tevent_req_callback_data(
    3075             :                 subreq, struct tevent_req);
    3076           0 :         struct dcerpc_dfs_SetDcAddress_state *state = tevent_req_data(
    3077             :                 req, struct dcerpc_dfs_SetDcAddress_state);
    3078             :         NTSTATUS status;
    3079             :         TALLOC_CTX *mem_ctx;
    3080             : 
    3081           0 :         if (state->out_mem_ctx) {
    3082           0 :                 mem_ctx = state->out_mem_ctx;
    3083             :         } else {
    3084           0 :                 mem_ctx = state;
    3085             :         }
    3086             : 
    3087           0 :         status = dcerpc_dfs_SetDcAddress_r_recv(subreq, mem_ctx);
    3088           0 :         TALLOC_FREE(subreq);
    3089           0 :         if (tevent_req_nterror(req, status)) {
    3090           0 :                 return;
    3091             :         }
    3092             : 
    3093             :         /* Copy out parameters */
    3094             : 
    3095             :         /* Copy result */
    3096           0 :         state->orig.out.result = state->tmp.out.result;
    3097             : 
    3098             :         /* Reset temporary structure */
    3099           0 :         NDR_ZERO_STRUCT(state->tmp);
    3100             : 
    3101           0 :         tevent_req_done(req);
    3102             : }
    3103             : 
    3104           0 : NTSTATUS dcerpc_dfs_SetDcAddress_recv(struct tevent_req *req,
    3105             :                                       TALLOC_CTX *mem_ctx,
    3106             :                                       WERROR *result)
    3107             : {
    3108           0 :         struct dcerpc_dfs_SetDcAddress_state *state = tevent_req_data(
    3109             :                 req, struct dcerpc_dfs_SetDcAddress_state);
    3110             :         NTSTATUS status;
    3111             : 
    3112           0 :         if (tevent_req_is_nterror(req, &status)) {
    3113           0 :                 tevent_req_received(req);
    3114           0 :                 return status;
    3115             :         }
    3116             : 
    3117             :         /* Steal possible out parameters to the callers context */
    3118           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3119             : 
    3120             :         /* Return result */
    3121           0 :         *result = state->orig.out.result;
    3122             : 
    3123           0 :         tevent_req_received(req);
    3124           0 :         return NT_STATUS_OK;
    3125             : }
    3126             : 
    3127           0 : NTSTATUS dcerpc_dfs_SetDcAddress(struct dcerpc_binding_handle *h,
    3128             :                                  TALLOC_CTX *mem_ctx,
    3129             :                                  const char *_servername /* [in] [charset(UTF16)] */,
    3130             :                                  const char *_server_fullname /* [in] [charset(UTF16)] */,
    3131             :                                  uint32_t _flags /* [in]  */,
    3132             :                                  uint32_t _ttl /* [in]  */,
    3133             :                                  WERROR *result)
    3134             : {
    3135             :         struct dfs_SetDcAddress r;
    3136             :         NTSTATUS status;
    3137             : 
    3138             :         /* In parameters */
    3139           0 :         r.in.servername = _servername;
    3140           0 :         r.in.server_fullname = _server_fullname;
    3141           0 :         r.in.flags = _flags;
    3142           0 :         r.in.ttl = _ttl;
    3143             : 
    3144             :         /* Out parameters */
    3145             : 
    3146             :         /* Result */
    3147           0 :         NDR_ZERO_STRUCT(r.out.result);
    3148             : 
    3149           0 :         status = dcerpc_dfs_SetDcAddress_r(h, mem_ctx, &r);
    3150           0 :         if (!NT_STATUS_IS_OK(status)) {
    3151           0 :                 return status;
    3152             :         }
    3153             : 
    3154             :         /* Return variables */
    3155             : 
    3156             :         /* Return result */
    3157           0 :         *result = r.out.result;
    3158             : 
    3159           0 :         return NT_STATUS_OK;
    3160             : }
    3161             : 
    3162             : struct dcerpc_dfs_FlushFtTable_r_state {
    3163             :         TALLOC_CTX *out_mem_ctx;
    3164             : };
    3165             : 
    3166             : static void dcerpc_dfs_FlushFtTable_r_done(struct tevent_req *subreq);
    3167             : 
    3168           0 : struct tevent_req *dcerpc_dfs_FlushFtTable_r_send(TALLOC_CTX *mem_ctx,
    3169             :         struct tevent_context *ev,
    3170             :         struct dcerpc_binding_handle *h,
    3171             :         struct dfs_FlushFtTable *r)
    3172             : {
    3173             :         struct tevent_req *req;
    3174             :         struct dcerpc_dfs_FlushFtTable_r_state *state;
    3175             :         struct tevent_req *subreq;
    3176             : 
    3177           0 :         req = tevent_req_create(mem_ctx, &state,
    3178             :                                 struct dcerpc_dfs_FlushFtTable_r_state);
    3179           0 :         if (req == NULL) {
    3180           0 :                 return NULL;
    3181             :         }
    3182             : 
    3183           0 :         state->out_mem_ctx = NULL;
    3184             : 
    3185           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3186             :                         NULL, &ndr_table_netdfs,
    3187             :                         NDR_DFS_FLUSHFTTABLE, state, r);
    3188           0 :         if (tevent_req_nomem(subreq, req)) {
    3189           0 :                 return tevent_req_post(req, ev);
    3190             :         }
    3191           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_FlushFtTable_r_done, req);
    3192             : 
    3193           0 :         return req;
    3194             : }
    3195             : 
    3196           0 : static void dcerpc_dfs_FlushFtTable_r_done(struct tevent_req *subreq)
    3197             : {
    3198           0 :         struct tevent_req *req =
    3199           0 :                 tevent_req_callback_data(subreq,
    3200             :                 struct tevent_req);
    3201             :         NTSTATUS status;
    3202             : 
    3203           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3204           0 :         TALLOC_FREE(subreq);
    3205           0 :         if (tevent_req_nterror(req, status)) {
    3206           0 :                 return;
    3207             :         }
    3208             : 
    3209           0 :         tevent_req_done(req);
    3210             : }
    3211             : 
    3212           0 : NTSTATUS dcerpc_dfs_FlushFtTable_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3213             : {
    3214           0 :         struct dcerpc_dfs_FlushFtTable_r_state *state =
    3215           0 :                 tevent_req_data(req,
    3216             :                 struct dcerpc_dfs_FlushFtTable_r_state);
    3217             :         NTSTATUS status;
    3218             : 
    3219           0 :         if (tevent_req_is_nterror(req, &status)) {
    3220           0 :                 tevent_req_received(req);
    3221           0 :                 return status;
    3222             :         }
    3223             : 
    3224           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3225             : 
    3226           0 :         tevent_req_received(req);
    3227           0 :         return NT_STATUS_OK;
    3228             : }
    3229             : 
    3230           0 : NTSTATUS dcerpc_dfs_FlushFtTable_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_FlushFtTable *r)
    3231             : {
    3232             :         NTSTATUS status;
    3233             : 
    3234           0 :         status = dcerpc_binding_handle_call(h,
    3235             :                         NULL, &ndr_table_netdfs,
    3236             :                         NDR_DFS_FLUSHFTTABLE, mem_ctx, r);
    3237             : 
    3238           0 :         return status;
    3239             : }
    3240             : 
    3241             : struct dcerpc_dfs_FlushFtTable_state {
    3242             :         struct dfs_FlushFtTable orig;
    3243             :         struct dfs_FlushFtTable tmp;
    3244             :         TALLOC_CTX *out_mem_ctx;
    3245             : };
    3246             : 
    3247             : static void dcerpc_dfs_FlushFtTable_done(struct tevent_req *subreq);
    3248             : 
    3249           0 : struct tevent_req *dcerpc_dfs_FlushFtTable_send(TALLOC_CTX *mem_ctx,
    3250             :                                                 struct tevent_context *ev,
    3251             :                                                 struct dcerpc_binding_handle *h,
    3252             :                                                 const char *_servername /* [in] [charset(UTF16)] */,
    3253             :                                                 const char *_rootshare /* [in] [charset(UTF16)] */)
    3254             : {
    3255             :         struct tevent_req *req;
    3256             :         struct dcerpc_dfs_FlushFtTable_state *state;
    3257             :         struct tevent_req *subreq;
    3258             : 
    3259           0 :         req = tevent_req_create(mem_ctx, &state,
    3260             :                                 struct dcerpc_dfs_FlushFtTable_state);
    3261           0 :         if (req == NULL) {
    3262           0 :                 return NULL;
    3263             :         }
    3264           0 :         state->out_mem_ctx = NULL;
    3265             : 
    3266             :         /* In parameters */
    3267           0 :         state->orig.in.servername = _servername;
    3268           0 :         state->orig.in.rootshare = _rootshare;
    3269             : 
    3270             :         /* Out parameters */
    3271             : 
    3272             :         /* Result */
    3273           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3274             : 
    3275             :         /* make a temporary copy, that we pass to the dispatch function */
    3276           0 :         state->tmp = state->orig;
    3277             : 
    3278           0 :         subreq = dcerpc_dfs_FlushFtTable_r_send(state, ev, h, &state->tmp);
    3279           0 :         if (tevent_req_nomem(subreq, req)) {
    3280           0 :                 return tevent_req_post(req, ev);
    3281             :         }
    3282           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_FlushFtTable_done, req);
    3283           0 :         return req;
    3284             : }
    3285             : 
    3286           0 : static void dcerpc_dfs_FlushFtTable_done(struct tevent_req *subreq)
    3287             : {
    3288           0 :         struct tevent_req *req = tevent_req_callback_data(
    3289             :                 subreq, struct tevent_req);
    3290           0 :         struct dcerpc_dfs_FlushFtTable_state *state = tevent_req_data(
    3291             :                 req, struct dcerpc_dfs_FlushFtTable_state);
    3292             :         NTSTATUS status;
    3293             :         TALLOC_CTX *mem_ctx;
    3294             : 
    3295           0 :         if (state->out_mem_ctx) {
    3296           0 :                 mem_ctx = state->out_mem_ctx;
    3297             :         } else {
    3298           0 :                 mem_ctx = state;
    3299             :         }
    3300             : 
    3301           0 :         status = dcerpc_dfs_FlushFtTable_r_recv(subreq, mem_ctx);
    3302           0 :         TALLOC_FREE(subreq);
    3303           0 :         if (tevent_req_nterror(req, status)) {
    3304           0 :                 return;
    3305             :         }
    3306             : 
    3307             :         /* Copy out parameters */
    3308             : 
    3309             :         /* Copy result */
    3310           0 :         state->orig.out.result = state->tmp.out.result;
    3311             : 
    3312             :         /* Reset temporary structure */
    3313           0 :         NDR_ZERO_STRUCT(state->tmp);
    3314             : 
    3315           0 :         tevent_req_done(req);
    3316             : }
    3317             : 
    3318           0 : NTSTATUS dcerpc_dfs_FlushFtTable_recv(struct tevent_req *req,
    3319             :                                       TALLOC_CTX *mem_ctx,
    3320             :                                       WERROR *result)
    3321             : {
    3322           0 :         struct dcerpc_dfs_FlushFtTable_state *state = tevent_req_data(
    3323             :                 req, struct dcerpc_dfs_FlushFtTable_state);
    3324             :         NTSTATUS status;
    3325             : 
    3326           0 :         if (tevent_req_is_nterror(req, &status)) {
    3327           0 :                 tevent_req_received(req);
    3328           0 :                 return status;
    3329             :         }
    3330             : 
    3331             :         /* Steal possible out parameters to the callers context */
    3332           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3333             : 
    3334             :         /* Return result */
    3335           0 :         *result = state->orig.out.result;
    3336             : 
    3337           0 :         tevent_req_received(req);
    3338           0 :         return NT_STATUS_OK;
    3339             : }
    3340             : 
    3341           0 : NTSTATUS dcerpc_dfs_FlushFtTable(struct dcerpc_binding_handle *h,
    3342             :                                  TALLOC_CTX *mem_ctx,
    3343             :                                  const char *_servername /* [in] [charset(UTF16)] */,
    3344             :                                  const char *_rootshare /* [in] [charset(UTF16)] */,
    3345             :                                  WERROR *result)
    3346             : {
    3347             :         struct dfs_FlushFtTable r;
    3348             :         NTSTATUS status;
    3349             : 
    3350             :         /* In parameters */
    3351           0 :         r.in.servername = _servername;
    3352           0 :         r.in.rootshare = _rootshare;
    3353             : 
    3354             :         /* Out parameters */
    3355             : 
    3356             :         /* Result */
    3357           0 :         NDR_ZERO_STRUCT(r.out.result);
    3358             : 
    3359           0 :         status = dcerpc_dfs_FlushFtTable_r(h, mem_ctx, &r);
    3360           0 :         if (!NT_STATUS_IS_OK(status)) {
    3361           0 :                 return status;
    3362             :         }
    3363             : 
    3364             :         /* Return variables */
    3365             : 
    3366             :         /* Return result */
    3367           0 :         *result = r.out.result;
    3368             : 
    3369           0 :         return NT_STATUS_OK;
    3370             : }
    3371             : 
    3372             : struct dcerpc_dfs_EnumEx_r_state {
    3373             :         TALLOC_CTX *out_mem_ctx;
    3374             : };
    3375             : 
    3376             : static void dcerpc_dfs_EnumEx_r_done(struct tevent_req *subreq);
    3377             : 
    3378           0 : struct tevent_req *dcerpc_dfs_EnumEx_r_send(TALLOC_CTX *mem_ctx,
    3379             :         struct tevent_context *ev,
    3380             :         struct dcerpc_binding_handle *h,
    3381             :         struct dfs_EnumEx *r)
    3382             : {
    3383             :         struct tevent_req *req;
    3384             :         struct dcerpc_dfs_EnumEx_r_state *state;
    3385             :         struct tevent_req *subreq;
    3386             : 
    3387           0 :         req = tevent_req_create(mem_ctx, &state,
    3388             :                                 struct dcerpc_dfs_EnumEx_r_state);
    3389           0 :         if (req == NULL) {
    3390           0 :                 return NULL;
    3391             :         }
    3392             : 
    3393           0 :         state->out_mem_ctx = talloc_new(state);
    3394           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3395           0 :                 return tevent_req_post(req, ev);
    3396             :         }
    3397             : 
    3398           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3399             :                         NULL, &ndr_table_netdfs,
    3400           0 :                         NDR_DFS_ENUMEX, state->out_mem_ctx, r);
    3401           0 :         if (tevent_req_nomem(subreq, req)) {
    3402           0 :                 return tevent_req_post(req, ev);
    3403             :         }
    3404           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_EnumEx_r_done, req);
    3405             : 
    3406           0 :         return req;
    3407             : }
    3408             : 
    3409           0 : static void dcerpc_dfs_EnumEx_r_done(struct tevent_req *subreq)
    3410             : {
    3411           0 :         struct tevent_req *req =
    3412           0 :                 tevent_req_callback_data(subreq,
    3413             :                 struct tevent_req);
    3414             :         NTSTATUS status;
    3415             : 
    3416           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3417           0 :         TALLOC_FREE(subreq);
    3418           0 :         if (tevent_req_nterror(req, status)) {
    3419           0 :                 return;
    3420             :         }
    3421             : 
    3422           0 :         tevent_req_done(req);
    3423             : }
    3424             : 
    3425           0 : NTSTATUS dcerpc_dfs_EnumEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3426             : {
    3427           0 :         struct dcerpc_dfs_EnumEx_r_state *state =
    3428           0 :                 tevent_req_data(req,
    3429             :                 struct dcerpc_dfs_EnumEx_r_state);
    3430             :         NTSTATUS status;
    3431             : 
    3432           0 :         if (tevent_req_is_nterror(req, &status)) {
    3433           0 :                 tevent_req_received(req);
    3434           0 :                 return status;
    3435             :         }
    3436             : 
    3437           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3438             : 
    3439           0 :         tevent_req_received(req);
    3440           0 :         return NT_STATUS_OK;
    3441             : }
    3442             : 
    3443           0 : NTSTATUS dcerpc_dfs_EnumEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_EnumEx *r)
    3444             : {
    3445             :         NTSTATUS status;
    3446             : 
    3447           0 :         status = dcerpc_binding_handle_call(h,
    3448             :                         NULL, &ndr_table_netdfs,
    3449             :                         NDR_DFS_ENUMEX, mem_ctx, r);
    3450             : 
    3451           0 :         return status;
    3452             : }
    3453             : 
    3454             : struct dcerpc_dfs_EnumEx_state {
    3455             :         struct dfs_EnumEx orig;
    3456             :         struct dfs_EnumEx tmp;
    3457             :         TALLOC_CTX *out_mem_ctx;
    3458             : };
    3459             : 
    3460             : static void dcerpc_dfs_EnumEx_done(struct tevent_req *subreq);
    3461             : 
    3462           0 : struct tevent_req *dcerpc_dfs_EnumEx_send(TALLOC_CTX *mem_ctx,
    3463             :                                           struct tevent_context *ev,
    3464             :                                           struct dcerpc_binding_handle *h,
    3465             :                                           const char *_dfs_name /* [in] [charset(UTF16)] */,
    3466             :                                           uint32_t _level /* [in]  */,
    3467             :                                           uint32_t _bufsize /* [in]  */,
    3468             :                                           struct dfs_EnumStruct *_info /* [in,out] [unique] */,
    3469             :                                           uint32_t *_total /* [in,out] [unique] */)
    3470             : {
    3471             :         struct tevent_req *req;
    3472             :         struct dcerpc_dfs_EnumEx_state *state;
    3473             :         struct tevent_req *subreq;
    3474             : 
    3475           0 :         req = tevent_req_create(mem_ctx, &state,
    3476             :                                 struct dcerpc_dfs_EnumEx_state);
    3477           0 :         if (req == NULL) {
    3478           0 :                 return NULL;
    3479             :         }
    3480           0 :         state->out_mem_ctx = NULL;
    3481             : 
    3482             :         /* In parameters */
    3483           0 :         state->orig.in.dfs_name = _dfs_name;
    3484           0 :         state->orig.in.level = _level;
    3485           0 :         state->orig.in.bufsize = _bufsize;
    3486           0 :         state->orig.in.info = _info;
    3487           0 :         state->orig.in.total = _total;
    3488             : 
    3489             :         /* Out parameters */
    3490           0 :         state->orig.out.info = _info;
    3491           0 :         state->orig.out.total = _total;
    3492             : 
    3493             :         /* Result */
    3494           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3495             : 
    3496           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3497             :                              "dcerpc_dfs_EnumEx_out_memory");
    3498           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3499           0 :                 return tevent_req_post(req, ev);
    3500             :         }
    3501             : 
    3502             :         /* make a temporary copy, that we pass to the dispatch function */
    3503           0 :         state->tmp = state->orig;
    3504             : 
    3505           0 :         subreq = dcerpc_dfs_EnumEx_r_send(state, ev, h, &state->tmp);
    3506           0 :         if (tevent_req_nomem(subreq, req)) {
    3507           0 :                 return tevent_req_post(req, ev);
    3508             :         }
    3509           0 :         tevent_req_set_callback(subreq, dcerpc_dfs_EnumEx_done, req);
    3510           0 :         return req;
    3511             : }
    3512             : 
    3513           0 : static void dcerpc_dfs_EnumEx_done(struct tevent_req *subreq)
    3514             : {
    3515           0 :         struct tevent_req *req = tevent_req_callback_data(
    3516             :                 subreq, struct tevent_req);
    3517           0 :         struct dcerpc_dfs_EnumEx_state *state = tevent_req_data(
    3518             :                 req, struct dcerpc_dfs_EnumEx_state);
    3519             :         NTSTATUS status;
    3520             :         TALLOC_CTX *mem_ctx;
    3521             : 
    3522           0 :         if (state->out_mem_ctx) {
    3523           0 :                 mem_ctx = state->out_mem_ctx;
    3524             :         } else {
    3525           0 :                 mem_ctx = state;
    3526             :         }
    3527             : 
    3528           0 :         status = dcerpc_dfs_EnumEx_r_recv(subreq, mem_ctx);
    3529           0 :         TALLOC_FREE(subreq);
    3530           0 :         if (tevent_req_nterror(req, status)) {
    3531           0 :                 return;
    3532             :         }
    3533             : 
    3534             :         /* Copy out parameters */
    3535           0 :         if (state->orig.out.info && state->tmp.out.info) {
    3536           0 :                 *state->orig.out.info = *state->tmp.out.info;
    3537             :         }
    3538           0 :         if (state->orig.out.total && state->tmp.out.total) {
    3539           0 :                 *state->orig.out.total = *state->tmp.out.total;
    3540             :         }
    3541             : 
    3542             :         /* Copy result */
    3543           0 :         state->orig.out.result = state->tmp.out.result;
    3544             : 
    3545             :         /* Reset temporary structure */
    3546           0 :         NDR_ZERO_STRUCT(state->tmp);
    3547             : 
    3548           0 :         tevent_req_done(req);
    3549             : }
    3550             : 
    3551           0 : NTSTATUS dcerpc_dfs_EnumEx_recv(struct tevent_req *req,
    3552             :                                 TALLOC_CTX *mem_ctx,
    3553             :                                 WERROR *result)
    3554             : {
    3555           0 :         struct dcerpc_dfs_EnumEx_state *state = tevent_req_data(
    3556             :                 req, struct dcerpc_dfs_EnumEx_state);
    3557             :         NTSTATUS status;
    3558             : 
    3559           0 :         if (tevent_req_is_nterror(req, &status)) {
    3560           0 :                 tevent_req_received(req);
    3561           0 :                 return status;
    3562             :         }
    3563             : 
    3564             :         /* Steal possible out parameters to the callers context */
    3565           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3566             : 
    3567             :         /* Return result */
    3568           0 :         *result = state->orig.out.result;
    3569             : 
    3570           0 :         tevent_req_received(req);
    3571           0 :         return NT_STATUS_OK;
    3572             : }
    3573             : 
    3574           0 : NTSTATUS dcerpc_dfs_EnumEx(struct dcerpc_binding_handle *h,
    3575             :                            TALLOC_CTX *mem_ctx,
    3576             :                            const char *_dfs_name /* [in] [charset(UTF16)] */,
    3577             :                            uint32_t _level /* [in]  */,
    3578             :                            uint32_t _bufsize /* [in]  */,
    3579             :                            struct dfs_EnumStruct *_info /* [in,out] [unique] */,
    3580             :                            uint32_t *_total /* [in,out] [unique] */,
    3581             :                            WERROR *result)
    3582             : {
    3583             :         struct dfs_EnumEx r;
    3584             :         NTSTATUS status;
    3585             : 
    3586             :         /* In parameters */
    3587           0 :         r.in.dfs_name = _dfs_name;
    3588           0 :         r.in.level = _level;
    3589           0 :         r.in.bufsize = _bufsize;
    3590           0 :         r.in.info = _info;
    3591           0 :         r.in.total = _total;
    3592             : 
    3593             :         /* Out parameters */
    3594           0 :         r.out.info = _info;
    3595           0 :         r.out.total = _total;
    3596             : 
    3597             :         /* Result */
    3598           0 :         NDR_ZERO_STRUCT(r.out.result);
    3599             : 
    3600           0 :         status = dcerpc_dfs_EnumEx_r(h, mem_ctx, &r);
    3601           0 :         if (!NT_STATUS_IS_OK(status)) {
    3602           0 :                 return status;
    3603             :         }
    3604             : 
    3605             :         /* Return variables */
    3606           0 :         if (_info && r.out.info) {
    3607           0 :                 *_info = *r.out.info;
    3608             :         }
    3609           0 :         if (_total && r.out.total) {
    3610           0 :                 *_total = *r.out.total;
    3611             :         }
    3612             : 
    3613             :         /* Return result */
    3614           0 :         *result = r.out.result;
    3615             : 
    3616           0 :         return NT_STATUS_OK;
    3617             : }
    3618             : 

Generated by: LCOV version 1.13