LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_wkssvc_c.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 69 2643 2.6 %
Date: 2021-09-23 10:06:22 Functions: 23 248 9.3 %

          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_wkssvc.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_wkssvc_c.h"
       8             : 
       9             : /* wkssvc - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_wkssvc_NetWkstaGetInfo_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_wkssvc_NetWkstaGetInfo_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_wkssvc_NetWkstaGetInfo_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct wkssvc_NetWkstaGetInfo *r)
      21             : {
      22             :         struct tevent_req *req;
      23             :         struct dcerpc_wkssvc_NetWkstaGetInfo_r_state *state;
      24             :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_wkssvc_NetWkstaGetInfo_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_wkssvc,
      39           0 :                         NDR_WKSSVC_NETWKSTAGETINFO, 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_wkssvc_NetWkstaGetInfo_r_done, req);
      44             : 
      45           0 :         return req;
      46             : }
      47             : 
      48           0 : static void dcerpc_wkssvc_NetWkstaGetInfo_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_wkssvc_NetWkstaGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_wkssvc_NetWkstaGetInfo_r_state *state =
      67           0 :                 tevent_req_data(req,
      68             :                 struct dcerpc_wkssvc_NetWkstaGetInfo_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          21 : NTSTATUS dcerpc_wkssvc_NetWkstaGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetWkstaGetInfo *r)
      83             : {
      84             :         NTSTATUS status;
      85             : 
      86          21 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_wkssvc,
      88             :                         NDR_WKSSVC_NETWKSTAGETINFO, mem_ctx, r);
      89             : 
      90          21 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_wkssvc_NetWkstaGetInfo_state {
      94             :         struct wkssvc_NetWkstaGetInfo orig;
      95             :         struct wkssvc_NetWkstaGetInfo tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_wkssvc_NetWkstaGetInfo_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_wkssvc_NetWkstaGetInfo_send(TALLOC_CTX *mem_ctx,
     102             :                                                       struct tevent_context *ev,
     103             :                                                       struct dcerpc_binding_handle *h,
     104             :                                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
     105             :                                                       uint32_t _level /* [in]  */,
     106             :                                                       union wkssvc_NetWkstaInfo *_info /* [out] [ref,switch_is(level)] */)
     107             : {
     108             :         struct tevent_req *req;
     109             :         struct dcerpc_wkssvc_NetWkstaGetInfo_state *state;
     110             :         struct tevent_req *subreq;
     111             : 
     112           0 :         req = tevent_req_create(mem_ctx, &state,
     113             :                                 struct dcerpc_wkssvc_NetWkstaGetInfo_state);
     114           0 :         if (req == NULL) {
     115           0 :                 return NULL;
     116             :         }
     117           0 :         state->out_mem_ctx = NULL;
     118             : 
     119             :         /* In parameters */
     120           0 :         state->orig.in.server_name = _server_name;
     121           0 :         state->orig.in.level = _level;
     122             : 
     123             :         /* Out parameters */
     124           0 :         state->orig.out.info = _info;
     125             : 
     126             :         /* Result */
     127           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     128             : 
     129           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     130             :                              "dcerpc_wkssvc_NetWkstaGetInfo_out_memory");
     131           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     132           0 :                 return tevent_req_post(req, ev);
     133             :         }
     134             : 
     135             :         /* make a temporary copy, that we pass to the dispatch function */
     136           0 :         state->tmp = state->orig;
     137             : 
     138           0 :         subreq = dcerpc_wkssvc_NetWkstaGetInfo_r_send(state, ev, h, &state->tmp);
     139           0 :         if (tevent_req_nomem(subreq, req)) {
     140           0 :                 return tevent_req_post(req, ev);
     141             :         }
     142           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetWkstaGetInfo_done, req);
     143           0 :         return req;
     144             : }
     145             : 
     146           0 : static void dcerpc_wkssvc_NetWkstaGetInfo_done(struct tevent_req *subreq)
     147             : {
     148           0 :         struct tevent_req *req = tevent_req_callback_data(
     149             :                 subreq, struct tevent_req);
     150           0 :         struct dcerpc_wkssvc_NetWkstaGetInfo_state *state = tevent_req_data(
     151             :                 req, struct dcerpc_wkssvc_NetWkstaGetInfo_state);
     152             :         NTSTATUS status;
     153             :         TALLOC_CTX *mem_ctx;
     154             : 
     155           0 :         if (state->out_mem_ctx) {
     156           0 :                 mem_ctx = state->out_mem_ctx;
     157             :         } else {
     158           0 :                 mem_ctx = state;
     159             :         }
     160             : 
     161           0 :         status = dcerpc_wkssvc_NetWkstaGetInfo_r_recv(subreq, mem_ctx);
     162           0 :         TALLOC_FREE(subreq);
     163           0 :         if (tevent_req_nterror(req, status)) {
     164           0 :                 return;
     165             :         }
     166             : 
     167             :         /* Copy out parameters */
     168           0 :         *state->orig.out.info = *state->tmp.out.info;
     169             : 
     170             :         /* Copy result */
     171           0 :         state->orig.out.result = state->tmp.out.result;
     172             : 
     173             :         /* Reset temporary structure */
     174           0 :         NDR_ZERO_STRUCT(state->tmp);
     175             : 
     176           0 :         tevent_req_done(req);
     177             : }
     178             : 
     179           0 : NTSTATUS dcerpc_wkssvc_NetWkstaGetInfo_recv(struct tevent_req *req,
     180             :                                             TALLOC_CTX *mem_ctx,
     181             :                                             WERROR *result)
     182             : {
     183           0 :         struct dcerpc_wkssvc_NetWkstaGetInfo_state *state = tevent_req_data(
     184             :                 req, struct dcerpc_wkssvc_NetWkstaGetInfo_state);
     185             :         NTSTATUS status;
     186             : 
     187           0 :         if (tevent_req_is_nterror(req, &status)) {
     188           0 :                 tevent_req_received(req);
     189           0 :                 return status;
     190             :         }
     191             : 
     192             :         /* Steal possible out parameters to the callers context */
     193           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     194             : 
     195             :         /* Return result */
     196           0 :         *result = state->orig.out.result;
     197             : 
     198           0 :         tevent_req_received(req);
     199           0 :         return NT_STATUS_OK;
     200             : }
     201             : 
     202           0 : NTSTATUS dcerpc_wkssvc_NetWkstaGetInfo(struct dcerpc_binding_handle *h,
     203             :                                        TALLOC_CTX *mem_ctx,
     204             :                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
     205             :                                        uint32_t _level /* [in]  */,
     206             :                                        union wkssvc_NetWkstaInfo *_info /* [out] [ref,switch_is(level)] */,
     207             :                                        WERROR *result)
     208             : {
     209             :         struct wkssvc_NetWkstaGetInfo r;
     210             :         NTSTATUS status;
     211             : 
     212             :         /* In parameters */
     213           0 :         r.in.server_name = _server_name;
     214           0 :         r.in.level = _level;
     215             : 
     216             :         /* Out parameters */
     217           0 :         r.out.info = _info;
     218             : 
     219             :         /* Result */
     220           0 :         NDR_ZERO_STRUCT(r.out.result);
     221             : 
     222           0 :         status = dcerpc_wkssvc_NetWkstaGetInfo_r(h, mem_ctx, &r);
     223           0 :         if (!NT_STATUS_IS_OK(status)) {
     224           0 :                 return status;
     225             :         }
     226             : 
     227             :         /* Return variables */
     228           0 :         *_info = *r.out.info;
     229             : 
     230             :         /* Return result */
     231           0 :         *result = r.out.result;
     232             : 
     233           0 :         return NT_STATUS_OK;
     234             : }
     235             : 
     236             : struct dcerpc_wkssvc_NetWkstaSetInfo_r_state {
     237             :         TALLOC_CTX *out_mem_ctx;
     238             : };
     239             : 
     240             : static void dcerpc_wkssvc_NetWkstaSetInfo_r_done(struct tevent_req *subreq);
     241             : 
     242           0 : struct tevent_req *dcerpc_wkssvc_NetWkstaSetInfo_r_send(TALLOC_CTX *mem_ctx,
     243             :         struct tevent_context *ev,
     244             :         struct dcerpc_binding_handle *h,
     245             :         struct wkssvc_NetWkstaSetInfo *r)
     246             : {
     247             :         struct tevent_req *req;
     248             :         struct dcerpc_wkssvc_NetWkstaSetInfo_r_state *state;
     249             :         struct tevent_req *subreq;
     250             : 
     251           0 :         req = tevent_req_create(mem_ctx, &state,
     252             :                                 struct dcerpc_wkssvc_NetWkstaSetInfo_r_state);
     253           0 :         if (req == NULL) {
     254           0 :                 return NULL;
     255             :         }
     256             : 
     257           0 :         state->out_mem_ctx = talloc_new(state);
     258           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     259           0 :                 return tevent_req_post(req, ev);
     260             :         }
     261             : 
     262           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     263             :                         NULL, &ndr_table_wkssvc,
     264           0 :                         NDR_WKSSVC_NETWKSTASETINFO, state->out_mem_ctx, r);
     265           0 :         if (tevent_req_nomem(subreq, req)) {
     266           0 :                 return tevent_req_post(req, ev);
     267             :         }
     268           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetWkstaSetInfo_r_done, req);
     269             : 
     270           0 :         return req;
     271             : }
     272             : 
     273           0 : static void dcerpc_wkssvc_NetWkstaSetInfo_r_done(struct tevent_req *subreq)
     274             : {
     275           0 :         struct tevent_req *req =
     276           0 :                 tevent_req_callback_data(subreq,
     277             :                 struct tevent_req);
     278             :         NTSTATUS status;
     279             : 
     280           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     281           0 :         TALLOC_FREE(subreq);
     282           0 :         if (tevent_req_nterror(req, status)) {
     283           0 :                 return;
     284             :         }
     285             : 
     286           0 :         tevent_req_done(req);
     287             : }
     288             : 
     289           0 : NTSTATUS dcerpc_wkssvc_NetWkstaSetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     290             : {
     291           0 :         struct dcerpc_wkssvc_NetWkstaSetInfo_r_state *state =
     292           0 :                 tevent_req_data(req,
     293             :                 struct dcerpc_wkssvc_NetWkstaSetInfo_r_state);
     294             :         NTSTATUS status;
     295             : 
     296           0 :         if (tevent_req_is_nterror(req, &status)) {
     297           0 :                 tevent_req_received(req);
     298           0 :                 return status;
     299             :         }
     300             : 
     301           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     302             : 
     303           0 :         tevent_req_received(req);
     304           0 :         return NT_STATUS_OK;
     305             : }
     306             : 
     307           0 : NTSTATUS dcerpc_wkssvc_NetWkstaSetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetWkstaSetInfo *r)
     308             : {
     309             :         NTSTATUS status;
     310             : 
     311           0 :         status = dcerpc_binding_handle_call(h,
     312             :                         NULL, &ndr_table_wkssvc,
     313             :                         NDR_WKSSVC_NETWKSTASETINFO, mem_ctx, r);
     314             : 
     315           0 :         return status;
     316             : }
     317             : 
     318             : struct dcerpc_wkssvc_NetWkstaSetInfo_state {
     319             :         struct wkssvc_NetWkstaSetInfo orig;
     320             :         struct wkssvc_NetWkstaSetInfo tmp;
     321             :         TALLOC_CTX *out_mem_ctx;
     322             : };
     323             : 
     324             : static void dcerpc_wkssvc_NetWkstaSetInfo_done(struct tevent_req *subreq);
     325             : 
     326           0 : struct tevent_req *dcerpc_wkssvc_NetWkstaSetInfo_send(TALLOC_CTX *mem_ctx,
     327             :                                                       struct tevent_context *ev,
     328             :                                                       struct dcerpc_binding_handle *h,
     329             :                                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
     330             :                                                       uint32_t _level /* [in]  */,
     331             :                                                       union wkssvc_NetWkstaInfo *_info /* [in] [ref,switch_is(level)] */,
     332             :                                                       uint32_t *_parm_error /* [in,out] [ref] */)
     333             : {
     334             :         struct tevent_req *req;
     335             :         struct dcerpc_wkssvc_NetWkstaSetInfo_state *state;
     336             :         struct tevent_req *subreq;
     337             : 
     338           0 :         req = tevent_req_create(mem_ctx, &state,
     339             :                                 struct dcerpc_wkssvc_NetWkstaSetInfo_state);
     340           0 :         if (req == NULL) {
     341           0 :                 return NULL;
     342             :         }
     343           0 :         state->out_mem_ctx = NULL;
     344             : 
     345             :         /* In parameters */
     346           0 :         state->orig.in.server_name = _server_name;
     347           0 :         state->orig.in.level = _level;
     348           0 :         state->orig.in.info = _info;
     349           0 :         state->orig.in.parm_error = _parm_error;
     350             : 
     351             :         /* Out parameters */
     352           0 :         state->orig.out.parm_error = _parm_error;
     353             : 
     354             :         /* Result */
     355           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     356             : 
     357           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     358             :                              "dcerpc_wkssvc_NetWkstaSetInfo_out_memory");
     359           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     360           0 :                 return tevent_req_post(req, ev);
     361             :         }
     362             : 
     363             :         /* make a temporary copy, that we pass to the dispatch function */
     364           0 :         state->tmp = state->orig;
     365             : 
     366           0 :         subreq = dcerpc_wkssvc_NetWkstaSetInfo_r_send(state, ev, h, &state->tmp);
     367           0 :         if (tevent_req_nomem(subreq, req)) {
     368           0 :                 return tevent_req_post(req, ev);
     369             :         }
     370           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetWkstaSetInfo_done, req);
     371           0 :         return req;
     372             : }
     373             : 
     374           0 : static void dcerpc_wkssvc_NetWkstaSetInfo_done(struct tevent_req *subreq)
     375             : {
     376           0 :         struct tevent_req *req = tevent_req_callback_data(
     377             :                 subreq, struct tevent_req);
     378           0 :         struct dcerpc_wkssvc_NetWkstaSetInfo_state *state = tevent_req_data(
     379             :                 req, struct dcerpc_wkssvc_NetWkstaSetInfo_state);
     380             :         NTSTATUS status;
     381             :         TALLOC_CTX *mem_ctx;
     382             : 
     383           0 :         if (state->out_mem_ctx) {
     384           0 :                 mem_ctx = state->out_mem_ctx;
     385             :         } else {
     386           0 :                 mem_ctx = state;
     387             :         }
     388             : 
     389           0 :         status = dcerpc_wkssvc_NetWkstaSetInfo_r_recv(subreq, mem_ctx);
     390           0 :         TALLOC_FREE(subreq);
     391           0 :         if (tevent_req_nterror(req, status)) {
     392           0 :                 return;
     393             :         }
     394             : 
     395             :         /* Copy out parameters */
     396           0 :         *state->orig.out.parm_error = *state->tmp.out.parm_error;
     397             : 
     398             :         /* Copy result */
     399           0 :         state->orig.out.result = state->tmp.out.result;
     400             : 
     401             :         /* Reset temporary structure */
     402           0 :         NDR_ZERO_STRUCT(state->tmp);
     403             : 
     404           0 :         tevent_req_done(req);
     405             : }
     406             : 
     407           0 : NTSTATUS dcerpc_wkssvc_NetWkstaSetInfo_recv(struct tevent_req *req,
     408             :                                             TALLOC_CTX *mem_ctx,
     409             :                                             WERROR *result)
     410             : {
     411           0 :         struct dcerpc_wkssvc_NetWkstaSetInfo_state *state = tevent_req_data(
     412             :                 req, struct dcerpc_wkssvc_NetWkstaSetInfo_state);
     413             :         NTSTATUS status;
     414             : 
     415           0 :         if (tevent_req_is_nterror(req, &status)) {
     416           0 :                 tevent_req_received(req);
     417           0 :                 return status;
     418             :         }
     419             : 
     420             :         /* Steal possible out parameters to the callers context */
     421           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     422             : 
     423             :         /* Return result */
     424           0 :         *result = state->orig.out.result;
     425             : 
     426           0 :         tevent_req_received(req);
     427           0 :         return NT_STATUS_OK;
     428             : }
     429             : 
     430           0 : NTSTATUS dcerpc_wkssvc_NetWkstaSetInfo(struct dcerpc_binding_handle *h,
     431             :                                        TALLOC_CTX *mem_ctx,
     432             :                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
     433             :                                        uint32_t _level /* [in]  */,
     434             :                                        union wkssvc_NetWkstaInfo *_info /* [in] [ref,switch_is(level)] */,
     435             :                                        uint32_t *_parm_error /* [in,out] [ref] */,
     436             :                                        WERROR *result)
     437             : {
     438             :         struct wkssvc_NetWkstaSetInfo r;
     439             :         NTSTATUS status;
     440             : 
     441             :         /* In parameters */
     442           0 :         r.in.server_name = _server_name;
     443           0 :         r.in.level = _level;
     444           0 :         r.in.info = _info;
     445           0 :         r.in.parm_error = _parm_error;
     446             : 
     447             :         /* Out parameters */
     448           0 :         r.out.parm_error = _parm_error;
     449             : 
     450             :         /* Result */
     451           0 :         NDR_ZERO_STRUCT(r.out.result);
     452             : 
     453           0 :         status = dcerpc_wkssvc_NetWkstaSetInfo_r(h, mem_ctx, &r);
     454           0 :         if (!NT_STATUS_IS_OK(status)) {
     455           0 :                 return status;
     456             :         }
     457             : 
     458             :         /* Return variables */
     459           0 :         *_parm_error = *r.out.parm_error;
     460             : 
     461             :         /* Return result */
     462           0 :         *result = r.out.result;
     463             : 
     464           0 :         return NT_STATUS_OK;
     465             : }
     466             : 
     467             : struct dcerpc_wkssvc_NetWkstaEnumUsers_r_state {
     468             :         TALLOC_CTX *out_mem_ctx;
     469             : };
     470             : 
     471             : static void dcerpc_wkssvc_NetWkstaEnumUsers_r_done(struct tevent_req *subreq);
     472             : 
     473           0 : struct tevent_req *dcerpc_wkssvc_NetWkstaEnumUsers_r_send(TALLOC_CTX *mem_ctx,
     474             :         struct tevent_context *ev,
     475             :         struct dcerpc_binding_handle *h,
     476             :         struct wkssvc_NetWkstaEnumUsers *r)
     477             : {
     478             :         struct tevent_req *req;
     479             :         struct dcerpc_wkssvc_NetWkstaEnumUsers_r_state *state;
     480             :         struct tevent_req *subreq;
     481             : 
     482           0 :         req = tevent_req_create(mem_ctx, &state,
     483             :                                 struct dcerpc_wkssvc_NetWkstaEnumUsers_r_state);
     484           0 :         if (req == NULL) {
     485           0 :                 return NULL;
     486             :         }
     487             : 
     488           0 :         state->out_mem_ctx = talloc_new(state);
     489           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     490           0 :                 return tevent_req_post(req, ev);
     491             :         }
     492             : 
     493           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     494             :                         NULL, &ndr_table_wkssvc,
     495           0 :                         NDR_WKSSVC_NETWKSTAENUMUSERS, state->out_mem_ctx, r);
     496           0 :         if (tevent_req_nomem(subreq, req)) {
     497           0 :                 return tevent_req_post(req, ev);
     498             :         }
     499           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetWkstaEnumUsers_r_done, req);
     500             : 
     501           0 :         return req;
     502             : }
     503             : 
     504           0 : static void dcerpc_wkssvc_NetWkstaEnumUsers_r_done(struct tevent_req *subreq)
     505             : {
     506           0 :         struct tevent_req *req =
     507           0 :                 tevent_req_callback_data(subreq,
     508             :                 struct tevent_req);
     509             :         NTSTATUS status;
     510             : 
     511           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     512           0 :         TALLOC_FREE(subreq);
     513           0 :         if (tevent_req_nterror(req, status)) {
     514           0 :                 return;
     515             :         }
     516             : 
     517           0 :         tevent_req_done(req);
     518             : }
     519             : 
     520           0 : NTSTATUS dcerpc_wkssvc_NetWkstaEnumUsers_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     521             : {
     522           0 :         struct dcerpc_wkssvc_NetWkstaEnumUsers_r_state *state =
     523           0 :                 tevent_req_data(req,
     524             :                 struct dcerpc_wkssvc_NetWkstaEnumUsers_r_state);
     525             :         NTSTATUS status;
     526             : 
     527           0 :         if (tevent_req_is_nterror(req, &status)) {
     528           0 :                 tevent_req_received(req);
     529           0 :                 return status;
     530             :         }
     531             : 
     532           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     533             : 
     534           0 :         tevent_req_received(req);
     535           0 :         return NT_STATUS_OK;
     536             : }
     537             : 
     538           7 : NTSTATUS dcerpc_wkssvc_NetWkstaEnumUsers_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetWkstaEnumUsers *r)
     539             : {
     540             :         NTSTATUS status;
     541             : 
     542           7 :         status = dcerpc_binding_handle_call(h,
     543             :                         NULL, &ndr_table_wkssvc,
     544             :                         NDR_WKSSVC_NETWKSTAENUMUSERS, mem_ctx, r);
     545             : 
     546           7 :         return status;
     547             : }
     548             : 
     549             : struct dcerpc_wkssvc_NetWkstaEnumUsers_state {
     550             :         struct wkssvc_NetWkstaEnumUsers orig;
     551             :         struct wkssvc_NetWkstaEnumUsers tmp;
     552             :         TALLOC_CTX *out_mem_ctx;
     553             : };
     554             : 
     555             : static void dcerpc_wkssvc_NetWkstaEnumUsers_done(struct tevent_req *subreq);
     556             : 
     557           0 : struct tevent_req *dcerpc_wkssvc_NetWkstaEnumUsers_send(TALLOC_CTX *mem_ctx,
     558             :                                                         struct tevent_context *ev,
     559             :                                                         struct dcerpc_binding_handle *h,
     560             :                                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
     561             :                                                         struct wkssvc_NetWkstaEnumUsersInfo *_info /* [in,out] [ref] */,
     562             :                                                         uint32_t _prefmaxlen /* [in]  */,
     563             :                                                         uint32_t *_entries_read /* [out] [ref] */,
     564             :                                                         uint32_t *_resume_handle /* [in,out] [unique] */)
     565             : {
     566             :         struct tevent_req *req;
     567             :         struct dcerpc_wkssvc_NetWkstaEnumUsers_state *state;
     568             :         struct tevent_req *subreq;
     569             : 
     570           0 :         req = tevent_req_create(mem_ctx, &state,
     571             :                                 struct dcerpc_wkssvc_NetWkstaEnumUsers_state);
     572           0 :         if (req == NULL) {
     573           0 :                 return NULL;
     574             :         }
     575           0 :         state->out_mem_ctx = NULL;
     576             : 
     577             :         /* In parameters */
     578           0 :         state->orig.in.server_name = _server_name;
     579           0 :         state->orig.in.info = _info;
     580           0 :         state->orig.in.prefmaxlen = _prefmaxlen;
     581           0 :         state->orig.in.resume_handle = _resume_handle;
     582             : 
     583             :         /* Out parameters */
     584           0 :         state->orig.out.info = _info;
     585           0 :         state->orig.out.entries_read = _entries_read;
     586           0 :         state->orig.out.resume_handle = _resume_handle;
     587             : 
     588             :         /* Result */
     589           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     590             : 
     591           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     592             :                              "dcerpc_wkssvc_NetWkstaEnumUsers_out_memory");
     593           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     594           0 :                 return tevent_req_post(req, ev);
     595             :         }
     596             : 
     597             :         /* make a temporary copy, that we pass to the dispatch function */
     598           0 :         state->tmp = state->orig;
     599             : 
     600           0 :         subreq = dcerpc_wkssvc_NetWkstaEnumUsers_r_send(state, ev, h, &state->tmp);
     601           0 :         if (tevent_req_nomem(subreq, req)) {
     602           0 :                 return tevent_req_post(req, ev);
     603             :         }
     604           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetWkstaEnumUsers_done, req);
     605           0 :         return req;
     606             : }
     607             : 
     608           0 : static void dcerpc_wkssvc_NetWkstaEnumUsers_done(struct tevent_req *subreq)
     609             : {
     610           0 :         struct tevent_req *req = tevent_req_callback_data(
     611             :                 subreq, struct tevent_req);
     612           0 :         struct dcerpc_wkssvc_NetWkstaEnumUsers_state *state = tevent_req_data(
     613             :                 req, struct dcerpc_wkssvc_NetWkstaEnumUsers_state);
     614             :         NTSTATUS status;
     615             :         TALLOC_CTX *mem_ctx;
     616             : 
     617           0 :         if (state->out_mem_ctx) {
     618           0 :                 mem_ctx = state->out_mem_ctx;
     619             :         } else {
     620           0 :                 mem_ctx = state;
     621             :         }
     622             : 
     623           0 :         status = dcerpc_wkssvc_NetWkstaEnumUsers_r_recv(subreq, mem_ctx);
     624           0 :         TALLOC_FREE(subreq);
     625           0 :         if (tevent_req_nterror(req, status)) {
     626           0 :                 return;
     627             :         }
     628             : 
     629             :         /* Copy out parameters */
     630           0 :         *state->orig.out.info = *state->tmp.out.info;
     631           0 :         *state->orig.out.entries_read = *state->tmp.out.entries_read;
     632           0 :         if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
     633           0 :                 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
     634             :         }
     635             : 
     636             :         /* Copy result */
     637           0 :         state->orig.out.result = state->tmp.out.result;
     638             : 
     639             :         /* Reset temporary structure */
     640           0 :         NDR_ZERO_STRUCT(state->tmp);
     641             : 
     642           0 :         tevent_req_done(req);
     643             : }
     644             : 
     645           0 : NTSTATUS dcerpc_wkssvc_NetWkstaEnumUsers_recv(struct tevent_req *req,
     646             :                                               TALLOC_CTX *mem_ctx,
     647             :                                               WERROR *result)
     648             : {
     649           0 :         struct dcerpc_wkssvc_NetWkstaEnumUsers_state *state = tevent_req_data(
     650             :                 req, struct dcerpc_wkssvc_NetWkstaEnumUsers_state);
     651             :         NTSTATUS status;
     652             : 
     653           0 :         if (tevent_req_is_nterror(req, &status)) {
     654           0 :                 tevent_req_received(req);
     655           0 :                 return status;
     656             :         }
     657             : 
     658             :         /* Steal possible out parameters to the callers context */
     659           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     660             : 
     661             :         /* Return result */
     662           0 :         *result = state->orig.out.result;
     663             : 
     664           0 :         tevent_req_received(req);
     665           0 :         return NT_STATUS_OK;
     666             : }
     667             : 
     668           0 : NTSTATUS dcerpc_wkssvc_NetWkstaEnumUsers(struct dcerpc_binding_handle *h,
     669             :                                          TALLOC_CTX *mem_ctx,
     670             :                                          const char *_server_name /* [in] [charset(UTF16),unique] */,
     671             :                                          struct wkssvc_NetWkstaEnumUsersInfo *_info /* [in,out] [ref] */,
     672             :                                          uint32_t _prefmaxlen /* [in]  */,
     673             :                                          uint32_t *_entries_read /* [out] [ref] */,
     674             :                                          uint32_t *_resume_handle /* [in,out] [unique] */,
     675             :                                          WERROR *result)
     676             : {
     677             :         struct wkssvc_NetWkstaEnumUsers r;
     678             :         NTSTATUS status;
     679             : 
     680             :         /* In parameters */
     681           0 :         r.in.server_name = _server_name;
     682           0 :         r.in.info = _info;
     683           0 :         r.in.prefmaxlen = _prefmaxlen;
     684           0 :         r.in.resume_handle = _resume_handle;
     685             : 
     686             :         /* Out parameters */
     687           0 :         r.out.info = _info;
     688           0 :         r.out.entries_read = _entries_read;
     689           0 :         r.out.resume_handle = _resume_handle;
     690             : 
     691             :         /* Result */
     692           0 :         NDR_ZERO_STRUCT(r.out.result);
     693             : 
     694           0 :         status = dcerpc_wkssvc_NetWkstaEnumUsers_r(h, mem_ctx, &r);
     695           0 :         if (!NT_STATUS_IS_OK(status)) {
     696           0 :                 return status;
     697             :         }
     698             : 
     699             :         /* Return variables */
     700           0 :         *_info = *r.out.info;
     701           0 :         *_entries_read = *r.out.entries_read;
     702           0 :         if (_resume_handle && r.out.resume_handle) {
     703           0 :                 *_resume_handle = *r.out.resume_handle;
     704             :         }
     705             : 
     706             :         /* Return result */
     707           0 :         *result = r.out.result;
     708             : 
     709           0 :         return NT_STATUS_OK;
     710             : }
     711             : 
     712             : struct dcerpc_wkssvc_NetrWkstaUserGetInfo_r_state {
     713             :         TALLOC_CTX *out_mem_ctx;
     714             : };
     715             : 
     716             : static void dcerpc_wkssvc_NetrWkstaUserGetInfo_r_done(struct tevent_req *subreq);
     717             : 
     718           0 : struct tevent_req *dcerpc_wkssvc_NetrWkstaUserGetInfo_r_send(TALLOC_CTX *mem_ctx,
     719             :         struct tevent_context *ev,
     720             :         struct dcerpc_binding_handle *h,
     721             :         struct wkssvc_NetrWkstaUserGetInfo *r)
     722             : {
     723             :         struct tevent_req *req;
     724             :         struct dcerpc_wkssvc_NetrWkstaUserGetInfo_r_state *state;
     725             :         struct tevent_req *subreq;
     726             : 
     727           0 :         req = tevent_req_create(mem_ctx, &state,
     728             :                                 struct dcerpc_wkssvc_NetrWkstaUserGetInfo_r_state);
     729           0 :         if (req == NULL) {
     730           0 :                 return NULL;
     731             :         }
     732             : 
     733           0 :         state->out_mem_ctx = talloc_new(state);
     734           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     735           0 :                 return tevent_req_post(req, ev);
     736             :         }
     737             : 
     738           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     739             :                         NULL, &ndr_table_wkssvc,
     740           0 :                         NDR_WKSSVC_NETRWKSTAUSERGETINFO, state->out_mem_ctx, r);
     741           0 :         if (tevent_req_nomem(subreq, req)) {
     742           0 :                 return tevent_req_post(req, ev);
     743             :         }
     744           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWkstaUserGetInfo_r_done, req);
     745             : 
     746           0 :         return req;
     747             : }
     748             : 
     749           0 : static void dcerpc_wkssvc_NetrWkstaUserGetInfo_r_done(struct tevent_req *subreq)
     750             : {
     751           0 :         struct tevent_req *req =
     752           0 :                 tevent_req_callback_data(subreq,
     753             :                 struct tevent_req);
     754             :         NTSTATUS status;
     755             : 
     756           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     757           0 :         TALLOC_FREE(subreq);
     758           0 :         if (tevent_req_nterror(req, status)) {
     759           0 :                 return;
     760             :         }
     761             : 
     762           0 :         tevent_req_done(req);
     763             : }
     764             : 
     765           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaUserGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     766             : {
     767           0 :         struct dcerpc_wkssvc_NetrWkstaUserGetInfo_r_state *state =
     768           0 :                 tevent_req_data(req,
     769             :                 struct dcerpc_wkssvc_NetrWkstaUserGetInfo_r_state);
     770             :         NTSTATUS status;
     771             : 
     772           0 :         if (tevent_req_is_nterror(req, &status)) {
     773           0 :                 tevent_req_received(req);
     774           0 :                 return status;
     775             :         }
     776             : 
     777           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     778             : 
     779           0 :         tevent_req_received(req);
     780           0 :         return NT_STATUS_OK;
     781             : }
     782             : 
     783           5 : NTSTATUS dcerpc_wkssvc_NetrWkstaUserGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrWkstaUserGetInfo *r)
     784             : {
     785             :         NTSTATUS status;
     786             : 
     787           5 :         status = dcerpc_binding_handle_call(h,
     788             :                         NULL, &ndr_table_wkssvc,
     789             :                         NDR_WKSSVC_NETRWKSTAUSERGETINFO, mem_ctx, r);
     790             : 
     791           5 :         return status;
     792             : }
     793             : 
     794             : struct dcerpc_wkssvc_NetrWkstaUserGetInfo_state {
     795             :         struct wkssvc_NetrWkstaUserGetInfo orig;
     796             :         struct wkssvc_NetrWkstaUserGetInfo tmp;
     797             :         TALLOC_CTX *out_mem_ctx;
     798             : };
     799             : 
     800             : static void dcerpc_wkssvc_NetrWkstaUserGetInfo_done(struct tevent_req *subreq);
     801             : 
     802           0 : struct tevent_req *dcerpc_wkssvc_NetrWkstaUserGetInfo_send(TALLOC_CTX *mem_ctx,
     803             :                                                            struct tevent_context *ev,
     804             :                                                            struct dcerpc_binding_handle *h,
     805             :                                                            const char *_unknown /* [in] [charset(UTF16),unique] */,
     806             :                                                            uint32_t _level /* [in]  */,
     807             :                                                            union wkssvc_NetrWkstaUserInfo *_info /* [out] [ref,switch_is(level)] */)
     808             : {
     809             :         struct tevent_req *req;
     810             :         struct dcerpc_wkssvc_NetrWkstaUserGetInfo_state *state;
     811             :         struct tevent_req *subreq;
     812             : 
     813           0 :         req = tevent_req_create(mem_ctx, &state,
     814             :                                 struct dcerpc_wkssvc_NetrWkstaUserGetInfo_state);
     815           0 :         if (req == NULL) {
     816           0 :                 return NULL;
     817             :         }
     818           0 :         state->out_mem_ctx = NULL;
     819             : 
     820             :         /* In parameters */
     821           0 :         state->orig.in.unknown = _unknown;
     822           0 :         state->orig.in.level = _level;
     823             : 
     824             :         /* Out parameters */
     825           0 :         state->orig.out.info = _info;
     826             : 
     827             :         /* Result */
     828           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     829             : 
     830           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     831             :                              "dcerpc_wkssvc_NetrWkstaUserGetInfo_out_memory");
     832           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     833           0 :                 return tevent_req_post(req, ev);
     834             :         }
     835             : 
     836             :         /* make a temporary copy, that we pass to the dispatch function */
     837           0 :         state->tmp = state->orig;
     838             : 
     839           0 :         subreq = dcerpc_wkssvc_NetrWkstaUserGetInfo_r_send(state, ev, h, &state->tmp);
     840           0 :         if (tevent_req_nomem(subreq, req)) {
     841           0 :                 return tevent_req_post(req, ev);
     842             :         }
     843           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWkstaUserGetInfo_done, req);
     844           0 :         return req;
     845             : }
     846             : 
     847           0 : static void dcerpc_wkssvc_NetrWkstaUserGetInfo_done(struct tevent_req *subreq)
     848             : {
     849           0 :         struct tevent_req *req = tevent_req_callback_data(
     850             :                 subreq, struct tevent_req);
     851           0 :         struct dcerpc_wkssvc_NetrWkstaUserGetInfo_state *state = tevent_req_data(
     852             :                 req, struct dcerpc_wkssvc_NetrWkstaUserGetInfo_state);
     853             :         NTSTATUS status;
     854             :         TALLOC_CTX *mem_ctx;
     855             : 
     856           0 :         if (state->out_mem_ctx) {
     857           0 :                 mem_ctx = state->out_mem_ctx;
     858             :         } else {
     859           0 :                 mem_ctx = state;
     860             :         }
     861             : 
     862           0 :         status = dcerpc_wkssvc_NetrWkstaUserGetInfo_r_recv(subreq, mem_ctx);
     863           0 :         TALLOC_FREE(subreq);
     864           0 :         if (tevent_req_nterror(req, status)) {
     865           0 :                 return;
     866             :         }
     867             : 
     868             :         /* Copy out parameters */
     869           0 :         *state->orig.out.info = *state->tmp.out.info;
     870             : 
     871             :         /* Copy result */
     872           0 :         state->orig.out.result = state->tmp.out.result;
     873             : 
     874             :         /* Reset temporary structure */
     875           0 :         NDR_ZERO_STRUCT(state->tmp);
     876             : 
     877           0 :         tevent_req_done(req);
     878             : }
     879             : 
     880           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaUserGetInfo_recv(struct tevent_req *req,
     881             :                                                  TALLOC_CTX *mem_ctx,
     882             :                                                  WERROR *result)
     883             : {
     884           0 :         struct dcerpc_wkssvc_NetrWkstaUserGetInfo_state *state = tevent_req_data(
     885             :                 req, struct dcerpc_wkssvc_NetrWkstaUserGetInfo_state);
     886             :         NTSTATUS status;
     887             : 
     888           0 :         if (tevent_req_is_nterror(req, &status)) {
     889           0 :                 tevent_req_received(req);
     890           0 :                 return status;
     891             :         }
     892             : 
     893             :         /* Steal possible out parameters to the callers context */
     894           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     895             : 
     896             :         /* Return result */
     897           0 :         *result = state->orig.out.result;
     898             : 
     899           0 :         tevent_req_received(req);
     900           0 :         return NT_STATUS_OK;
     901             : }
     902             : 
     903           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaUserGetInfo(struct dcerpc_binding_handle *h,
     904             :                                             TALLOC_CTX *mem_ctx,
     905             :                                             const char *_unknown /* [in] [charset(UTF16),unique] */,
     906             :                                             uint32_t _level /* [in]  */,
     907             :                                             union wkssvc_NetrWkstaUserInfo *_info /* [out] [ref,switch_is(level)] */,
     908             :                                             WERROR *result)
     909             : {
     910             :         struct wkssvc_NetrWkstaUserGetInfo r;
     911             :         NTSTATUS status;
     912             : 
     913             :         /* In parameters */
     914           0 :         r.in.unknown = _unknown;
     915           0 :         r.in.level = _level;
     916             : 
     917             :         /* Out parameters */
     918           0 :         r.out.info = _info;
     919             : 
     920             :         /* Result */
     921           0 :         NDR_ZERO_STRUCT(r.out.result);
     922             : 
     923           0 :         status = dcerpc_wkssvc_NetrWkstaUserGetInfo_r(h, mem_ctx, &r);
     924           0 :         if (!NT_STATUS_IS_OK(status)) {
     925           0 :                 return status;
     926             :         }
     927             : 
     928             :         /* Return variables */
     929           0 :         *_info = *r.out.info;
     930             : 
     931             :         /* Return result */
     932           0 :         *result = r.out.result;
     933             : 
     934           0 :         return NT_STATUS_OK;
     935             : }
     936             : 
     937             : struct dcerpc_wkssvc_NetrWkstaUserSetInfo_r_state {
     938             :         TALLOC_CTX *out_mem_ctx;
     939             : };
     940             : 
     941             : static void dcerpc_wkssvc_NetrWkstaUserSetInfo_r_done(struct tevent_req *subreq);
     942             : 
     943           0 : struct tevent_req *dcerpc_wkssvc_NetrWkstaUserSetInfo_r_send(TALLOC_CTX *mem_ctx,
     944             :         struct tevent_context *ev,
     945             :         struct dcerpc_binding_handle *h,
     946             :         struct wkssvc_NetrWkstaUserSetInfo *r)
     947             : {
     948             :         struct tevent_req *req;
     949             :         struct dcerpc_wkssvc_NetrWkstaUserSetInfo_r_state *state;
     950             :         struct tevent_req *subreq;
     951             : 
     952           0 :         req = tevent_req_create(mem_ctx, &state,
     953             :                                 struct dcerpc_wkssvc_NetrWkstaUserSetInfo_r_state);
     954           0 :         if (req == NULL) {
     955           0 :                 return NULL;
     956             :         }
     957             : 
     958           0 :         state->out_mem_ctx = talloc_new(state);
     959           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     960           0 :                 return tevent_req_post(req, ev);
     961             :         }
     962             : 
     963           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     964             :                         NULL, &ndr_table_wkssvc,
     965           0 :                         NDR_WKSSVC_NETRWKSTAUSERSETINFO, state->out_mem_ctx, r);
     966           0 :         if (tevent_req_nomem(subreq, req)) {
     967           0 :                 return tevent_req_post(req, ev);
     968             :         }
     969           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWkstaUserSetInfo_r_done, req);
     970             : 
     971           0 :         return req;
     972             : }
     973             : 
     974           0 : static void dcerpc_wkssvc_NetrWkstaUserSetInfo_r_done(struct tevent_req *subreq)
     975             : {
     976           0 :         struct tevent_req *req =
     977           0 :                 tevent_req_callback_data(subreq,
     978             :                 struct tevent_req);
     979             :         NTSTATUS status;
     980             : 
     981           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     982           0 :         TALLOC_FREE(subreq);
     983           0 :         if (tevent_req_nterror(req, status)) {
     984           0 :                 return;
     985             :         }
     986             : 
     987           0 :         tevent_req_done(req);
     988             : }
     989             : 
     990           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaUserSetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     991             : {
     992           0 :         struct dcerpc_wkssvc_NetrWkstaUserSetInfo_r_state *state =
     993           0 :                 tevent_req_data(req,
     994             :                 struct dcerpc_wkssvc_NetrWkstaUserSetInfo_r_state);
     995             :         NTSTATUS status;
     996             : 
     997           0 :         if (tevent_req_is_nterror(req, &status)) {
     998           0 :                 tevent_req_received(req);
     999           0 :                 return status;
    1000             :         }
    1001             : 
    1002           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1003             : 
    1004           0 :         tevent_req_received(req);
    1005           0 :         return NT_STATUS_OK;
    1006             : }
    1007             : 
    1008           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaUserSetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrWkstaUserSetInfo *r)
    1009             : {
    1010             :         NTSTATUS status;
    1011             : 
    1012           0 :         status = dcerpc_binding_handle_call(h,
    1013             :                         NULL, &ndr_table_wkssvc,
    1014             :                         NDR_WKSSVC_NETRWKSTAUSERSETINFO, mem_ctx, r);
    1015             : 
    1016           0 :         return status;
    1017             : }
    1018             : 
    1019             : struct dcerpc_wkssvc_NetrWkstaUserSetInfo_state {
    1020             :         struct wkssvc_NetrWkstaUserSetInfo orig;
    1021             :         struct wkssvc_NetrWkstaUserSetInfo tmp;
    1022             :         TALLOC_CTX *out_mem_ctx;
    1023             : };
    1024             : 
    1025             : static void dcerpc_wkssvc_NetrWkstaUserSetInfo_done(struct tevent_req *subreq);
    1026             : 
    1027           0 : struct tevent_req *dcerpc_wkssvc_NetrWkstaUserSetInfo_send(TALLOC_CTX *mem_ctx,
    1028             :                                                            struct tevent_context *ev,
    1029             :                                                            struct dcerpc_binding_handle *h,
    1030             :                                                            const char *_unknown /* [in] [charset(UTF16),unique] */,
    1031             :                                                            uint32_t _level /* [in]  */,
    1032             :                                                            union wkssvc_NetrWkstaUserInfo *_info /* [in] [ref,switch_is(level)] */,
    1033             :                                                            uint32_t *_parm_err /* [in,out] [unique] */)
    1034             : {
    1035             :         struct tevent_req *req;
    1036             :         struct dcerpc_wkssvc_NetrWkstaUserSetInfo_state *state;
    1037             :         struct tevent_req *subreq;
    1038             : 
    1039           0 :         req = tevent_req_create(mem_ctx, &state,
    1040             :                                 struct dcerpc_wkssvc_NetrWkstaUserSetInfo_state);
    1041           0 :         if (req == NULL) {
    1042           0 :                 return NULL;
    1043             :         }
    1044           0 :         state->out_mem_ctx = NULL;
    1045             : 
    1046             :         /* In parameters */
    1047           0 :         state->orig.in.unknown = _unknown;
    1048           0 :         state->orig.in.level = _level;
    1049           0 :         state->orig.in.info = _info;
    1050           0 :         state->orig.in.parm_err = _parm_err;
    1051             : 
    1052             :         /* Out parameters */
    1053           0 :         state->orig.out.parm_err = _parm_err;
    1054             : 
    1055             :         /* Result */
    1056           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1057             : 
    1058           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1059             :                              "dcerpc_wkssvc_NetrWkstaUserSetInfo_out_memory");
    1060           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1061           0 :                 return tevent_req_post(req, ev);
    1062             :         }
    1063             : 
    1064             :         /* make a temporary copy, that we pass to the dispatch function */
    1065           0 :         state->tmp = state->orig;
    1066             : 
    1067           0 :         subreq = dcerpc_wkssvc_NetrWkstaUserSetInfo_r_send(state, ev, h, &state->tmp);
    1068           0 :         if (tevent_req_nomem(subreq, req)) {
    1069           0 :                 return tevent_req_post(req, ev);
    1070             :         }
    1071           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWkstaUserSetInfo_done, req);
    1072           0 :         return req;
    1073             : }
    1074             : 
    1075           0 : static void dcerpc_wkssvc_NetrWkstaUserSetInfo_done(struct tevent_req *subreq)
    1076             : {
    1077           0 :         struct tevent_req *req = tevent_req_callback_data(
    1078             :                 subreq, struct tevent_req);
    1079           0 :         struct dcerpc_wkssvc_NetrWkstaUserSetInfo_state *state = tevent_req_data(
    1080             :                 req, struct dcerpc_wkssvc_NetrWkstaUserSetInfo_state);
    1081             :         NTSTATUS status;
    1082             :         TALLOC_CTX *mem_ctx;
    1083             : 
    1084           0 :         if (state->out_mem_ctx) {
    1085           0 :                 mem_ctx = state->out_mem_ctx;
    1086             :         } else {
    1087           0 :                 mem_ctx = state;
    1088             :         }
    1089             : 
    1090           0 :         status = dcerpc_wkssvc_NetrWkstaUserSetInfo_r_recv(subreq, mem_ctx);
    1091           0 :         TALLOC_FREE(subreq);
    1092           0 :         if (tevent_req_nterror(req, status)) {
    1093           0 :                 return;
    1094             :         }
    1095             : 
    1096             :         /* Copy out parameters */
    1097           0 :         if (state->orig.out.parm_err && state->tmp.out.parm_err) {
    1098           0 :                 *state->orig.out.parm_err = *state->tmp.out.parm_err;
    1099             :         }
    1100             : 
    1101             :         /* Copy result */
    1102           0 :         state->orig.out.result = state->tmp.out.result;
    1103             : 
    1104             :         /* Reset temporary structure */
    1105           0 :         NDR_ZERO_STRUCT(state->tmp);
    1106             : 
    1107           0 :         tevent_req_done(req);
    1108             : }
    1109             : 
    1110           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaUserSetInfo_recv(struct tevent_req *req,
    1111             :                                                  TALLOC_CTX *mem_ctx,
    1112             :                                                  WERROR *result)
    1113             : {
    1114           0 :         struct dcerpc_wkssvc_NetrWkstaUserSetInfo_state *state = tevent_req_data(
    1115             :                 req, struct dcerpc_wkssvc_NetrWkstaUserSetInfo_state);
    1116             :         NTSTATUS status;
    1117             : 
    1118           0 :         if (tevent_req_is_nterror(req, &status)) {
    1119           0 :                 tevent_req_received(req);
    1120           0 :                 return status;
    1121             :         }
    1122             : 
    1123             :         /* Steal possible out parameters to the callers context */
    1124           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1125             : 
    1126             :         /* Return result */
    1127           0 :         *result = state->orig.out.result;
    1128             : 
    1129           0 :         tevent_req_received(req);
    1130           0 :         return NT_STATUS_OK;
    1131             : }
    1132             : 
    1133           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaUserSetInfo(struct dcerpc_binding_handle *h,
    1134             :                                             TALLOC_CTX *mem_ctx,
    1135             :                                             const char *_unknown /* [in] [charset(UTF16),unique] */,
    1136             :                                             uint32_t _level /* [in]  */,
    1137             :                                             union wkssvc_NetrWkstaUserInfo *_info /* [in] [ref,switch_is(level)] */,
    1138             :                                             uint32_t *_parm_err /* [in,out] [unique] */,
    1139             :                                             WERROR *result)
    1140             : {
    1141             :         struct wkssvc_NetrWkstaUserSetInfo r;
    1142             :         NTSTATUS status;
    1143             : 
    1144             :         /* In parameters */
    1145           0 :         r.in.unknown = _unknown;
    1146           0 :         r.in.level = _level;
    1147           0 :         r.in.info = _info;
    1148           0 :         r.in.parm_err = _parm_err;
    1149             : 
    1150             :         /* Out parameters */
    1151           0 :         r.out.parm_err = _parm_err;
    1152             : 
    1153             :         /* Result */
    1154           0 :         NDR_ZERO_STRUCT(r.out.result);
    1155             : 
    1156           0 :         status = dcerpc_wkssvc_NetrWkstaUserSetInfo_r(h, mem_ctx, &r);
    1157           0 :         if (!NT_STATUS_IS_OK(status)) {
    1158           0 :                 return status;
    1159             :         }
    1160             : 
    1161             :         /* Return variables */
    1162           0 :         if (_parm_err && r.out.parm_err) {
    1163           0 :                 *_parm_err = *r.out.parm_err;
    1164             :         }
    1165             : 
    1166             :         /* Return result */
    1167           0 :         *result = r.out.result;
    1168             : 
    1169           0 :         return NT_STATUS_OK;
    1170             : }
    1171             : 
    1172             : struct dcerpc_wkssvc_NetWkstaTransportEnum_r_state {
    1173             :         TALLOC_CTX *out_mem_ctx;
    1174             : };
    1175             : 
    1176             : static void dcerpc_wkssvc_NetWkstaTransportEnum_r_done(struct tevent_req *subreq);
    1177             : 
    1178           0 : struct tevent_req *dcerpc_wkssvc_NetWkstaTransportEnum_r_send(TALLOC_CTX *mem_ctx,
    1179             :         struct tevent_context *ev,
    1180             :         struct dcerpc_binding_handle *h,
    1181             :         struct wkssvc_NetWkstaTransportEnum *r)
    1182             : {
    1183             :         struct tevent_req *req;
    1184             :         struct dcerpc_wkssvc_NetWkstaTransportEnum_r_state *state;
    1185             :         struct tevent_req *subreq;
    1186             : 
    1187           0 :         req = tevent_req_create(mem_ctx, &state,
    1188             :                                 struct dcerpc_wkssvc_NetWkstaTransportEnum_r_state);
    1189           0 :         if (req == NULL) {
    1190           0 :                 return NULL;
    1191             :         }
    1192             : 
    1193           0 :         state->out_mem_ctx = talloc_new(state);
    1194           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1195           0 :                 return tevent_req_post(req, ev);
    1196             :         }
    1197             : 
    1198           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1199             :                         NULL, &ndr_table_wkssvc,
    1200           0 :                         NDR_WKSSVC_NETWKSTATRANSPORTENUM, state->out_mem_ctx, r);
    1201           0 :         if (tevent_req_nomem(subreq, req)) {
    1202           0 :                 return tevent_req_post(req, ev);
    1203             :         }
    1204           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetWkstaTransportEnum_r_done, req);
    1205             : 
    1206           0 :         return req;
    1207             : }
    1208             : 
    1209           0 : static void dcerpc_wkssvc_NetWkstaTransportEnum_r_done(struct tevent_req *subreq)
    1210             : {
    1211           0 :         struct tevent_req *req =
    1212           0 :                 tevent_req_callback_data(subreq,
    1213             :                 struct tevent_req);
    1214             :         NTSTATUS status;
    1215             : 
    1216           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1217           0 :         TALLOC_FREE(subreq);
    1218           0 :         if (tevent_req_nterror(req, status)) {
    1219           0 :                 return;
    1220             :         }
    1221             : 
    1222           0 :         tevent_req_done(req);
    1223             : }
    1224             : 
    1225           0 : NTSTATUS dcerpc_wkssvc_NetWkstaTransportEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1226             : {
    1227           0 :         struct dcerpc_wkssvc_NetWkstaTransportEnum_r_state *state =
    1228           0 :                 tevent_req_data(req,
    1229             :                 struct dcerpc_wkssvc_NetWkstaTransportEnum_r_state);
    1230             :         NTSTATUS status;
    1231             : 
    1232           0 :         if (tevent_req_is_nterror(req, &status)) {
    1233           0 :                 tevent_req_received(req);
    1234           0 :                 return status;
    1235             :         }
    1236             : 
    1237           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1238             : 
    1239           0 :         tevent_req_received(req);
    1240           0 :         return NT_STATUS_OK;
    1241             : }
    1242             : 
    1243           5 : NTSTATUS dcerpc_wkssvc_NetWkstaTransportEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetWkstaTransportEnum *r)
    1244             : {
    1245             :         NTSTATUS status;
    1246             : 
    1247           5 :         status = dcerpc_binding_handle_call(h,
    1248             :                         NULL, &ndr_table_wkssvc,
    1249             :                         NDR_WKSSVC_NETWKSTATRANSPORTENUM, mem_ctx, r);
    1250             : 
    1251           5 :         return status;
    1252             : }
    1253             : 
    1254             : struct dcerpc_wkssvc_NetWkstaTransportEnum_state {
    1255             :         struct wkssvc_NetWkstaTransportEnum orig;
    1256             :         struct wkssvc_NetWkstaTransportEnum tmp;
    1257             :         TALLOC_CTX *out_mem_ctx;
    1258             : };
    1259             : 
    1260             : static void dcerpc_wkssvc_NetWkstaTransportEnum_done(struct tevent_req *subreq);
    1261             : 
    1262           0 : struct tevent_req *dcerpc_wkssvc_NetWkstaTransportEnum_send(TALLOC_CTX *mem_ctx,
    1263             :                                                             struct tevent_context *ev,
    1264             :                                                             struct dcerpc_binding_handle *h,
    1265             :                                                             const char *_server_name /* [in] [charset(UTF16),unique] */,
    1266             :                                                             struct wkssvc_NetWkstaTransportInfo *_info /* [in,out] [ref] */,
    1267             :                                                             uint32_t _max_buffer /* [in]  */,
    1268             :                                                             uint32_t *_total_entries /* [out] [ref] */,
    1269             :                                                             uint32_t *_resume_handle /* [in,out] [unique] */)
    1270             : {
    1271             :         struct tevent_req *req;
    1272             :         struct dcerpc_wkssvc_NetWkstaTransportEnum_state *state;
    1273             :         struct tevent_req *subreq;
    1274             : 
    1275           0 :         req = tevent_req_create(mem_ctx, &state,
    1276             :                                 struct dcerpc_wkssvc_NetWkstaTransportEnum_state);
    1277           0 :         if (req == NULL) {
    1278           0 :                 return NULL;
    1279             :         }
    1280           0 :         state->out_mem_ctx = NULL;
    1281             : 
    1282             :         /* In parameters */
    1283           0 :         state->orig.in.server_name = _server_name;
    1284           0 :         state->orig.in.info = _info;
    1285           0 :         state->orig.in.max_buffer = _max_buffer;
    1286           0 :         state->orig.in.resume_handle = _resume_handle;
    1287             : 
    1288             :         /* Out parameters */
    1289           0 :         state->orig.out.info = _info;
    1290           0 :         state->orig.out.total_entries = _total_entries;
    1291           0 :         state->orig.out.resume_handle = _resume_handle;
    1292             : 
    1293             :         /* Result */
    1294           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1295             : 
    1296           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1297             :                              "dcerpc_wkssvc_NetWkstaTransportEnum_out_memory");
    1298           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1299           0 :                 return tevent_req_post(req, ev);
    1300             :         }
    1301             : 
    1302             :         /* make a temporary copy, that we pass to the dispatch function */
    1303           0 :         state->tmp = state->orig;
    1304             : 
    1305           0 :         subreq = dcerpc_wkssvc_NetWkstaTransportEnum_r_send(state, ev, h, &state->tmp);
    1306           0 :         if (tevent_req_nomem(subreq, req)) {
    1307           0 :                 return tevent_req_post(req, ev);
    1308             :         }
    1309           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetWkstaTransportEnum_done, req);
    1310           0 :         return req;
    1311             : }
    1312             : 
    1313           0 : static void dcerpc_wkssvc_NetWkstaTransportEnum_done(struct tevent_req *subreq)
    1314             : {
    1315           0 :         struct tevent_req *req = tevent_req_callback_data(
    1316             :                 subreq, struct tevent_req);
    1317           0 :         struct dcerpc_wkssvc_NetWkstaTransportEnum_state *state = tevent_req_data(
    1318             :                 req, struct dcerpc_wkssvc_NetWkstaTransportEnum_state);
    1319             :         NTSTATUS status;
    1320             :         TALLOC_CTX *mem_ctx;
    1321             : 
    1322           0 :         if (state->out_mem_ctx) {
    1323           0 :                 mem_ctx = state->out_mem_ctx;
    1324             :         } else {
    1325           0 :                 mem_ctx = state;
    1326             :         }
    1327             : 
    1328           0 :         status = dcerpc_wkssvc_NetWkstaTransportEnum_r_recv(subreq, mem_ctx);
    1329           0 :         TALLOC_FREE(subreq);
    1330           0 :         if (tevent_req_nterror(req, status)) {
    1331           0 :                 return;
    1332             :         }
    1333             : 
    1334             :         /* Copy out parameters */
    1335           0 :         *state->orig.out.info = *state->tmp.out.info;
    1336           0 :         *state->orig.out.total_entries = *state->tmp.out.total_entries;
    1337           0 :         if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
    1338           0 :                 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    1339             :         }
    1340             : 
    1341             :         /* Copy result */
    1342           0 :         state->orig.out.result = state->tmp.out.result;
    1343             : 
    1344             :         /* Reset temporary structure */
    1345           0 :         NDR_ZERO_STRUCT(state->tmp);
    1346             : 
    1347           0 :         tevent_req_done(req);
    1348             : }
    1349             : 
    1350           0 : NTSTATUS dcerpc_wkssvc_NetWkstaTransportEnum_recv(struct tevent_req *req,
    1351             :                                                   TALLOC_CTX *mem_ctx,
    1352             :                                                   WERROR *result)
    1353             : {
    1354           0 :         struct dcerpc_wkssvc_NetWkstaTransportEnum_state *state = tevent_req_data(
    1355             :                 req, struct dcerpc_wkssvc_NetWkstaTransportEnum_state);
    1356             :         NTSTATUS status;
    1357             : 
    1358           0 :         if (tevent_req_is_nterror(req, &status)) {
    1359           0 :                 tevent_req_received(req);
    1360           0 :                 return status;
    1361             :         }
    1362             : 
    1363             :         /* Steal possible out parameters to the callers context */
    1364           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1365             : 
    1366             :         /* Return result */
    1367           0 :         *result = state->orig.out.result;
    1368             : 
    1369           0 :         tevent_req_received(req);
    1370           0 :         return NT_STATUS_OK;
    1371             : }
    1372             : 
    1373           0 : NTSTATUS dcerpc_wkssvc_NetWkstaTransportEnum(struct dcerpc_binding_handle *h,
    1374             :                                              TALLOC_CTX *mem_ctx,
    1375             :                                              const char *_server_name /* [in] [charset(UTF16),unique] */,
    1376             :                                              struct wkssvc_NetWkstaTransportInfo *_info /* [in,out] [ref] */,
    1377             :                                              uint32_t _max_buffer /* [in]  */,
    1378             :                                              uint32_t *_total_entries /* [out] [ref] */,
    1379             :                                              uint32_t *_resume_handle /* [in,out] [unique] */,
    1380             :                                              WERROR *result)
    1381             : {
    1382             :         struct wkssvc_NetWkstaTransportEnum r;
    1383             :         NTSTATUS status;
    1384             : 
    1385             :         /* In parameters */
    1386           0 :         r.in.server_name = _server_name;
    1387           0 :         r.in.info = _info;
    1388           0 :         r.in.max_buffer = _max_buffer;
    1389           0 :         r.in.resume_handle = _resume_handle;
    1390             : 
    1391             :         /* Out parameters */
    1392           0 :         r.out.info = _info;
    1393           0 :         r.out.total_entries = _total_entries;
    1394           0 :         r.out.resume_handle = _resume_handle;
    1395             : 
    1396             :         /* Result */
    1397           0 :         NDR_ZERO_STRUCT(r.out.result);
    1398             : 
    1399           0 :         status = dcerpc_wkssvc_NetWkstaTransportEnum_r(h, mem_ctx, &r);
    1400           0 :         if (!NT_STATUS_IS_OK(status)) {
    1401           0 :                 return status;
    1402             :         }
    1403             : 
    1404             :         /* Return variables */
    1405           0 :         *_info = *r.out.info;
    1406           0 :         *_total_entries = *r.out.total_entries;
    1407           0 :         if (_resume_handle && r.out.resume_handle) {
    1408           0 :                 *_resume_handle = *r.out.resume_handle;
    1409             :         }
    1410             : 
    1411             :         /* Return result */
    1412           0 :         *result = r.out.result;
    1413             : 
    1414           0 :         return NT_STATUS_OK;
    1415             : }
    1416             : 
    1417             : struct dcerpc_wkssvc_NetrWkstaTransportAdd_r_state {
    1418             :         TALLOC_CTX *out_mem_ctx;
    1419             : };
    1420             : 
    1421             : static void dcerpc_wkssvc_NetrWkstaTransportAdd_r_done(struct tevent_req *subreq);
    1422             : 
    1423           0 : struct tevent_req *dcerpc_wkssvc_NetrWkstaTransportAdd_r_send(TALLOC_CTX *mem_ctx,
    1424             :         struct tevent_context *ev,
    1425             :         struct dcerpc_binding_handle *h,
    1426             :         struct wkssvc_NetrWkstaTransportAdd *r)
    1427             : {
    1428             :         struct tevent_req *req;
    1429             :         struct dcerpc_wkssvc_NetrWkstaTransportAdd_r_state *state;
    1430             :         struct tevent_req *subreq;
    1431             : 
    1432           0 :         req = tevent_req_create(mem_ctx, &state,
    1433             :                                 struct dcerpc_wkssvc_NetrWkstaTransportAdd_r_state);
    1434           0 :         if (req == NULL) {
    1435           0 :                 return NULL;
    1436             :         }
    1437             : 
    1438           0 :         state->out_mem_ctx = talloc_new(state);
    1439           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1440           0 :                 return tevent_req_post(req, ev);
    1441             :         }
    1442             : 
    1443           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1444             :                         NULL, &ndr_table_wkssvc,
    1445           0 :                         NDR_WKSSVC_NETRWKSTATRANSPORTADD, state->out_mem_ctx, r);
    1446           0 :         if (tevent_req_nomem(subreq, req)) {
    1447           0 :                 return tevent_req_post(req, ev);
    1448             :         }
    1449           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWkstaTransportAdd_r_done, req);
    1450             : 
    1451           0 :         return req;
    1452             : }
    1453             : 
    1454           0 : static void dcerpc_wkssvc_NetrWkstaTransportAdd_r_done(struct tevent_req *subreq)
    1455             : {
    1456           0 :         struct tevent_req *req =
    1457           0 :                 tevent_req_callback_data(subreq,
    1458             :                 struct tevent_req);
    1459             :         NTSTATUS status;
    1460             : 
    1461           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1462           0 :         TALLOC_FREE(subreq);
    1463           0 :         if (tevent_req_nterror(req, status)) {
    1464           0 :                 return;
    1465             :         }
    1466             : 
    1467           0 :         tevent_req_done(req);
    1468             : }
    1469             : 
    1470           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaTransportAdd_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1471             : {
    1472           0 :         struct dcerpc_wkssvc_NetrWkstaTransportAdd_r_state *state =
    1473           0 :                 tevent_req_data(req,
    1474             :                 struct dcerpc_wkssvc_NetrWkstaTransportAdd_r_state);
    1475             :         NTSTATUS status;
    1476             : 
    1477           0 :         if (tevent_req_is_nterror(req, &status)) {
    1478           0 :                 tevent_req_received(req);
    1479           0 :                 return status;
    1480             :         }
    1481             : 
    1482           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1483             : 
    1484           0 :         tevent_req_received(req);
    1485           0 :         return NT_STATUS_OK;
    1486             : }
    1487             : 
    1488           5 : NTSTATUS dcerpc_wkssvc_NetrWkstaTransportAdd_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrWkstaTransportAdd *r)
    1489             : {
    1490             :         NTSTATUS status;
    1491             : 
    1492           5 :         status = dcerpc_binding_handle_call(h,
    1493             :                         NULL, &ndr_table_wkssvc,
    1494             :                         NDR_WKSSVC_NETRWKSTATRANSPORTADD, mem_ctx, r);
    1495             : 
    1496           5 :         return status;
    1497             : }
    1498             : 
    1499             : struct dcerpc_wkssvc_NetrWkstaTransportAdd_state {
    1500             :         struct wkssvc_NetrWkstaTransportAdd orig;
    1501             :         struct wkssvc_NetrWkstaTransportAdd tmp;
    1502             :         TALLOC_CTX *out_mem_ctx;
    1503             : };
    1504             : 
    1505             : static void dcerpc_wkssvc_NetrWkstaTransportAdd_done(struct tevent_req *subreq);
    1506             : 
    1507           0 : struct tevent_req *dcerpc_wkssvc_NetrWkstaTransportAdd_send(TALLOC_CTX *mem_ctx,
    1508             :                                                             struct tevent_context *ev,
    1509             :                                                             struct dcerpc_binding_handle *h,
    1510             :                                                             const char *_server_name /* [in] [charset(UTF16),unique] */,
    1511             :                                                             uint32_t _level /* [in]  */,
    1512             :                                                             struct wkssvc_NetWkstaTransportInfo0 *_info0 /* [in] [ref] */,
    1513             :                                                             uint32_t *_parm_err /* [in,out] [unique] */)
    1514             : {
    1515             :         struct tevent_req *req;
    1516             :         struct dcerpc_wkssvc_NetrWkstaTransportAdd_state *state;
    1517             :         struct tevent_req *subreq;
    1518             : 
    1519           0 :         req = tevent_req_create(mem_ctx, &state,
    1520             :                                 struct dcerpc_wkssvc_NetrWkstaTransportAdd_state);
    1521           0 :         if (req == NULL) {
    1522           0 :                 return NULL;
    1523             :         }
    1524           0 :         state->out_mem_ctx = NULL;
    1525             : 
    1526             :         /* In parameters */
    1527           0 :         state->orig.in.server_name = _server_name;
    1528           0 :         state->orig.in.level = _level;
    1529           0 :         state->orig.in.info0 = _info0;
    1530           0 :         state->orig.in.parm_err = _parm_err;
    1531             : 
    1532             :         /* Out parameters */
    1533           0 :         state->orig.out.parm_err = _parm_err;
    1534             : 
    1535             :         /* Result */
    1536           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1537             : 
    1538           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1539             :                              "dcerpc_wkssvc_NetrWkstaTransportAdd_out_memory");
    1540           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1541           0 :                 return tevent_req_post(req, ev);
    1542             :         }
    1543             : 
    1544             :         /* make a temporary copy, that we pass to the dispatch function */
    1545           0 :         state->tmp = state->orig;
    1546             : 
    1547           0 :         subreq = dcerpc_wkssvc_NetrWkstaTransportAdd_r_send(state, ev, h, &state->tmp);
    1548           0 :         if (tevent_req_nomem(subreq, req)) {
    1549           0 :                 return tevent_req_post(req, ev);
    1550             :         }
    1551           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWkstaTransportAdd_done, req);
    1552           0 :         return req;
    1553             : }
    1554             : 
    1555           0 : static void dcerpc_wkssvc_NetrWkstaTransportAdd_done(struct tevent_req *subreq)
    1556             : {
    1557           0 :         struct tevent_req *req = tevent_req_callback_data(
    1558             :                 subreq, struct tevent_req);
    1559           0 :         struct dcerpc_wkssvc_NetrWkstaTransportAdd_state *state = tevent_req_data(
    1560             :                 req, struct dcerpc_wkssvc_NetrWkstaTransportAdd_state);
    1561             :         NTSTATUS status;
    1562             :         TALLOC_CTX *mem_ctx;
    1563             : 
    1564           0 :         if (state->out_mem_ctx) {
    1565           0 :                 mem_ctx = state->out_mem_ctx;
    1566             :         } else {
    1567           0 :                 mem_ctx = state;
    1568             :         }
    1569             : 
    1570           0 :         status = dcerpc_wkssvc_NetrWkstaTransportAdd_r_recv(subreq, mem_ctx);
    1571           0 :         TALLOC_FREE(subreq);
    1572           0 :         if (tevent_req_nterror(req, status)) {
    1573           0 :                 return;
    1574             :         }
    1575             : 
    1576             :         /* Copy out parameters */
    1577           0 :         if (state->orig.out.parm_err && state->tmp.out.parm_err) {
    1578           0 :                 *state->orig.out.parm_err = *state->tmp.out.parm_err;
    1579             :         }
    1580             : 
    1581             :         /* Copy result */
    1582           0 :         state->orig.out.result = state->tmp.out.result;
    1583             : 
    1584             :         /* Reset temporary structure */
    1585           0 :         NDR_ZERO_STRUCT(state->tmp);
    1586             : 
    1587           0 :         tevent_req_done(req);
    1588             : }
    1589             : 
    1590           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaTransportAdd_recv(struct tevent_req *req,
    1591             :                                                   TALLOC_CTX *mem_ctx,
    1592             :                                                   WERROR *result)
    1593             : {
    1594           0 :         struct dcerpc_wkssvc_NetrWkstaTransportAdd_state *state = tevent_req_data(
    1595             :                 req, struct dcerpc_wkssvc_NetrWkstaTransportAdd_state);
    1596             :         NTSTATUS status;
    1597             : 
    1598           0 :         if (tevent_req_is_nterror(req, &status)) {
    1599           0 :                 tevent_req_received(req);
    1600           0 :                 return status;
    1601             :         }
    1602             : 
    1603             :         /* Steal possible out parameters to the callers context */
    1604           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1605             : 
    1606             :         /* Return result */
    1607           0 :         *result = state->orig.out.result;
    1608             : 
    1609           0 :         tevent_req_received(req);
    1610           0 :         return NT_STATUS_OK;
    1611             : }
    1612             : 
    1613           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaTransportAdd(struct dcerpc_binding_handle *h,
    1614             :                                              TALLOC_CTX *mem_ctx,
    1615             :                                              const char *_server_name /* [in] [charset(UTF16),unique] */,
    1616             :                                              uint32_t _level /* [in]  */,
    1617             :                                              struct wkssvc_NetWkstaTransportInfo0 *_info0 /* [in] [ref] */,
    1618             :                                              uint32_t *_parm_err /* [in,out] [unique] */,
    1619             :                                              WERROR *result)
    1620             : {
    1621             :         struct wkssvc_NetrWkstaTransportAdd r;
    1622             :         NTSTATUS status;
    1623             : 
    1624             :         /* In parameters */
    1625           0 :         r.in.server_name = _server_name;
    1626           0 :         r.in.level = _level;
    1627           0 :         r.in.info0 = _info0;
    1628           0 :         r.in.parm_err = _parm_err;
    1629             : 
    1630             :         /* Out parameters */
    1631           0 :         r.out.parm_err = _parm_err;
    1632             : 
    1633             :         /* Result */
    1634           0 :         NDR_ZERO_STRUCT(r.out.result);
    1635             : 
    1636           0 :         status = dcerpc_wkssvc_NetrWkstaTransportAdd_r(h, mem_ctx, &r);
    1637           0 :         if (!NT_STATUS_IS_OK(status)) {
    1638           0 :                 return status;
    1639             :         }
    1640             : 
    1641             :         /* Return variables */
    1642           0 :         if (_parm_err && r.out.parm_err) {
    1643           0 :                 *_parm_err = *r.out.parm_err;
    1644             :         }
    1645             : 
    1646             :         /* Return result */
    1647           0 :         *result = r.out.result;
    1648             : 
    1649           0 :         return NT_STATUS_OK;
    1650             : }
    1651             : 
    1652             : struct dcerpc_wkssvc_NetrWkstaTransportDel_r_state {
    1653             :         TALLOC_CTX *out_mem_ctx;
    1654             : };
    1655             : 
    1656             : static void dcerpc_wkssvc_NetrWkstaTransportDel_r_done(struct tevent_req *subreq);
    1657             : 
    1658           0 : struct tevent_req *dcerpc_wkssvc_NetrWkstaTransportDel_r_send(TALLOC_CTX *mem_ctx,
    1659             :         struct tevent_context *ev,
    1660             :         struct dcerpc_binding_handle *h,
    1661             :         struct wkssvc_NetrWkstaTransportDel *r)
    1662             : {
    1663             :         struct tevent_req *req;
    1664             :         struct dcerpc_wkssvc_NetrWkstaTransportDel_r_state *state;
    1665             :         struct tevent_req *subreq;
    1666             : 
    1667           0 :         req = tevent_req_create(mem_ctx, &state,
    1668             :                                 struct dcerpc_wkssvc_NetrWkstaTransportDel_r_state);
    1669           0 :         if (req == NULL) {
    1670           0 :                 return NULL;
    1671             :         }
    1672             : 
    1673           0 :         state->out_mem_ctx = NULL;
    1674             : 
    1675           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1676             :                         NULL, &ndr_table_wkssvc,
    1677             :                         NDR_WKSSVC_NETRWKSTATRANSPORTDEL, state, r);
    1678           0 :         if (tevent_req_nomem(subreq, req)) {
    1679           0 :                 return tevent_req_post(req, ev);
    1680             :         }
    1681           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWkstaTransportDel_r_done, req);
    1682             : 
    1683           0 :         return req;
    1684             : }
    1685             : 
    1686           0 : static void dcerpc_wkssvc_NetrWkstaTransportDel_r_done(struct tevent_req *subreq)
    1687             : {
    1688           0 :         struct tevent_req *req =
    1689           0 :                 tevent_req_callback_data(subreq,
    1690             :                 struct tevent_req);
    1691             :         NTSTATUS status;
    1692             : 
    1693           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1694           0 :         TALLOC_FREE(subreq);
    1695           0 :         if (tevent_req_nterror(req, status)) {
    1696           0 :                 return;
    1697             :         }
    1698             : 
    1699           0 :         tevent_req_done(req);
    1700             : }
    1701             : 
    1702           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaTransportDel_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1703             : {
    1704           0 :         struct dcerpc_wkssvc_NetrWkstaTransportDel_r_state *state =
    1705           0 :                 tevent_req_data(req,
    1706             :                 struct dcerpc_wkssvc_NetrWkstaTransportDel_r_state);
    1707             :         NTSTATUS status;
    1708             : 
    1709           0 :         if (tevent_req_is_nterror(req, &status)) {
    1710           0 :                 tevent_req_received(req);
    1711           0 :                 return status;
    1712             :         }
    1713             : 
    1714           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1715             : 
    1716           0 :         tevent_req_received(req);
    1717           0 :         return NT_STATUS_OK;
    1718             : }
    1719             : 
    1720           5 : NTSTATUS dcerpc_wkssvc_NetrWkstaTransportDel_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrWkstaTransportDel *r)
    1721             : {
    1722             :         NTSTATUS status;
    1723             : 
    1724           5 :         status = dcerpc_binding_handle_call(h,
    1725             :                         NULL, &ndr_table_wkssvc,
    1726             :                         NDR_WKSSVC_NETRWKSTATRANSPORTDEL, mem_ctx, r);
    1727             : 
    1728           5 :         return status;
    1729             : }
    1730             : 
    1731             : struct dcerpc_wkssvc_NetrWkstaTransportDel_state {
    1732             :         struct wkssvc_NetrWkstaTransportDel orig;
    1733             :         struct wkssvc_NetrWkstaTransportDel tmp;
    1734             :         TALLOC_CTX *out_mem_ctx;
    1735             : };
    1736             : 
    1737             : static void dcerpc_wkssvc_NetrWkstaTransportDel_done(struct tevent_req *subreq);
    1738             : 
    1739           0 : struct tevent_req *dcerpc_wkssvc_NetrWkstaTransportDel_send(TALLOC_CTX *mem_ctx,
    1740             :                                                             struct tevent_context *ev,
    1741             :                                                             struct dcerpc_binding_handle *h,
    1742             :                                                             const char *_server_name /* [in] [charset(UTF16),unique] */,
    1743             :                                                             const char *_transport_name /* [in] [charset(UTF16),unique] */,
    1744             :                                                             uint32_t _unknown3 /* [in]  */)
    1745             : {
    1746             :         struct tevent_req *req;
    1747             :         struct dcerpc_wkssvc_NetrWkstaTransportDel_state *state;
    1748             :         struct tevent_req *subreq;
    1749             : 
    1750           0 :         req = tevent_req_create(mem_ctx, &state,
    1751             :                                 struct dcerpc_wkssvc_NetrWkstaTransportDel_state);
    1752           0 :         if (req == NULL) {
    1753           0 :                 return NULL;
    1754             :         }
    1755           0 :         state->out_mem_ctx = NULL;
    1756             : 
    1757             :         /* In parameters */
    1758           0 :         state->orig.in.server_name = _server_name;
    1759           0 :         state->orig.in.transport_name = _transport_name;
    1760           0 :         state->orig.in.unknown3 = _unknown3;
    1761             : 
    1762             :         /* Out parameters */
    1763             : 
    1764             :         /* Result */
    1765           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1766             : 
    1767             :         /* make a temporary copy, that we pass to the dispatch function */
    1768           0 :         state->tmp = state->orig;
    1769             : 
    1770           0 :         subreq = dcerpc_wkssvc_NetrWkstaTransportDel_r_send(state, ev, h, &state->tmp);
    1771           0 :         if (tevent_req_nomem(subreq, req)) {
    1772           0 :                 return tevent_req_post(req, ev);
    1773             :         }
    1774           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWkstaTransportDel_done, req);
    1775           0 :         return req;
    1776             : }
    1777             : 
    1778           0 : static void dcerpc_wkssvc_NetrWkstaTransportDel_done(struct tevent_req *subreq)
    1779             : {
    1780           0 :         struct tevent_req *req = tevent_req_callback_data(
    1781             :                 subreq, struct tevent_req);
    1782           0 :         struct dcerpc_wkssvc_NetrWkstaTransportDel_state *state = tevent_req_data(
    1783             :                 req, struct dcerpc_wkssvc_NetrWkstaTransportDel_state);
    1784             :         NTSTATUS status;
    1785             :         TALLOC_CTX *mem_ctx;
    1786             : 
    1787           0 :         if (state->out_mem_ctx) {
    1788           0 :                 mem_ctx = state->out_mem_ctx;
    1789             :         } else {
    1790           0 :                 mem_ctx = state;
    1791             :         }
    1792             : 
    1793           0 :         status = dcerpc_wkssvc_NetrWkstaTransportDel_r_recv(subreq, mem_ctx);
    1794           0 :         TALLOC_FREE(subreq);
    1795           0 :         if (tevent_req_nterror(req, status)) {
    1796           0 :                 return;
    1797             :         }
    1798             : 
    1799             :         /* Copy out parameters */
    1800             : 
    1801             :         /* Copy result */
    1802           0 :         state->orig.out.result = state->tmp.out.result;
    1803             : 
    1804             :         /* Reset temporary structure */
    1805           0 :         NDR_ZERO_STRUCT(state->tmp);
    1806             : 
    1807           0 :         tevent_req_done(req);
    1808             : }
    1809             : 
    1810           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaTransportDel_recv(struct tevent_req *req,
    1811             :                                                   TALLOC_CTX *mem_ctx,
    1812             :                                                   WERROR *result)
    1813             : {
    1814           0 :         struct dcerpc_wkssvc_NetrWkstaTransportDel_state *state = tevent_req_data(
    1815             :                 req, struct dcerpc_wkssvc_NetrWkstaTransportDel_state);
    1816             :         NTSTATUS status;
    1817             : 
    1818           0 :         if (tevent_req_is_nterror(req, &status)) {
    1819           0 :                 tevent_req_received(req);
    1820           0 :                 return status;
    1821             :         }
    1822             : 
    1823             :         /* Steal possible out parameters to the callers context */
    1824           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1825             : 
    1826             :         /* Return result */
    1827           0 :         *result = state->orig.out.result;
    1828             : 
    1829           0 :         tevent_req_received(req);
    1830           0 :         return NT_STATUS_OK;
    1831             : }
    1832             : 
    1833           0 : NTSTATUS dcerpc_wkssvc_NetrWkstaTransportDel(struct dcerpc_binding_handle *h,
    1834             :                                              TALLOC_CTX *mem_ctx,
    1835             :                                              const char *_server_name /* [in] [charset(UTF16),unique] */,
    1836             :                                              const char *_transport_name /* [in] [charset(UTF16),unique] */,
    1837             :                                              uint32_t _unknown3 /* [in]  */,
    1838             :                                              WERROR *result)
    1839             : {
    1840             :         struct wkssvc_NetrWkstaTransportDel r;
    1841             :         NTSTATUS status;
    1842             : 
    1843             :         /* In parameters */
    1844           0 :         r.in.server_name = _server_name;
    1845           0 :         r.in.transport_name = _transport_name;
    1846           0 :         r.in.unknown3 = _unknown3;
    1847             : 
    1848             :         /* Out parameters */
    1849             : 
    1850             :         /* Result */
    1851           0 :         NDR_ZERO_STRUCT(r.out.result);
    1852             : 
    1853           0 :         status = dcerpc_wkssvc_NetrWkstaTransportDel_r(h, mem_ctx, &r);
    1854           0 :         if (!NT_STATUS_IS_OK(status)) {
    1855           0 :                 return status;
    1856             :         }
    1857             : 
    1858             :         /* Return variables */
    1859             : 
    1860             :         /* Return result */
    1861           0 :         *result = r.out.result;
    1862             : 
    1863           0 :         return NT_STATUS_OK;
    1864             : }
    1865             : 
    1866             : struct dcerpc_wkssvc_NetrUseAdd_r_state {
    1867             :         TALLOC_CTX *out_mem_ctx;
    1868             : };
    1869             : 
    1870             : static void dcerpc_wkssvc_NetrUseAdd_r_done(struct tevent_req *subreq);
    1871             : 
    1872           0 : struct tevent_req *dcerpc_wkssvc_NetrUseAdd_r_send(TALLOC_CTX *mem_ctx,
    1873             :         struct tevent_context *ev,
    1874             :         struct dcerpc_binding_handle *h,
    1875             :         struct wkssvc_NetrUseAdd *r)
    1876             : {
    1877             :         struct tevent_req *req;
    1878             :         struct dcerpc_wkssvc_NetrUseAdd_r_state *state;
    1879             :         struct tevent_req *subreq;
    1880             : 
    1881           0 :         req = tevent_req_create(mem_ctx, &state,
    1882             :                                 struct dcerpc_wkssvc_NetrUseAdd_r_state);
    1883           0 :         if (req == NULL) {
    1884           0 :                 return NULL;
    1885             :         }
    1886             : 
    1887           0 :         state->out_mem_ctx = talloc_new(state);
    1888           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1889           0 :                 return tevent_req_post(req, ev);
    1890             :         }
    1891             : 
    1892           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1893             :                         NULL, &ndr_table_wkssvc,
    1894           0 :                         NDR_WKSSVC_NETRUSEADD, state->out_mem_ctx, r);
    1895           0 :         if (tevent_req_nomem(subreq, req)) {
    1896           0 :                 return tevent_req_post(req, ev);
    1897             :         }
    1898           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUseAdd_r_done, req);
    1899             : 
    1900           0 :         return req;
    1901             : }
    1902             : 
    1903           0 : static void dcerpc_wkssvc_NetrUseAdd_r_done(struct tevent_req *subreq)
    1904             : {
    1905           0 :         struct tevent_req *req =
    1906           0 :                 tevent_req_callback_data(subreq,
    1907             :                 struct tevent_req);
    1908             :         NTSTATUS status;
    1909             : 
    1910           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1911           0 :         TALLOC_FREE(subreq);
    1912           0 :         if (tevent_req_nterror(req, status)) {
    1913           0 :                 return;
    1914             :         }
    1915             : 
    1916           0 :         tevent_req_done(req);
    1917             : }
    1918             : 
    1919           0 : NTSTATUS dcerpc_wkssvc_NetrUseAdd_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1920             : {
    1921           0 :         struct dcerpc_wkssvc_NetrUseAdd_r_state *state =
    1922           0 :                 tevent_req_data(req,
    1923             :                 struct dcerpc_wkssvc_NetrUseAdd_r_state);
    1924             :         NTSTATUS status;
    1925             : 
    1926           0 :         if (tevent_req_is_nterror(req, &status)) {
    1927           0 :                 tevent_req_received(req);
    1928           0 :                 return status;
    1929             :         }
    1930             : 
    1931           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1932             : 
    1933           0 :         tevent_req_received(req);
    1934           0 :         return NT_STATUS_OK;
    1935             : }
    1936             : 
    1937           5 : NTSTATUS dcerpc_wkssvc_NetrUseAdd_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrUseAdd *r)
    1938             : {
    1939             :         NTSTATUS status;
    1940             : 
    1941           5 :         status = dcerpc_binding_handle_call(h,
    1942             :                         NULL, &ndr_table_wkssvc,
    1943             :                         NDR_WKSSVC_NETRUSEADD, mem_ctx, r);
    1944             : 
    1945           5 :         return status;
    1946             : }
    1947             : 
    1948             : struct dcerpc_wkssvc_NetrUseAdd_state {
    1949             :         struct wkssvc_NetrUseAdd orig;
    1950             :         struct wkssvc_NetrUseAdd tmp;
    1951             :         TALLOC_CTX *out_mem_ctx;
    1952             : };
    1953             : 
    1954             : static void dcerpc_wkssvc_NetrUseAdd_done(struct tevent_req *subreq);
    1955             : 
    1956           0 : struct tevent_req *dcerpc_wkssvc_NetrUseAdd_send(TALLOC_CTX *mem_ctx,
    1957             :                                                  struct tevent_context *ev,
    1958             :                                                  struct dcerpc_binding_handle *h,
    1959             :                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    1960             :                                                  uint32_t _level /* [in]  */,
    1961             :                                                  union wkssvc_NetrUseGetInfoCtr *_ctr /* [in] [ref,switch_is(level)] */,
    1962             :                                                  uint32_t *_parm_err /* [in,out] [unique] */)
    1963             : {
    1964             :         struct tevent_req *req;
    1965             :         struct dcerpc_wkssvc_NetrUseAdd_state *state;
    1966             :         struct tevent_req *subreq;
    1967             : 
    1968           0 :         req = tevent_req_create(mem_ctx, &state,
    1969             :                                 struct dcerpc_wkssvc_NetrUseAdd_state);
    1970           0 :         if (req == NULL) {
    1971           0 :                 return NULL;
    1972             :         }
    1973           0 :         state->out_mem_ctx = NULL;
    1974             : 
    1975             :         /* In parameters */
    1976           0 :         state->orig.in.server_name = _server_name;
    1977           0 :         state->orig.in.level = _level;
    1978           0 :         state->orig.in.ctr = _ctr;
    1979           0 :         state->orig.in.parm_err = _parm_err;
    1980             : 
    1981             :         /* Out parameters */
    1982           0 :         state->orig.out.parm_err = _parm_err;
    1983             : 
    1984             :         /* Result */
    1985           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1986             : 
    1987           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1988             :                              "dcerpc_wkssvc_NetrUseAdd_out_memory");
    1989           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1990           0 :                 return tevent_req_post(req, ev);
    1991             :         }
    1992             : 
    1993             :         /* make a temporary copy, that we pass to the dispatch function */
    1994           0 :         state->tmp = state->orig;
    1995             : 
    1996           0 :         subreq = dcerpc_wkssvc_NetrUseAdd_r_send(state, ev, h, &state->tmp);
    1997           0 :         if (tevent_req_nomem(subreq, req)) {
    1998           0 :                 return tevent_req_post(req, ev);
    1999             :         }
    2000           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUseAdd_done, req);
    2001           0 :         return req;
    2002             : }
    2003             : 
    2004           0 : static void dcerpc_wkssvc_NetrUseAdd_done(struct tevent_req *subreq)
    2005             : {
    2006           0 :         struct tevent_req *req = tevent_req_callback_data(
    2007             :                 subreq, struct tevent_req);
    2008           0 :         struct dcerpc_wkssvc_NetrUseAdd_state *state = tevent_req_data(
    2009             :                 req, struct dcerpc_wkssvc_NetrUseAdd_state);
    2010             :         NTSTATUS status;
    2011             :         TALLOC_CTX *mem_ctx;
    2012             : 
    2013           0 :         if (state->out_mem_ctx) {
    2014           0 :                 mem_ctx = state->out_mem_ctx;
    2015             :         } else {
    2016           0 :                 mem_ctx = state;
    2017             :         }
    2018             : 
    2019           0 :         status = dcerpc_wkssvc_NetrUseAdd_r_recv(subreq, mem_ctx);
    2020           0 :         TALLOC_FREE(subreq);
    2021           0 :         if (tevent_req_nterror(req, status)) {
    2022           0 :                 return;
    2023             :         }
    2024             : 
    2025             :         /* Copy out parameters */
    2026           0 :         if (state->orig.out.parm_err && state->tmp.out.parm_err) {
    2027           0 :                 *state->orig.out.parm_err = *state->tmp.out.parm_err;
    2028             :         }
    2029             : 
    2030             :         /* Copy result */
    2031           0 :         state->orig.out.result = state->tmp.out.result;
    2032             : 
    2033             :         /* Reset temporary structure */
    2034           0 :         NDR_ZERO_STRUCT(state->tmp);
    2035             : 
    2036           0 :         tevent_req_done(req);
    2037             : }
    2038             : 
    2039           0 : NTSTATUS dcerpc_wkssvc_NetrUseAdd_recv(struct tevent_req *req,
    2040             :                                        TALLOC_CTX *mem_ctx,
    2041             :                                        WERROR *result)
    2042             : {
    2043           0 :         struct dcerpc_wkssvc_NetrUseAdd_state *state = tevent_req_data(
    2044             :                 req, struct dcerpc_wkssvc_NetrUseAdd_state);
    2045             :         NTSTATUS status;
    2046             : 
    2047           0 :         if (tevent_req_is_nterror(req, &status)) {
    2048           0 :                 tevent_req_received(req);
    2049           0 :                 return status;
    2050             :         }
    2051             : 
    2052             :         /* Steal possible out parameters to the callers context */
    2053           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2054             : 
    2055             :         /* Return result */
    2056           0 :         *result = state->orig.out.result;
    2057             : 
    2058           0 :         tevent_req_received(req);
    2059           0 :         return NT_STATUS_OK;
    2060             : }
    2061             : 
    2062           0 : NTSTATUS dcerpc_wkssvc_NetrUseAdd(struct dcerpc_binding_handle *h,
    2063             :                                   TALLOC_CTX *mem_ctx,
    2064             :                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
    2065             :                                   uint32_t _level /* [in]  */,
    2066             :                                   union wkssvc_NetrUseGetInfoCtr *_ctr /* [in] [ref,switch_is(level)] */,
    2067             :                                   uint32_t *_parm_err /* [in,out] [unique] */,
    2068             :                                   WERROR *result)
    2069             : {
    2070             :         struct wkssvc_NetrUseAdd r;
    2071             :         NTSTATUS status;
    2072             : 
    2073             :         /* In parameters */
    2074           0 :         r.in.server_name = _server_name;
    2075           0 :         r.in.level = _level;
    2076           0 :         r.in.ctr = _ctr;
    2077           0 :         r.in.parm_err = _parm_err;
    2078             : 
    2079             :         /* Out parameters */
    2080           0 :         r.out.parm_err = _parm_err;
    2081             : 
    2082             :         /* Result */
    2083           0 :         NDR_ZERO_STRUCT(r.out.result);
    2084             : 
    2085           0 :         status = dcerpc_wkssvc_NetrUseAdd_r(h, mem_ctx, &r);
    2086           0 :         if (!NT_STATUS_IS_OK(status)) {
    2087           0 :                 return status;
    2088             :         }
    2089             : 
    2090             :         /* Return variables */
    2091           0 :         if (_parm_err && r.out.parm_err) {
    2092           0 :                 *_parm_err = *r.out.parm_err;
    2093             :         }
    2094             : 
    2095             :         /* Return result */
    2096           0 :         *result = r.out.result;
    2097             : 
    2098           0 :         return NT_STATUS_OK;
    2099             : }
    2100             : 
    2101             : struct dcerpc_wkssvc_NetrUseGetInfo_r_state {
    2102             :         TALLOC_CTX *out_mem_ctx;
    2103             : };
    2104             : 
    2105             : static void dcerpc_wkssvc_NetrUseGetInfo_r_done(struct tevent_req *subreq);
    2106             : 
    2107           0 : struct tevent_req *dcerpc_wkssvc_NetrUseGetInfo_r_send(TALLOC_CTX *mem_ctx,
    2108             :         struct tevent_context *ev,
    2109             :         struct dcerpc_binding_handle *h,
    2110             :         struct wkssvc_NetrUseGetInfo *r)
    2111             : {
    2112             :         struct tevent_req *req;
    2113             :         struct dcerpc_wkssvc_NetrUseGetInfo_r_state *state;
    2114             :         struct tevent_req *subreq;
    2115             : 
    2116           0 :         req = tevent_req_create(mem_ctx, &state,
    2117             :                                 struct dcerpc_wkssvc_NetrUseGetInfo_r_state);
    2118           0 :         if (req == NULL) {
    2119           0 :                 return NULL;
    2120             :         }
    2121             : 
    2122           0 :         state->out_mem_ctx = talloc_new(state);
    2123           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2124           0 :                 return tevent_req_post(req, ev);
    2125             :         }
    2126             : 
    2127           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2128             :                         NULL, &ndr_table_wkssvc,
    2129           0 :                         NDR_WKSSVC_NETRUSEGETINFO, state->out_mem_ctx, r);
    2130           0 :         if (tevent_req_nomem(subreq, req)) {
    2131           0 :                 return tevent_req_post(req, ev);
    2132             :         }
    2133           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUseGetInfo_r_done, req);
    2134             : 
    2135           0 :         return req;
    2136             : }
    2137             : 
    2138           0 : static void dcerpc_wkssvc_NetrUseGetInfo_r_done(struct tevent_req *subreq)
    2139             : {
    2140           0 :         struct tevent_req *req =
    2141           0 :                 tevent_req_callback_data(subreq,
    2142             :                 struct tevent_req);
    2143             :         NTSTATUS status;
    2144             : 
    2145           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2146           0 :         TALLOC_FREE(subreq);
    2147           0 :         if (tevent_req_nterror(req, status)) {
    2148           0 :                 return;
    2149             :         }
    2150             : 
    2151           0 :         tevent_req_done(req);
    2152             : }
    2153             : 
    2154           0 : NTSTATUS dcerpc_wkssvc_NetrUseGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2155             : {
    2156           0 :         struct dcerpc_wkssvc_NetrUseGetInfo_r_state *state =
    2157           0 :                 tevent_req_data(req,
    2158             :                 struct dcerpc_wkssvc_NetrUseGetInfo_r_state);
    2159             :         NTSTATUS status;
    2160             : 
    2161           0 :         if (tevent_req_is_nterror(req, &status)) {
    2162           0 :                 tevent_req_received(req);
    2163           0 :                 return status;
    2164             :         }
    2165             : 
    2166           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2167             : 
    2168           0 :         tevent_req_received(req);
    2169           0 :         return NT_STATUS_OK;
    2170             : }
    2171             : 
    2172           0 : NTSTATUS dcerpc_wkssvc_NetrUseGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrUseGetInfo *r)
    2173             : {
    2174             :         NTSTATUS status;
    2175             : 
    2176           0 :         status = dcerpc_binding_handle_call(h,
    2177             :                         NULL, &ndr_table_wkssvc,
    2178             :                         NDR_WKSSVC_NETRUSEGETINFO, mem_ctx, r);
    2179             : 
    2180           0 :         return status;
    2181             : }
    2182             : 
    2183             : struct dcerpc_wkssvc_NetrUseGetInfo_state {
    2184             :         struct wkssvc_NetrUseGetInfo orig;
    2185             :         struct wkssvc_NetrUseGetInfo tmp;
    2186             :         TALLOC_CTX *out_mem_ctx;
    2187             : };
    2188             : 
    2189             : static void dcerpc_wkssvc_NetrUseGetInfo_done(struct tevent_req *subreq);
    2190             : 
    2191           0 : struct tevent_req *dcerpc_wkssvc_NetrUseGetInfo_send(TALLOC_CTX *mem_ctx,
    2192             :                                                      struct tevent_context *ev,
    2193             :                                                      struct dcerpc_binding_handle *h,
    2194             :                                                      const char *_server_name /* [in] [charset(UTF16),unique] */,
    2195             :                                                      const char *_use_name /* [in] [charset(UTF16),ref] */,
    2196             :                                                      uint32_t _level /* [in]  */,
    2197             :                                                      union wkssvc_NetrUseGetInfoCtr *_ctr /* [out] [ref,switch_is(level)] */)
    2198             : {
    2199             :         struct tevent_req *req;
    2200             :         struct dcerpc_wkssvc_NetrUseGetInfo_state *state;
    2201             :         struct tevent_req *subreq;
    2202             : 
    2203           0 :         req = tevent_req_create(mem_ctx, &state,
    2204             :                                 struct dcerpc_wkssvc_NetrUseGetInfo_state);
    2205           0 :         if (req == NULL) {
    2206           0 :                 return NULL;
    2207             :         }
    2208           0 :         state->out_mem_ctx = NULL;
    2209             : 
    2210             :         /* In parameters */
    2211           0 :         state->orig.in.server_name = _server_name;
    2212           0 :         state->orig.in.use_name = _use_name;
    2213           0 :         state->orig.in.level = _level;
    2214             : 
    2215             :         /* Out parameters */
    2216           0 :         state->orig.out.ctr = _ctr;
    2217             : 
    2218             :         /* Result */
    2219           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2220             : 
    2221           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2222             :                              "dcerpc_wkssvc_NetrUseGetInfo_out_memory");
    2223           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2224           0 :                 return tevent_req_post(req, ev);
    2225             :         }
    2226             : 
    2227             :         /* make a temporary copy, that we pass to the dispatch function */
    2228           0 :         state->tmp = state->orig;
    2229             : 
    2230           0 :         subreq = dcerpc_wkssvc_NetrUseGetInfo_r_send(state, ev, h, &state->tmp);
    2231           0 :         if (tevent_req_nomem(subreq, req)) {
    2232           0 :                 return tevent_req_post(req, ev);
    2233             :         }
    2234           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUseGetInfo_done, req);
    2235           0 :         return req;
    2236             : }
    2237             : 
    2238           0 : static void dcerpc_wkssvc_NetrUseGetInfo_done(struct tevent_req *subreq)
    2239             : {
    2240           0 :         struct tevent_req *req = tevent_req_callback_data(
    2241             :                 subreq, struct tevent_req);
    2242           0 :         struct dcerpc_wkssvc_NetrUseGetInfo_state *state = tevent_req_data(
    2243             :                 req, struct dcerpc_wkssvc_NetrUseGetInfo_state);
    2244             :         NTSTATUS status;
    2245             :         TALLOC_CTX *mem_ctx;
    2246             : 
    2247           0 :         if (state->out_mem_ctx) {
    2248           0 :                 mem_ctx = state->out_mem_ctx;
    2249             :         } else {
    2250           0 :                 mem_ctx = state;
    2251             :         }
    2252             : 
    2253           0 :         status = dcerpc_wkssvc_NetrUseGetInfo_r_recv(subreq, mem_ctx);
    2254           0 :         TALLOC_FREE(subreq);
    2255           0 :         if (tevent_req_nterror(req, status)) {
    2256           0 :                 return;
    2257             :         }
    2258             : 
    2259             :         /* Copy out parameters */
    2260           0 :         *state->orig.out.ctr = *state->tmp.out.ctr;
    2261             : 
    2262             :         /* Copy result */
    2263           0 :         state->orig.out.result = state->tmp.out.result;
    2264             : 
    2265             :         /* Reset temporary structure */
    2266           0 :         NDR_ZERO_STRUCT(state->tmp);
    2267             : 
    2268           0 :         tevent_req_done(req);
    2269             : }
    2270             : 
    2271           0 : NTSTATUS dcerpc_wkssvc_NetrUseGetInfo_recv(struct tevent_req *req,
    2272             :                                            TALLOC_CTX *mem_ctx,
    2273             :                                            WERROR *result)
    2274             : {
    2275           0 :         struct dcerpc_wkssvc_NetrUseGetInfo_state *state = tevent_req_data(
    2276             :                 req, struct dcerpc_wkssvc_NetrUseGetInfo_state);
    2277             :         NTSTATUS status;
    2278             : 
    2279           0 :         if (tevent_req_is_nterror(req, &status)) {
    2280           0 :                 tevent_req_received(req);
    2281           0 :                 return status;
    2282             :         }
    2283             : 
    2284             :         /* Steal possible out parameters to the callers context */
    2285           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2286             : 
    2287             :         /* Return result */
    2288           0 :         *result = state->orig.out.result;
    2289             : 
    2290           0 :         tevent_req_received(req);
    2291           0 :         return NT_STATUS_OK;
    2292             : }
    2293             : 
    2294           0 : NTSTATUS dcerpc_wkssvc_NetrUseGetInfo(struct dcerpc_binding_handle *h,
    2295             :                                       TALLOC_CTX *mem_ctx,
    2296             :                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
    2297             :                                       const char *_use_name /* [in] [charset(UTF16),ref] */,
    2298             :                                       uint32_t _level /* [in]  */,
    2299             :                                       union wkssvc_NetrUseGetInfoCtr *_ctr /* [out] [ref,switch_is(level)] */,
    2300             :                                       WERROR *result)
    2301             : {
    2302             :         struct wkssvc_NetrUseGetInfo r;
    2303             :         NTSTATUS status;
    2304             : 
    2305             :         /* In parameters */
    2306           0 :         r.in.server_name = _server_name;
    2307           0 :         r.in.use_name = _use_name;
    2308           0 :         r.in.level = _level;
    2309             : 
    2310             :         /* Out parameters */
    2311           0 :         r.out.ctr = _ctr;
    2312             : 
    2313             :         /* Result */
    2314           0 :         NDR_ZERO_STRUCT(r.out.result);
    2315             : 
    2316           0 :         status = dcerpc_wkssvc_NetrUseGetInfo_r(h, mem_ctx, &r);
    2317           0 :         if (!NT_STATUS_IS_OK(status)) {
    2318           0 :                 return status;
    2319             :         }
    2320             : 
    2321             :         /* Return variables */
    2322           0 :         *_ctr = *r.out.ctr;
    2323             : 
    2324             :         /* Return result */
    2325           0 :         *result = r.out.result;
    2326             : 
    2327           0 :         return NT_STATUS_OK;
    2328             : }
    2329             : 
    2330             : struct dcerpc_wkssvc_NetrUseDel_r_state {
    2331             :         TALLOC_CTX *out_mem_ctx;
    2332             : };
    2333             : 
    2334             : static void dcerpc_wkssvc_NetrUseDel_r_done(struct tevent_req *subreq);
    2335             : 
    2336           0 : struct tevent_req *dcerpc_wkssvc_NetrUseDel_r_send(TALLOC_CTX *mem_ctx,
    2337             :         struct tevent_context *ev,
    2338             :         struct dcerpc_binding_handle *h,
    2339             :         struct wkssvc_NetrUseDel *r)
    2340             : {
    2341             :         struct tevent_req *req;
    2342             :         struct dcerpc_wkssvc_NetrUseDel_r_state *state;
    2343             :         struct tevent_req *subreq;
    2344             : 
    2345           0 :         req = tevent_req_create(mem_ctx, &state,
    2346             :                                 struct dcerpc_wkssvc_NetrUseDel_r_state);
    2347           0 :         if (req == NULL) {
    2348           0 :                 return NULL;
    2349             :         }
    2350             : 
    2351           0 :         state->out_mem_ctx = NULL;
    2352             : 
    2353           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2354             :                         NULL, &ndr_table_wkssvc,
    2355             :                         NDR_WKSSVC_NETRUSEDEL, state, r);
    2356           0 :         if (tevent_req_nomem(subreq, req)) {
    2357           0 :                 return tevent_req_post(req, ev);
    2358             :         }
    2359           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUseDel_r_done, req);
    2360             : 
    2361           0 :         return req;
    2362             : }
    2363             : 
    2364           0 : static void dcerpc_wkssvc_NetrUseDel_r_done(struct tevent_req *subreq)
    2365             : {
    2366           0 :         struct tevent_req *req =
    2367           0 :                 tevent_req_callback_data(subreq,
    2368             :                 struct tevent_req);
    2369             :         NTSTATUS status;
    2370             : 
    2371           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2372           0 :         TALLOC_FREE(subreq);
    2373           0 :         if (tevent_req_nterror(req, status)) {
    2374           0 :                 return;
    2375             :         }
    2376             : 
    2377           0 :         tevent_req_done(req);
    2378             : }
    2379             : 
    2380           0 : NTSTATUS dcerpc_wkssvc_NetrUseDel_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2381             : {
    2382           0 :         struct dcerpc_wkssvc_NetrUseDel_r_state *state =
    2383           0 :                 tevent_req_data(req,
    2384             :                 struct dcerpc_wkssvc_NetrUseDel_r_state);
    2385             :         NTSTATUS status;
    2386             : 
    2387           0 :         if (tevent_req_is_nterror(req, &status)) {
    2388           0 :                 tevent_req_received(req);
    2389           0 :                 return status;
    2390             :         }
    2391             : 
    2392           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2393             : 
    2394           0 :         tevent_req_received(req);
    2395           0 :         return NT_STATUS_OK;
    2396             : }
    2397             : 
    2398           5 : NTSTATUS dcerpc_wkssvc_NetrUseDel_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrUseDel *r)
    2399             : {
    2400             :         NTSTATUS status;
    2401             : 
    2402           5 :         status = dcerpc_binding_handle_call(h,
    2403             :                         NULL, &ndr_table_wkssvc,
    2404             :                         NDR_WKSSVC_NETRUSEDEL, mem_ctx, r);
    2405             : 
    2406           5 :         return status;
    2407             : }
    2408             : 
    2409             : struct dcerpc_wkssvc_NetrUseDel_state {
    2410             :         struct wkssvc_NetrUseDel orig;
    2411             :         struct wkssvc_NetrUseDel tmp;
    2412             :         TALLOC_CTX *out_mem_ctx;
    2413             : };
    2414             : 
    2415             : static void dcerpc_wkssvc_NetrUseDel_done(struct tevent_req *subreq);
    2416             : 
    2417           0 : struct tevent_req *dcerpc_wkssvc_NetrUseDel_send(TALLOC_CTX *mem_ctx,
    2418             :                                                  struct tevent_context *ev,
    2419             :                                                  struct dcerpc_binding_handle *h,
    2420             :                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    2421             :                                                  const char *_use_name /* [in] [charset(UTF16),ref] */,
    2422             :                                                  uint32_t _force_cond /* [in]  */)
    2423             : {
    2424             :         struct tevent_req *req;
    2425             :         struct dcerpc_wkssvc_NetrUseDel_state *state;
    2426             :         struct tevent_req *subreq;
    2427             : 
    2428           0 :         req = tevent_req_create(mem_ctx, &state,
    2429             :                                 struct dcerpc_wkssvc_NetrUseDel_state);
    2430           0 :         if (req == NULL) {
    2431           0 :                 return NULL;
    2432             :         }
    2433           0 :         state->out_mem_ctx = NULL;
    2434             : 
    2435             :         /* In parameters */
    2436           0 :         state->orig.in.server_name = _server_name;
    2437           0 :         state->orig.in.use_name = _use_name;
    2438           0 :         state->orig.in.force_cond = _force_cond;
    2439             : 
    2440             :         /* Out parameters */
    2441             : 
    2442             :         /* Result */
    2443           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2444             : 
    2445             :         /* make a temporary copy, that we pass to the dispatch function */
    2446           0 :         state->tmp = state->orig;
    2447             : 
    2448           0 :         subreq = dcerpc_wkssvc_NetrUseDel_r_send(state, ev, h, &state->tmp);
    2449           0 :         if (tevent_req_nomem(subreq, req)) {
    2450           0 :                 return tevent_req_post(req, ev);
    2451             :         }
    2452           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUseDel_done, req);
    2453           0 :         return req;
    2454             : }
    2455             : 
    2456           0 : static void dcerpc_wkssvc_NetrUseDel_done(struct tevent_req *subreq)
    2457             : {
    2458           0 :         struct tevent_req *req = tevent_req_callback_data(
    2459             :                 subreq, struct tevent_req);
    2460           0 :         struct dcerpc_wkssvc_NetrUseDel_state *state = tevent_req_data(
    2461             :                 req, struct dcerpc_wkssvc_NetrUseDel_state);
    2462             :         NTSTATUS status;
    2463             :         TALLOC_CTX *mem_ctx;
    2464             : 
    2465           0 :         if (state->out_mem_ctx) {
    2466           0 :                 mem_ctx = state->out_mem_ctx;
    2467             :         } else {
    2468           0 :                 mem_ctx = state;
    2469             :         }
    2470             : 
    2471           0 :         status = dcerpc_wkssvc_NetrUseDel_r_recv(subreq, mem_ctx);
    2472           0 :         TALLOC_FREE(subreq);
    2473           0 :         if (tevent_req_nterror(req, status)) {
    2474           0 :                 return;
    2475             :         }
    2476             : 
    2477             :         /* Copy out parameters */
    2478             : 
    2479             :         /* Copy result */
    2480           0 :         state->orig.out.result = state->tmp.out.result;
    2481             : 
    2482             :         /* Reset temporary structure */
    2483           0 :         NDR_ZERO_STRUCT(state->tmp);
    2484             : 
    2485           0 :         tevent_req_done(req);
    2486             : }
    2487             : 
    2488           0 : NTSTATUS dcerpc_wkssvc_NetrUseDel_recv(struct tevent_req *req,
    2489             :                                        TALLOC_CTX *mem_ctx,
    2490             :                                        WERROR *result)
    2491             : {
    2492           0 :         struct dcerpc_wkssvc_NetrUseDel_state *state = tevent_req_data(
    2493             :                 req, struct dcerpc_wkssvc_NetrUseDel_state);
    2494             :         NTSTATUS status;
    2495             : 
    2496           0 :         if (tevent_req_is_nterror(req, &status)) {
    2497           0 :                 tevent_req_received(req);
    2498           0 :                 return status;
    2499             :         }
    2500             : 
    2501             :         /* Steal possible out parameters to the callers context */
    2502           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2503             : 
    2504             :         /* Return result */
    2505           0 :         *result = state->orig.out.result;
    2506             : 
    2507           0 :         tevent_req_received(req);
    2508           0 :         return NT_STATUS_OK;
    2509             : }
    2510             : 
    2511           0 : NTSTATUS dcerpc_wkssvc_NetrUseDel(struct dcerpc_binding_handle *h,
    2512             :                                   TALLOC_CTX *mem_ctx,
    2513             :                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
    2514             :                                   const char *_use_name /* [in] [charset(UTF16),ref] */,
    2515             :                                   uint32_t _force_cond /* [in]  */,
    2516             :                                   WERROR *result)
    2517             : {
    2518             :         struct wkssvc_NetrUseDel r;
    2519             :         NTSTATUS status;
    2520             : 
    2521             :         /* In parameters */
    2522           0 :         r.in.server_name = _server_name;
    2523           0 :         r.in.use_name = _use_name;
    2524           0 :         r.in.force_cond = _force_cond;
    2525             : 
    2526             :         /* Out parameters */
    2527             : 
    2528             :         /* Result */
    2529           0 :         NDR_ZERO_STRUCT(r.out.result);
    2530             : 
    2531           0 :         status = dcerpc_wkssvc_NetrUseDel_r(h, mem_ctx, &r);
    2532           0 :         if (!NT_STATUS_IS_OK(status)) {
    2533           0 :                 return status;
    2534             :         }
    2535             : 
    2536             :         /* Return variables */
    2537             : 
    2538             :         /* Return result */
    2539           0 :         *result = r.out.result;
    2540             : 
    2541           0 :         return NT_STATUS_OK;
    2542             : }
    2543             : 
    2544             : struct dcerpc_wkssvc_NetrUseEnum_r_state {
    2545             :         TALLOC_CTX *out_mem_ctx;
    2546             : };
    2547             : 
    2548             : static void dcerpc_wkssvc_NetrUseEnum_r_done(struct tevent_req *subreq);
    2549             : 
    2550           0 : struct tevent_req *dcerpc_wkssvc_NetrUseEnum_r_send(TALLOC_CTX *mem_ctx,
    2551             :         struct tevent_context *ev,
    2552             :         struct dcerpc_binding_handle *h,
    2553             :         struct wkssvc_NetrUseEnum *r)
    2554             : {
    2555             :         struct tevent_req *req;
    2556             :         struct dcerpc_wkssvc_NetrUseEnum_r_state *state;
    2557             :         struct tevent_req *subreq;
    2558             : 
    2559           0 :         req = tevent_req_create(mem_ctx, &state,
    2560             :                                 struct dcerpc_wkssvc_NetrUseEnum_r_state);
    2561           0 :         if (req == NULL) {
    2562           0 :                 return NULL;
    2563             :         }
    2564             : 
    2565           0 :         state->out_mem_ctx = talloc_new(state);
    2566           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2567           0 :                 return tevent_req_post(req, ev);
    2568             :         }
    2569             : 
    2570           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2571             :                         NULL, &ndr_table_wkssvc,
    2572           0 :                         NDR_WKSSVC_NETRUSEENUM, state->out_mem_ctx, r);
    2573           0 :         if (tevent_req_nomem(subreq, req)) {
    2574           0 :                 return tevent_req_post(req, ev);
    2575             :         }
    2576           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUseEnum_r_done, req);
    2577             : 
    2578           0 :         return req;
    2579             : }
    2580             : 
    2581           0 : static void dcerpc_wkssvc_NetrUseEnum_r_done(struct tevent_req *subreq)
    2582             : {
    2583           0 :         struct tevent_req *req =
    2584           0 :                 tevent_req_callback_data(subreq,
    2585             :                 struct tevent_req);
    2586             :         NTSTATUS status;
    2587             : 
    2588           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2589           0 :         TALLOC_FREE(subreq);
    2590           0 :         if (tevent_req_nterror(req, status)) {
    2591           0 :                 return;
    2592             :         }
    2593             : 
    2594           0 :         tevent_req_done(req);
    2595             : }
    2596             : 
    2597           0 : NTSTATUS dcerpc_wkssvc_NetrUseEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2598             : {
    2599           0 :         struct dcerpc_wkssvc_NetrUseEnum_r_state *state =
    2600           0 :                 tevent_req_data(req,
    2601             :                 struct dcerpc_wkssvc_NetrUseEnum_r_state);
    2602             :         NTSTATUS status;
    2603             : 
    2604           0 :         if (tevent_req_is_nterror(req, &status)) {
    2605           0 :                 tevent_req_received(req);
    2606           0 :                 return status;
    2607             :         }
    2608             : 
    2609           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2610             : 
    2611           0 :         tevent_req_received(req);
    2612           0 :         return NT_STATUS_OK;
    2613             : }
    2614             : 
    2615          10 : NTSTATUS dcerpc_wkssvc_NetrUseEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrUseEnum *r)
    2616             : {
    2617             :         NTSTATUS status;
    2618             : 
    2619          10 :         status = dcerpc_binding_handle_call(h,
    2620             :                         NULL, &ndr_table_wkssvc,
    2621             :                         NDR_WKSSVC_NETRUSEENUM, mem_ctx, r);
    2622             : 
    2623          10 :         return status;
    2624             : }
    2625             : 
    2626             : struct dcerpc_wkssvc_NetrUseEnum_state {
    2627             :         struct wkssvc_NetrUseEnum orig;
    2628             :         struct wkssvc_NetrUseEnum tmp;
    2629             :         TALLOC_CTX *out_mem_ctx;
    2630             : };
    2631             : 
    2632             : static void dcerpc_wkssvc_NetrUseEnum_done(struct tevent_req *subreq);
    2633             : 
    2634           0 : struct tevent_req *dcerpc_wkssvc_NetrUseEnum_send(TALLOC_CTX *mem_ctx,
    2635             :                                                   struct tevent_context *ev,
    2636             :                                                   struct dcerpc_binding_handle *h,
    2637             :                                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
    2638             :                                                   struct wkssvc_NetrUseEnumInfo *_info /* [in,out] [ref] */,
    2639             :                                                   uint32_t _prefmaxlen /* [in]  */,
    2640             :                                                   uint32_t *_entries_read /* [out] [ref] */,
    2641             :                                                   uint32_t *_resume_handle /* [in,out] [unique] */)
    2642             : {
    2643             :         struct tevent_req *req;
    2644             :         struct dcerpc_wkssvc_NetrUseEnum_state *state;
    2645             :         struct tevent_req *subreq;
    2646             : 
    2647           0 :         req = tevent_req_create(mem_ctx, &state,
    2648             :                                 struct dcerpc_wkssvc_NetrUseEnum_state);
    2649           0 :         if (req == NULL) {
    2650           0 :                 return NULL;
    2651             :         }
    2652           0 :         state->out_mem_ctx = NULL;
    2653             : 
    2654             :         /* In parameters */
    2655           0 :         state->orig.in.server_name = _server_name;
    2656           0 :         state->orig.in.info = _info;
    2657           0 :         state->orig.in.prefmaxlen = _prefmaxlen;
    2658           0 :         state->orig.in.resume_handle = _resume_handle;
    2659             : 
    2660             :         /* Out parameters */
    2661           0 :         state->orig.out.info = _info;
    2662           0 :         state->orig.out.entries_read = _entries_read;
    2663           0 :         state->orig.out.resume_handle = _resume_handle;
    2664             : 
    2665             :         /* Result */
    2666           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2667             : 
    2668           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2669             :                              "dcerpc_wkssvc_NetrUseEnum_out_memory");
    2670           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2671           0 :                 return tevent_req_post(req, ev);
    2672             :         }
    2673             : 
    2674             :         /* make a temporary copy, that we pass to the dispatch function */
    2675           0 :         state->tmp = state->orig;
    2676             : 
    2677           0 :         subreq = dcerpc_wkssvc_NetrUseEnum_r_send(state, ev, h, &state->tmp);
    2678           0 :         if (tevent_req_nomem(subreq, req)) {
    2679           0 :                 return tevent_req_post(req, ev);
    2680             :         }
    2681           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUseEnum_done, req);
    2682           0 :         return req;
    2683             : }
    2684             : 
    2685           0 : static void dcerpc_wkssvc_NetrUseEnum_done(struct tevent_req *subreq)
    2686             : {
    2687           0 :         struct tevent_req *req = tevent_req_callback_data(
    2688             :                 subreq, struct tevent_req);
    2689           0 :         struct dcerpc_wkssvc_NetrUseEnum_state *state = tevent_req_data(
    2690             :                 req, struct dcerpc_wkssvc_NetrUseEnum_state);
    2691             :         NTSTATUS status;
    2692             :         TALLOC_CTX *mem_ctx;
    2693             : 
    2694           0 :         if (state->out_mem_ctx) {
    2695           0 :                 mem_ctx = state->out_mem_ctx;
    2696             :         } else {
    2697           0 :                 mem_ctx = state;
    2698             :         }
    2699             : 
    2700           0 :         status = dcerpc_wkssvc_NetrUseEnum_r_recv(subreq, mem_ctx);
    2701           0 :         TALLOC_FREE(subreq);
    2702           0 :         if (tevent_req_nterror(req, status)) {
    2703           0 :                 return;
    2704             :         }
    2705             : 
    2706             :         /* Copy out parameters */
    2707           0 :         *state->orig.out.info = *state->tmp.out.info;
    2708           0 :         *state->orig.out.entries_read = *state->tmp.out.entries_read;
    2709           0 :         if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
    2710           0 :                 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    2711             :         }
    2712             : 
    2713             :         /* Copy result */
    2714           0 :         state->orig.out.result = state->tmp.out.result;
    2715             : 
    2716             :         /* Reset temporary structure */
    2717           0 :         NDR_ZERO_STRUCT(state->tmp);
    2718             : 
    2719           0 :         tevent_req_done(req);
    2720             : }
    2721             : 
    2722           0 : NTSTATUS dcerpc_wkssvc_NetrUseEnum_recv(struct tevent_req *req,
    2723             :                                         TALLOC_CTX *mem_ctx,
    2724             :                                         WERROR *result)
    2725             : {
    2726           0 :         struct dcerpc_wkssvc_NetrUseEnum_state *state = tevent_req_data(
    2727             :                 req, struct dcerpc_wkssvc_NetrUseEnum_state);
    2728             :         NTSTATUS status;
    2729             : 
    2730           0 :         if (tevent_req_is_nterror(req, &status)) {
    2731           0 :                 tevent_req_received(req);
    2732           0 :                 return status;
    2733             :         }
    2734             : 
    2735             :         /* Steal possible out parameters to the callers context */
    2736           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2737             : 
    2738             :         /* Return result */
    2739           0 :         *result = state->orig.out.result;
    2740             : 
    2741           0 :         tevent_req_received(req);
    2742           0 :         return NT_STATUS_OK;
    2743             : }
    2744             : 
    2745           0 : NTSTATUS dcerpc_wkssvc_NetrUseEnum(struct dcerpc_binding_handle *h,
    2746             :                                    TALLOC_CTX *mem_ctx,
    2747             :                                    const char *_server_name /* [in] [charset(UTF16),unique] */,
    2748             :                                    struct wkssvc_NetrUseEnumInfo *_info /* [in,out] [ref] */,
    2749             :                                    uint32_t _prefmaxlen /* [in]  */,
    2750             :                                    uint32_t *_entries_read /* [out] [ref] */,
    2751             :                                    uint32_t *_resume_handle /* [in,out] [unique] */,
    2752             :                                    WERROR *result)
    2753             : {
    2754             :         struct wkssvc_NetrUseEnum r;
    2755             :         NTSTATUS status;
    2756             : 
    2757             :         /* In parameters */
    2758           0 :         r.in.server_name = _server_name;
    2759           0 :         r.in.info = _info;
    2760           0 :         r.in.prefmaxlen = _prefmaxlen;
    2761           0 :         r.in.resume_handle = _resume_handle;
    2762             : 
    2763             :         /* Out parameters */
    2764           0 :         r.out.info = _info;
    2765           0 :         r.out.entries_read = _entries_read;
    2766           0 :         r.out.resume_handle = _resume_handle;
    2767             : 
    2768             :         /* Result */
    2769           0 :         NDR_ZERO_STRUCT(r.out.result);
    2770             : 
    2771           0 :         status = dcerpc_wkssvc_NetrUseEnum_r(h, mem_ctx, &r);
    2772           0 :         if (!NT_STATUS_IS_OK(status)) {
    2773           0 :                 return status;
    2774             :         }
    2775             : 
    2776             :         /* Return variables */
    2777           0 :         *_info = *r.out.info;
    2778           0 :         *_entries_read = *r.out.entries_read;
    2779           0 :         if (_resume_handle && r.out.resume_handle) {
    2780           0 :                 *_resume_handle = *r.out.resume_handle;
    2781             :         }
    2782             : 
    2783             :         /* Return result */
    2784           0 :         *result = r.out.result;
    2785             : 
    2786           0 :         return NT_STATUS_OK;
    2787             : }
    2788             : 
    2789             : struct dcerpc_wkssvc_NetrMessageBufferSend_r_state {
    2790             :         TALLOC_CTX *out_mem_ctx;
    2791             : };
    2792             : 
    2793             : static void dcerpc_wkssvc_NetrMessageBufferSend_r_done(struct tevent_req *subreq);
    2794             : 
    2795           0 : struct tevent_req *dcerpc_wkssvc_NetrMessageBufferSend_r_send(TALLOC_CTX *mem_ctx,
    2796             :         struct tevent_context *ev,
    2797             :         struct dcerpc_binding_handle *h,
    2798             :         struct wkssvc_NetrMessageBufferSend *r)
    2799             : {
    2800             :         struct tevent_req *req;
    2801             :         struct dcerpc_wkssvc_NetrMessageBufferSend_r_state *state;
    2802             :         struct tevent_req *subreq;
    2803             : 
    2804           0 :         req = tevent_req_create(mem_ctx, &state,
    2805             :                                 struct dcerpc_wkssvc_NetrMessageBufferSend_r_state);
    2806           0 :         if (req == NULL) {
    2807           0 :                 return NULL;
    2808             :         }
    2809             : 
    2810           0 :         state->out_mem_ctx = NULL;
    2811             : 
    2812           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2813             :                         NULL, &ndr_table_wkssvc,
    2814             :                         NDR_WKSSVC_NETRMESSAGEBUFFERSEND, state, r);
    2815           0 :         if (tevent_req_nomem(subreq, req)) {
    2816           0 :                 return tevent_req_post(req, ev);
    2817             :         }
    2818           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrMessageBufferSend_r_done, req);
    2819             : 
    2820           0 :         return req;
    2821             : }
    2822             : 
    2823           0 : static void dcerpc_wkssvc_NetrMessageBufferSend_r_done(struct tevent_req *subreq)
    2824             : {
    2825           0 :         struct tevent_req *req =
    2826           0 :                 tevent_req_callback_data(subreq,
    2827             :                 struct tevent_req);
    2828             :         NTSTATUS status;
    2829             : 
    2830           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2831           0 :         TALLOC_FREE(subreq);
    2832           0 :         if (tevent_req_nterror(req, status)) {
    2833           0 :                 return;
    2834             :         }
    2835             : 
    2836           0 :         tevent_req_done(req);
    2837             : }
    2838             : 
    2839           0 : NTSTATUS dcerpc_wkssvc_NetrMessageBufferSend_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2840             : {
    2841           0 :         struct dcerpc_wkssvc_NetrMessageBufferSend_r_state *state =
    2842           0 :                 tevent_req_data(req,
    2843             :                 struct dcerpc_wkssvc_NetrMessageBufferSend_r_state);
    2844             :         NTSTATUS status;
    2845             : 
    2846           0 :         if (tevent_req_is_nterror(req, &status)) {
    2847           0 :                 tevent_req_received(req);
    2848           0 :                 return status;
    2849             :         }
    2850             : 
    2851           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2852             : 
    2853           0 :         tevent_req_received(req);
    2854           0 :         return NT_STATUS_OK;
    2855             : }
    2856             : 
    2857           5 : NTSTATUS dcerpc_wkssvc_NetrMessageBufferSend_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrMessageBufferSend *r)
    2858             : {
    2859             :         NTSTATUS status;
    2860             : 
    2861           5 :         status = dcerpc_binding_handle_call(h,
    2862             :                         NULL, &ndr_table_wkssvc,
    2863             :                         NDR_WKSSVC_NETRMESSAGEBUFFERSEND, mem_ctx, r);
    2864             : 
    2865           5 :         return status;
    2866             : }
    2867             : 
    2868             : struct dcerpc_wkssvc_NetrMessageBufferSend_state {
    2869             :         struct wkssvc_NetrMessageBufferSend orig;
    2870             :         struct wkssvc_NetrMessageBufferSend tmp;
    2871             :         TALLOC_CTX *out_mem_ctx;
    2872             : };
    2873             : 
    2874             : static void dcerpc_wkssvc_NetrMessageBufferSend_done(struct tevent_req *subreq);
    2875             : 
    2876           0 : struct tevent_req *dcerpc_wkssvc_NetrMessageBufferSend_send(TALLOC_CTX *mem_ctx,
    2877             :                                                             struct tevent_context *ev,
    2878             :                                                             struct dcerpc_binding_handle *h,
    2879             :                                                             const char *_server_name /* [in] [charset(UTF16),unique] */,
    2880             :                                                             const char *_message_name /* [in] [charset(UTF16),ref] */,
    2881             :                                                             const char *_message_sender_name /* [in] [charset(UTF16),unique] */,
    2882             :                                                             uint8_t *_message_buffer /* [in] [ref,size_is(message_size)] */,
    2883             :                                                             uint32_t _message_size /* [in]  */)
    2884             : {
    2885             :         struct tevent_req *req;
    2886             :         struct dcerpc_wkssvc_NetrMessageBufferSend_state *state;
    2887             :         struct tevent_req *subreq;
    2888             : 
    2889           0 :         req = tevent_req_create(mem_ctx, &state,
    2890             :                                 struct dcerpc_wkssvc_NetrMessageBufferSend_state);
    2891           0 :         if (req == NULL) {
    2892           0 :                 return NULL;
    2893             :         }
    2894           0 :         state->out_mem_ctx = NULL;
    2895             : 
    2896             :         /* In parameters */
    2897           0 :         state->orig.in.server_name = _server_name;
    2898           0 :         state->orig.in.message_name = _message_name;
    2899           0 :         state->orig.in.message_sender_name = _message_sender_name;
    2900           0 :         state->orig.in.message_buffer = _message_buffer;
    2901           0 :         state->orig.in.message_size = _message_size;
    2902             : 
    2903             :         /* Out parameters */
    2904             : 
    2905             :         /* Result */
    2906           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2907             : 
    2908             :         /* make a temporary copy, that we pass to the dispatch function */
    2909           0 :         state->tmp = state->orig;
    2910             : 
    2911           0 :         subreq = dcerpc_wkssvc_NetrMessageBufferSend_r_send(state, ev, h, &state->tmp);
    2912           0 :         if (tevent_req_nomem(subreq, req)) {
    2913           0 :                 return tevent_req_post(req, ev);
    2914             :         }
    2915           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrMessageBufferSend_done, req);
    2916           0 :         return req;
    2917             : }
    2918             : 
    2919           0 : static void dcerpc_wkssvc_NetrMessageBufferSend_done(struct tevent_req *subreq)
    2920             : {
    2921           0 :         struct tevent_req *req = tevent_req_callback_data(
    2922             :                 subreq, struct tevent_req);
    2923           0 :         struct dcerpc_wkssvc_NetrMessageBufferSend_state *state = tevent_req_data(
    2924             :                 req, struct dcerpc_wkssvc_NetrMessageBufferSend_state);
    2925             :         NTSTATUS status;
    2926             :         TALLOC_CTX *mem_ctx;
    2927             : 
    2928           0 :         if (state->out_mem_ctx) {
    2929           0 :                 mem_ctx = state->out_mem_ctx;
    2930             :         } else {
    2931           0 :                 mem_ctx = state;
    2932             :         }
    2933             : 
    2934           0 :         status = dcerpc_wkssvc_NetrMessageBufferSend_r_recv(subreq, mem_ctx);
    2935           0 :         TALLOC_FREE(subreq);
    2936           0 :         if (tevent_req_nterror(req, status)) {
    2937           0 :                 return;
    2938             :         }
    2939             : 
    2940             :         /* Copy out parameters */
    2941             : 
    2942             :         /* Copy result */
    2943           0 :         state->orig.out.result = state->tmp.out.result;
    2944             : 
    2945             :         /* Reset temporary structure */
    2946           0 :         NDR_ZERO_STRUCT(state->tmp);
    2947             : 
    2948           0 :         tevent_req_done(req);
    2949             : }
    2950             : 
    2951           0 : NTSTATUS dcerpc_wkssvc_NetrMessageBufferSend_recv(struct tevent_req *req,
    2952             :                                                   TALLOC_CTX *mem_ctx,
    2953             :                                                   WERROR *result)
    2954             : {
    2955           0 :         struct dcerpc_wkssvc_NetrMessageBufferSend_state *state = tevent_req_data(
    2956             :                 req, struct dcerpc_wkssvc_NetrMessageBufferSend_state);
    2957             :         NTSTATUS status;
    2958             : 
    2959           0 :         if (tevent_req_is_nterror(req, &status)) {
    2960           0 :                 tevent_req_received(req);
    2961           0 :                 return status;
    2962             :         }
    2963             : 
    2964             :         /* Steal possible out parameters to the callers context */
    2965           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2966             : 
    2967             :         /* Return result */
    2968           0 :         *result = state->orig.out.result;
    2969             : 
    2970           0 :         tevent_req_received(req);
    2971           0 :         return NT_STATUS_OK;
    2972             : }
    2973             : 
    2974           0 : NTSTATUS dcerpc_wkssvc_NetrMessageBufferSend(struct dcerpc_binding_handle *h,
    2975             :                                              TALLOC_CTX *mem_ctx,
    2976             :                                              const char *_server_name /* [in] [charset(UTF16),unique] */,
    2977             :                                              const char *_message_name /* [in] [charset(UTF16),ref] */,
    2978             :                                              const char *_message_sender_name /* [in] [charset(UTF16),unique] */,
    2979             :                                              uint8_t *_message_buffer /* [in] [ref,size_is(message_size)] */,
    2980             :                                              uint32_t _message_size /* [in]  */,
    2981             :                                              WERROR *result)
    2982             : {
    2983             :         struct wkssvc_NetrMessageBufferSend r;
    2984             :         NTSTATUS status;
    2985             : 
    2986             :         /* In parameters */
    2987           0 :         r.in.server_name = _server_name;
    2988           0 :         r.in.message_name = _message_name;
    2989           0 :         r.in.message_sender_name = _message_sender_name;
    2990           0 :         r.in.message_buffer = _message_buffer;
    2991           0 :         r.in.message_size = _message_size;
    2992             : 
    2993             :         /* Out parameters */
    2994             : 
    2995             :         /* Result */
    2996           0 :         NDR_ZERO_STRUCT(r.out.result);
    2997             : 
    2998           0 :         status = dcerpc_wkssvc_NetrMessageBufferSend_r(h, mem_ctx, &r);
    2999           0 :         if (!NT_STATUS_IS_OK(status)) {
    3000           0 :                 return status;
    3001             :         }
    3002             : 
    3003             :         /* Return variables */
    3004             : 
    3005             :         /* Return result */
    3006           0 :         *result = r.out.result;
    3007             : 
    3008           0 :         return NT_STATUS_OK;
    3009             : }
    3010             : 
    3011             : struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_state {
    3012             :         TALLOC_CTX *out_mem_ctx;
    3013             : };
    3014             : 
    3015             : static void dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_done(struct tevent_req *subreq);
    3016             : 
    3017           0 : struct tevent_req *dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_send(TALLOC_CTX *mem_ctx,
    3018             :         struct tevent_context *ev,
    3019             :         struct dcerpc_binding_handle *h,
    3020             :         struct wkssvc_NetrWorkstationStatisticsGet *r)
    3021             : {
    3022             :         struct tevent_req *req;
    3023             :         struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_state *state;
    3024             :         struct tevent_req *subreq;
    3025             : 
    3026           0 :         req = tevent_req_create(mem_ctx, &state,
    3027             :                                 struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_state);
    3028           0 :         if (req == NULL) {
    3029           0 :                 return NULL;
    3030             :         }
    3031             : 
    3032           0 :         state->out_mem_ctx = talloc_new(state);
    3033           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3034           0 :                 return tevent_req_post(req, ev);
    3035             :         }
    3036             : 
    3037           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3038             :                         NULL, &ndr_table_wkssvc,
    3039           0 :                         NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET, state->out_mem_ctx, r);
    3040           0 :         if (tevent_req_nomem(subreq, req)) {
    3041           0 :                 return tevent_req_post(req, ev);
    3042             :         }
    3043           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_done, req);
    3044             : 
    3045           0 :         return req;
    3046             : }
    3047             : 
    3048           0 : static void dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_done(struct tevent_req *subreq)
    3049             : {
    3050           0 :         struct tevent_req *req =
    3051           0 :                 tevent_req_callback_data(subreq,
    3052             :                 struct tevent_req);
    3053             :         NTSTATUS status;
    3054             : 
    3055           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3056           0 :         TALLOC_FREE(subreq);
    3057           0 :         if (tevent_req_nterror(req, status)) {
    3058           0 :                 return;
    3059             :         }
    3060             : 
    3061           0 :         tevent_req_done(req);
    3062             : }
    3063             : 
    3064           0 : NTSTATUS dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3065             : {
    3066           0 :         struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_state *state =
    3067           0 :                 tevent_req_data(req,
    3068             :                 struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_state);
    3069             :         NTSTATUS status;
    3070             : 
    3071           0 :         if (tevent_req_is_nterror(req, &status)) {
    3072           0 :                 tevent_req_received(req);
    3073           0 :                 return status;
    3074             :         }
    3075             : 
    3076           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3077             : 
    3078           0 :         tevent_req_received(req);
    3079           0 :         return NT_STATUS_OK;
    3080             : }
    3081             : 
    3082           5 : NTSTATUS dcerpc_wkssvc_NetrWorkstationStatisticsGet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrWorkstationStatisticsGet *r)
    3083             : {
    3084             :         NTSTATUS status;
    3085             : 
    3086           5 :         status = dcerpc_binding_handle_call(h,
    3087             :                         NULL, &ndr_table_wkssvc,
    3088             :                         NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET, mem_ctx, r);
    3089             : 
    3090           5 :         return status;
    3091             : }
    3092             : 
    3093             : struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_state {
    3094             :         struct wkssvc_NetrWorkstationStatisticsGet orig;
    3095             :         struct wkssvc_NetrWorkstationStatisticsGet tmp;
    3096             :         TALLOC_CTX *out_mem_ctx;
    3097             : };
    3098             : 
    3099             : static void dcerpc_wkssvc_NetrWorkstationStatisticsGet_done(struct tevent_req *subreq);
    3100             : 
    3101           0 : struct tevent_req *dcerpc_wkssvc_NetrWorkstationStatisticsGet_send(TALLOC_CTX *mem_ctx,
    3102             :                                                                    struct tevent_context *ev,
    3103             :                                                                    struct dcerpc_binding_handle *h,
    3104             :                                                                    const char *_server_name /* [in] [charset(UTF16),unique] */,
    3105             :                                                                    const char *_unknown2 /* [in] [charset(UTF16),unique] */,
    3106             :                                                                    uint32_t _unknown3 /* [in]  */,
    3107             :                                                                    uint32_t _unknown4 /* [in]  */,
    3108             :                                                                    struct wkssvc_NetrWorkstationStatistics **_info /* [out] [ref] */)
    3109             : {
    3110             :         struct tevent_req *req;
    3111             :         struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_state *state;
    3112             :         struct tevent_req *subreq;
    3113             : 
    3114           0 :         req = tevent_req_create(mem_ctx, &state,
    3115             :                                 struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_state);
    3116           0 :         if (req == NULL) {
    3117           0 :                 return NULL;
    3118             :         }
    3119           0 :         state->out_mem_ctx = NULL;
    3120             : 
    3121             :         /* In parameters */
    3122           0 :         state->orig.in.server_name = _server_name;
    3123           0 :         state->orig.in.unknown2 = _unknown2;
    3124           0 :         state->orig.in.unknown3 = _unknown3;
    3125           0 :         state->orig.in.unknown4 = _unknown4;
    3126             : 
    3127             :         /* Out parameters */
    3128           0 :         state->orig.out.info = _info;
    3129             : 
    3130             :         /* Result */
    3131           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3132             : 
    3133           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3134             :                              "dcerpc_wkssvc_NetrWorkstationStatisticsGet_out_memory");
    3135           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3136           0 :                 return tevent_req_post(req, ev);
    3137             :         }
    3138             : 
    3139             :         /* make a temporary copy, that we pass to the dispatch function */
    3140           0 :         state->tmp = state->orig;
    3141             : 
    3142           0 :         subreq = dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_send(state, ev, h, &state->tmp);
    3143           0 :         if (tevent_req_nomem(subreq, req)) {
    3144           0 :                 return tevent_req_post(req, ev);
    3145             :         }
    3146           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrWorkstationStatisticsGet_done, req);
    3147           0 :         return req;
    3148             : }
    3149             : 
    3150           0 : static void dcerpc_wkssvc_NetrWorkstationStatisticsGet_done(struct tevent_req *subreq)
    3151             : {
    3152           0 :         struct tevent_req *req = tevent_req_callback_data(
    3153             :                 subreq, struct tevent_req);
    3154           0 :         struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_state *state = tevent_req_data(
    3155             :                 req, struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_state);
    3156             :         NTSTATUS status;
    3157             :         TALLOC_CTX *mem_ctx;
    3158             : 
    3159           0 :         if (state->out_mem_ctx) {
    3160           0 :                 mem_ctx = state->out_mem_ctx;
    3161             :         } else {
    3162           0 :                 mem_ctx = state;
    3163             :         }
    3164             : 
    3165           0 :         status = dcerpc_wkssvc_NetrWorkstationStatisticsGet_r_recv(subreq, mem_ctx);
    3166           0 :         TALLOC_FREE(subreq);
    3167           0 :         if (tevent_req_nterror(req, status)) {
    3168           0 :                 return;
    3169             :         }
    3170             : 
    3171             :         /* Copy out parameters */
    3172           0 :         *state->orig.out.info = *state->tmp.out.info;
    3173             : 
    3174             :         /* Copy result */
    3175           0 :         state->orig.out.result = state->tmp.out.result;
    3176             : 
    3177             :         /* Reset temporary structure */
    3178           0 :         NDR_ZERO_STRUCT(state->tmp);
    3179             : 
    3180           0 :         tevent_req_done(req);
    3181             : }
    3182             : 
    3183           0 : NTSTATUS dcerpc_wkssvc_NetrWorkstationStatisticsGet_recv(struct tevent_req *req,
    3184             :                                                          TALLOC_CTX *mem_ctx,
    3185             :                                                          WERROR *result)
    3186             : {
    3187           0 :         struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_state *state = tevent_req_data(
    3188             :                 req, struct dcerpc_wkssvc_NetrWorkstationStatisticsGet_state);
    3189             :         NTSTATUS status;
    3190             : 
    3191           0 :         if (tevent_req_is_nterror(req, &status)) {
    3192           0 :                 tevent_req_received(req);
    3193           0 :                 return status;
    3194             :         }
    3195             : 
    3196             :         /* Steal possible out parameters to the callers context */
    3197           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3198             : 
    3199             :         /* Return result */
    3200           0 :         *result = state->orig.out.result;
    3201             : 
    3202           0 :         tevent_req_received(req);
    3203           0 :         return NT_STATUS_OK;
    3204             : }
    3205             : 
    3206           0 : NTSTATUS dcerpc_wkssvc_NetrWorkstationStatisticsGet(struct dcerpc_binding_handle *h,
    3207             :                                                     TALLOC_CTX *mem_ctx,
    3208             :                                                     const char *_server_name /* [in] [charset(UTF16),unique] */,
    3209             :                                                     const char *_unknown2 /* [in] [charset(UTF16),unique] */,
    3210             :                                                     uint32_t _unknown3 /* [in]  */,
    3211             :                                                     uint32_t _unknown4 /* [in]  */,
    3212             :                                                     struct wkssvc_NetrWorkstationStatistics **_info /* [out] [ref] */,
    3213             :                                                     WERROR *result)
    3214             : {
    3215             :         struct wkssvc_NetrWorkstationStatisticsGet r;
    3216             :         NTSTATUS status;
    3217             : 
    3218             :         /* In parameters */
    3219           0 :         r.in.server_name = _server_name;
    3220           0 :         r.in.unknown2 = _unknown2;
    3221           0 :         r.in.unknown3 = _unknown3;
    3222           0 :         r.in.unknown4 = _unknown4;
    3223             : 
    3224             :         /* Out parameters */
    3225           0 :         r.out.info = _info;
    3226             : 
    3227             :         /* Result */
    3228           0 :         NDR_ZERO_STRUCT(r.out.result);
    3229             : 
    3230           0 :         status = dcerpc_wkssvc_NetrWorkstationStatisticsGet_r(h, mem_ctx, &r);
    3231           0 :         if (!NT_STATUS_IS_OK(status)) {
    3232           0 :                 return status;
    3233             :         }
    3234             : 
    3235             :         /* Return variables */
    3236           0 :         *_info = *r.out.info;
    3237             : 
    3238             :         /* Return result */
    3239           0 :         *result = r.out.result;
    3240             : 
    3241           0 :         return NT_STATUS_OK;
    3242             : }
    3243             : 
    3244             : struct dcerpc_wkssvc_NetrLogonDomainNameAdd_r_state {
    3245             :         TALLOC_CTX *out_mem_ctx;
    3246             : };
    3247             : 
    3248             : static void dcerpc_wkssvc_NetrLogonDomainNameAdd_r_done(struct tevent_req *subreq);
    3249             : 
    3250           0 : struct tevent_req *dcerpc_wkssvc_NetrLogonDomainNameAdd_r_send(TALLOC_CTX *mem_ctx,
    3251             :         struct tevent_context *ev,
    3252             :         struct dcerpc_binding_handle *h,
    3253             :         struct wkssvc_NetrLogonDomainNameAdd *r)
    3254             : {
    3255             :         struct tevent_req *req;
    3256             :         struct dcerpc_wkssvc_NetrLogonDomainNameAdd_r_state *state;
    3257             :         struct tevent_req *subreq;
    3258             : 
    3259           0 :         req = tevent_req_create(mem_ctx, &state,
    3260             :                                 struct dcerpc_wkssvc_NetrLogonDomainNameAdd_r_state);
    3261           0 :         if (req == NULL) {
    3262           0 :                 return NULL;
    3263             :         }
    3264             : 
    3265           0 :         state->out_mem_ctx = NULL;
    3266             : 
    3267           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3268             :                         NULL, &ndr_table_wkssvc,
    3269             :                         NDR_WKSSVC_NETRLOGONDOMAINNAMEADD, state, r);
    3270           0 :         if (tevent_req_nomem(subreq, req)) {
    3271           0 :                 return tevent_req_post(req, ev);
    3272             :         }
    3273           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrLogonDomainNameAdd_r_done, req);
    3274             : 
    3275           0 :         return req;
    3276             : }
    3277             : 
    3278           0 : static void dcerpc_wkssvc_NetrLogonDomainNameAdd_r_done(struct tevent_req *subreq)
    3279             : {
    3280           0 :         struct tevent_req *req =
    3281           0 :                 tevent_req_callback_data(subreq,
    3282             :                 struct tevent_req);
    3283             :         NTSTATUS status;
    3284             : 
    3285           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3286           0 :         TALLOC_FREE(subreq);
    3287           0 :         if (tevent_req_nterror(req, status)) {
    3288           0 :                 return;
    3289             :         }
    3290             : 
    3291           0 :         tevent_req_done(req);
    3292             : }
    3293             : 
    3294           0 : NTSTATUS dcerpc_wkssvc_NetrLogonDomainNameAdd_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3295             : {
    3296           0 :         struct dcerpc_wkssvc_NetrLogonDomainNameAdd_r_state *state =
    3297           0 :                 tevent_req_data(req,
    3298             :                 struct dcerpc_wkssvc_NetrLogonDomainNameAdd_r_state);
    3299             :         NTSTATUS status;
    3300             : 
    3301           0 :         if (tevent_req_is_nterror(req, &status)) {
    3302           0 :                 tevent_req_received(req);
    3303           0 :                 return status;
    3304             :         }
    3305             : 
    3306           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3307             : 
    3308           0 :         tevent_req_received(req);
    3309           0 :         return NT_STATUS_OK;
    3310             : }
    3311             : 
    3312           5 : NTSTATUS dcerpc_wkssvc_NetrLogonDomainNameAdd_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrLogonDomainNameAdd *r)
    3313             : {
    3314             :         NTSTATUS status;
    3315             : 
    3316           5 :         status = dcerpc_binding_handle_call(h,
    3317             :                         NULL, &ndr_table_wkssvc,
    3318             :                         NDR_WKSSVC_NETRLOGONDOMAINNAMEADD, mem_ctx, r);
    3319             : 
    3320           5 :         return status;
    3321             : }
    3322             : 
    3323             : struct dcerpc_wkssvc_NetrLogonDomainNameAdd_state {
    3324             :         struct wkssvc_NetrLogonDomainNameAdd orig;
    3325             :         struct wkssvc_NetrLogonDomainNameAdd tmp;
    3326             :         TALLOC_CTX *out_mem_ctx;
    3327             : };
    3328             : 
    3329             : static void dcerpc_wkssvc_NetrLogonDomainNameAdd_done(struct tevent_req *subreq);
    3330             : 
    3331           0 : struct tevent_req *dcerpc_wkssvc_NetrLogonDomainNameAdd_send(TALLOC_CTX *mem_ctx,
    3332             :                                                              struct tevent_context *ev,
    3333             :                                                              struct dcerpc_binding_handle *h,
    3334             :                                                              const char *_domain_name /* [in] [charset(UTF16),ref] */)
    3335             : {
    3336             :         struct tevent_req *req;
    3337             :         struct dcerpc_wkssvc_NetrLogonDomainNameAdd_state *state;
    3338             :         struct tevent_req *subreq;
    3339             : 
    3340           0 :         req = tevent_req_create(mem_ctx, &state,
    3341             :                                 struct dcerpc_wkssvc_NetrLogonDomainNameAdd_state);
    3342           0 :         if (req == NULL) {
    3343           0 :                 return NULL;
    3344             :         }
    3345           0 :         state->out_mem_ctx = NULL;
    3346             : 
    3347             :         /* In parameters */
    3348           0 :         state->orig.in.domain_name = _domain_name;
    3349             : 
    3350             :         /* Out parameters */
    3351             : 
    3352             :         /* Result */
    3353           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3354             : 
    3355             :         /* make a temporary copy, that we pass to the dispatch function */
    3356           0 :         state->tmp = state->orig;
    3357             : 
    3358           0 :         subreq = dcerpc_wkssvc_NetrLogonDomainNameAdd_r_send(state, ev, h, &state->tmp);
    3359           0 :         if (tevent_req_nomem(subreq, req)) {
    3360           0 :                 return tevent_req_post(req, ev);
    3361             :         }
    3362           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrLogonDomainNameAdd_done, req);
    3363           0 :         return req;
    3364             : }
    3365             : 
    3366           0 : static void dcerpc_wkssvc_NetrLogonDomainNameAdd_done(struct tevent_req *subreq)
    3367             : {
    3368           0 :         struct tevent_req *req = tevent_req_callback_data(
    3369             :                 subreq, struct tevent_req);
    3370           0 :         struct dcerpc_wkssvc_NetrLogonDomainNameAdd_state *state = tevent_req_data(
    3371             :                 req, struct dcerpc_wkssvc_NetrLogonDomainNameAdd_state);
    3372             :         NTSTATUS status;
    3373             :         TALLOC_CTX *mem_ctx;
    3374             : 
    3375           0 :         if (state->out_mem_ctx) {
    3376           0 :                 mem_ctx = state->out_mem_ctx;
    3377             :         } else {
    3378           0 :                 mem_ctx = state;
    3379             :         }
    3380             : 
    3381           0 :         status = dcerpc_wkssvc_NetrLogonDomainNameAdd_r_recv(subreq, mem_ctx);
    3382           0 :         TALLOC_FREE(subreq);
    3383           0 :         if (tevent_req_nterror(req, status)) {
    3384           0 :                 return;
    3385             :         }
    3386             : 
    3387             :         /* Copy out parameters */
    3388             : 
    3389             :         /* Copy result */
    3390           0 :         state->orig.out.result = state->tmp.out.result;
    3391             : 
    3392             :         /* Reset temporary structure */
    3393           0 :         NDR_ZERO_STRUCT(state->tmp);
    3394             : 
    3395           0 :         tevent_req_done(req);
    3396             : }
    3397             : 
    3398           0 : NTSTATUS dcerpc_wkssvc_NetrLogonDomainNameAdd_recv(struct tevent_req *req,
    3399             :                                                    TALLOC_CTX *mem_ctx,
    3400             :                                                    WERROR *result)
    3401             : {
    3402           0 :         struct dcerpc_wkssvc_NetrLogonDomainNameAdd_state *state = tevent_req_data(
    3403             :                 req, struct dcerpc_wkssvc_NetrLogonDomainNameAdd_state);
    3404             :         NTSTATUS status;
    3405             : 
    3406           0 :         if (tevent_req_is_nterror(req, &status)) {
    3407           0 :                 tevent_req_received(req);
    3408           0 :                 return status;
    3409             :         }
    3410             : 
    3411             :         /* Steal possible out parameters to the callers context */
    3412           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3413             : 
    3414             :         /* Return result */
    3415           0 :         *result = state->orig.out.result;
    3416             : 
    3417           0 :         tevent_req_received(req);
    3418           0 :         return NT_STATUS_OK;
    3419             : }
    3420             : 
    3421           0 : NTSTATUS dcerpc_wkssvc_NetrLogonDomainNameAdd(struct dcerpc_binding_handle *h,
    3422             :                                               TALLOC_CTX *mem_ctx,
    3423             :                                               const char *_domain_name /* [in] [charset(UTF16),ref] */,
    3424             :                                               WERROR *result)
    3425             : {
    3426             :         struct wkssvc_NetrLogonDomainNameAdd r;
    3427             :         NTSTATUS status;
    3428             : 
    3429             :         /* In parameters */
    3430           0 :         r.in.domain_name = _domain_name;
    3431             : 
    3432             :         /* Out parameters */
    3433             : 
    3434             :         /* Result */
    3435           0 :         NDR_ZERO_STRUCT(r.out.result);
    3436             : 
    3437           0 :         status = dcerpc_wkssvc_NetrLogonDomainNameAdd_r(h, mem_ctx, &r);
    3438           0 :         if (!NT_STATUS_IS_OK(status)) {
    3439           0 :                 return status;
    3440             :         }
    3441             : 
    3442             :         /* Return variables */
    3443             : 
    3444             :         /* Return result */
    3445           0 :         *result = r.out.result;
    3446             : 
    3447           0 :         return NT_STATUS_OK;
    3448             : }
    3449             : 
    3450             : struct dcerpc_wkssvc_NetrLogonDomainNameDel_r_state {
    3451             :         TALLOC_CTX *out_mem_ctx;
    3452             : };
    3453             : 
    3454             : static void dcerpc_wkssvc_NetrLogonDomainNameDel_r_done(struct tevent_req *subreq);
    3455             : 
    3456           0 : struct tevent_req *dcerpc_wkssvc_NetrLogonDomainNameDel_r_send(TALLOC_CTX *mem_ctx,
    3457             :         struct tevent_context *ev,
    3458             :         struct dcerpc_binding_handle *h,
    3459             :         struct wkssvc_NetrLogonDomainNameDel *r)
    3460             : {
    3461             :         struct tevent_req *req;
    3462             :         struct dcerpc_wkssvc_NetrLogonDomainNameDel_r_state *state;
    3463             :         struct tevent_req *subreq;
    3464             : 
    3465           0 :         req = tevent_req_create(mem_ctx, &state,
    3466             :                                 struct dcerpc_wkssvc_NetrLogonDomainNameDel_r_state);
    3467           0 :         if (req == NULL) {
    3468           0 :                 return NULL;
    3469             :         }
    3470             : 
    3471           0 :         state->out_mem_ctx = NULL;
    3472             : 
    3473           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3474             :                         NULL, &ndr_table_wkssvc,
    3475             :                         NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL, state, r);
    3476           0 :         if (tevent_req_nomem(subreq, req)) {
    3477           0 :                 return tevent_req_post(req, ev);
    3478             :         }
    3479           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrLogonDomainNameDel_r_done, req);
    3480             : 
    3481           0 :         return req;
    3482             : }
    3483             : 
    3484           0 : static void dcerpc_wkssvc_NetrLogonDomainNameDel_r_done(struct tevent_req *subreq)
    3485             : {
    3486           0 :         struct tevent_req *req =
    3487           0 :                 tevent_req_callback_data(subreq,
    3488             :                 struct tevent_req);
    3489             :         NTSTATUS status;
    3490             : 
    3491           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3492           0 :         TALLOC_FREE(subreq);
    3493           0 :         if (tevent_req_nterror(req, status)) {
    3494           0 :                 return;
    3495             :         }
    3496             : 
    3497           0 :         tevent_req_done(req);
    3498             : }
    3499             : 
    3500           0 : NTSTATUS dcerpc_wkssvc_NetrLogonDomainNameDel_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3501             : {
    3502           0 :         struct dcerpc_wkssvc_NetrLogonDomainNameDel_r_state *state =
    3503           0 :                 tevent_req_data(req,
    3504             :                 struct dcerpc_wkssvc_NetrLogonDomainNameDel_r_state);
    3505             :         NTSTATUS status;
    3506             : 
    3507           0 :         if (tevent_req_is_nterror(req, &status)) {
    3508           0 :                 tevent_req_received(req);
    3509           0 :                 return status;
    3510             :         }
    3511             : 
    3512           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3513             : 
    3514           0 :         tevent_req_received(req);
    3515           0 :         return NT_STATUS_OK;
    3516             : }
    3517             : 
    3518           5 : NTSTATUS dcerpc_wkssvc_NetrLogonDomainNameDel_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrLogonDomainNameDel *r)
    3519             : {
    3520             :         NTSTATUS status;
    3521             : 
    3522           5 :         status = dcerpc_binding_handle_call(h,
    3523             :                         NULL, &ndr_table_wkssvc,
    3524             :                         NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL, mem_ctx, r);
    3525             : 
    3526           5 :         return status;
    3527             : }
    3528             : 
    3529             : struct dcerpc_wkssvc_NetrLogonDomainNameDel_state {
    3530             :         struct wkssvc_NetrLogonDomainNameDel orig;
    3531             :         struct wkssvc_NetrLogonDomainNameDel tmp;
    3532             :         TALLOC_CTX *out_mem_ctx;
    3533             : };
    3534             : 
    3535             : static void dcerpc_wkssvc_NetrLogonDomainNameDel_done(struct tevent_req *subreq);
    3536             : 
    3537           0 : struct tevent_req *dcerpc_wkssvc_NetrLogonDomainNameDel_send(TALLOC_CTX *mem_ctx,
    3538             :                                                              struct tevent_context *ev,
    3539             :                                                              struct dcerpc_binding_handle *h,
    3540             :                                                              const char *_domain_name /* [in] [charset(UTF16),ref] */)
    3541             : {
    3542             :         struct tevent_req *req;
    3543             :         struct dcerpc_wkssvc_NetrLogonDomainNameDel_state *state;
    3544             :         struct tevent_req *subreq;
    3545             : 
    3546           0 :         req = tevent_req_create(mem_ctx, &state,
    3547             :                                 struct dcerpc_wkssvc_NetrLogonDomainNameDel_state);
    3548           0 :         if (req == NULL) {
    3549           0 :                 return NULL;
    3550             :         }
    3551           0 :         state->out_mem_ctx = NULL;
    3552             : 
    3553             :         /* In parameters */
    3554           0 :         state->orig.in.domain_name = _domain_name;
    3555             : 
    3556             :         /* Out parameters */
    3557             : 
    3558             :         /* Result */
    3559           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3560             : 
    3561             :         /* make a temporary copy, that we pass to the dispatch function */
    3562           0 :         state->tmp = state->orig;
    3563             : 
    3564           0 :         subreq = dcerpc_wkssvc_NetrLogonDomainNameDel_r_send(state, ev, h, &state->tmp);
    3565           0 :         if (tevent_req_nomem(subreq, req)) {
    3566           0 :                 return tevent_req_post(req, ev);
    3567             :         }
    3568           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrLogonDomainNameDel_done, req);
    3569           0 :         return req;
    3570             : }
    3571             : 
    3572           0 : static void dcerpc_wkssvc_NetrLogonDomainNameDel_done(struct tevent_req *subreq)
    3573             : {
    3574           0 :         struct tevent_req *req = tevent_req_callback_data(
    3575             :                 subreq, struct tevent_req);
    3576           0 :         struct dcerpc_wkssvc_NetrLogonDomainNameDel_state *state = tevent_req_data(
    3577             :                 req, struct dcerpc_wkssvc_NetrLogonDomainNameDel_state);
    3578             :         NTSTATUS status;
    3579             :         TALLOC_CTX *mem_ctx;
    3580             : 
    3581           0 :         if (state->out_mem_ctx) {
    3582           0 :                 mem_ctx = state->out_mem_ctx;
    3583             :         } else {
    3584           0 :                 mem_ctx = state;
    3585             :         }
    3586             : 
    3587           0 :         status = dcerpc_wkssvc_NetrLogonDomainNameDel_r_recv(subreq, mem_ctx);
    3588           0 :         TALLOC_FREE(subreq);
    3589           0 :         if (tevent_req_nterror(req, status)) {
    3590           0 :                 return;
    3591             :         }
    3592             : 
    3593             :         /* Copy out parameters */
    3594             : 
    3595             :         /* Copy result */
    3596           0 :         state->orig.out.result = state->tmp.out.result;
    3597             : 
    3598             :         /* Reset temporary structure */
    3599           0 :         NDR_ZERO_STRUCT(state->tmp);
    3600             : 
    3601           0 :         tevent_req_done(req);
    3602             : }
    3603             : 
    3604           0 : NTSTATUS dcerpc_wkssvc_NetrLogonDomainNameDel_recv(struct tevent_req *req,
    3605             :                                                    TALLOC_CTX *mem_ctx,
    3606             :                                                    WERROR *result)
    3607             : {
    3608           0 :         struct dcerpc_wkssvc_NetrLogonDomainNameDel_state *state = tevent_req_data(
    3609             :                 req, struct dcerpc_wkssvc_NetrLogonDomainNameDel_state);
    3610             :         NTSTATUS status;
    3611             : 
    3612           0 :         if (tevent_req_is_nterror(req, &status)) {
    3613           0 :                 tevent_req_received(req);
    3614           0 :                 return status;
    3615             :         }
    3616             : 
    3617             :         /* Steal possible out parameters to the callers context */
    3618           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3619             : 
    3620             :         /* Return result */
    3621           0 :         *result = state->orig.out.result;
    3622             : 
    3623           0 :         tevent_req_received(req);
    3624           0 :         return NT_STATUS_OK;
    3625             : }
    3626             : 
    3627           0 : NTSTATUS dcerpc_wkssvc_NetrLogonDomainNameDel(struct dcerpc_binding_handle *h,
    3628             :                                               TALLOC_CTX *mem_ctx,
    3629             :                                               const char *_domain_name /* [in] [charset(UTF16),ref] */,
    3630             :                                               WERROR *result)
    3631             : {
    3632             :         struct wkssvc_NetrLogonDomainNameDel r;
    3633             :         NTSTATUS status;
    3634             : 
    3635             :         /* In parameters */
    3636           0 :         r.in.domain_name = _domain_name;
    3637             : 
    3638             :         /* Out parameters */
    3639             : 
    3640             :         /* Result */
    3641           0 :         NDR_ZERO_STRUCT(r.out.result);
    3642             : 
    3643           0 :         status = dcerpc_wkssvc_NetrLogonDomainNameDel_r(h, mem_ctx, &r);
    3644           0 :         if (!NT_STATUS_IS_OK(status)) {
    3645           0 :                 return status;
    3646             :         }
    3647             : 
    3648             :         /* Return variables */
    3649             : 
    3650             :         /* Return result */
    3651           0 :         *result = r.out.result;
    3652             : 
    3653           0 :         return NT_STATUS_OK;
    3654             : }
    3655             : 
    3656             : struct dcerpc_wkssvc_NetrJoinDomain_r_state {
    3657             :         TALLOC_CTX *out_mem_ctx;
    3658             : };
    3659             : 
    3660             : static void dcerpc_wkssvc_NetrJoinDomain_r_done(struct tevent_req *subreq);
    3661             : 
    3662           0 : struct tevent_req *dcerpc_wkssvc_NetrJoinDomain_r_send(TALLOC_CTX *mem_ctx,
    3663             :         struct tevent_context *ev,
    3664             :         struct dcerpc_binding_handle *h,
    3665             :         struct wkssvc_NetrJoinDomain *r)
    3666             : {
    3667             :         struct tevent_req *req;
    3668             :         struct dcerpc_wkssvc_NetrJoinDomain_r_state *state;
    3669             :         struct tevent_req *subreq;
    3670             : 
    3671           0 :         req = tevent_req_create(mem_ctx, &state,
    3672             :                                 struct dcerpc_wkssvc_NetrJoinDomain_r_state);
    3673           0 :         if (req == NULL) {
    3674           0 :                 return NULL;
    3675             :         }
    3676             : 
    3677           0 :         state->out_mem_ctx = NULL;
    3678             : 
    3679           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3680             :                         NULL, &ndr_table_wkssvc,
    3681             :                         NDR_WKSSVC_NETRJOINDOMAIN, state, r);
    3682           0 :         if (tevent_req_nomem(subreq, req)) {
    3683           0 :                 return tevent_req_post(req, ev);
    3684             :         }
    3685           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrJoinDomain_r_done, req);
    3686             : 
    3687           0 :         return req;
    3688             : }
    3689             : 
    3690           0 : static void dcerpc_wkssvc_NetrJoinDomain_r_done(struct tevent_req *subreq)
    3691             : {
    3692           0 :         struct tevent_req *req =
    3693           0 :                 tevent_req_callback_data(subreq,
    3694             :                 struct tevent_req);
    3695             :         NTSTATUS status;
    3696             : 
    3697           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3698           0 :         TALLOC_FREE(subreq);
    3699           0 :         if (tevent_req_nterror(req, status)) {
    3700           0 :                 return;
    3701             :         }
    3702             : 
    3703           0 :         tevent_req_done(req);
    3704             : }
    3705             : 
    3706           0 : NTSTATUS dcerpc_wkssvc_NetrJoinDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3707             : {
    3708           0 :         struct dcerpc_wkssvc_NetrJoinDomain_r_state *state =
    3709           0 :                 tevent_req_data(req,
    3710             :                 struct dcerpc_wkssvc_NetrJoinDomain_r_state);
    3711             :         NTSTATUS status;
    3712             : 
    3713           0 :         if (tevent_req_is_nterror(req, &status)) {
    3714           0 :                 tevent_req_received(req);
    3715           0 :                 return status;
    3716             :         }
    3717             : 
    3718           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3719             : 
    3720           0 :         tevent_req_received(req);
    3721           0 :         return NT_STATUS_OK;
    3722             : }
    3723             : 
    3724           5 : NTSTATUS dcerpc_wkssvc_NetrJoinDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrJoinDomain *r)
    3725             : {
    3726             :         NTSTATUS status;
    3727             : 
    3728           5 :         status = dcerpc_binding_handle_call(h,
    3729             :                         NULL, &ndr_table_wkssvc,
    3730             :                         NDR_WKSSVC_NETRJOINDOMAIN, mem_ctx, r);
    3731             : 
    3732           5 :         return status;
    3733             : }
    3734             : 
    3735             : struct dcerpc_wkssvc_NetrJoinDomain_state {
    3736             :         struct wkssvc_NetrJoinDomain orig;
    3737             :         struct wkssvc_NetrJoinDomain tmp;
    3738             :         TALLOC_CTX *out_mem_ctx;
    3739             : };
    3740             : 
    3741             : static void dcerpc_wkssvc_NetrJoinDomain_done(struct tevent_req *subreq);
    3742             : 
    3743           0 : struct tevent_req *dcerpc_wkssvc_NetrJoinDomain_send(TALLOC_CTX *mem_ctx,
    3744             :                                                      struct tevent_context *ev,
    3745             :                                                      struct dcerpc_binding_handle *h,
    3746             :                                                      const char *_server_name /* [in] [charset(UTF16),unique] */,
    3747             :                                                      const char *_domain_name /* [in] [charset(UTF16),ref] */,
    3748             :                                                      const char *_account_ou /* [in] [charset(UTF16),unique] */,
    3749             :                                                      const char *_Account /* [in] [charset(UTF16),unique] */,
    3750             :                                                      const char *_password /* [in] [charset(UTF16),unique] */,
    3751             :                                                      uint32_t _join_flags /* [in]  */)
    3752             : {
    3753             :         struct tevent_req *req;
    3754             :         struct dcerpc_wkssvc_NetrJoinDomain_state *state;
    3755             :         struct tevent_req *subreq;
    3756             : 
    3757           0 :         req = tevent_req_create(mem_ctx, &state,
    3758             :                                 struct dcerpc_wkssvc_NetrJoinDomain_state);
    3759           0 :         if (req == NULL) {
    3760           0 :                 return NULL;
    3761             :         }
    3762           0 :         state->out_mem_ctx = NULL;
    3763             : 
    3764             :         /* In parameters */
    3765           0 :         state->orig.in.server_name = _server_name;
    3766           0 :         state->orig.in.domain_name = _domain_name;
    3767           0 :         state->orig.in.account_ou = _account_ou;
    3768           0 :         state->orig.in.Account = _Account;
    3769           0 :         state->orig.in.password = _password;
    3770           0 :         state->orig.in.join_flags = _join_flags;
    3771             : 
    3772             :         /* Out parameters */
    3773             : 
    3774             :         /* Result */
    3775           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3776             : 
    3777             :         /* make a temporary copy, that we pass to the dispatch function */
    3778           0 :         state->tmp = state->orig;
    3779             : 
    3780           0 :         subreq = dcerpc_wkssvc_NetrJoinDomain_r_send(state, ev, h, &state->tmp);
    3781           0 :         if (tevent_req_nomem(subreq, req)) {
    3782           0 :                 return tevent_req_post(req, ev);
    3783             :         }
    3784           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrJoinDomain_done, req);
    3785           0 :         return req;
    3786             : }
    3787             : 
    3788           0 : static void dcerpc_wkssvc_NetrJoinDomain_done(struct tevent_req *subreq)
    3789             : {
    3790           0 :         struct tevent_req *req = tevent_req_callback_data(
    3791             :                 subreq, struct tevent_req);
    3792           0 :         struct dcerpc_wkssvc_NetrJoinDomain_state *state = tevent_req_data(
    3793             :                 req, struct dcerpc_wkssvc_NetrJoinDomain_state);
    3794             :         NTSTATUS status;
    3795             :         TALLOC_CTX *mem_ctx;
    3796             : 
    3797           0 :         if (state->out_mem_ctx) {
    3798           0 :                 mem_ctx = state->out_mem_ctx;
    3799             :         } else {
    3800           0 :                 mem_ctx = state;
    3801             :         }
    3802             : 
    3803           0 :         status = dcerpc_wkssvc_NetrJoinDomain_r_recv(subreq, mem_ctx);
    3804           0 :         TALLOC_FREE(subreq);
    3805           0 :         if (tevent_req_nterror(req, status)) {
    3806           0 :                 return;
    3807             :         }
    3808             : 
    3809             :         /* Copy out parameters */
    3810             : 
    3811             :         /* Copy result */
    3812           0 :         state->orig.out.result = state->tmp.out.result;
    3813             : 
    3814             :         /* Reset temporary structure */
    3815           0 :         NDR_ZERO_STRUCT(state->tmp);
    3816             : 
    3817           0 :         tevent_req_done(req);
    3818             : }
    3819             : 
    3820           0 : NTSTATUS dcerpc_wkssvc_NetrJoinDomain_recv(struct tevent_req *req,
    3821             :                                            TALLOC_CTX *mem_ctx,
    3822             :                                            WERROR *result)
    3823             : {
    3824           0 :         struct dcerpc_wkssvc_NetrJoinDomain_state *state = tevent_req_data(
    3825             :                 req, struct dcerpc_wkssvc_NetrJoinDomain_state);
    3826             :         NTSTATUS status;
    3827             : 
    3828           0 :         if (tevent_req_is_nterror(req, &status)) {
    3829           0 :                 tevent_req_received(req);
    3830           0 :                 return status;
    3831             :         }
    3832             : 
    3833             :         /* Steal possible out parameters to the callers context */
    3834           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3835             : 
    3836             :         /* Return result */
    3837           0 :         *result = state->orig.out.result;
    3838             : 
    3839           0 :         tevent_req_received(req);
    3840           0 :         return NT_STATUS_OK;
    3841             : }
    3842             : 
    3843           0 : NTSTATUS dcerpc_wkssvc_NetrJoinDomain(struct dcerpc_binding_handle *h,
    3844             :                                       TALLOC_CTX *mem_ctx,
    3845             :                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
    3846             :                                       const char *_domain_name /* [in] [charset(UTF16),ref] */,
    3847             :                                       const char *_account_ou /* [in] [charset(UTF16),unique] */,
    3848             :                                       const char *_Account /* [in] [charset(UTF16),unique] */,
    3849             :                                       const char *_password /* [in] [charset(UTF16),unique] */,
    3850             :                                       uint32_t _join_flags /* [in]  */,
    3851             :                                       WERROR *result)
    3852             : {
    3853             :         struct wkssvc_NetrJoinDomain r;
    3854             :         NTSTATUS status;
    3855             : 
    3856             :         /* In parameters */
    3857           0 :         r.in.server_name = _server_name;
    3858           0 :         r.in.domain_name = _domain_name;
    3859           0 :         r.in.account_ou = _account_ou;
    3860           0 :         r.in.Account = _Account;
    3861           0 :         r.in.password = _password;
    3862           0 :         r.in.join_flags = _join_flags;
    3863             : 
    3864             :         /* Out parameters */
    3865             : 
    3866             :         /* Result */
    3867           0 :         NDR_ZERO_STRUCT(r.out.result);
    3868             : 
    3869           0 :         status = dcerpc_wkssvc_NetrJoinDomain_r(h, mem_ctx, &r);
    3870           0 :         if (!NT_STATUS_IS_OK(status)) {
    3871           0 :                 return status;
    3872             :         }
    3873             : 
    3874             :         /* Return variables */
    3875             : 
    3876             :         /* Return result */
    3877           0 :         *result = r.out.result;
    3878             : 
    3879           0 :         return NT_STATUS_OK;
    3880             : }
    3881             : 
    3882             : struct dcerpc_wkssvc_NetrUnjoinDomain_r_state {
    3883             :         TALLOC_CTX *out_mem_ctx;
    3884             : };
    3885             : 
    3886             : static void dcerpc_wkssvc_NetrUnjoinDomain_r_done(struct tevent_req *subreq);
    3887             : 
    3888           0 : struct tevent_req *dcerpc_wkssvc_NetrUnjoinDomain_r_send(TALLOC_CTX *mem_ctx,
    3889             :         struct tevent_context *ev,
    3890             :         struct dcerpc_binding_handle *h,
    3891             :         struct wkssvc_NetrUnjoinDomain *r)
    3892             : {
    3893             :         struct tevent_req *req;
    3894             :         struct dcerpc_wkssvc_NetrUnjoinDomain_r_state *state;
    3895             :         struct tevent_req *subreq;
    3896             : 
    3897           0 :         req = tevent_req_create(mem_ctx, &state,
    3898             :                                 struct dcerpc_wkssvc_NetrUnjoinDomain_r_state);
    3899           0 :         if (req == NULL) {
    3900           0 :                 return NULL;
    3901             :         }
    3902             : 
    3903           0 :         state->out_mem_ctx = NULL;
    3904             : 
    3905           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3906             :                         NULL, &ndr_table_wkssvc,
    3907             :                         NDR_WKSSVC_NETRUNJOINDOMAIN, state, r);
    3908           0 :         if (tevent_req_nomem(subreq, req)) {
    3909           0 :                 return tevent_req_post(req, ev);
    3910             :         }
    3911           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUnjoinDomain_r_done, req);
    3912             : 
    3913           0 :         return req;
    3914             : }
    3915             : 
    3916           0 : static void dcerpc_wkssvc_NetrUnjoinDomain_r_done(struct tevent_req *subreq)
    3917             : {
    3918           0 :         struct tevent_req *req =
    3919           0 :                 tevent_req_callback_data(subreq,
    3920             :                 struct tevent_req);
    3921             :         NTSTATUS status;
    3922             : 
    3923           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3924           0 :         TALLOC_FREE(subreq);
    3925           0 :         if (tevent_req_nterror(req, status)) {
    3926           0 :                 return;
    3927             :         }
    3928             : 
    3929           0 :         tevent_req_done(req);
    3930             : }
    3931             : 
    3932           0 : NTSTATUS dcerpc_wkssvc_NetrUnjoinDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3933             : {
    3934           0 :         struct dcerpc_wkssvc_NetrUnjoinDomain_r_state *state =
    3935           0 :                 tevent_req_data(req,
    3936             :                 struct dcerpc_wkssvc_NetrUnjoinDomain_r_state);
    3937             :         NTSTATUS status;
    3938             : 
    3939           0 :         if (tevent_req_is_nterror(req, &status)) {
    3940           0 :                 tevent_req_received(req);
    3941           0 :                 return status;
    3942             :         }
    3943             : 
    3944           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3945             : 
    3946           0 :         tevent_req_received(req);
    3947           0 :         return NT_STATUS_OK;
    3948             : }
    3949             : 
    3950           5 : NTSTATUS dcerpc_wkssvc_NetrUnjoinDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrUnjoinDomain *r)
    3951             : {
    3952             :         NTSTATUS status;
    3953             : 
    3954           5 :         status = dcerpc_binding_handle_call(h,
    3955             :                         NULL, &ndr_table_wkssvc,
    3956             :                         NDR_WKSSVC_NETRUNJOINDOMAIN, mem_ctx, r);
    3957             : 
    3958           5 :         return status;
    3959             : }
    3960             : 
    3961             : struct dcerpc_wkssvc_NetrUnjoinDomain_state {
    3962             :         struct wkssvc_NetrUnjoinDomain orig;
    3963             :         struct wkssvc_NetrUnjoinDomain tmp;
    3964             :         TALLOC_CTX *out_mem_ctx;
    3965             : };
    3966             : 
    3967             : static void dcerpc_wkssvc_NetrUnjoinDomain_done(struct tevent_req *subreq);
    3968             : 
    3969           0 : struct tevent_req *dcerpc_wkssvc_NetrUnjoinDomain_send(TALLOC_CTX *mem_ctx,
    3970             :                                                        struct tevent_context *ev,
    3971             :                                                        struct dcerpc_binding_handle *h,
    3972             :                                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    3973             :                                                        const char *_Account /* [in] [charset(UTF16),unique] */,
    3974             :                                                        const char *_password /* [in] [charset(UTF16),unique] */,
    3975             :                                                        uint32_t _unjoin_flags /* [in]  */)
    3976             : {
    3977             :         struct tevent_req *req;
    3978             :         struct dcerpc_wkssvc_NetrUnjoinDomain_state *state;
    3979             :         struct tevent_req *subreq;
    3980             : 
    3981           0 :         req = tevent_req_create(mem_ctx, &state,
    3982             :                                 struct dcerpc_wkssvc_NetrUnjoinDomain_state);
    3983           0 :         if (req == NULL) {
    3984           0 :                 return NULL;
    3985             :         }
    3986           0 :         state->out_mem_ctx = NULL;
    3987             : 
    3988             :         /* In parameters */
    3989           0 :         state->orig.in.server_name = _server_name;
    3990           0 :         state->orig.in.Account = _Account;
    3991           0 :         state->orig.in.password = _password;
    3992           0 :         state->orig.in.unjoin_flags = _unjoin_flags;
    3993             : 
    3994             :         /* Out parameters */
    3995             : 
    3996             :         /* Result */
    3997           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3998             : 
    3999             :         /* make a temporary copy, that we pass to the dispatch function */
    4000           0 :         state->tmp = state->orig;
    4001             : 
    4002           0 :         subreq = dcerpc_wkssvc_NetrUnjoinDomain_r_send(state, ev, h, &state->tmp);
    4003           0 :         if (tevent_req_nomem(subreq, req)) {
    4004           0 :                 return tevent_req_post(req, ev);
    4005             :         }
    4006           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUnjoinDomain_done, req);
    4007           0 :         return req;
    4008             : }
    4009             : 
    4010           0 : static void dcerpc_wkssvc_NetrUnjoinDomain_done(struct tevent_req *subreq)
    4011             : {
    4012           0 :         struct tevent_req *req = tevent_req_callback_data(
    4013             :                 subreq, struct tevent_req);
    4014           0 :         struct dcerpc_wkssvc_NetrUnjoinDomain_state *state = tevent_req_data(
    4015             :                 req, struct dcerpc_wkssvc_NetrUnjoinDomain_state);
    4016             :         NTSTATUS status;
    4017             :         TALLOC_CTX *mem_ctx;
    4018             : 
    4019           0 :         if (state->out_mem_ctx) {
    4020           0 :                 mem_ctx = state->out_mem_ctx;
    4021             :         } else {
    4022           0 :                 mem_ctx = state;
    4023             :         }
    4024             : 
    4025           0 :         status = dcerpc_wkssvc_NetrUnjoinDomain_r_recv(subreq, mem_ctx);
    4026           0 :         TALLOC_FREE(subreq);
    4027           0 :         if (tevent_req_nterror(req, status)) {
    4028           0 :                 return;
    4029             :         }
    4030             : 
    4031             :         /* Copy out parameters */
    4032             : 
    4033             :         /* Copy result */
    4034           0 :         state->orig.out.result = state->tmp.out.result;
    4035             : 
    4036             :         /* Reset temporary structure */
    4037           0 :         NDR_ZERO_STRUCT(state->tmp);
    4038             : 
    4039           0 :         tevent_req_done(req);
    4040             : }
    4041             : 
    4042           0 : NTSTATUS dcerpc_wkssvc_NetrUnjoinDomain_recv(struct tevent_req *req,
    4043             :                                              TALLOC_CTX *mem_ctx,
    4044             :                                              WERROR *result)
    4045             : {
    4046           0 :         struct dcerpc_wkssvc_NetrUnjoinDomain_state *state = tevent_req_data(
    4047             :                 req, struct dcerpc_wkssvc_NetrUnjoinDomain_state);
    4048             :         NTSTATUS status;
    4049             : 
    4050           0 :         if (tevent_req_is_nterror(req, &status)) {
    4051           0 :                 tevent_req_received(req);
    4052           0 :                 return status;
    4053             :         }
    4054             : 
    4055             :         /* Steal possible out parameters to the callers context */
    4056           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4057             : 
    4058             :         /* Return result */
    4059           0 :         *result = state->orig.out.result;
    4060             : 
    4061           0 :         tevent_req_received(req);
    4062           0 :         return NT_STATUS_OK;
    4063             : }
    4064             : 
    4065           0 : NTSTATUS dcerpc_wkssvc_NetrUnjoinDomain(struct dcerpc_binding_handle *h,
    4066             :                                         TALLOC_CTX *mem_ctx,
    4067             :                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    4068             :                                         const char *_Account /* [in] [charset(UTF16),unique] */,
    4069             :                                         const char *_password /* [in] [charset(UTF16),unique] */,
    4070             :                                         uint32_t _unjoin_flags /* [in]  */,
    4071             :                                         WERROR *result)
    4072             : {
    4073             :         struct wkssvc_NetrUnjoinDomain r;
    4074             :         NTSTATUS status;
    4075             : 
    4076             :         /* In parameters */
    4077           0 :         r.in.server_name = _server_name;
    4078           0 :         r.in.Account = _Account;
    4079           0 :         r.in.password = _password;
    4080           0 :         r.in.unjoin_flags = _unjoin_flags;
    4081             : 
    4082             :         /* Out parameters */
    4083             : 
    4084             :         /* Result */
    4085           0 :         NDR_ZERO_STRUCT(r.out.result);
    4086             : 
    4087           0 :         status = dcerpc_wkssvc_NetrUnjoinDomain_r(h, mem_ctx, &r);
    4088           0 :         if (!NT_STATUS_IS_OK(status)) {
    4089           0 :                 return status;
    4090             :         }
    4091             : 
    4092             :         /* Return variables */
    4093             : 
    4094             :         /* Return result */
    4095           0 :         *result = r.out.result;
    4096             : 
    4097           0 :         return NT_STATUS_OK;
    4098             : }
    4099             : 
    4100             : struct dcerpc_wkssvc_NetrRenameMachineInDomain_r_state {
    4101             :         TALLOC_CTX *out_mem_ctx;
    4102             : };
    4103             : 
    4104             : static void dcerpc_wkssvc_NetrRenameMachineInDomain_r_done(struct tevent_req *subreq);
    4105             : 
    4106           0 : struct tevent_req *dcerpc_wkssvc_NetrRenameMachineInDomain_r_send(TALLOC_CTX *mem_ctx,
    4107             :         struct tevent_context *ev,
    4108             :         struct dcerpc_binding_handle *h,
    4109             :         struct wkssvc_NetrRenameMachineInDomain *r)
    4110             : {
    4111             :         struct tevent_req *req;
    4112             :         struct dcerpc_wkssvc_NetrRenameMachineInDomain_r_state *state;
    4113             :         struct tevent_req *subreq;
    4114             : 
    4115           0 :         req = tevent_req_create(mem_ctx, &state,
    4116             :                                 struct dcerpc_wkssvc_NetrRenameMachineInDomain_r_state);
    4117           0 :         if (req == NULL) {
    4118           0 :                 return NULL;
    4119             :         }
    4120             : 
    4121           0 :         state->out_mem_ctx = NULL;
    4122             : 
    4123           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4124             :                         NULL, &ndr_table_wkssvc,
    4125             :                         NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN, state, r);
    4126           0 :         if (tevent_req_nomem(subreq, req)) {
    4127           0 :                 return tevent_req_post(req, ev);
    4128             :         }
    4129           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrRenameMachineInDomain_r_done, req);
    4130             : 
    4131           0 :         return req;
    4132             : }
    4133             : 
    4134           0 : static void dcerpc_wkssvc_NetrRenameMachineInDomain_r_done(struct tevent_req *subreq)
    4135             : {
    4136           0 :         struct tevent_req *req =
    4137           0 :                 tevent_req_callback_data(subreq,
    4138             :                 struct tevent_req);
    4139             :         NTSTATUS status;
    4140             : 
    4141           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4142           0 :         TALLOC_FREE(subreq);
    4143           0 :         if (tevent_req_nterror(req, status)) {
    4144           0 :                 return;
    4145             :         }
    4146             : 
    4147           0 :         tevent_req_done(req);
    4148             : }
    4149             : 
    4150           0 : NTSTATUS dcerpc_wkssvc_NetrRenameMachineInDomain_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4151             : {
    4152           0 :         struct dcerpc_wkssvc_NetrRenameMachineInDomain_r_state *state =
    4153           0 :                 tevent_req_data(req,
    4154             :                 struct dcerpc_wkssvc_NetrRenameMachineInDomain_r_state);
    4155             :         NTSTATUS status;
    4156             : 
    4157           0 :         if (tevent_req_is_nterror(req, &status)) {
    4158           0 :                 tevent_req_received(req);
    4159           0 :                 return status;
    4160             :         }
    4161             : 
    4162           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4163             : 
    4164           0 :         tevent_req_received(req);
    4165           0 :         return NT_STATUS_OK;
    4166             : }
    4167             : 
    4168           0 : NTSTATUS dcerpc_wkssvc_NetrRenameMachineInDomain_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrRenameMachineInDomain *r)
    4169             : {
    4170             :         NTSTATUS status;
    4171             : 
    4172           0 :         status = dcerpc_binding_handle_call(h,
    4173             :                         NULL, &ndr_table_wkssvc,
    4174             :                         NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN, mem_ctx, r);
    4175             : 
    4176           0 :         return status;
    4177             : }
    4178             : 
    4179             : struct dcerpc_wkssvc_NetrRenameMachineInDomain_state {
    4180             :         struct wkssvc_NetrRenameMachineInDomain orig;
    4181             :         struct wkssvc_NetrRenameMachineInDomain tmp;
    4182             :         TALLOC_CTX *out_mem_ctx;
    4183             : };
    4184             : 
    4185             : static void dcerpc_wkssvc_NetrRenameMachineInDomain_done(struct tevent_req *subreq);
    4186             : 
    4187           0 : struct tevent_req *dcerpc_wkssvc_NetrRenameMachineInDomain_send(TALLOC_CTX *mem_ctx,
    4188             :                                                                 struct tevent_context *ev,
    4189             :                                                                 struct dcerpc_binding_handle *h,
    4190             :                                                                 const char *_server_name /* [in] [charset(UTF16),unique] */,
    4191             :                                                                 const char *_NewMachineName /* [in] [charset(UTF16),unique] */,
    4192             :                                                                 const char *_Account /* [in] [charset(UTF16),unique] */,
    4193             :                                                                 const char *_password /* [in] [charset(UTF16),unique] */,
    4194             :                                                                 uint32_t _RenameOptions /* [in]  */)
    4195             : {
    4196             :         struct tevent_req *req;
    4197             :         struct dcerpc_wkssvc_NetrRenameMachineInDomain_state *state;
    4198             :         struct tevent_req *subreq;
    4199             : 
    4200           0 :         req = tevent_req_create(mem_ctx, &state,
    4201             :                                 struct dcerpc_wkssvc_NetrRenameMachineInDomain_state);
    4202           0 :         if (req == NULL) {
    4203           0 :                 return NULL;
    4204             :         }
    4205           0 :         state->out_mem_ctx = NULL;
    4206             : 
    4207             :         /* In parameters */
    4208           0 :         state->orig.in.server_name = _server_name;
    4209           0 :         state->orig.in.NewMachineName = _NewMachineName;
    4210           0 :         state->orig.in.Account = _Account;
    4211           0 :         state->orig.in.password = _password;
    4212           0 :         state->orig.in.RenameOptions = _RenameOptions;
    4213             : 
    4214             :         /* Out parameters */
    4215             : 
    4216             :         /* Result */
    4217           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4218             : 
    4219             :         /* make a temporary copy, that we pass to the dispatch function */
    4220           0 :         state->tmp = state->orig;
    4221             : 
    4222           0 :         subreq = dcerpc_wkssvc_NetrRenameMachineInDomain_r_send(state, ev, h, &state->tmp);
    4223           0 :         if (tevent_req_nomem(subreq, req)) {
    4224           0 :                 return tevent_req_post(req, ev);
    4225             :         }
    4226           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrRenameMachineInDomain_done, req);
    4227           0 :         return req;
    4228             : }
    4229             : 
    4230           0 : static void dcerpc_wkssvc_NetrRenameMachineInDomain_done(struct tevent_req *subreq)
    4231             : {
    4232           0 :         struct tevent_req *req = tevent_req_callback_data(
    4233             :                 subreq, struct tevent_req);
    4234           0 :         struct dcerpc_wkssvc_NetrRenameMachineInDomain_state *state = tevent_req_data(
    4235             :                 req, struct dcerpc_wkssvc_NetrRenameMachineInDomain_state);
    4236             :         NTSTATUS status;
    4237             :         TALLOC_CTX *mem_ctx;
    4238             : 
    4239           0 :         if (state->out_mem_ctx) {
    4240           0 :                 mem_ctx = state->out_mem_ctx;
    4241             :         } else {
    4242           0 :                 mem_ctx = state;
    4243             :         }
    4244             : 
    4245           0 :         status = dcerpc_wkssvc_NetrRenameMachineInDomain_r_recv(subreq, mem_ctx);
    4246           0 :         TALLOC_FREE(subreq);
    4247           0 :         if (tevent_req_nterror(req, status)) {
    4248           0 :                 return;
    4249             :         }
    4250             : 
    4251             :         /* Copy out parameters */
    4252             : 
    4253             :         /* Copy result */
    4254           0 :         state->orig.out.result = state->tmp.out.result;
    4255             : 
    4256             :         /* Reset temporary structure */
    4257           0 :         NDR_ZERO_STRUCT(state->tmp);
    4258             : 
    4259           0 :         tevent_req_done(req);
    4260             : }
    4261             : 
    4262           0 : NTSTATUS dcerpc_wkssvc_NetrRenameMachineInDomain_recv(struct tevent_req *req,
    4263             :                                                       TALLOC_CTX *mem_ctx,
    4264             :                                                       WERROR *result)
    4265             : {
    4266           0 :         struct dcerpc_wkssvc_NetrRenameMachineInDomain_state *state = tevent_req_data(
    4267             :                 req, struct dcerpc_wkssvc_NetrRenameMachineInDomain_state);
    4268             :         NTSTATUS status;
    4269             : 
    4270           0 :         if (tevent_req_is_nterror(req, &status)) {
    4271           0 :                 tevent_req_received(req);
    4272           0 :                 return status;
    4273             :         }
    4274             : 
    4275             :         /* Steal possible out parameters to the callers context */
    4276           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4277             : 
    4278             :         /* Return result */
    4279           0 :         *result = state->orig.out.result;
    4280             : 
    4281           0 :         tevent_req_received(req);
    4282           0 :         return NT_STATUS_OK;
    4283             : }
    4284             : 
    4285           0 : NTSTATUS dcerpc_wkssvc_NetrRenameMachineInDomain(struct dcerpc_binding_handle *h,
    4286             :                                                  TALLOC_CTX *mem_ctx,
    4287             :                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    4288             :                                                  const char *_NewMachineName /* [in] [charset(UTF16),unique] */,
    4289             :                                                  const char *_Account /* [in] [charset(UTF16),unique] */,
    4290             :                                                  const char *_password /* [in] [charset(UTF16),unique] */,
    4291             :                                                  uint32_t _RenameOptions /* [in]  */,
    4292             :                                                  WERROR *result)
    4293             : {
    4294             :         struct wkssvc_NetrRenameMachineInDomain r;
    4295             :         NTSTATUS status;
    4296             : 
    4297             :         /* In parameters */
    4298           0 :         r.in.server_name = _server_name;
    4299           0 :         r.in.NewMachineName = _NewMachineName;
    4300           0 :         r.in.Account = _Account;
    4301           0 :         r.in.password = _password;
    4302           0 :         r.in.RenameOptions = _RenameOptions;
    4303             : 
    4304             :         /* Out parameters */
    4305             : 
    4306             :         /* Result */
    4307           0 :         NDR_ZERO_STRUCT(r.out.result);
    4308             : 
    4309           0 :         status = dcerpc_wkssvc_NetrRenameMachineInDomain_r(h, mem_ctx, &r);
    4310           0 :         if (!NT_STATUS_IS_OK(status)) {
    4311           0 :                 return status;
    4312             :         }
    4313             : 
    4314             :         /* Return variables */
    4315             : 
    4316             :         /* Return result */
    4317           0 :         *result = r.out.result;
    4318             : 
    4319           0 :         return NT_STATUS_OK;
    4320             : }
    4321             : 
    4322             : struct dcerpc_wkssvc_NetrValidateName_r_state {
    4323             :         TALLOC_CTX *out_mem_ctx;
    4324             : };
    4325             : 
    4326             : static void dcerpc_wkssvc_NetrValidateName_r_done(struct tevent_req *subreq);
    4327             : 
    4328           0 : struct tevent_req *dcerpc_wkssvc_NetrValidateName_r_send(TALLOC_CTX *mem_ctx,
    4329             :         struct tevent_context *ev,
    4330             :         struct dcerpc_binding_handle *h,
    4331             :         struct wkssvc_NetrValidateName *r)
    4332             : {
    4333             :         struct tevent_req *req;
    4334             :         struct dcerpc_wkssvc_NetrValidateName_r_state *state;
    4335             :         struct tevent_req *subreq;
    4336             : 
    4337           0 :         req = tevent_req_create(mem_ctx, &state,
    4338             :                                 struct dcerpc_wkssvc_NetrValidateName_r_state);
    4339           0 :         if (req == NULL) {
    4340           0 :                 return NULL;
    4341             :         }
    4342             : 
    4343           0 :         state->out_mem_ctx = NULL;
    4344             : 
    4345           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4346             :                         NULL, &ndr_table_wkssvc,
    4347             :                         NDR_WKSSVC_NETRVALIDATENAME, state, r);
    4348           0 :         if (tevent_req_nomem(subreq, req)) {
    4349           0 :                 return tevent_req_post(req, ev);
    4350             :         }
    4351           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrValidateName_r_done, req);
    4352             : 
    4353           0 :         return req;
    4354             : }
    4355             : 
    4356           0 : static void dcerpc_wkssvc_NetrValidateName_r_done(struct tevent_req *subreq)
    4357             : {
    4358           0 :         struct tevent_req *req =
    4359           0 :                 tevent_req_callback_data(subreq,
    4360             :                 struct tevent_req);
    4361             :         NTSTATUS status;
    4362             : 
    4363           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4364           0 :         TALLOC_FREE(subreq);
    4365           0 :         if (tevent_req_nterror(req, status)) {
    4366           0 :                 return;
    4367             :         }
    4368             : 
    4369           0 :         tevent_req_done(req);
    4370             : }
    4371             : 
    4372           0 : NTSTATUS dcerpc_wkssvc_NetrValidateName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4373             : {
    4374           0 :         struct dcerpc_wkssvc_NetrValidateName_r_state *state =
    4375           0 :                 tevent_req_data(req,
    4376             :                 struct dcerpc_wkssvc_NetrValidateName_r_state);
    4377             :         NTSTATUS status;
    4378             : 
    4379           0 :         if (tevent_req_is_nterror(req, &status)) {
    4380           0 :                 tevent_req_received(req);
    4381           0 :                 return status;
    4382             :         }
    4383             : 
    4384           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4385             : 
    4386           0 :         tevent_req_received(req);
    4387           0 :         return NT_STATUS_OK;
    4388             : }
    4389             : 
    4390           5 : NTSTATUS dcerpc_wkssvc_NetrValidateName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrValidateName *r)
    4391             : {
    4392             :         NTSTATUS status;
    4393             : 
    4394           5 :         status = dcerpc_binding_handle_call(h,
    4395             :                         NULL, &ndr_table_wkssvc,
    4396             :                         NDR_WKSSVC_NETRVALIDATENAME, mem_ctx, r);
    4397             : 
    4398           5 :         return status;
    4399             : }
    4400             : 
    4401             : struct dcerpc_wkssvc_NetrValidateName_state {
    4402             :         struct wkssvc_NetrValidateName orig;
    4403             :         struct wkssvc_NetrValidateName tmp;
    4404             :         TALLOC_CTX *out_mem_ctx;
    4405             : };
    4406             : 
    4407             : static void dcerpc_wkssvc_NetrValidateName_done(struct tevent_req *subreq);
    4408             : 
    4409           0 : struct tevent_req *dcerpc_wkssvc_NetrValidateName_send(TALLOC_CTX *mem_ctx,
    4410             :                                                        struct tevent_context *ev,
    4411             :                                                        struct dcerpc_binding_handle *h,
    4412             :                                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    4413             :                                                        const char *_name /* [in] [charset(UTF16),ref] */,
    4414             :                                                        const char *_Account /* [in] [charset(UTF16),unique] */,
    4415             :                                                        const char *_Password /* [in] [charset(UTF16),unique] */,
    4416             :                                                        enum wkssvc_NetValidateNameType _name_type /* [in]  */)
    4417             : {
    4418             :         struct tevent_req *req;
    4419             :         struct dcerpc_wkssvc_NetrValidateName_state *state;
    4420             :         struct tevent_req *subreq;
    4421             : 
    4422           0 :         req = tevent_req_create(mem_ctx, &state,
    4423             :                                 struct dcerpc_wkssvc_NetrValidateName_state);
    4424           0 :         if (req == NULL) {
    4425           0 :                 return NULL;
    4426             :         }
    4427           0 :         state->out_mem_ctx = NULL;
    4428             : 
    4429             :         /* In parameters */
    4430           0 :         state->orig.in.server_name = _server_name;
    4431           0 :         state->orig.in.name = _name;
    4432           0 :         state->orig.in.Account = _Account;
    4433           0 :         state->orig.in.Password = _Password;
    4434           0 :         state->orig.in.name_type = _name_type;
    4435             : 
    4436             :         /* Out parameters */
    4437             : 
    4438             :         /* Result */
    4439           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4440             : 
    4441             :         /* make a temporary copy, that we pass to the dispatch function */
    4442           0 :         state->tmp = state->orig;
    4443             : 
    4444           0 :         subreq = dcerpc_wkssvc_NetrValidateName_r_send(state, ev, h, &state->tmp);
    4445           0 :         if (tevent_req_nomem(subreq, req)) {
    4446           0 :                 return tevent_req_post(req, ev);
    4447             :         }
    4448           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrValidateName_done, req);
    4449           0 :         return req;
    4450             : }
    4451             : 
    4452           0 : static void dcerpc_wkssvc_NetrValidateName_done(struct tevent_req *subreq)
    4453             : {
    4454           0 :         struct tevent_req *req = tevent_req_callback_data(
    4455             :                 subreq, struct tevent_req);
    4456           0 :         struct dcerpc_wkssvc_NetrValidateName_state *state = tevent_req_data(
    4457             :                 req, struct dcerpc_wkssvc_NetrValidateName_state);
    4458             :         NTSTATUS status;
    4459             :         TALLOC_CTX *mem_ctx;
    4460             : 
    4461           0 :         if (state->out_mem_ctx) {
    4462           0 :                 mem_ctx = state->out_mem_ctx;
    4463             :         } else {
    4464           0 :                 mem_ctx = state;
    4465             :         }
    4466             : 
    4467           0 :         status = dcerpc_wkssvc_NetrValidateName_r_recv(subreq, mem_ctx);
    4468           0 :         TALLOC_FREE(subreq);
    4469           0 :         if (tevent_req_nterror(req, status)) {
    4470           0 :                 return;
    4471             :         }
    4472             : 
    4473             :         /* Copy out parameters */
    4474             : 
    4475             :         /* Copy result */
    4476           0 :         state->orig.out.result = state->tmp.out.result;
    4477             : 
    4478             :         /* Reset temporary structure */
    4479           0 :         NDR_ZERO_STRUCT(state->tmp);
    4480             : 
    4481           0 :         tevent_req_done(req);
    4482             : }
    4483             : 
    4484           0 : NTSTATUS dcerpc_wkssvc_NetrValidateName_recv(struct tevent_req *req,
    4485             :                                              TALLOC_CTX *mem_ctx,
    4486             :                                              WERROR *result)
    4487             : {
    4488           0 :         struct dcerpc_wkssvc_NetrValidateName_state *state = tevent_req_data(
    4489             :                 req, struct dcerpc_wkssvc_NetrValidateName_state);
    4490             :         NTSTATUS status;
    4491             : 
    4492           0 :         if (tevent_req_is_nterror(req, &status)) {
    4493           0 :                 tevent_req_received(req);
    4494           0 :                 return status;
    4495             :         }
    4496             : 
    4497             :         /* Steal possible out parameters to the callers context */
    4498           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4499             : 
    4500             :         /* Return result */
    4501           0 :         *result = state->orig.out.result;
    4502             : 
    4503           0 :         tevent_req_received(req);
    4504           0 :         return NT_STATUS_OK;
    4505             : }
    4506             : 
    4507           0 : NTSTATUS dcerpc_wkssvc_NetrValidateName(struct dcerpc_binding_handle *h,
    4508             :                                         TALLOC_CTX *mem_ctx,
    4509             :                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    4510             :                                         const char *_name /* [in] [charset(UTF16),ref] */,
    4511             :                                         const char *_Account /* [in] [charset(UTF16),unique] */,
    4512             :                                         const char *_Password /* [in] [charset(UTF16),unique] */,
    4513             :                                         enum wkssvc_NetValidateNameType _name_type /* [in]  */,
    4514             :                                         WERROR *result)
    4515             : {
    4516             :         struct wkssvc_NetrValidateName r;
    4517             :         NTSTATUS status;
    4518             : 
    4519             :         /* In parameters */
    4520           0 :         r.in.server_name = _server_name;
    4521           0 :         r.in.name = _name;
    4522           0 :         r.in.Account = _Account;
    4523           0 :         r.in.Password = _Password;
    4524           0 :         r.in.name_type = _name_type;
    4525             : 
    4526             :         /* Out parameters */
    4527             : 
    4528             :         /* Result */
    4529           0 :         NDR_ZERO_STRUCT(r.out.result);
    4530             : 
    4531           0 :         status = dcerpc_wkssvc_NetrValidateName_r(h, mem_ctx, &r);
    4532           0 :         if (!NT_STATUS_IS_OK(status)) {
    4533           0 :                 return status;
    4534             :         }
    4535             : 
    4536             :         /* Return variables */
    4537             : 
    4538             :         /* Return result */
    4539           0 :         *result = r.out.result;
    4540             : 
    4541           0 :         return NT_STATUS_OK;
    4542             : }
    4543             : 
    4544             : struct dcerpc_wkssvc_NetrGetJoinInformation_r_state {
    4545             :         TALLOC_CTX *out_mem_ctx;
    4546             : };
    4547             : 
    4548             : static void dcerpc_wkssvc_NetrGetJoinInformation_r_done(struct tevent_req *subreq);
    4549             : 
    4550           0 : struct tevent_req *dcerpc_wkssvc_NetrGetJoinInformation_r_send(TALLOC_CTX *mem_ctx,
    4551             :         struct tevent_context *ev,
    4552             :         struct dcerpc_binding_handle *h,
    4553             :         struct wkssvc_NetrGetJoinInformation *r)
    4554             : {
    4555             :         struct tevent_req *req;
    4556             :         struct dcerpc_wkssvc_NetrGetJoinInformation_r_state *state;
    4557             :         struct tevent_req *subreq;
    4558             : 
    4559           0 :         req = tevent_req_create(mem_ctx, &state,
    4560             :                                 struct dcerpc_wkssvc_NetrGetJoinInformation_r_state);
    4561           0 :         if (req == NULL) {
    4562           0 :                 return NULL;
    4563             :         }
    4564             : 
    4565           0 :         state->out_mem_ctx = talloc_new(state);
    4566           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4567           0 :                 return tevent_req_post(req, ev);
    4568             :         }
    4569             : 
    4570           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4571             :                         NULL, &ndr_table_wkssvc,
    4572           0 :                         NDR_WKSSVC_NETRGETJOININFORMATION, state->out_mem_ctx, r);
    4573           0 :         if (tevent_req_nomem(subreq, req)) {
    4574           0 :                 return tevent_req_post(req, ev);
    4575             :         }
    4576           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrGetJoinInformation_r_done, req);
    4577             : 
    4578           0 :         return req;
    4579             : }
    4580             : 
    4581           0 : static void dcerpc_wkssvc_NetrGetJoinInformation_r_done(struct tevent_req *subreq)
    4582             : {
    4583           0 :         struct tevent_req *req =
    4584           0 :                 tevent_req_callback_data(subreq,
    4585             :                 struct tevent_req);
    4586             :         NTSTATUS status;
    4587             : 
    4588           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4589           0 :         TALLOC_FREE(subreq);
    4590           0 :         if (tevent_req_nterror(req, status)) {
    4591           0 :                 return;
    4592             :         }
    4593             : 
    4594           0 :         tevent_req_done(req);
    4595             : }
    4596             : 
    4597           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinInformation_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4598             : {
    4599           0 :         struct dcerpc_wkssvc_NetrGetJoinInformation_r_state *state =
    4600           0 :                 tevent_req_data(req,
    4601             :                 struct dcerpc_wkssvc_NetrGetJoinInformation_r_state);
    4602             :         NTSTATUS status;
    4603             : 
    4604           0 :         if (tevent_req_is_nterror(req, &status)) {
    4605           0 :                 tevent_req_received(req);
    4606           0 :                 return status;
    4607             :         }
    4608             : 
    4609           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4610             : 
    4611           0 :         tevent_req_received(req);
    4612           0 :         return NT_STATUS_OK;
    4613             : }
    4614             : 
    4615           5 : NTSTATUS dcerpc_wkssvc_NetrGetJoinInformation_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrGetJoinInformation *r)
    4616             : {
    4617             :         NTSTATUS status;
    4618             : 
    4619           5 :         status = dcerpc_binding_handle_call(h,
    4620             :                         NULL, &ndr_table_wkssvc,
    4621             :                         NDR_WKSSVC_NETRGETJOININFORMATION, mem_ctx, r);
    4622             : 
    4623           5 :         return status;
    4624             : }
    4625             : 
    4626             : struct dcerpc_wkssvc_NetrGetJoinInformation_state {
    4627             :         struct wkssvc_NetrGetJoinInformation orig;
    4628             :         struct wkssvc_NetrGetJoinInformation tmp;
    4629             :         TALLOC_CTX *out_mem_ctx;
    4630             : };
    4631             : 
    4632             : static void dcerpc_wkssvc_NetrGetJoinInformation_done(struct tevent_req *subreq);
    4633             : 
    4634           0 : struct tevent_req *dcerpc_wkssvc_NetrGetJoinInformation_send(TALLOC_CTX *mem_ctx,
    4635             :                                                              struct tevent_context *ev,
    4636             :                                                              struct dcerpc_binding_handle *h,
    4637             :                                                              const char *_server_name /* [in] [charset(UTF16),unique] */,
    4638             :                                                              const char **_name_buffer /* [in,out] [charset(UTF16),ref] */,
    4639             :                                                              enum wkssvc_NetJoinStatus *_name_type /* [out] [ref] */)
    4640             : {
    4641             :         struct tevent_req *req;
    4642             :         struct dcerpc_wkssvc_NetrGetJoinInformation_state *state;
    4643             :         struct tevent_req *subreq;
    4644             : 
    4645           0 :         req = tevent_req_create(mem_ctx, &state,
    4646             :                                 struct dcerpc_wkssvc_NetrGetJoinInformation_state);
    4647           0 :         if (req == NULL) {
    4648           0 :                 return NULL;
    4649             :         }
    4650           0 :         state->out_mem_ctx = NULL;
    4651             : 
    4652             :         /* In parameters */
    4653           0 :         state->orig.in.server_name = _server_name;
    4654           0 :         state->orig.in.name_buffer = _name_buffer;
    4655             : 
    4656             :         /* Out parameters */
    4657           0 :         state->orig.out.name_buffer = _name_buffer;
    4658           0 :         state->orig.out.name_type = _name_type;
    4659             : 
    4660             :         /* Result */
    4661           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4662             : 
    4663           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4664             :                              "dcerpc_wkssvc_NetrGetJoinInformation_out_memory");
    4665           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4666           0 :                 return tevent_req_post(req, ev);
    4667             :         }
    4668             : 
    4669             :         /* make a temporary copy, that we pass to the dispatch function */
    4670           0 :         state->tmp = state->orig;
    4671             : 
    4672           0 :         subreq = dcerpc_wkssvc_NetrGetJoinInformation_r_send(state, ev, h, &state->tmp);
    4673           0 :         if (tevent_req_nomem(subreq, req)) {
    4674           0 :                 return tevent_req_post(req, ev);
    4675             :         }
    4676           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrGetJoinInformation_done, req);
    4677           0 :         return req;
    4678             : }
    4679             : 
    4680           0 : static void dcerpc_wkssvc_NetrGetJoinInformation_done(struct tevent_req *subreq)
    4681             : {
    4682           0 :         struct tevent_req *req = tevent_req_callback_data(
    4683             :                 subreq, struct tevent_req);
    4684           0 :         struct dcerpc_wkssvc_NetrGetJoinInformation_state *state = tevent_req_data(
    4685             :                 req, struct dcerpc_wkssvc_NetrGetJoinInformation_state);
    4686             :         NTSTATUS status;
    4687             :         TALLOC_CTX *mem_ctx;
    4688             : 
    4689           0 :         if (state->out_mem_ctx) {
    4690           0 :                 mem_ctx = state->out_mem_ctx;
    4691             :         } else {
    4692           0 :                 mem_ctx = state;
    4693             :         }
    4694             : 
    4695           0 :         status = dcerpc_wkssvc_NetrGetJoinInformation_r_recv(subreq, mem_ctx);
    4696           0 :         TALLOC_FREE(subreq);
    4697           0 :         if (tevent_req_nterror(req, status)) {
    4698           0 :                 return;
    4699             :         }
    4700             : 
    4701             :         /* Copy out parameters */
    4702           0 :         *state->orig.out.name_buffer = *state->tmp.out.name_buffer;
    4703           0 :         *state->orig.out.name_type = *state->tmp.out.name_type;
    4704             : 
    4705             :         /* Copy result */
    4706           0 :         state->orig.out.result = state->tmp.out.result;
    4707             : 
    4708             :         /* Reset temporary structure */
    4709           0 :         NDR_ZERO_STRUCT(state->tmp);
    4710             : 
    4711           0 :         tevent_req_done(req);
    4712             : }
    4713             : 
    4714           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinInformation_recv(struct tevent_req *req,
    4715             :                                                    TALLOC_CTX *mem_ctx,
    4716             :                                                    WERROR *result)
    4717             : {
    4718           0 :         struct dcerpc_wkssvc_NetrGetJoinInformation_state *state = tevent_req_data(
    4719             :                 req, struct dcerpc_wkssvc_NetrGetJoinInformation_state);
    4720             :         NTSTATUS status;
    4721             : 
    4722           0 :         if (tevent_req_is_nterror(req, &status)) {
    4723           0 :                 tevent_req_received(req);
    4724           0 :                 return status;
    4725             :         }
    4726             : 
    4727             :         /* Steal possible out parameters to the callers context */
    4728           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4729             : 
    4730             :         /* Return result */
    4731           0 :         *result = state->orig.out.result;
    4732             : 
    4733           0 :         tevent_req_received(req);
    4734           0 :         return NT_STATUS_OK;
    4735             : }
    4736             : 
    4737           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinInformation(struct dcerpc_binding_handle *h,
    4738             :                                               TALLOC_CTX *mem_ctx,
    4739             :                                               const char *_server_name /* [in] [charset(UTF16),unique] */,
    4740             :                                               const char **_name_buffer /* [in,out] [charset(UTF16),ref] */,
    4741             :                                               enum wkssvc_NetJoinStatus *_name_type /* [out] [ref] */,
    4742             :                                               WERROR *result)
    4743             : {
    4744             :         struct wkssvc_NetrGetJoinInformation r;
    4745             :         NTSTATUS status;
    4746             : 
    4747             :         /* In parameters */
    4748           0 :         r.in.server_name = _server_name;
    4749           0 :         r.in.name_buffer = _name_buffer;
    4750             : 
    4751             :         /* Out parameters */
    4752           0 :         r.out.name_buffer = _name_buffer;
    4753           0 :         r.out.name_type = _name_type;
    4754             : 
    4755             :         /* Result */
    4756           0 :         NDR_ZERO_STRUCT(r.out.result);
    4757             : 
    4758           0 :         status = dcerpc_wkssvc_NetrGetJoinInformation_r(h, mem_ctx, &r);
    4759           0 :         if (!NT_STATUS_IS_OK(status)) {
    4760           0 :                 return status;
    4761             :         }
    4762             : 
    4763             :         /* Return variables */
    4764           0 :         *_name_buffer = *r.out.name_buffer;
    4765           0 :         *_name_type = *r.out.name_type;
    4766             : 
    4767             :         /* Return result */
    4768           0 :         *result = r.out.result;
    4769             : 
    4770           0 :         return NT_STATUS_OK;
    4771             : }
    4772             : 
    4773             : struct dcerpc_wkssvc_NetrGetJoinableOus_r_state {
    4774             :         TALLOC_CTX *out_mem_ctx;
    4775             : };
    4776             : 
    4777             : static void dcerpc_wkssvc_NetrGetJoinableOus_r_done(struct tevent_req *subreq);
    4778             : 
    4779           0 : struct tevent_req *dcerpc_wkssvc_NetrGetJoinableOus_r_send(TALLOC_CTX *mem_ctx,
    4780             :         struct tevent_context *ev,
    4781             :         struct dcerpc_binding_handle *h,
    4782             :         struct wkssvc_NetrGetJoinableOus *r)
    4783             : {
    4784             :         struct tevent_req *req;
    4785             :         struct dcerpc_wkssvc_NetrGetJoinableOus_r_state *state;
    4786             :         struct tevent_req *subreq;
    4787             : 
    4788           0 :         req = tevent_req_create(mem_ctx, &state,
    4789             :                                 struct dcerpc_wkssvc_NetrGetJoinableOus_r_state);
    4790           0 :         if (req == NULL) {
    4791           0 :                 return NULL;
    4792             :         }
    4793             : 
    4794           0 :         state->out_mem_ctx = talloc_new(state);
    4795           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4796           0 :                 return tevent_req_post(req, ev);
    4797             :         }
    4798             : 
    4799           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4800             :                         NULL, &ndr_table_wkssvc,
    4801           0 :                         NDR_WKSSVC_NETRGETJOINABLEOUS, state->out_mem_ctx, r);
    4802           0 :         if (tevent_req_nomem(subreq, req)) {
    4803           0 :                 return tevent_req_post(req, ev);
    4804             :         }
    4805           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrGetJoinableOus_r_done, req);
    4806             : 
    4807           0 :         return req;
    4808             : }
    4809             : 
    4810           0 : static void dcerpc_wkssvc_NetrGetJoinableOus_r_done(struct tevent_req *subreq)
    4811             : {
    4812           0 :         struct tevent_req *req =
    4813           0 :                 tevent_req_callback_data(subreq,
    4814             :                 struct tevent_req);
    4815             :         NTSTATUS status;
    4816             : 
    4817           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4818           0 :         TALLOC_FREE(subreq);
    4819           0 :         if (tevent_req_nterror(req, status)) {
    4820           0 :                 return;
    4821             :         }
    4822             : 
    4823           0 :         tevent_req_done(req);
    4824             : }
    4825             : 
    4826           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinableOus_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4827             : {
    4828           0 :         struct dcerpc_wkssvc_NetrGetJoinableOus_r_state *state =
    4829           0 :                 tevent_req_data(req,
    4830             :                 struct dcerpc_wkssvc_NetrGetJoinableOus_r_state);
    4831             :         NTSTATUS status;
    4832             : 
    4833           0 :         if (tevent_req_is_nterror(req, &status)) {
    4834           0 :                 tevent_req_received(req);
    4835           0 :                 return status;
    4836             :         }
    4837             : 
    4838           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4839             : 
    4840           0 :         tevent_req_received(req);
    4841           0 :         return NT_STATUS_OK;
    4842             : }
    4843             : 
    4844           5 : NTSTATUS dcerpc_wkssvc_NetrGetJoinableOus_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrGetJoinableOus *r)
    4845             : {
    4846             :         NTSTATUS status;
    4847             : 
    4848           5 :         status = dcerpc_binding_handle_call(h,
    4849             :                         NULL, &ndr_table_wkssvc,
    4850             :                         NDR_WKSSVC_NETRGETJOINABLEOUS, mem_ctx, r);
    4851             : 
    4852           5 :         return status;
    4853             : }
    4854             : 
    4855             : struct dcerpc_wkssvc_NetrGetJoinableOus_state {
    4856             :         struct wkssvc_NetrGetJoinableOus orig;
    4857             :         struct wkssvc_NetrGetJoinableOus tmp;
    4858             :         TALLOC_CTX *out_mem_ctx;
    4859             : };
    4860             : 
    4861             : static void dcerpc_wkssvc_NetrGetJoinableOus_done(struct tevent_req *subreq);
    4862             : 
    4863           0 : struct tevent_req *dcerpc_wkssvc_NetrGetJoinableOus_send(TALLOC_CTX *mem_ctx,
    4864             :                                                          struct tevent_context *ev,
    4865             :                                                          struct dcerpc_binding_handle *h,
    4866             :                                                          const char *_server_name /* [in] [charset(UTF16),unique] */,
    4867             :                                                          const char *_domain_name /* [in] [charset(UTF16),ref] */,
    4868             :                                                          const char *_Account /* [in] [charset(UTF16),unique] */,
    4869             :                                                          const char *_unknown /* [in] [charset(UTF16),unique] */,
    4870             :                                                          uint32_t *_num_ous /* [in,out] [ref] */,
    4871             :                                                          const char ***_ous /* [out] [charset(UTF16),ref,size_is(,*num_ous)] */)
    4872             : {
    4873             :         struct tevent_req *req;
    4874             :         struct dcerpc_wkssvc_NetrGetJoinableOus_state *state;
    4875             :         struct tevent_req *subreq;
    4876             : 
    4877           0 :         req = tevent_req_create(mem_ctx, &state,
    4878             :                                 struct dcerpc_wkssvc_NetrGetJoinableOus_state);
    4879           0 :         if (req == NULL) {
    4880           0 :                 return NULL;
    4881             :         }
    4882           0 :         state->out_mem_ctx = NULL;
    4883             : 
    4884             :         /* In parameters */
    4885           0 :         state->orig.in.server_name = _server_name;
    4886           0 :         state->orig.in.domain_name = _domain_name;
    4887           0 :         state->orig.in.Account = _Account;
    4888           0 :         state->orig.in.unknown = _unknown;
    4889           0 :         state->orig.in.num_ous = _num_ous;
    4890             : 
    4891             :         /* Out parameters */
    4892           0 :         state->orig.out.num_ous = _num_ous;
    4893           0 :         state->orig.out.ous = _ous;
    4894             : 
    4895             :         /* Result */
    4896           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4897             : 
    4898           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4899             :                              "dcerpc_wkssvc_NetrGetJoinableOus_out_memory");
    4900           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4901           0 :                 return tevent_req_post(req, ev);
    4902             :         }
    4903             : 
    4904             :         /* make a temporary copy, that we pass to the dispatch function */
    4905           0 :         state->tmp = state->orig;
    4906             : 
    4907           0 :         subreq = dcerpc_wkssvc_NetrGetJoinableOus_r_send(state, ev, h, &state->tmp);
    4908           0 :         if (tevent_req_nomem(subreq, req)) {
    4909           0 :                 return tevent_req_post(req, ev);
    4910             :         }
    4911           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrGetJoinableOus_done, req);
    4912           0 :         return req;
    4913             : }
    4914             : 
    4915           0 : static void dcerpc_wkssvc_NetrGetJoinableOus_done(struct tevent_req *subreq)
    4916             : {
    4917           0 :         struct tevent_req *req = tevent_req_callback_data(
    4918             :                 subreq, struct tevent_req);
    4919           0 :         struct dcerpc_wkssvc_NetrGetJoinableOus_state *state = tevent_req_data(
    4920             :                 req, struct dcerpc_wkssvc_NetrGetJoinableOus_state);
    4921             :         NTSTATUS status;
    4922             :         TALLOC_CTX *mem_ctx;
    4923             : 
    4924           0 :         if (state->out_mem_ctx) {
    4925           0 :                 mem_ctx = state->out_mem_ctx;
    4926             :         } else {
    4927           0 :                 mem_ctx = state;
    4928             :         }
    4929             : 
    4930           0 :         status = dcerpc_wkssvc_NetrGetJoinableOus_r_recv(subreq, mem_ctx);
    4931           0 :         TALLOC_FREE(subreq);
    4932           0 :         if (tevent_req_nterror(req, status)) {
    4933           0 :                 return;
    4934             :         }
    4935             : 
    4936             :         /* Copy out parameters */
    4937           0 :         *state->orig.out.num_ous = *state->tmp.out.num_ous;
    4938           0 :         *state->orig.out.ous = *state->tmp.out.ous;
    4939             : 
    4940             :         /* Copy result */
    4941           0 :         state->orig.out.result = state->tmp.out.result;
    4942             : 
    4943             :         /* Reset temporary structure */
    4944           0 :         NDR_ZERO_STRUCT(state->tmp);
    4945             : 
    4946           0 :         tevent_req_done(req);
    4947             : }
    4948             : 
    4949           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinableOus_recv(struct tevent_req *req,
    4950             :                                                TALLOC_CTX *mem_ctx,
    4951             :                                                WERROR *result)
    4952             : {
    4953           0 :         struct dcerpc_wkssvc_NetrGetJoinableOus_state *state = tevent_req_data(
    4954             :                 req, struct dcerpc_wkssvc_NetrGetJoinableOus_state);
    4955             :         NTSTATUS status;
    4956             : 
    4957           0 :         if (tevent_req_is_nterror(req, &status)) {
    4958           0 :                 tevent_req_received(req);
    4959           0 :                 return status;
    4960             :         }
    4961             : 
    4962             :         /* Steal possible out parameters to the callers context */
    4963           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4964             : 
    4965             :         /* Return result */
    4966           0 :         *result = state->orig.out.result;
    4967             : 
    4968           0 :         tevent_req_received(req);
    4969           0 :         return NT_STATUS_OK;
    4970             : }
    4971             : 
    4972           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinableOus(struct dcerpc_binding_handle *h,
    4973             :                                           TALLOC_CTX *mem_ctx,
    4974             :                                           const char *_server_name /* [in] [charset(UTF16),unique] */,
    4975             :                                           const char *_domain_name /* [in] [charset(UTF16),ref] */,
    4976             :                                           const char *_Account /* [in] [charset(UTF16),unique] */,
    4977             :                                           const char *_unknown /* [in] [charset(UTF16),unique] */,
    4978             :                                           uint32_t *_num_ous /* [in,out] [ref] */,
    4979             :                                           const char ***_ous /* [out] [charset(UTF16),ref,size_is(,*num_ous)] */,
    4980             :                                           WERROR *result)
    4981             : {
    4982             :         struct wkssvc_NetrGetJoinableOus r;
    4983             :         NTSTATUS status;
    4984             : 
    4985             :         /* In parameters */
    4986           0 :         r.in.server_name = _server_name;
    4987           0 :         r.in.domain_name = _domain_name;
    4988           0 :         r.in.Account = _Account;
    4989           0 :         r.in.unknown = _unknown;
    4990           0 :         r.in.num_ous = _num_ous;
    4991             : 
    4992             :         /* Out parameters */
    4993           0 :         r.out.num_ous = _num_ous;
    4994           0 :         r.out.ous = _ous;
    4995             : 
    4996             :         /* Result */
    4997           0 :         NDR_ZERO_STRUCT(r.out.result);
    4998             : 
    4999           0 :         status = dcerpc_wkssvc_NetrGetJoinableOus_r(h, mem_ctx, &r);
    5000           0 :         if (!NT_STATUS_IS_OK(status)) {
    5001           0 :                 return status;
    5002             :         }
    5003             : 
    5004             :         /* Return variables */
    5005           0 :         *_num_ous = *r.out.num_ous;
    5006           0 :         *_ous = *r.out.ous;
    5007             : 
    5008             :         /* Return result */
    5009           0 :         *result = r.out.result;
    5010             : 
    5011           0 :         return NT_STATUS_OK;
    5012             : }
    5013             : 
    5014             : struct dcerpc_wkssvc_NetrJoinDomain2_r_state {
    5015             :         TALLOC_CTX *out_mem_ctx;
    5016             : };
    5017             : 
    5018             : static void dcerpc_wkssvc_NetrJoinDomain2_r_done(struct tevent_req *subreq);
    5019             : 
    5020           0 : struct tevent_req *dcerpc_wkssvc_NetrJoinDomain2_r_send(TALLOC_CTX *mem_ctx,
    5021             :         struct tevent_context *ev,
    5022             :         struct dcerpc_binding_handle *h,
    5023             :         struct wkssvc_NetrJoinDomain2 *r)
    5024             : {
    5025             :         struct tevent_req *req;
    5026             :         struct dcerpc_wkssvc_NetrJoinDomain2_r_state *state;
    5027             :         struct tevent_req *subreq;
    5028             : 
    5029           0 :         req = tevent_req_create(mem_ctx, &state,
    5030             :                                 struct dcerpc_wkssvc_NetrJoinDomain2_r_state);
    5031           0 :         if (req == NULL) {
    5032           0 :                 return NULL;
    5033             :         }
    5034             : 
    5035           0 :         state->out_mem_ctx = NULL;
    5036             : 
    5037           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5038             :                         NULL, &ndr_table_wkssvc,
    5039             :                         NDR_WKSSVC_NETRJOINDOMAIN2, state, r);
    5040           0 :         if (tevent_req_nomem(subreq, req)) {
    5041           0 :                 return tevent_req_post(req, ev);
    5042             :         }
    5043           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrJoinDomain2_r_done, req);
    5044             : 
    5045           0 :         return req;
    5046             : }
    5047             : 
    5048           0 : static void dcerpc_wkssvc_NetrJoinDomain2_r_done(struct tevent_req *subreq)
    5049             : {
    5050           0 :         struct tevent_req *req =
    5051           0 :                 tevent_req_callback_data(subreq,
    5052             :                 struct tevent_req);
    5053             :         NTSTATUS status;
    5054             : 
    5055           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5056           0 :         TALLOC_FREE(subreq);
    5057           0 :         if (tevent_req_nterror(req, status)) {
    5058           0 :                 return;
    5059             :         }
    5060             : 
    5061           0 :         tevent_req_done(req);
    5062             : }
    5063             : 
    5064           0 : NTSTATUS dcerpc_wkssvc_NetrJoinDomain2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5065             : {
    5066           0 :         struct dcerpc_wkssvc_NetrJoinDomain2_r_state *state =
    5067           0 :                 tevent_req_data(req,
    5068             :                 struct dcerpc_wkssvc_NetrJoinDomain2_r_state);
    5069             :         NTSTATUS status;
    5070             : 
    5071           0 :         if (tevent_req_is_nterror(req, &status)) {
    5072           0 :                 tevent_req_received(req);
    5073           0 :                 return status;
    5074             :         }
    5075             : 
    5076           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5077             : 
    5078           0 :         tevent_req_received(req);
    5079           0 :         return NT_STATUS_OK;
    5080             : }
    5081             : 
    5082           0 : NTSTATUS dcerpc_wkssvc_NetrJoinDomain2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrJoinDomain2 *r)
    5083             : {
    5084             :         NTSTATUS status;
    5085             : 
    5086           0 :         status = dcerpc_binding_handle_call(h,
    5087             :                         NULL, &ndr_table_wkssvc,
    5088             :                         NDR_WKSSVC_NETRJOINDOMAIN2, mem_ctx, r);
    5089             : 
    5090           0 :         return status;
    5091             : }
    5092             : 
    5093             : struct dcerpc_wkssvc_NetrJoinDomain2_state {
    5094             :         struct wkssvc_NetrJoinDomain2 orig;
    5095             :         struct wkssvc_NetrJoinDomain2 tmp;
    5096             :         TALLOC_CTX *out_mem_ctx;
    5097             : };
    5098             : 
    5099             : static void dcerpc_wkssvc_NetrJoinDomain2_done(struct tevent_req *subreq);
    5100             : 
    5101           0 : struct tevent_req *dcerpc_wkssvc_NetrJoinDomain2_send(TALLOC_CTX *mem_ctx,
    5102             :                                                       struct tevent_context *ev,
    5103             :                                                       struct dcerpc_binding_handle *h,
    5104             :                                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
    5105             :                                                       const char *_domain_name /* [in] [charset(UTF16),ref] */,
    5106             :                                                       const char *_account_ou /* [in] [charset(UTF16),unique] */,
    5107             :                                                       const char *_admin_account /* [in] [charset(UTF16),unique] */,
    5108             :                                                       struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */,
    5109             :                                                       uint32_t _join_flags /* [in]  */)
    5110             : {
    5111             :         struct tevent_req *req;
    5112             :         struct dcerpc_wkssvc_NetrJoinDomain2_state *state;
    5113             :         struct tevent_req *subreq;
    5114             : 
    5115           0 :         req = tevent_req_create(mem_ctx, &state,
    5116             :                                 struct dcerpc_wkssvc_NetrJoinDomain2_state);
    5117           0 :         if (req == NULL) {
    5118           0 :                 return NULL;
    5119             :         }
    5120           0 :         state->out_mem_ctx = NULL;
    5121             : 
    5122             :         /* In parameters */
    5123           0 :         state->orig.in.server_name = _server_name;
    5124           0 :         state->orig.in.domain_name = _domain_name;
    5125           0 :         state->orig.in.account_ou = _account_ou;
    5126           0 :         state->orig.in.admin_account = _admin_account;
    5127           0 :         state->orig.in.encrypted_password = _encrypted_password;
    5128           0 :         state->orig.in.join_flags = _join_flags;
    5129             : 
    5130             :         /* Out parameters */
    5131             : 
    5132             :         /* Result */
    5133           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5134             : 
    5135             :         /* make a temporary copy, that we pass to the dispatch function */
    5136           0 :         state->tmp = state->orig;
    5137             : 
    5138           0 :         subreq = dcerpc_wkssvc_NetrJoinDomain2_r_send(state, ev, h, &state->tmp);
    5139           0 :         if (tevent_req_nomem(subreq, req)) {
    5140           0 :                 return tevent_req_post(req, ev);
    5141             :         }
    5142           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrJoinDomain2_done, req);
    5143           0 :         return req;
    5144             : }
    5145             : 
    5146           0 : static void dcerpc_wkssvc_NetrJoinDomain2_done(struct tevent_req *subreq)
    5147             : {
    5148           0 :         struct tevent_req *req = tevent_req_callback_data(
    5149             :                 subreq, struct tevent_req);
    5150           0 :         struct dcerpc_wkssvc_NetrJoinDomain2_state *state = tevent_req_data(
    5151             :                 req, struct dcerpc_wkssvc_NetrJoinDomain2_state);
    5152             :         NTSTATUS status;
    5153             :         TALLOC_CTX *mem_ctx;
    5154             : 
    5155           0 :         if (state->out_mem_ctx) {
    5156           0 :                 mem_ctx = state->out_mem_ctx;
    5157             :         } else {
    5158           0 :                 mem_ctx = state;
    5159             :         }
    5160             : 
    5161           0 :         status = dcerpc_wkssvc_NetrJoinDomain2_r_recv(subreq, mem_ctx);
    5162           0 :         TALLOC_FREE(subreq);
    5163           0 :         if (tevent_req_nterror(req, status)) {
    5164           0 :                 return;
    5165             :         }
    5166             : 
    5167             :         /* Copy out parameters */
    5168             : 
    5169             :         /* Copy result */
    5170           0 :         state->orig.out.result = state->tmp.out.result;
    5171             : 
    5172             :         /* Reset temporary structure */
    5173           0 :         NDR_ZERO_STRUCT(state->tmp);
    5174             : 
    5175           0 :         tevent_req_done(req);
    5176             : }
    5177             : 
    5178           0 : NTSTATUS dcerpc_wkssvc_NetrJoinDomain2_recv(struct tevent_req *req,
    5179             :                                             TALLOC_CTX *mem_ctx,
    5180             :                                             WERROR *result)
    5181             : {
    5182           0 :         struct dcerpc_wkssvc_NetrJoinDomain2_state *state = tevent_req_data(
    5183             :                 req, struct dcerpc_wkssvc_NetrJoinDomain2_state);
    5184             :         NTSTATUS status;
    5185             : 
    5186           0 :         if (tevent_req_is_nterror(req, &status)) {
    5187           0 :                 tevent_req_received(req);
    5188           0 :                 return status;
    5189             :         }
    5190             : 
    5191             :         /* Steal possible out parameters to the callers context */
    5192           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5193             : 
    5194             :         /* Return result */
    5195           0 :         *result = state->orig.out.result;
    5196             : 
    5197           0 :         tevent_req_received(req);
    5198           0 :         return NT_STATUS_OK;
    5199             : }
    5200             : 
    5201           0 : NTSTATUS dcerpc_wkssvc_NetrJoinDomain2(struct dcerpc_binding_handle *h,
    5202             :                                        TALLOC_CTX *mem_ctx,
    5203             :                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    5204             :                                        const char *_domain_name /* [in] [charset(UTF16),ref] */,
    5205             :                                        const char *_account_ou /* [in] [charset(UTF16),unique] */,
    5206             :                                        const char *_admin_account /* [in] [charset(UTF16),unique] */,
    5207             :                                        struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */,
    5208             :                                        uint32_t _join_flags /* [in]  */,
    5209             :                                        WERROR *result)
    5210             : {
    5211             :         struct wkssvc_NetrJoinDomain2 r;
    5212             :         NTSTATUS status;
    5213             : 
    5214             :         /* In parameters */
    5215           0 :         r.in.server_name = _server_name;
    5216           0 :         r.in.domain_name = _domain_name;
    5217           0 :         r.in.account_ou = _account_ou;
    5218           0 :         r.in.admin_account = _admin_account;
    5219           0 :         r.in.encrypted_password = _encrypted_password;
    5220           0 :         r.in.join_flags = _join_flags;
    5221             : 
    5222             :         /* Out parameters */
    5223             : 
    5224             :         /* Result */
    5225           0 :         NDR_ZERO_STRUCT(r.out.result);
    5226             : 
    5227           0 :         status = dcerpc_wkssvc_NetrJoinDomain2_r(h, mem_ctx, &r);
    5228           0 :         if (!NT_STATUS_IS_OK(status)) {
    5229           0 :                 return status;
    5230             :         }
    5231             : 
    5232             :         /* Return variables */
    5233             : 
    5234             :         /* Return result */
    5235           0 :         *result = r.out.result;
    5236             : 
    5237           0 :         return NT_STATUS_OK;
    5238             : }
    5239             : 
    5240             : struct dcerpc_wkssvc_NetrUnjoinDomain2_r_state {
    5241             :         TALLOC_CTX *out_mem_ctx;
    5242             : };
    5243             : 
    5244             : static void dcerpc_wkssvc_NetrUnjoinDomain2_r_done(struct tevent_req *subreq);
    5245             : 
    5246           0 : struct tevent_req *dcerpc_wkssvc_NetrUnjoinDomain2_r_send(TALLOC_CTX *mem_ctx,
    5247             :         struct tevent_context *ev,
    5248             :         struct dcerpc_binding_handle *h,
    5249             :         struct wkssvc_NetrUnjoinDomain2 *r)
    5250             : {
    5251             :         struct tevent_req *req;
    5252             :         struct dcerpc_wkssvc_NetrUnjoinDomain2_r_state *state;
    5253             :         struct tevent_req *subreq;
    5254             : 
    5255           0 :         req = tevent_req_create(mem_ctx, &state,
    5256             :                                 struct dcerpc_wkssvc_NetrUnjoinDomain2_r_state);
    5257           0 :         if (req == NULL) {
    5258           0 :                 return NULL;
    5259             :         }
    5260             : 
    5261           0 :         state->out_mem_ctx = NULL;
    5262             : 
    5263           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5264             :                         NULL, &ndr_table_wkssvc,
    5265             :                         NDR_WKSSVC_NETRUNJOINDOMAIN2, state, r);
    5266           0 :         if (tevent_req_nomem(subreq, req)) {
    5267           0 :                 return tevent_req_post(req, ev);
    5268             :         }
    5269           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUnjoinDomain2_r_done, req);
    5270             : 
    5271           0 :         return req;
    5272             : }
    5273             : 
    5274           0 : static void dcerpc_wkssvc_NetrUnjoinDomain2_r_done(struct tevent_req *subreq)
    5275             : {
    5276           0 :         struct tevent_req *req =
    5277           0 :                 tevent_req_callback_data(subreq,
    5278             :                 struct tevent_req);
    5279             :         NTSTATUS status;
    5280             : 
    5281           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5282           0 :         TALLOC_FREE(subreq);
    5283           0 :         if (tevent_req_nterror(req, status)) {
    5284           0 :                 return;
    5285             :         }
    5286             : 
    5287           0 :         tevent_req_done(req);
    5288             : }
    5289             : 
    5290           0 : NTSTATUS dcerpc_wkssvc_NetrUnjoinDomain2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5291             : {
    5292           0 :         struct dcerpc_wkssvc_NetrUnjoinDomain2_r_state *state =
    5293           0 :                 tevent_req_data(req,
    5294             :                 struct dcerpc_wkssvc_NetrUnjoinDomain2_r_state);
    5295             :         NTSTATUS status;
    5296             : 
    5297           0 :         if (tevent_req_is_nterror(req, &status)) {
    5298           0 :                 tevent_req_received(req);
    5299           0 :                 return status;
    5300             :         }
    5301             : 
    5302           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5303             : 
    5304           0 :         tevent_req_received(req);
    5305           0 :         return NT_STATUS_OK;
    5306             : }
    5307             : 
    5308           0 : NTSTATUS dcerpc_wkssvc_NetrUnjoinDomain2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrUnjoinDomain2 *r)
    5309             : {
    5310             :         NTSTATUS status;
    5311             : 
    5312           0 :         status = dcerpc_binding_handle_call(h,
    5313             :                         NULL, &ndr_table_wkssvc,
    5314             :                         NDR_WKSSVC_NETRUNJOINDOMAIN2, mem_ctx, r);
    5315             : 
    5316           0 :         return status;
    5317             : }
    5318             : 
    5319             : struct dcerpc_wkssvc_NetrUnjoinDomain2_state {
    5320             :         struct wkssvc_NetrUnjoinDomain2 orig;
    5321             :         struct wkssvc_NetrUnjoinDomain2 tmp;
    5322             :         TALLOC_CTX *out_mem_ctx;
    5323             : };
    5324             : 
    5325             : static void dcerpc_wkssvc_NetrUnjoinDomain2_done(struct tevent_req *subreq);
    5326             : 
    5327           0 : struct tevent_req *dcerpc_wkssvc_NetrUnjoinDomain2_send(TALLOC_CTX *mem_ctx,
    5328             :                                                         struct tevent_context *ev,
    5329             :                                                         struct dcerpc_binding_handle *h,
    5330             :                                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    5331             :                                                         const char *_account /* [in] [charset(UTF16),unique] */,
    5332             :                                                         struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */,
    5333             :                                                         uint32_t _unjoin_flags /* [in]  */)
    5334             : {
    5335             :         struct tevent_req *req;
    5336             :         struct dcerpc_wkssvc_NetrUnjoinDomain2_state *state;
    5337             :         struct tevent_req *subreq;
    5338             : 
    5339           0 :         req = tevent_req_create(mem_ctx, &state,
    5340             :                                 struct dcerpc_wkssvc_NetrUnjoinDomain2_state);
    5341           0 :         if (req == NULL) {
    5342           0 :                 return NULL;
    5343             :         }
    5344           0 :         state->out_mem_ctx = NULL;
    5345             : 
    5346             :         /* In parameters */
    5347           0 :         state->orig.in.server_name = _server_name;
    5348           0 :         state->orig.in.account = _account;
    5349           0 :         state->orig.in.encrypted_password = _encrypted_password;
    5350           0 :         state->orig.in.unjoin_flags = _unjoin_flags;
    5351             : 
    5352             :         /* Out parameters */
    5353             : 
    5354             :         /* Result */
    5355           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5356             : 
    5357             :         /* make a temporary copy, that we pass to the dispatch function */
    5358           0 :         state->tmp = state->orig;
    5359             : 
    5360           0 :         subreq = dcerpc_wkssvc_NetrUnjoinDomain2_r_send(state, ev, h, &state->tmp);
    5361           0 :         if (tevent_req_nomem(subreq, req)) {
    5362           0 :                 return tevent_req_post(req, ev);
    5363             :         }
    5364           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrUnjoinDomain2_done, req);
    5365           0 :         return req;
    5366             : }
    5367             : 
    5368           0 : static void dcerpc_wkssvc_NetrUnjoinDomain2_done(struct tevent_req *subreq)
    5369             : {
    5370           0 :         struct tevent_req *req = tevent_req_callback_data(
    5371             :                 subreq, struct tevent_req);
    5372           0 :         struct dcerpc_wkssvc_NetrUnjoinDomain2_state *state = tevent_req_data(
    5373             :                 req, struct dcerpc_wkssvc_NetrUnjoinDomain2_state);
    5374             :         NTSTATUS status;
    5375             :         TALLOC_CTX *mem_ctx;
    5376             : 
    5377           0 :         if (state->out_mem_ctx) {
    5378           0 :                 mem_ctx = state->out_mem_ctx;
    5379             :         } else {
    5380           0 :                 mem_ctx = state;
    5381             :         }
    5382             : 
    5383           0 :         status = dcerpc_wkssvc_NetrUnjoinDomain2_r_recv(subreq, mem_ctx);
    5384           0 :         TALLOC_FREE(subreq);
    5385           0 :         if (tevent_req_nterror(req, status)) {
    5386           0 :                 return;
    5387             :         }
    5388             : 
    5389             :         /* Copy out parameters */
    5390             : 
    5391             :         /* Copy result */
    5392           0 :         state->orig.out.result = state->tmp.out.result;
    5393             : 
    5394             :         /* Reset temporary structure */
    5395           0 :         NDR_ZERO_STRUCT(state->tmp);
    5396             : 
    5397           0 :         tevent_req_done(req);
    5398             : }
    5399             : 
    5400           0 : NTSTATUS dcerpc_wkssvc_NetrUnjoinDomain2_recv(struct tevent_req *req,
    5401             :                                               TALLOC_CTX *mem_ctx,
    5402             :                                               WERROR *result)
    5403             : {
    5404           0 :         struct dcerpc_wkssvc_NetrUnjoinDomain2_state *state = tevent_req_data(
    5405             :                 req, struct dcerpc_wkssvc_NetrUnjoinDomain2_state);
    5406             :         NTSTATUS status;
    5407             : 
    5408           0 :         if (tevent_req_is_nterror(req, &status)) {
    5409           0 :                 tevent_req_received(req);
    5410           0 :                 return status;
    5411             :         }
    5412             : 
    5413             :         /* Steal possible out parameters to the callers context */
    5414           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5415             : 
    5416             :         /* Return result */
    5417           0 :         *result = state->orig.out.result;
    5418             : 
    5419           0 :         tevent_req_received(req);
    5420           0 :         return NT_STATUS_OK;
    5421             : }
    5422             : 
    5423           0 : NTSTATUS dcerpc_wkssvc_NetrUnjoinDomain2(struct dcerpc_binding_handle *h,
    5424             :                                          TALLOC_CTX *mem_ctx,
    5425             :                                          const char *_server_name /* [in] [charset(UTF16),unique] */,
    5426             :                                          const char *_account /* [in] [charset(UTF16),unique] */,
    5427             :                                          struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */,
    5428             :                                          uint32_t _unjoin_flags /* [in]  */,
    5429             :                                          WERROR *result)
    5430             : {
    5431             :         struct wkssvc_NetrUnjoinDomain2 r;
    5432             :         NTSTATUS status;
    5433             : 
    5434             :         /* In parameters */
    5435           0 :         r.in.server_name = _server_name;
    5436           0 :         r.in.account = _account;
    5437           0 :         r.in.encrypted_password = _encrypted_password;
    5438           0 :         r.in.unjoin_flags = _unjoin_flags;
    5439             : 
    5440             :         /* Out parameters */
    5441             : 
    5442             :         /* Result */
    5443           0 :         NDR_ZERO_STRUCT(r.out.result);
    5444             : 
    5445           0 :         status = dcerpc_wkssvc_NetrUnjoinDomain2_r(h, mem_ctx, &r);
    5446           0 :         if (!NT_STATUS_IS_OK(status)) {
    5447           0 :                 return status;
    5448             :         }
    5449             : 
    5450             :         /* Return variables */
    5451             : 
    5452             :         /* Return result */
    5453           0 :         *result = r.out.result;
    5454             : 
    5455           0 :         return NT_STATUS_OK;
    5456             : }
    5457             : 
    5458             : struct dcerpc_wkssvc_NetrRenameMachineInDomain2_r_state {
    5459             :         TALLOC_CTX *out_mem_ctx;
    5460             : };
    5461             : 
    5462             : static void dcerpc_wkssvc_NetrRenameMachineInDomain2_r_done(struct tevent_req *subreq);
    5463             : 
    5464           0 : struct tevent_req *dcerpc_wkssvc_NetrRenameMachineInDomain2_r_send(TALLOC_CTX *mem_ctx,
    5465             :         struct tevent_context *ev,
    5466             :         struct dcerpc_binding_handle *h,
    5467             :         struct wkssvc_NetrRenameMachineInDomain2 *r)
    5468             : {
    5469             :         struct tevent_req *req;
    5470             :         struct dcerpc_wkssvc_NetrRenameMachineInDomain2_r_state *state;
    5471             :         struct tevent_req *subreq;
    5472             : 
    5473           0 :         req = tevent_req_create(mem_ctx, &state,
    5474             :                                 struct dcerpc_wkssvc_NetrRenameMachineInDomain2_r_state);
    5475           0 :         if (req == NULL) {
    5476           0 :                 return NULL;
    5477             :         }
    5478             : 
    5479           0 :         state->out_mem_ctx = NULL;
    5480             : 
    5481           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5482             :                         NULL, &ndr_table_wkssvc,
    5483             :                         NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2, state, r);
    5484           0 :         if (tevent_req_nomem(subreq, req)) {
    5485           0 :                 return tevent_req_post(req, ev);
    5486             :         }
    5487           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrRenameMachineInDomain2_r_done, req);
    5488             : 
    5489           0 :         return req;
    5490             : }
    5491             : 
    5492           0 : static void dcerpc_wkssvc_NetrRenameMachineInDomain2_r_done(struct tevent_req *subreq)
    5493             : {
    5494           0 :         struct tevent_req *req =
    5495           0 :                 tevent_req_callback_data(subreq,
    5496             :                 struct tevent_req);
    5497             :         NTSTATUS status;
    5498             : 
    5499           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5500           0 :         TALLOC_FREE(subreq);
    5501           0 :         if (tevent_req_nterror(req, status)) {
    5502           0 :                 return;
    5503             :         }
    5504             : 
    5505           0 :         tevent_req_done(req);
    5506             : }
    5507             : 
    5508           0 : NTSTATUS dcerpc_wkssvc_NetrRenameMachineInDomain2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5509             : {
    5510           0 :         struct dcerpc_wkssvc_NetrRenameMachineInDomain2_r_state *state =
    5511           0 :                 tevent_req_data(req,
    5512             :                 struct dcerpc_wkssvc_NetrRenameMachineInDomain2_r_state);
    5513             :         NTSTATUS status;
    5514             : 
    5515           0 :         if (tevent_req_is_nterror(req, &status)) {
    5516           0 :                 tevent_req_received(req);
    5517           0 :                 return status;
    5518             :         }
    5519             : 
    5520           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5521             : 
    5522           0 :         tevent_req_received(req);
    5523           0 :         return NT_STATUS_OK;
    5524             : }
    5525             : 
    5526           0 : NTSTATUS dcerpc_wkssvc_NetrRenameMachineInDomain2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrRenameMachineInDomain2 *r)
    5527             : {
    5528             :         NTSTATUS status;
    5529             : 
    5530           0 :         status = dcerpc_binding_handle_call(h,
    5531             :                         NULL, &ndr_table_wkssvc,
    5532             :                         NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2, mem_ctx, r);
    5533             : 
    5534           0 :         return status;
    5535             : }
    5536             : 
    5537             : struct dcerpc_wkssvc_NetrRenameMachineInDomain2_state {
    5538             :         struct wkssvc_NetrRenameMachineInDomain2 orig;
    5539             :         struct wkssvc_NetrRenameMachineInDomain2 tmp;
    5540             :         TALLOC_CTX *out_mem_ctx;
    5541             : };
    5542             : 
    5543             : static void dcerpc_wkssvc_NetrRenameMachineInDomain2_done(struct tevent_req *subreq);
    5544             : 
    5545           0 : struct tevent_req *dcerpc_wkssvc_NetrRenameMachineInDomain2_send(TALLOC_CTX *mem_ctx,
    5546             :                                                                  struct tevent_context *ev,
    5547             :                                                                  struct dcerpc_binding_handle *h,
    5548             :                                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    5549             :                                                                  const char *_NewMachineName /* [in] [charset(UTF16),unique] */,
    5550             :                                                                  const char *_Account /* [in] [charset(UTF16),unique] */,
    5551             :                                                                  struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    5552             :                                                                  uint32_t _RenameOptions /* [in]  */)
    5553             : {
    5554             :         struct tevent_req *req;
    5555             :         struct dcerpc_wkssvc_NetrRenameMachineInDomain2_state *state;
    5556             :         struct tevent_req *subreq;
    5557             : 
    5558           0 :         req = tevent_req_create(mem_ctx, &state,
    5559             :                                 struct dcerpc_wkssvc_NetrRenameMachineInDomain2_state);
    5560           0 :         if (req == NULL) {
    5561           0 :                 return NULL;
    5562             :         }
    5563           0 :         state->out_mem_ctx = NULL;
    5564             : 
    5565             :         /* In parameters */
    5566           0 :         state->orig.in.server_name = _server_name;
    5567           0 :         state->orig.in.NewMachineName = _NewMachineName;
    5568           0 :         state->orig.in.Account = _Account;
    5569           0 :         state->orig.in.EncryptedPassword = _EncryptedPassword;
    5570           0 :         state->orig.in.RenameOptions = _RenameOptions;
    5571             : 
    5572             :         /* Out parameters */
    5573             : 
    5574             :         /* Result */
    5575           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5576             : 
    5577             :         /* make a temporary copy, that we pass to the dispatch function */
    5578           0 :         state->tmp = state->orig;
    5579             : 
    5580           0 :         subreq = dcerpc_wkssvc_NetrRenameMachineInDomain2_r_send(state, ev, h, &state->tmp);
    5581           0 :         if (tevent_req_nomem(subreq, req)) {
    5582           0 :                 return tevent_req_post(req, ev);
    5583             :         }
    5584           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrRenameMachineInDomain2_done, req);
    5585           0 :         return req;
    5586             : }
    5587             : 
    5588           0 : static void dcerpc_wkssvc_NetrRenameMachineInDomain2_done(struct tevent_req *subreq)
    5589             : {
    5590           0 :         struct tevent_req *req = tevent_req_callback_data(
    5591             :                 subreq, struct tevent_req);
    5592           0 :         struct dcerpc_wkssvc_NetrRenameMachineInDomain2_state *state = tevent_req_data(
    5593             :                 req, struct dcerpc_wkssvc_NetrRenameMachineInDomain2_state);
    5594             :         NTSTATUS status;
    5595             :         TALLOC_CTX *mem_ctx;
    5596             : 
    5597           0 :         if (state->out_mem_ctx) {
    5598           0 :                 mem_ctx = state->out_mem_ctx;
    5599             :         } else {
    5600           0 :                 mem_ctx = state;
    5601             :         }
    5602             : 
    5603           0 :         status = dcerpc_wkssvc_NetrRenameMachineInDomain2_r_recv(subreq, mem_ctx);
    5604           0 :         TALLOC_FREE(subreq);
    5605           0 :         if (tevent_req_nterror(req, status)) {
    5606           0 :                 return;
    5607             :         }
    5608             : 
    5609             :         /* Copy out parameters */
    5610             : 
    5611             :         /* Copy result */
    5612           0 :         state->orig.out.result = state->tmp.out.result;
    5613             : 
    5614             :         /* Reset temporary structure */
    5615           0 :         NDR_ZERO_STRUCT(state->tmp);
    5616             : 
    5617           0 :         tevent_req_done(req);
    5618             : }
    5619             : 
    5620           0 : NTSTATUS dcerpc_wkssvc_NetrRenameMachineInDomain2_recv(struct tevent_req *req,
    5621             :                                                        TALLOC_CTX *mem_ctx,
    5622             :                                                        WERROR *result)
    5623             : {
    5624           0 :         struct dcerpc_wkssvc_NetrRenameMachineInDomain2_state *state = tevent_req_data(
    5625             :                 req, struct dcerpc_wkssvc_NetrRenameMachineInDomain2_state);
    5626             :         NTSTATUS status;
    5627             : 
    5628           0 :         if (tevent_req_is_nterror(req, &status)) {
    5629           0 :                 tevent_req_received(req);
    5630           0 :                 return status;
    5631             :         }
    5632             : 
    5633             :         /* Steal possible out parameters to the callers context */
    5634           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5635             : 
    5636             :         /* Return result */
    5637           0 :         *result = state->orig.out.result;
    5638             : 
    5639           0 :         tevent_req_received(req);
    5640           0 :         return NT_STATUS_OK;
    5641             : }
    5642             : 
    5643           0 : NTSTATUS dcerpc_wkssvc_NetrRenameMachineInDomain2(struct dcerpc_binding_handle *h,
    5644             :                                                   TALLOC_CTX *mem_ctx,
    5645             :                                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
    5646             :                                                   const char *_NewMachineName /* [in] [charset(UTF16),unique] */,
    5647             :                                                   const char *_Account /* [in] [charset(UTF16),unique] */,
    5648             :                                                   struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    5649             :                                                   uint32_t _RenameOptions /* [in]  */,
    5650             :                                                   WERROR *result)
    5651             : {
    5652             :         struct wkssvc_NetrRenameMachineInDomain2 r;
    5653             :         NTSTATUS status;
    5654             : 
    5655             :         /* In parameters */
    5656           0 :         r.in.server_name = _server_name;
    5657           0 :         r.in.NewMachineName = _NewMachineName;
    5658           0 :         r.in.Account = _Account;
    5659           0 :         r.in.EncryptedPassword = _EncryptedPassword;
    5660           0 :         r.in.RenameOptions = _RenameOptions;
    5661             : 
    5662             :         /* Out parameters */
    5663             : 
    5664             :         /* Result */
    5665           0 :         NDR_ZERO_STRUCT(r.out.result);
    5666             : 
    5667           0 :         status = dcerpc_wkssvc_NetrRenameMachineInDomain2_r(h, mem_ctx, &r);
    5668           0 :         if (!NT_STATUS_IS_OK(status)) {
    5669           0 :                 return status;
    5670             :         }
    5671             : 
    5672             :         /* Return variables */
    5673             : 
    5674             :         /* Return result */
    5675           0 :         *result = r.out.result;
    5676             : 
    5677           0 :         return NT_STATUS_OK;
    5678             : }
    5679             : 
    5680             : struct dcerpc_wkssvc_NetrValidateName2_r_state {
    5681             :         TALLOC_CTX *out_mem_ctx;
    5682             : };
    5683             : 
    5684             : static void dcerpc_wkssvc_NetrValidateName2_r_done(struct tevent_req *subreq);
    5685             : 
    5686           0 : struct tevent_req *dcerpc_wkssvc_NetrValidateName2_r_send(TALLOC_CTX *mem_ctx,
    5687             :         struct tevent_context *ev,
    5688             :         struct dcerpc_binding_handle *h,
    5689             :         struct wkssvc_NetrValidateName2 *r)
    5690             : {
    5691             :         struct tevent_req *req;
    5692             :         struct dcerpc_wkssvc_NetrValidateName2_r_state *state;
    5693             :         struct tevent_req *subreq;
    5694             : 
    5695           0 :         req = tevent_req_create(mem_ctx, &state,
    5696             :                                 struct dcerpc_wkssvc_NetrValidateName2_r_state);
    5697           0 :         if (req == NULL) {
    5698           0 :                 return NULL;
    5699             :         }
    5700             : 
    5701           0 :         state->out_mem_ctx = NULL;
    5702             : 
    5703           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5704             :                         NULL, &ndr_table_wkssvc,
    5705             :                         NDR_WKSSVC_NETRVALIDATENAME2, state, r);
    5706           0 :         if (tevent_req_nomem(subreq, req)) {
    5707           0 :                 return tevent_req_post(req, ev);
    5708             :         }
    5709           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrValidateName2_r_done, req);
    5710             : 
    5711           0 :         return req;
    5712             : }
    5713             : 
    5714           0 : static void dcerpc_wkssvc_NetrValidateName2_r_done(struct tevent_req *subreq)
    5715             : {
    5716           0 :         struct tevent_req *req =
    5717           0 :                 tevent_req_callback_data(subreq,
    5718             :                 struct tevent_req);
    5719             :         NTSTATUS status;
    5720             : 
    5721           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5722           0 :         TALLOC_FREE(subreq);
    5723           0 :         if (tevent_req_nterror(req, status)) {
    5724           0 :                 return;
    5725             :         }
    5726             : 
    5727           0 :         tevent_req_done(req);
    5728             : }
    5729             : 
    5730           0 : NTSTATUS dcerpc_wkssvc_NetrValidateName2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5731             : {
    5732           0 :         struct dcerpc_wkssvc_NetrValidateName2_r_state *state =
    5733           0 :                 tevent_req_data(req,
    5734             :                 struct dcerpc_wkssvc_NetrValidateName2_r_state);
    5735             :         NTSTATUS status;
    5736             : 
    5737           0 :         if (tevent_req_is_nterror(req, &status)) {
    5738           0 :                 tevent_req_received(req);
    5739           0 :                 return status;
    5740             :         }
    5741             : 
    5742           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5743             : 
    5744           0 :         tevent_req_received(req);
    5745           0 :         return NT_STATUS_OK;
    5746             : }
    5747             : 
    5748           5 : NTSTATUS dcerpc_wkssvc_NetrValidateName2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrValidateName2 *r)
    5749             : {
    5750             :         NTSTATUS status;
    5751             : 
    5752           5 :         status = dcerpc_binding_handle_call(h,
    5753             :                         NULL, &ndr_table_wkssvc,
    5754             :                         NDR_WKSSVC_NETRVALIDATENAME2, mem_ctx, r);
    5755             : 
    5756           5 :         return status;
    5757             : }
    5758             : 
    5759             : struct dcerpc_wkssvc_NetrValidateName2_state {
    5760             :         struct wkssvc_NetrValidateName2 orig;
    5761             :         struct wkssvc_NetrValidateName2 tmp;
    5762             :         TALLOC_CTX *out_mem_ctx;
    5763             : };
    5764             : 
    5765             : static void dcerpc_wkssvc_NetrValidateName2_done(struct tevent_req *subreq);
    5766             : 
    5767           0 : struct tevent_req *dcerpc_wkssvc_NetrValidateName2_send(TALLOC_CTX *mem_ctx,
    5768             :                                                         struct tevent_context *ev,
    5769             :                                                         struct dcerpc_binding_handle *h,
    5770             :                                                         const char *_server_name /* [in] [charset(UTF16),unique] */,
    5771             :                                                         const char *_name /* [in] [charset(UTF16),ref] */,
    5772             :                                                         const char *_Account /* [in] [charset(UTF16),unique] */,
    5773             :                                                         struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    5774             :                                                         enum wkssvc_NetValidateNameType _name_type /* [in]  */)
    5775             : {
    5776             :         struct tevent_req *req;
    5777             :         struct dcerpc_wkssvc_NetrValidateName2_state *state;
    5778             :         struct tevent_req *subreq;
    5779             : 
    5780           0 :         req = tevent_req_create(mem_ctx, &state,
    5781             :                                 struct dcerpc_wkssvc_NetrValidateName2_state);
    5782           0 :         if (req == NULL) {
    5783           0 :                 return NULL;
    5784             :         }
    5785           0 :         state->out_mem_ctx = NULL;
    5786             : 
    5787             :         /* In parameters */
    5788           0 :         state->orig.in.server_name = _server_name;
    5789           0 :         state->orig.in.name = _name;
    5790           0 :         state->orig.in.Account = _Account;
    5791           0 :         state->orig.in.EncryptedPassword = _EncryptedPassword;
    5792           0 :         state->orig.in.name_type = _name_type;
    5793             : 
    5794             :         /* Out parameters */
    5795             : 
    5796             :         /* Result */
    5797           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5798             : 
    5799             :         /* make a temporary copy, that we pass to the dispatch function */
    5800           0 :         state->tmp = state->orig;
    5801             : 
    5802           0 :         subreq = dcerpc_wkssvc_NetrValidateName2_r_send(state, ev, h, &state->tmp);
    5803           0 :         if (tevent_req_nomem(subreq, req)) {
    5804           0 :                 return tevent_req_post(req, ev);
    5805             :         }
    5806           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrValidateName2_done, req);
    5807           0 :         return req;
    5808             : }
    5809             : 
    5810           0 : static void dcerpc_wkssvc_NetrValidateName2_done(struct tevent_req *subreq)
    5811             : {
    5812           0 :         struct tevent_req *req = tevent_req_callback_data(
    5813             :                 subreq, struct tevent_req);
    5814           0 :         struct dcerpc_wkssvc_NetrValidateName2_state *state = tevent_req_data(
    5815             :                 req, struct dcerpc_wkssvc_NetrValidateName2_state);
    5816             :         NTSTATUS status;
    5817             :         TALLOC_CTX *mem_ctx;
    5818             : 
    5819           0 :         if (state->out_mem_ctx) {
    5820           0 :                 mem_ctx = state->out_mem_ctx;
    5821             :         } else {
    5822           0 :                 mem_ctx = state;
    5823             :         }
    5824             : 
    5825           0 :         status = dcerpc_wkssvc_NetrValidateName2_r_recv(subreq, mem_ctx);
    5826           0 :         TALLOC_FREE(subreq);
    5827           0 :         if (tevent_req_nterror(req, status)) {
    5828           0 :                 return;
    5829             :         }
    5830             : 
    5831             :         /* Copy out parameters */
    5832             : 
    5833             :         /* Copy result */
    5834           0 :         state->orig.out.result = state->tmp.out.result;
    5835             : 
    5836             :         /* Reset temporary structure */
    5837           0 :         NDR_ZERO_STRUCT(state->tmp);
    5838             : 
    5839           0 :         tevent_req_done(req);
    5840             : }
    5841             : 
    5842           0 : NTSTATUS dcerpc_wkssvc_NetrValidateName2_recv(struct tevent_req *req,
    5843             :                                               TALLOC_CTX *mem_ctx,
    5844             :                                               WERROR *result)
    5845             : {
    5846           0 :         struct dcerpc_wkssvc_NetrValidateName2_state *state = tevent_req_data(
    5847             :                 req, struct dcerpc_wkssvc_NetrValidateName2_state);
    5848             :         NTSTATUS status;
    5849             : 
    5850           0 :         if (tevent_req_is_nterror(req, &status)) {
    5851           0 :                 tevent_req_received(req);
    5852           0 :                 return status;
    5853             :         }
    5854             : 
    5855             :         /* Steal possible out parameters to the callers context */
    5856           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5857             : 
    5858             :         /* Return result */
    5859           0 :         *result = state->orig.out.result;
    5860             : 
    5861           0 :         tevent_req_received(req);
    5862           0 :         return NT_STATUS_OK;
    5863             : }
    5864             : 
    5865           0 : NTSTATUS dcerpc_wkssvc_NetrValidateName2(struct dcerpc_binding_handle *h,
    5866             :                                          TALLOC_CTX *mem_ctx,
    5867             :                                          const char *_server_name /* [in] [charset(UTF16),unique] */,
    5868             :                                          const char *_name /* [in] [charset(UTF16),ref] */,
    5869             :                                          const char *_Account /* [in] [charset(UTF16),unique] */,
    5870             :                                          struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    5871             :                                          enum wkssvc_NetValidateNameType _name_type /* [in]  */,
    5872             :                                          WERROR *result)
    5873             : {
    5874             :         struct wkssvc_NetrValidateName2 r;
    5875             :         NTSTATUS status;
    5876             : 
    5877             :         /* In parameters */
    5878           0 :         r.in.server_name = _server_name;
    5879           0 :         r.in.name = _name;
    5880           0 :         r.in.Account = _Account;
    5881           0 :         r.in.EncryptedPassword = _EncryptedPassword;
    5882           0 :         r.in.name_type = _name_type;
    5883             : 
    5884             :         /* Out parameters */
    5885             : 
    5886             :         /* Result */
    5887           0 :         NDR_ZERO_STRUCT(r.out.result);
    5888             : 
    5889           0 :         status = dcerpc_wkssvc_NetrValidateName2_r(h, mem_ctx, &r);
    5890           0 :         if (!NT_STATUS_IS_OK(status)) {
    5891           0 :                 return status;
    5892             :         }
    5893             : 
    5894             :         /* Return variables */
    5895             : 
    5896             :         /* Return result */
    5897           0 :         *result = r.out.result;
    5898             : 
    5899           0 :         return NT_STATUS_OK;
    5900             : }
    5901             : 
    5902             : struct dcerpc_wkssvc_NetrGetJoinableOus2_r_state {
    5903             :         TALLOC_CTX *out_mem_ctx;
    5904             : };
    5905             : 
    5906             : static void dcerpc_wkssvc_NetrGetJoinableOus2_r_done(struct tevent_req *subreq);
    5907             : 
    5908           0 : struct tevent_req *dcerpc_wkssvc_NetrGetJoinableOus2_r_send(TALLOC_CTX *mem_ctx,
    5909             :         struct tevent_context *ev,
    5910             :         struct dcerpc_binding_handle *h,
    5911             :         struct wkssvc_NetrGetJoinableOus2 *r)
    5912             : {
    5913             :         struct tevent_req *req;
    5914             :         struct dcerpc_wkssvc_NetrGetJoinableOus2_r_state *state;
    5915             :         struct tevent_req *subreq;
    5916             : 
    5917           0 :         req = tevent_req_create(mem_ctx, &state,
    5918             :                                 struct dcerpc_wkssvc_NetrGetJoinableOus2_r_state);
    5919           0 :         if (req == NULL) {
    5920           0 :                 return NULL;
    5921             :         }
    5922             : 
    5923           0 :         state->out_mem_ctx = talloc_new(state);
    5924           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5925           0 :                 return tevent_req_post(req, ev);
    5926             :         }
    5927             : 
    5928           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5929             :                         NULL, &ndr_table_wkssvc,
    5930           0 :                         NDR_WKSSVC_NETRGETJOINABLEOUS2, state->out_mem_ctx, r);
    5931           0 :         if (tevent_req_nomem(subreq, req)) {
    5932           0 :                 return tevent_req_post(req, ev);
    5933             :         }
    5934           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrGetJoinableOus2_r_done, req);
    5935             : 
    5936           0 :         return req;
    5937             : }
    5938             : 
    5939           0 : static void dcerpc_wkssvc_NetrGetJoinableOus2_r_done(struct tevent_req *subreq)
    5940             : {
    5941           0 :         struct tevent_req *req =
    5942           0 :                 tevent_req_callback_data(subreq,
    5943             :                 struct tevent_req);
    5944             :         NTSTATUS status;
    5945             : 
    5946           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5947           0 :         TALLOC_FREE(subreq);
    5948           0 :         if (tevent_req_nterror(req, status)) {
    5949           0 :                 return;
    5950             :         }
    5951             : 
    5952           0 :         tevent_req_done(req);
    5953             : }
    5954             : 
    5955           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinableOus2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5956             : {
    5957           0 :         struct dcerpc_wkssvc_NetrGetJoinableOus2_r_state *state =
    5958           0 :                 tevent_req_data(req,
    5959             :                 struct dcerpc_wkssvc_NetrGetJoinableOus2_r_state);
    5960             :         NTSTATUS status;
    5961             : 
    5962           0 :         if (tevent_req_is_nterror(req, &status)) {
    5963           0 :                 tevent_req_received(req);
    5964           0 :                 return status;
    5965             :         }
    5966             : 
    5967           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5968             : 
    5969           0 :         tevent_req_received(req);
    5970           0 :         return NT_STATUS_OK;
    5971             : }
    5972             : 
    5973           5 : NTSTATUS dcerpc_wkssvc_NetrGetJoinableOus2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrGetJoinableOus2 *r)
    5974             : {
    5975             :         NTSTATUS status;
    5976             : 
    5977           5 :         status = dcerpc_binding_handle_call(h,
    5978             :                         NULL, &ndr_table_wkssvc,
    5979             :                         NDR_WKSSVC_NETRGETJOINABLEOUS2, mem_ctx, r);
    5980             : 
    5981           5 :         return status;
    5982             : }
    5983             : 
    5984             : struct dcerpc_wkssvc_NetrGetJoinableOus2_state {
    5985             :         struct wkssvc_NetrGetJoinableOus2 orig;
    5986             :         struct wkssvc_NetrGetJoinableOus2 tmp;
    5987             :         TALLOC_CTX *out_mem_ctx;
    5988             : };
    5989             : 
    5990             : static void dcerpc_wkssvc_NetrGetJoinableOus2_done(struct tevent_req *subreq);
    5991             : 
    5992           0 : struct tevent_req *dcerpc_wkssvc_NetrGetJoinableOus2_send(TALLOC_CTX *mem_ctx,
    5993             :                                                           struct tevent_context *ev,
    5994             :                                                           struct dcerpc_binding_handle *h,
    5995             :                                                           const char *_server_name /* [in] [charset(UTF16),unique] */,
    5996             :                                                           const char *_domain_name /* [in] [charset(UTF16),ref] */,
    5997             :                                                           const char *_Account /* [in] [charset(UTF16),unique] */,
    5998             :                                                           struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    5999             :                                                           uint32_t *_num_ous /* [in,out] [ref] */,
    6000             :                                                           const char ***_ous /* [out] [charset(UTF16),ref,size_is(,*num_ous)] */)
    6001             : {
    6002             :         struct tevent_req *req;
    6003             :         struct dcerpc_wkssvc_NetrGetJoinableOus2_state *state;
    6004             :         struct tevent_req *subreq;
    6005             : 
    6006           0 :         req = tevent_req_create(mem_ctx, &state,
    6007             :                                 struct dcerpc_wkssvc_NetrGetJoinableOus2_state);
    6008           0 :         if (req == NULL) {
    6009           0 :                 return NULL;
    6010             :         }
    6011           0 :         state->out_mem_ctx = NULL;
    6012             : 
    6013             :         /* In parameters */
    6014           0 :         state->orig.in.server_name = _server_name;
    6015           0 :         state->orig.in.domain_name = _domain_name;
    6016           0 :         state->orig.in.Account = _Account;
    6017           0 :         state->orig.in.EncryptedPassword = _EncryptedPassword;
    6018           0 :         state->orig.in.num_ous = _num_ous;
    6019             : 
    6020             :         /* Out parameters */
    6021           0 :         state->orig.out.num_ous = _num_ous;
    6022           0 :         state->orig.out.ous = _ous;
    6023             : 
    6024             :         /* Result */
    6025           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6026             : 
    6027           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6028             :                              "dcerpc_wkssvc_NetrGetJoinableOus2_out_memory");
    6029           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6030           0 :                 return tevent_req_post(req, ev);
    6031             :         }
    6032             : 
    6033             :         /* make a temporary copy, that we pass to the dispatch function */
    6034           0 :         state->tmp = state->orig;
    6035             : 
    6036           0 :         subreq = dcerpc_wkssvc_NetrGetJoinableOus2_r_send(state, ev, h, &state->tmp);
    6037           0 :         if (tevent_req_nomem(subreq, req)) {
    6038           0 :                 return tevent_req_post(req, ev);
    6039             :         }
    6040           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrGetJoinableOus2_done, req);
    6041           0 :         return req;
    6042             : }
    6043             : 
    6044           0 : static void dcerpc_wkssvc_NetrGetJoinableOus2_done(struct tevent_req *subreq)
    6045             : {
    6046           0 :         struct tevent_req *req = tevent_req_callback_data(
    6047             :                 subreq, struct tevent_req);
    6048           0 :         struct dcerpc_wkssvc_NetrGetJoinableOus2_state *state = tevent_req_data(
    6049             :                 req, struct dcerpc_wkssvc_NetrGetJoinableOus2_state);
    6050             :         NTSTATUS status;
    6051             :         TALLOC_CTX *mem_ctx;
    6052             : 
    6053           0 :         if (state->out_mem_ctx) {
    6054           0 :                 mem_ctx = state->out_mem_ctx;
    6055             :         } else {
    6056           0 :                 mem_ctx = state;
    6057             :         }
    6058             : 
    6059           0 :         status = dcerpc_wkssvc_NetrGetJoinableOus2_r_recv(subreq, mem_ctx);
    6060           0 :         TALLOC_FREE(subreq);
    6061           0 :         if (tevent_req_nterror(req, status)) {
    6062           0 :                 return;
    6063             :         }
    6064             : 
    6065             :         /* Copy out parameters */
    6066           0 :         *state->orig.out.num_ous = *state->tmp.out.num_ous;
    6067           0 :         *state->orig.out.ous = *state->tmp.out.ous;
    6068             : 
    6069             :         /* Copy result */
    6070           0 :         state->orig.out.result = state->tmp.out.result;
    6071             : 
    6072             :         /* Reset temporary structure */
    6073           0 :         NDR_ZERO_STRUCT(state->tmp);
    6074             : 
    6075           0 :         tevent_req_done(req);
    6076             : }
    6077             : 
    6078           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinableOus2_recv(struct tevent_req *req,
    6079             :                                                 TALLOC_CTX *mem_ctx,
    6080             :                                                 WERROR *result)
    6081             : {
    6082           0 :         struct dcerpc_wkssvc_NetrGetJoinableOus2_state *state = tevent_req_data(
    6083             :                 req, struct dcerpc_wkssvc_NetrGetJoinableOus2_state);
    6084             :         NTSTATUS status;
    6085             : 
    6086           0 :         if (tevent_req_is_nterror(req, &status)) {
    6087           0 :                 tevent_req_received(req);
    6088           0 :                 return status;
    6089             :         }
    6090             : 
    6091             :         /* Steal possible out parameters to the callers context */
    6092           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6093             : 
    6094             :         /* Return result */
    6095           0 :         *result = state->orig.out.result;
    6096             : 
    6097           0 :         tevent_req_received(req);
    6098           0 :         return NT_STATUS_OK;
    6099             : }
    6100             : 
    6101           0 : NTSTATUS dcerpc_wkssvc_NetrGetJoinableOus2(struct dcerpc_binding_handle *h,
    6102             :                                            TALLOC_CTX *mem_ctx,
    6103             :                                            const char *_server_name /* [in] [charset(UTF16),unique] */,
    6104             :                                            const char *_domain_name /* [in] [charset(UTF16),ref] */,
    6105             :                                            const char *_Account /* [in] [charset(UTF16),unique] */,
    6106             :                                            struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    6107             :                                            uint32_t *_num_ous /* [in,out] [ref] */,
    6108             :                                            const char ***_ous /* [out] [charset(UTF16),ref,size_is(,*num_ous)] */,
    6109             :                                            WERROR *result)
    6110             : {
    6111             :         struct wkssvc_NetrGetJoinableOus2 r;
    6112             :         NTSTATUS status;
    6113             : 
    6114             :         /* In parameters */
    6115           0 :         r.in.server_name = _server_name;
    6116           0 :         r.in.domain_name = _domain_name;
    6117           0 :         r.in.Account = _Account;
    6118           0 :         r.in.EncryptedPassword = _EncryptedPassword;
    6119           0 :         r.in.num_ous = _num_ous;
    6120             : 
    6121             :         /* Out parameters */
    6122           0 :         r.out.num_ous = _num_ous;
    6123           0 :         r.out.ous = _ous;
    6124             : 
    6125             :         /* Result */
    6126           0 :         NDR_ZERO_STRUCT(r.out.result);
    6127             : 
    6128           0 :         status = dcerpc_wkssvc_NetrGetJoinableOus2_r(h, mem_ctx, &r);
    6129           0 :         if (!NT_STATUS_IS_OK(status)) {
    6130           0 :                 return status;
    6131             :         }
    6132             : 
    6133             :         /* Return variables */
    6134           0 :         *_num_ous = *r.out.num_ous;
    6135           0 :         *_ous = *r.out.ous;
    6136             : 
    6137             :         /* Return result */
    6138           0 :         *result = r.out.result;
    6139             : 
    6140           0 :         return NT_STATUS_OK;
    6141             : }
    6142             : 
    6143             : struct dcerpc_wkssvc_NetrAddAlternateComputerName_r_state {
    6144             :         TALLOC_CTX *out_mem_ctx;
    6145             : };
    6146             : 
    6147             : static void dcerpc_wkssvc_NetrAddAlternateComputerName_r_done(struct tevent_req *subreq);
    6148             : 
    6149           0 : struct tevent_req *dcerpc_wkssvc_NetrAddAlternateComputerName_r_send(TALLOC_CTX *mem_ctx,
    6150             :         struct tevent_context *ev,
    6151             :         struct dcerpc_binding_handle *h,
    6152             :         struct wkssvc_NetrAddAlternateComputerName *r)
    6153             : {
    6154             :         struct tevent_req *req;
    6155             :         struct dcerpc_wkssvc_NetrAddAlternateComputerName_r_state *state;
    6156             :         struct tevent_req *subreq;
    6157             : 
    6158           0 :         req = tevent_req_create(mem_ctx, &state,
    6159             :                                 struct dcerpc_wkssvc_NetrAddAlternateComputerName_r_state);
    6160           0 :         if (req == NULL) {
    6161           0 :                 return NULL;
    6162             :         }
    6163             : 
    6164           0 :         state->out_mem_ctx = NULL;
    6165             : 
    6166           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6167             :                         NULL, &ndr_table_wkssvc,
    6168             :                         NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME, state, r);
    6169           0 :         if (tevent_req_nomem(subreq, req)) {
    6170           0 :                 return tevent_req_post(req, ev);
    6171             :         }
    6172           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrAddAlternateComputerName_r_done, req);
    6173             : 
    6174           0 :         return req;
    6175             : }
    6176             : 
    6177           0 : static void dcerpc_wkssvc_NetrAddAlternateComputerName_r_done(struct tevent_req *subreq)
    6178             : {
    6179           0 :         struct tevent_req *req =
    6180           0 :                 tevent_req_callback_data(subreq,
    6181             :                 struct tevent_req);
    6182             :         NTSTATUS status;
    6183             : 
    6184           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6185           0 :         TALLOC_FREE(subreq);
    6186           0 :         if (tevent_req_nterror(req, status)) {
    6187           0 :                 return;
    6188             :         }
    6189             : 
    6190           0 :         tevent_req_done(req);
    6191             : }
    6192             : 
    6193           0 : NTSTATUS dcerpc_wkssvc_NetrAddAlternateComputerName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6194             : {
    6195           0 :         struct dcerpc_wkssvc_NetrAddAlternateComputerName_r_state *state =
    6196           0 :                 tevent_req_data(req,
    6197             :                 struct dcerpc_wkssvc_NetrAddAlternateComputerName_r_state);
    6198             :         NTSTATUS status;
    6199             : 
    6200           0 :         if (tevent_req_is_nterror(req, &status)) {
    6201           0 :                 tevent_req_received(req);
    6202           0 :                 return status;
    6203             :         }
    6204             : 
    6205           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6206             : 
    6207           0 :         tevent_req_received(req);
    6208           0 :         return NT_STATUS_OK;
    6209             : }
    6210             : 
    6211           5 : NTSTATUS dcerpc_wkssvc_NetrAddAlternateComputerName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrAddAlternateComputerName *r)
    6212             : {
    6213             :         NTSTATUS status;
    6214             : 
    6215           5 :         status = dcerpc_binding_handle_call(h,
    6216             :                         NULL, &ndr_table_wkssvc,
    6217             :                         NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME, mem_ctx, r);
    6218             : 
    6219           5 :         return status;
    6220             : }
    6221             : 
    6222             : struct dcerpc_wkssvc_NetrAddAlternateComputerName_state {
    6223             :         struct wkssvc_NetrAddAlternateComputerName orig;
    6224             :         struct wkssvc_NetrAddAlternateComputerName tmp;
    6225             :         TALLOC_CTX *out_mem_ctx;
    6226             : };
    6227             : 
    6228             : static void dcerpc_wkssvc_NetrAddAlternateComputerName_done(struct tevent_req *subreq);
    6229             : 
    6230           0 : struct tevent_req *dcerpc_wkssvc_NetrAddAlternateComputerName_send(TALLOC_CTX *mem_ctx,
    6231             :                                                                    struct tevent_context *ev,
    6232             :                                                                    struct dcerpc_binding_handle *h,
    6233             :                                                                    const char *_server_name /* [in] [charset(UTF16),unique] */,
    6234             :                                                                    const char *_NewAlternateMachineName /* [in] [charset(UTF16),unique] */,
    6235             :                                                                    const char *_Account /* [in] [charset(UTF16),unique] */,
    6236             :                                                                    struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    6237             :                                                                    uint32_t _Reserved /* [in]  */)
    6238             : {
    6239             :         struct tevent_req *req;
    6240             :         struct dcerpc_wkssvc_NetrAddAlternateComputerName_state *state;
    6241             :         struct tevent_req *subreq;
    6242             : 
    6243           0 :         req = tevent_req_create(mem_ctx, &state,
    6244             :                                 struct dcerpc_wkssvc_NetrAddAlternateComputerName_state);
    6245           0 :         if (req == NULL) {
    6246           0 :                 return NULL;
    6247             :         }
    6248           0 :         state->out_mem_ctx = NULL;
    6249             : 
    6250             :         /* In parameters */
    6251           0 :         state->orig.in.server_name = _server_name;
    6252           0 :         state->orig.in.NewAlternateMachineName = _NewAlternateMachineName;
    6253           0 :         state->orig.in.Account = _Account;
    6254           0 :         state->orig.in.EncryptedPassword = _EncryptedPassword;
    6255           0 :         state->orig.in.Reserved = _Reserved;
    6256             : 
    6257             :         /* Out parameters */
    6258             : 
    6259             :         /* Result */
    6260           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6261             : 
    6262             :         /* make a temporary copy, that we pass to the dispatch function */
    6263           0 :         state->tmp = state->orig;
    6264             : 
    6265           0 :         subreq = dcerpc_wkssvc_NetrAddAlternateComputerName_r_send(state, ev, h, &state->tmp);
    6266           0 :         if (tevent_req_nomem(subreq, req)) {
    6267           0 :                 return tevent_req_post(req, ev);
    6268             :         }
    6269           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrAddAlternateComputerName_done, req);
    6270           0 :         return req;
    6271             : }
    6272             : 
    6273           0 : static void dcerpc_wkssvc_NetrAddAlternateComputerName_done(struct tevent_req *subreq)
    6274             : {
    6275           0 :         struct tevent_req *req = tevent_req_callback_data(
    6276             :                 subreq, struct tevent_req);
    6277           0 :         struct dcerpc_wkssvc_NetrAddAlternateComputerName_state *state = tevent_req_data(
    6278             :                 req, struct dcerpc_wkssvc_NetrAddAlternateComputerName_state);
    6279             :         NTSTATUS status;
    6280             :         TALLOC_CTX *mem_ctx;
    6281             : 
    6282           0 :         if (state->out_mem_ctx) {
    6283           0 :                 mem_ctx = state->out_mem_ctx;
    6284             :         } else {
    6285           0 :                 mem_ctx = state;
    6286             :         }
    6287             : 
    6288           0 :         status = dcerpc_wkssvc_NetrAddAlternateComputerName_r_recv(subreq, mem_ctx);
    6289           0 :         TALLOC_FREE(subreq);
    6290           0 :         if (tevent_req_nterror(req, status)) {
    6291           0 :                 return;
    6292             :         }
    6293             : 
    6294             :         /* Copy out parameters */
    6295             : 
    6296             :         /* Copy result */
    6297           0 :         state->orig.out.result = state->tmp.out.result;
    6298             : 
    6299             :         /* Reset temporary structure */
    6300           0 :         NDR_ZERO_STRUCT(state->tmp);
    6301             : 
    6302           0 :         tevent_req_done(req);
    6303             : }
    6304             : 
    6305           0 : NTSTATUS dcerpc_wkssvc_NetrAddAlternateComputerName_recv(struct tevent_req *req,
    6306             :                                                          TALLOC_CTX *mem_ctx,
    6307             :                                                          WERROR *result)
    6308             : {
    6309           0 :         struct dcerpc_wkssvc_NetrAddAlternateComputerName_state *state = tevent_req_data(
    6310             :                 req, struct dcerpc_wkssvc_NetrAddAlternateComputerName_state);
    6311             :         NTSTATUS status;
    6312             : 
    6313           0 :         if (tevent_req_is_nterror(req, &status)) {
    6314           0 :                 tevent_req_received(req);
    6315           0 :                 return status;
    6316             :         }
    6317             : 
    6318             :         /* Steal possible out parameters to the callers context */
    6319           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6320             : 
    6321             :         /* Return result */
    6322           0 :         *result = state->orig.out.result;
    6323             : 
    6324           0 :         tevent_req_received(req);
    6325           0 :         return NT_STATUS_OK;
    6326             : }
    6327             : 
    6328           0 : NTSTATUS dcerpc_wkssvc_NetrAddAlternateComputerName(struct dcerpc_binding_handle *h,
    6329             :                                                     TALLOC_CTX *mem_ctx,
    6330             :                                                     const char *_server_name /* [in] [charset(UTF16),unique] */,
    6331             :                                                     const char *_NewAlternateMachineName /* [in] [charset(UTF16),unique] */,
    6332             :                                                     const char *_Account /* [in] [charset(UTF16),unique] */,
    6333             :                                                     struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    6334             :                                                     uint32_t _Reserved /* [in]  */,
    6335             :                                                     WERROR *result)
    6336             : {
    6337             :         struct wkssvc_NetrAddAlternateComputerName r;
    6338             :         NTSTATUS status;
    6339             : 
    6340             :         /* In parameters */
    6341           0 :         r.in.server_name = _server_name;
    6342           0 :         r.in.NewAlternateMachineName = _NewAlternateMachineName;
    6343           0 :         r.in.Account = _Account;
    6344           0 :         r.in.EncryptedPassword = _EncryptedPassword;
    6345           0 :         r.in.Reserved = _Reserved;
    6346             : 
    6347             :         /* Out parameters */
    6348             : 
    6349             :         /* Result */
    6350           0 :         NDR_ZERO_STRUCT(r.out.result);
    6351             : 
    6352           0 :         status = dcerpc_wkssvc_NetrAddAlternateComputerName_r(h, mem_ctx, &r);
    6353           0 :         if (!NT_STATUS_IS_OK(status)) {
    6354           0 :                 return status;
    6355             :         }
    6356             : 
    6357             :         /* Return variables */
    6358             : 
    6359             :         /* Return result */
    6360           0 :         *result = r.out.result;
    6361             : 
    6362           0 :         return NT_STATUS_OK;
    6363             : }
    6364             : 
    6365             : struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_state {
    6366             :         TALLOC_CTX *out_mem_ctx;
    6367             : };
    6368             : 
    6369             : static void dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_done(struct tevent_req *subreq);
    6370             : 
    6371           0 : struct tevent_req *dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_send(TALLOC_CTX *mem_ctx,
    6372             :         struct tevent_context *ev,
    6373             :         struct dcerpc_binding_handle *h,
    6374             :         struct wkssvc_NetrRemoveAlternateComputerName *r)
    6375             : {
    6376             :         struct tevent_req *req;
    6377             :         struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_state *state;
    6378             :         struct tevent_req *subreq;
    6379             : 
    6380           0 :         req = tevent_req_create(mem_ctx, &state,
    6381             :                                 struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_state);
    6382           0 :         if (req == NULL) {
    6383           0 :                 return NULL;
    6384             :         }
    6385             : 
    6386           0 :         state->out_mem_ctx = NULL;
    6387             : 
    6388           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6389             :                         NULL, &ndr_table_wkssvc,
    6390             :                         NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME, state, r);
    6391           0 :         if (tevent_req_nomem(subreq, req)) {
    6392           0 :                 return tevent_req_post(req, ev);
    6393             :         }
    6394           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_done, req);
    6395             : 
    6396           0 :         return req;
    6397             : }
    6398             : 
    6399           0 : static void dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_done(struct tevent_req *subreq)
    6400             : {
    6401           0 :         struct tevent_req *req =
    6402           0 :                 tevent_req_callback_data(subreq,
    6403             :                 struct tevent_req);
    6404             :         NTSTATUS status;
    6405             : 
    6406           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6407           0 :         TALLOC_FREE(subreq);
    6408           0 :         if (tevent_req_nterror(req, status)) {
    6409           0 :                 return;
    6410             :         }
    6411             : 
    6412           0 :         tevent_req_done(req);
    6413             : }
    6414             : 
    6415           0 : NTSTATUS dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6416             : {
    6417           0 :         struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_state *state =
    6418           0 :                 tevent_req_data(req,
    6419             :                 struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_state);
    6420             :         NTSTATUS status;
    6421             : 
    6422           0 :         if (tevent_req_is_nterror(req, &status)) {
    6423           0 :                 tevent_req_received(req);
    6424           0 :                 return status;
    6425             :         }
    6426             : 
    6427           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6428             : 
    6429           0 :         tevent_req_received(req);
    6430           0 :         return NT_STATUS_OK;
    6431             : }
    6432             : 
    6433           5 : NTSTATUS dcerpc_wkssvc_NetrRemoveAlternateComputerName_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrRemoveAlternateComputerName *r)
    6434             : {
    6435             :         NTSTATUS status;
    6436             : 
    6437           5 :         status = dcerpc_binding_handle_call(h,
    6438             :                         NULL, &ndr_table_wkssvc,
    6439             :                         NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME, mem_ctx, r);
    6440             : 
    6441           5 :         return status;
    6442             : }
    6443             : 
    6444             : struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_state {
    6445             :         struct wkssvc_NetrRemoveAlternateComputerName orig;
    6446             :         struct wkssvc_NetrRemoveAlternateComputerName tmp;
    6447             :         TALLOC_CTX *out_mem_ctx;
    6448             : };
    6449             : 
    6450             : static void dcerpc_wkssvc_NetrRemoveAlternateComputerName_done(struct tevent_req *subreq);
    6451             : 
    6452           0 : struct tevent_req *dcerpc_wkssvc_NetrRemoveAlternateComputerName_send(TALLOC_CTX *mem_ctx,
    6453             :                                                                       struct tevent_context *ev,
    6454             :                                                                       struct dcerpc_binding_handle *h,
    6455             :                                                                       const char *_server_name /* [in] [charset(UTF16),unique] */,
    6456             :                                                                       const char *_AlternateMachineNameToRemove /* [in] [charset(UTF16),unique] */,
    6457             :                                                                       const char *_Account /* [in] [charset(UTF16),unique] */,
    6458             :                                                                       struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    6459             :                                                                       uint32_t _Reserved /* [in]  */)
    6460             : {
    6461             :         struct tevent_req *req;
    6462             :         struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_state *state;
    6463             :         struct tevent_req *subreq;
    6464             : 
    6465           0 :         req = tevent_req_create(mem_ctx, &state,
    6466             :                                 struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_state);
    6467           0 :         if (req == NULL) {
    6468           0 :                 return NULL;
    6469             :         }
    6470           0 :         state->out_mem_ctx = NULL;
    6471             : 
    6472             :         /* In parameters */
    6473           0 :         state->orig.in.server_name = _server_name;
    6474           0 :         state->orig.in.AlternateMachineNameToRemove = _AlternateMachineNameToRemove;
    6475           0 :         state->orig.in.Account = _Account;
    6476           0 :         state->orig.in.EncryptedPassword = _EncryptedPassword;
    6477           0 :         state->orig.in.Reserved = _Reserved;
    6478             : 
    6479             :         /* Out parameters */
    6480             : 
    6481             :         /* Result */
    6482           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6483             : 
    6484             :         /* make a temporary copy, that we pass to the dispatch function */
    6485           0 :         state->tmp = state->orig;
    6486             : 
    6487           0 :         subreq = dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_send(state, ev, h, &state->tmp);
    6488           0 :         if (tevent_req_nomem(subreq, req)) {
    6489           0 :                 return tevent_req_post(req, ev);
    6490             :         }
    6491           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrRemoveAlternateComputerName_done, req);
    6492           0 :         return req;
    6493             : }
    6494             : 
    6495           0 : static void dcerpc_wkssvc_NetrRemoveAlternateComputerName_done(struct tevent_req *subreq)
    6496             : {
    6497           0 :         struct tevent_req *req = tevent_req_callback_data(
    6498             :                 subreq, struct tevent_req);
    6499           0 :         struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_state *state = tevent_req_data(
    6500             :                 req, struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_state);
    6501             :         NTSTATUS status;
    6502             :         TALLOC_CTX *mem_ctx;
    6503             : 
    6504           0 :         if (state->out_mem_ctx) {
    6505           0 :                 mem_ctx = state->out_mem_ctx;
    6506             :         } else {
    6507           0 :                 mem_ctx = state;
    6508             :         }
    6509             : 
    6510           0 :         status = dcerpc_wkssvc_NetrRemoveAlternateComputerName_r_recv(subreq, mem_ctx);
    6511           0 :         TALLOC_FREE(subreq);
    6512           0 :         if (tevent_req_nterror(req, status)) {
    6513           0 :                 return;
    6514             :         }
    6515             : 
    6516             :         /* Copy out parameters */
    6517             : 
    6518             :         /* Copy result */
    6519           0 :         state->orig.out.result = state->tmp.out.result;
    6520             : 
    6521             :         /* Reset temporary structure */
    6522           0 :         NDR_ZERO_STRUCT(state->tmp);
    6523             : 
    6524           0 :         tevent_req_done(req);
    6525             : }
    6526             : 
    6527           0 : NTSTATUS dcerpc_wkssvc_NetrRemoveAlternateComputerName_recv(struct tevent_req *req,
    6528             :                                                             TALLOC_CTX *mem_ctx,
    6529             :                                                             WERROR *result)
    6530             : {
    6531           0 :         struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_state *state = tevent_req_data(
    6532             :                 req, struct dcerpc_wkssvc_NetrRemoveAlternateComputerName_state);
    6533             :         NTSTATUS status;
    6534             : 
    6535           0 :         if (tevent_req_is_nterror(req, &status)) {
    6536           0 :                 tevent_req_received(req);
    6537           0 :                 return status;
    6538             :         }
    6539             : 
    6540             :         /* Steal possible out parameters to the callers context */
    6541           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6542             : 
    6543             :         /* Return result */
    6544           0 :         *result = state->orig.out.result;
    6545             : 
    6546           0 :         tevent_req_received(req);
    6547           0 :         return NT_STATUS_OK;
    6548             : }
    6549             : 
    6550           0 : NTSTATUS dcerpc_wkssvc_NetrRemoveAlternateComputerName(struct dcerpc_binding_handle *h,
    6551             :                                                        TALLOC_CTX *mem_ctx,
    6552             :                                                        const char *_server_name /* [in] [charset(UTF16),unique] */,
    6553             :                                                        const char *_AlternateMachineNameToRemove /* [in] [charset(UTF16),unique] */,
    6554             :                                                        const char *_Account /* [in] [charset(UTF16),unique] */,
    6555             :                                                        struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    6556             :                                                        uint32_t _Reserved /* [in]  */,
    6557             :                                                        WERROR *result)
    6558             : {
    6559             :         struct wkssvc_NetrRemoveAlternateComputerName r;
    6560             :         NTSTATUS status;
    6561             : 
    6562             :         /* In parameters */
    6563           0 :         r.in.server_name = _server_name;
    6564           0 :         r.in.AlternateMachineNameToRemove = _AlternateMachineNameToRemove;
    6565           0 :         r.in.Account = _Account;
    6566           0 :         r.in.EncryptedPassword = _EncryptedPassword;
    6567           0 :         r.in.Reserved = _Reserved;
    6568             : 
    6569             :         /* Out parameters */
    6570             : 
    6571             :         /* Result */
    6572           0 :         NDR_ZERO_STRUCT(r.out.result);
    6573             : 
    6574           0 :         status = dcerpc_wkssvc_NetrRemoveAlternateComputerName_r(h, mem_ctx, &r);
    6575           0 :         if (!NT_STATUS_IS_OK(status)) {
    6576           0 :                 return status;
    6577             :         }
    6578             : 
    6579             :         /* Return variables */
    6580             : 
    6581             :         /* Return result */
    6582           0 :         *result = r.out.result;
    6583             : 
    6584           0 :         return NT_STATUS_OK;
    6585             : }
    6586             : 
    6587             : struct dcerpc_wkssvc_NetrSetPrimaryComputername_r_state {
    6588             :         TALLOC_CTX *out_mem_ctx;
    6589             : };
    6590             : 
    6591             : static void dcerpc_wkssvc_NetrSetPrimaryComputername_r_done(struct tevent_req *subreq);
    6592             : 
    6593           0 : struct tevent_req *dcerpc_wkssvc_NetrSetPrimaryComputername_r_send(TALLOC_CTX *mem_ctx,
    6594             :         struct tevent_context *ev,
    6595             :         struct dcerpc_binding_handle *h,
    6596             :         struct wkssvc_NetrSetPrimaryComputername *r)
    6597             : {
    6598             :         struct tevent_req *req;
    6599             :         struct dcerpc_wkssvc_NetrSetPrimaryComputername_r_state *state;
    6600             :         struct tevent_req *subreq;
    6601             : 
    6602           0 :         req = tevent_req_create(mem_ctx, &state,
    6603             :                                 struct dcerpc_wkssvc_NetrSetPrimaryComputername_r_state);
    6604           0 :         if (req == NULL) {
    6605           0 :                 return NULL;
    6606             :         }
    6607             : 
    6608           0 :         state->out_mem_ctx = NULL;
    6609             : 
    6610           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6611             :                         NULL, &ndr_table_wkssvc,
    6612             :                         NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME, state, r);
    6613           0 :         if (tevent_req_nomem(subreq, req)) {
    6614           0 :                 return tevent_req_post(req, ev);
    6615             :         }
    6616           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrSetPrimaryComputername_r_done, req);
    6617             : 
    6618           0 :         return req;
    6619             : }
    6620             : 
    6621           0 : static void dcerpc_wkssvc_NetrSetPrimaryComputername_r_done(struct tevent_req *subreq)
    6622             : {
    6623           0 :         struct tevent_req *req =
    6624           0 :                 tevent_req_callback_data(subreq,
    6625             :                 struct tevent_req);
    6626             :         NTSTATUS status;
    6627             : 
    6628           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6629           0 :         TALLOC_FREE(subreq);
    6630           0 :         if (tevent_req_nterror(req, status)) {
    6631           0 :                 return;
    6632             :         }
    6633             : 
    6634           0 :         tevent_req_done(req);
    6635             : }
    6636             : 
    6637           0 : NTSTATUS dcerpc_wkssvc_NetrSetPrimaryComputername_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6638             : {
    6639           0 :         struct dcerpc_wkssvc_NetrSetPrimaryComputername_r_state *state =
    6640           0 :                 tevent_req_data(req,
    6641             :                 struct dcerpc_wkssvc_NetrSetPrimaryComputername_r_state);
    6642             :         NTSTATUS status;
    6643             : 
    6644           0 :         if (tevent_req_is_nterror(req, &status)) {
    6645           0 :                 tevent_req_received(req);
    6646           0 :                 return status;
    6647             :         }
    6648             : 
    6649           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6650             : 
    6651           0 :         tevent_req_received(req);
    6652           0 :         return NT_STATUS_OK;
    6653             : }
    6654             : 
    6655           0 : NTSTATUS dcerpc_wkssvc_NetrSetPrimaryComputername_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrSetPrimaryComputername *r)
    6656             : {
    6657             :         NTSTATUS status;
    6658             : 
    6659           0 :         status = dcerpc_binding_handle_call(h,
    6660             :                         NULL, &ndr_table_wkssvc,
    6661             :                         NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME, mem_ctx, r);
    6662             : 
    6663           0 :         return status;
    6664             : }
    6665             : 
    6666             : struct dcerpc_wkssvc_NetrSetPrimaryComputername_state {
    6667             :         struct wkssvc_NetrSetPrimaryComputername orig;
    6668             :         struct wkssvc_NetrSetPrimaryComputername tmp;
    6669             :         TALLOC_CTX *out_mem_ctx;
    6670             : };
    6671             : 
    6672             : static void dcerpc_wkssvc_NetrSetPrimaryComputername_done(struct tevent_req *subreq);
    6673             : 
    6674           0 : struct tevent_req *dcerpc_wkssvc_NetrSetPrimaryComputername_send(TALLOC_CTX *mem_ctx,
    6675             :                                                                  struct tevent_context *ev,
    6676             :                                                                  struct dcerpc_binding_handle *h,
    6677             :                                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    6678             :                                                                  const char *_primary_name /* [in] [charset(UTF16),unique] */,
    6679             :                                                                  const char *_Account /* [in] [charset(UTF16),unique] */,
    6680             :                                                                  struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    6681             :                                                                  uint32_t _Reserved /* [in]  */)
    6682             : {
    6683             :         struct tevent_req *req;
    6684             :         struct dcerpc_wkssvc_NetrSetPrimaryComputername_state *state;
    6685             :         struct tevent_req *subreq;
    6686             : 
    6687           0 :         req = tevent_req_create(mem_ctx, &state,
    6688             :                                 struct dcerpc_wkssvc_NetrSetPrimaryComputername_state);
    6689           0 :         if (req == NULL) {
    6690           0 :                 return NULL;
    6691             :         }
    6692           0 :         state->out_mem_ctx = NULL;
    6693             : 
    6694             :         /* In parameters */
    6695           0 :         state->orig.in.server_name = _server_name;
    6696           0 :         state->orig.in.primary_name = _primary_name;
    6697           0 :         state->orig.in.Account = _Account;
    6698           0 :         state->orig.in.EncryptedPassword = _EncryptedPassword;
    6699           0 :         state->orig.in.Reserved = _Reserved;
    6700             : 
    6701             :         /* Out parameters */
    6702             : 
    6703             :         /* Result */
    6704           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6705             : 
    6706             :         /* make a temporary copy, that we pass to the dispatch function */
    6707           0 :         state->tmp = state->orig;
    6708             : 
    6709           0 :         subreq = dcerpc_wkssvc_NetrSetPrimaryComputername_r_send(state, ev, h, &state->tmp);
    6710           0 :         if (tevent_req_nomem(subreq, req)) {
    6711           0 :                 return tevent_req_post(req, ev);
    6712             :         }
    6713           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrSetPrimaryComputername_done, req);
    6714           0 :         return req;
    6715             : }
    6716             : 
    6717           0 : static void dcerpc_wkssvc_NetrSetPrimaryComputername_done(struct tevent_req *subreq)
    6718             : {
    6719           0 :         struct tevent_req *req = tevent_req_callback_data(
    6720             :                 subreq, struct tevent_req);
    6721           0 :         struct dcerpc_wkssvc_NetrSetPrimaryComputername_state *state = tevent_req_data(
    6722             :                 req, struct dcerpc_wkssvc_NetrSetPrimaryComputername_state);
    6723             :         NTSTATUS status;
    6724             :         TALLOC_CTX *mem_ctx;
    6725             : 
    6726           0 :         if (state->out_mem_ctx) {
    6727           0 :                 mem_ctx = state->out_mem_ctx;
    6728             :         } else {
    6729           0 :                 mem_ctx = state;
    6730             :         }
    6731             : 
    6732           0 :         status = dcerpc_wkssvc_NetrSetPrimaryComputername_r_recv(subreq, mem_ctx);
    6733           0 :         TALLOC_FREE(subreq);
    6734           0 :         if (tevent_req_nterror(req, status)) {
    6735           0 :                 return;
    6736             :         }
    6737             : 
    6738             :         /* Copy out parameters */
    6739             : 
    6740             :         /* Copy result */
    6741           0 :         state->orig.out.result = state->tmp.out.result;
    6742             : 
    6743             :         /* Reset temporary structure */
    6744           0 :         NDR_ZERO_STRUCT(state->tmp);
    6745             : 
    6746           0 :         tevent_req_done(req);
    6747             : }
    6748             : 
    6749           0 : NTSTATUS dcerpc_wkssvc_NetrSetPrimaryComputername_recv(struct tevent_req *req,
    6750             :                                                        TALLOC_CTX *mem_ctx,
    6751             :                                                        WERROR *result)
    6752             : {
    6753           0 :         struct dcerpc_wkssvc_NetrSetPrimaryComputername_state *state = tevent_req_data(
    6754             :                 req, struct dcerpc_wkssvc_NetrSetPrimaryComputername_state);
    6755             :         NTSTATUS status;
    6756             : 
    6757           0 :         if (tevent_req_is_nterror(req, &status)) {
    6758           0 :                 tevent_req_received(req);
    6759           0 :                 return status;
    6760             :         }
    6761             : 
    6762             :         /* Steal possible out parameters to the callers context */
    6763           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6764             : 
    6765             :         /* Return result */
    6766           0 :         *result = state->orig.out.result;
    6767             : 
    6768           0 :         tevent_req_received(req);
    6769           0 :         return NT_STATUS_OK;
    6770             : }
    6771             : 
    6772           0 : NTSTATUS dcerpc_wkssvc_NetrSetPrimaryComputername(struct dcerpc_binding_handle *h,
    6773             :                                                   TALLOC_CTX *mem_ctx,
    6774             :                                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
    6775             :                                                   const char *_primary_name /* [in] [charset(UTF16),unique] */,
    6776             :                                                   const char *_Account /* [in] [charset(UTF16),unique] */,
    6777             :                                                   struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */,
    6778             :                                                   uint32_t _Reserved /* [in]  */,
    6779             :                                                   WERROR *result)
    6780             : {
    6781             :         struct wkssvc_NetrSetPrimaryComputername r;
    6782             :         NTSTATUS status;
    6783             : 
    6784             :         /* In parameters */
    6785           0 :         r.in.server_name = _server_name;
    6786           0 :         r.in.primary_name = _primary_name;
    6787           0 :         r.in.Account = _Account;
    6788           0 :         r.in.EncryptedPassword = _EncryptedPassword;
    6789           0 :         r.in.Reserved = _Reserved;
    6790             : 
    6791             :         /* Out parameters */
    6792             : 
    6793             :         /* Result */
    6794           0 :         NDR_ZERO_STRUCT(r.out.result);
    6795             : 
    6796           0 :         status = dcerpc_wkssvc_NetrSetPrimaryComputername_r(h, mem_ctx, &r);
    6797           0 :         if (!NT_STATUS_IS_OK(status)) {
    6798           0 :                 return status;
    6799             :         }
    6800             : 
    6801             :         /* Return variables */
    6802             : 
    6803             :         /* Return result */
    6804           0 :         *result = r.out.result;
    6805             : 
    6806           0 :         return NT_STATUS_OK;
    6807             : }
    6808             : 
    6809             : struct dcerpc_wkssvc_NetrEnumerateComputerNames_r_state {
    6810             :         TALLOC_CTX *out_mem_ctx;
    6811             : };
    6812             : 
    6813             : static void dcerpc_wkssvc_NetrEnumerateComputerNames_r_done(struct tevent_req *subreq);
    6814             : 
    6815           0 : struct tevent_req *dcerpc_wkssvc_NetrEnumerateComputerNames_r_send(TALLOC_CTX *mem_ctx,
    6816             :         struct tevent_context *ev,
    6817             :         struct dcerpc_binding_handle *h,
    6818             :         struct wkssvc_NetrEnumerateComputerNames *r)
    6819             : {
    6820             :         struct tevent_req *req;
    6821             :         struct dcerpc_wkssvc_NetrEnumerateComputerNames_r_state *state;
    6822             :         struct tevent_req *subreq;
    6823             : 
    6824           0 :         req = tevent_req_create(mem_ctx, &state,
    6825             :                                 struct dcerpc_wkssvc_NetrEnumerateComputerNames_r_state);
    6826           0 :         if (req == NULL) {
    6827           0 :                 return NULL;
    6828             :         }
    6829             : 
    6830           0 :         state->out_mem_ctx = talloc_new(state);
    6831           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6832           0 :                 return tevent_req_post(req, ev);
    6833             :         }
    6834             : 
    6835           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6836             :                         NULL, &ndr_table_wkssvc,
    6837           0 :                         NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES, state->out_mem_ctx, r);
    6838           0 :         if (tevent_req_nomem(subreq, req)) {
    6839           0 :                 return tevent_req_post(req, ev);
    6840             :         }
    6841           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrEnumerateComputerNames_r_done, req);
    6842             : 
    6843           0 :         return req;
    6844             : }
    6845             : 
    6846           0 : static void dcerpc_wkssvc_NetrEnumerateComputerNames_r_done(struct tevent_req *subreq)
    6847             : {
    6848           0 :         struct tevent_req *req =
    6849           0 :                 tevent_req_callback_data(subreq,
    6850             :                 struct tevent_req);
    6851             :         NTSTATUS status;
    6852             : 
    6853           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6854           0 :         TALLOC_FREE(subreq);
    6855           0 :         if (tevent_req_nterror(req, status)) {
    6856           0 :                 return;
    6857             :         }
    6858             : 
    6859           0 :         tevent_req_done(req);
    6860             : }
    6861             : 
    6862           0 : NTSTATUS dcerpc_wkssvc_NetrEnumerateComputerNames_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6863             : {
    6864           0 :         struct dcerpc_wkssvc_NetrEnumerateComputerNames_r_state *state =
    6865           0 :                 tevent_req_data(req,
    6866             :                 struct dcerpc_wkssvc_NetrEnumerateComputerNames_r_state);
    6867             :         NTSTATUS status;
    6868             : 
    6869           0 :         if (tevent_req_is_nterror(req, &status)) {
    6870           0 :                 tevent_req_received(req);
    6871           0 :                 return status;
    6872             :         }
    6873             : 
    6874           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6875             : 
    6876           0 :         tevent_req_received(req);
    6877           0 :         return NT_STATUS_OK;
    6878             : }
    6879             : 
    6880           5 : NTSTATUS dcerpc_wkssvc_NetrEnumerateComputerNames_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct wkssvc_NetrEnumerateComputerNames *r)
    6881             : {
    6882             :         NTSTATUS status;
    6883             : 
    6884           5 :         status = dcerpc_binding_handle_call(h,
    6885             :                         NULL, &ndr_table_wkssvc,
    6886             :                         NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES, mem_ctx, r);
    6887             : 
    6888           5 :         return status;
    6889             : }
    6890             : 
    6891             : struct dcerpc_wkssvc_NetrEnumerateComputerNames_state {
    6892             :         struct wkssvc_NetrEnumerateComputerNames orig;
    6893             :         struct wkssvc_NetrEnumerateComputerNames tmp;
    6894             :         TALLOC_CTX *out_mem_ctx;
    6895             : };
    6896             : 
    6897             : static void dcerpc_wkssvc_NetrEnumerateComputerNames_done(struct tevent_req *subreq);
    6898             : 
    6899           0 : struct tevent_req *dcerpc_wkssvc_NetrEnumerateComputerNames_send(TALLOC_CTX *mem_ctx,
    6900             :                                                                  struct tevent_context *ev,
    6901             :                                                                  struct dcerpc_binding_handle *h,
    6902             :                                                                  const char *_server_name /* [in] [charset(UTF16),unique] */,
    6903             :                                                                  enum wkssvc_ComputerNameType _name_type /* [in]  */,
    6904             :                                                                  uint32_t _Reserved /* [in]  */,
    6905             :                                                                  struct wkssvc_ComputerNamesCtr **_ctr /* [out] [ref] */)
    6906             : {
    6907             :         struct tevent_req *req;
    6908             :         struct dcerpc_wkssvc_NetrEnumerateComputerNames_state *state;
    6909             :         struct tevent_req *subreq;
    6910             : 
    6911           0 :         req = tevent_req_create(mem_ctx, &state,
    6912             :                                 struct dcerpc_wkssvc_NetrEnumerateComputerNames_state);
    6913           0 :         if (req == NULL) {
    6914           0 :                 return NULL;
    6915             :         }
    6916           0 :         state->out_mem_ctx = NULL;
    6917             : 
    6918             :         /* In parameters */
    6919           0 :         state->orig.in.server_name = _server_name;
    6920           0 :         state->orig.in.name_type = _name_type;
    6921           0 :         state->orig.in.Reserved = _Reserved;
    6922             : 
    6923             :         /* Out parameters */
    6924           0 :         state->orig.out.ctr = _ctr;
    6925             : 
    6926             :         /* Result */
    6927           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6928             : 
    6929           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6930             :                              "dcerpc_wkssvc_NetrEnumerateComputerNames_out_memory");
    6931           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6932           0 :                 return tevent_req_post(req, ev);
    6933             :         }
    6934             : 
    6935             :         /* make a temporary copy, that we pass to the dispatch function */
    6936           0 :         state->tmp = state->orig;
    6937             : 
    6938           0 :         subreq = dcerpc_wkssvc_NetrEnumerateComputerNames_r_send(state, ev, h, &state->tmp);
    6939           0 :         if (tevent_req_nomem(subreq, req)) {
    6940           0 :                 return tevent_req_post(req, ev);
    6941             :         }
    6942           0 :         tevent_req_set_callback(subreq, dcerpc_wkssvc_NetrEnumerateComputerNames_done, req);
    6943           0 :         return req;
    6944             : }
    6945             : 
    6946           0 : static void dcerpc_wkssvc_NetrEnumerateComputerNames_done(struct tevent_req *subreq)
    6947             : {
    6948           0 :         struct tevent_req *req = tevent_req_callback_data(
    6949             :                 subreq, struct tevent_req);
    6950           0 :         struct dcerpc_wkssvc_NetrEnumerateComputerNames_state *state = tevent_req_data(
    6951             :                 req, struct dcerpc_wkssvc_NetrEnumerateComputerNames_state);
    6952             :         NTSTATUS status;
    6953             :         TALLOC_CTX *mem_ctx;
    6954             : 
    6955           0 :         if (state->out_mem_ctx) {
    6956           0 :                 mem_ctx = state->out_mem_ctx;
    6957             :         } else {
    6958           0 :                 mem_ctx = state;
    6959             :         }
    6960             : 
    6961           0 :         status = dcerpc_wkssvc_NetrEnumerateComputerNames_r_recv(subreq, mem_ctx);
    6962           0 :         TALLOC_FREE(subreq);
    6963           0 :         if (tevent_req_nterror(req, status)) {
    6964           0 :                 return;
    6965             :         }
    6966             : 
    6967             :         /* Copy out parameters */
    6968           0 :         *state->orig.out.ctr = *state->tmp.out.ctr;
    6969             : 
    6970             :         /* Copy result */
    6971           0 :         state->orig.out.result = state->tmp.out.result;
    6972             : 
    6973             :         /* Reset temporary structure */
    6974           0 :         NDR_ZERO_STRUCT(state->tmp);
    6975             : 
    6976           0 :         tevent_req_done(req);
    6977             : }
    6978             : 
    6979           0 : NTSTATUS dcerpc_wkssvc_NetrEnumerateComputerNames_recv(struct tevent_req *req,
    6980             :                                                        TALLOC_CTX *mem_ctx,
    6981             :                                                        WERROR *result)
    6982             : {
    6983           0 :         struct dcerpc_wkssvc_NetrEnumerateComputerNames_state *state = tevent_req_data(
    6984             :                 req, struct dcerpc_wkssvc_NetrEnumerateComputerNames_state);
    6985             :         NTSTATUS status;
    6986             : 
    6987           0 :         if (tevent_req_is_nterror(req, &status)) {
    6988           0 :                 tevent_req_received(req);
    6989           0 :                 return status;
    6990             :         }
    6991             : 
    6992             :         /* Steal possible out parameters to the callers context */
    6993           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6994             : 
    6995             :         /* Return result */
    6996           0 :         *result = state->orig.out.result;
    6997             : 
    6998           0 :         tevent_req_received(req);
    6999           0 :         return NT_STATUS_OK;
    7000             : }
    7001             : 
    7002           0 : NTSTATUS dcerpc_wkssvc_NetrEnumerateComputerNames(struct dcerpc_binding_handle *h,
    7003             :                                                   TALLOC_CTX *mem_ctx,
    7004             :                                                   const char *_server_name /* [in] [charset(UTF16),unique] */,
    7005             :                                                   enum wkssvc_ComputerNameType _name_type /* [in]  */,
    7006             :                                                   uint32_t _Reserved /* [in]  */,
    7007             :                                                   struct wkssvc_ComputerNamesCtr **_ctr /* [out] [ref] */,
    7008             :                                                   WERROR *result)
    7009             : {
    7010             :         struct wkssvc_NetrEnumerateComputerNames r;
    7011             :         NTSTATUS status;
    7012             : 
    7013             :         /* In parameters */
    7014           0 :         r.in.server_name = _server_name;
    7015           0 :         r.in.name_type = _name_type;
    7016           0 :         r.in.Reserved = _Reserved;
    7017             : 
    7018             :         /* Out parameters */
    7019           0 :         r.out.ctr = _ctr;
    7020             : 
    7021             :         /* Result */
    7022           0 :         NDR_ZERO_STRUCT(r.out.result);
    7023             : 
    7024           0 :         status = dcerpc_wkssvc_NetrEnumerateComputerNames_r(h, mem_ctx, &r);
    7025           0 :         if (!NT_STATUS_IS_OK(status)) {
    7026           0 :                 return status;
    7027             :         }
    7028             : 
    7029             :         /* Return variables */
    7030           0 :         *_ctr = *r.out.ctr;
    7031             : 
    7032             :         /* Return result */
    7033           0 :         *result = r.out.result;
    7034             : 
    7035           0 :         return NT_STATUS_OK;
    7036             : }
    7037             : 

Generated by: LCOV version 1.13