LCOV - code coverage report
Current view: top level - bin/default/source4/librpc/gen_ndr - ndr_irpc_c.c (source / functions) Hit Total Coverage
Test: coverage report for master 2b515b7d Lines: 168 895 18.8 %
Date: 2024-02-28 12:06:22 Functions: 21 84 25.0 %

          Line data    Source code
       1             : /* client functions auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include <tevent.h>
       5             : #include "lib/util/tevent_ntstatus.h"
       6             : #include "bin/default/source4/librpc/gen_ndr/ndr_irpc.h"
       7             : #include "bin/default/source4/librpc/gen_ndr/ndr_irpc_c.h"
       8             : 
       9             : /* irpc - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_irpc_uptime_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_irpc_uptime_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_irpc_uptime_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct irpc_uptime *r)
      21             : {
      22           0 :         struct tevent_req *req;
      23           0 :         struct dcerpc_irpc_uptime_r_state *state;
      24           0 :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_irpc_uptime_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_irpc,
      39           0 :                         NDR_IRPC_UPTIME, 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_irpc_uptime_r_done, req);
      44             : 
      45           0 :         return req;
      46             : }
      47             : 
      48           0 : static void dcerpc_irpc_uptime_r_done(struct tevent_req *subreq)
      49             : {
      50           0 :         struct tevent_req *req =
      51           0 :                 tevent_req_callback_data(subreq,
      52             :                 struct tevent_req);
      53           0 :         NTSTATUS status;
      54             : 
      55           0 :         status = dcerpc_binding_handle_call_recv(subreq);
      56           0 :         TALLOC_FREE(subreq);
      57           0 :         if (tevent_req_nterror(req, status)) {
      58           0 :                 return;
      59             :         }
      60             : 
      61           0 :         tevent_req_done(req);
      62             : }
      63             : 
      64           0 : NTSTATUS dcerpc_irpc_uptime_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_irpc_uptime_r_state *state =
      67           0 :                 tevent_req_data(req,
      68             :                 struct dcerpc_irpc_uptime_r_state);
      69           0 :         NTSTATUS status;
      70             : 
      71           0 :         if (tevent_req_is_nterror(req, &status)) {
      72           0 :                 tevent_req_received(req);
      73           0 :                 return status;
      74             :         }
      75             : 
      76           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      77             : 
      78           0 :         tevent_req_received(req);
      79           0 :         return NT_STATUS_OK;
      80             : }
      81             : 
      82           0 : NTSTATUS dcerpc_irpc_uptime_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct irpc_uptime *r)
      83             : {
      84           0 :         NTSTATUS status;
      85             : 
      86           0 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_irpc,
      88             :                         NDR_IRPC_UPTIME, mem_ctx, r);
      89             : 
      90           0 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_irpc_uptime_state {
      94             :         struct irpc_uptime orig;
      95             :         struct irpc_uptime tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_irpc_uptime_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_irpc_uptime_send(TALLOC_CTX *mem_ctx,
     102             :                                            struct tevent_context *ev,
     103             :                                            struct dcerpc_binding_handle *h,
     104             :                                            NTTIME *_start_time /* [out] [ref] */)
     105             : {
     106           0 :         struct tevent_req *req;
     107           0 :         struct dcerpc_irpc_uptime_state *state;
     108           0 :         struct tevent_req *subreq;
     109             : 
     110           0 :         req = tevent_req_create(mem_ctx, &state,
     111             :                                 struct dcerpc_irpc_uptime_state);
     112           0 :         if (req == NULL) {
     113           0 :                 return NULL;
     114             :         }
     115           0 :         state->out_mem_ctx = NULL;
     116             : 
     117             :         /* In parameters */
     118             : 
     119             :         /* Out parameters */
     120           0 :         state->orig.out.start_time = _start_time;
     121             : 
     122           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     123             :                              "dcerpc_irpc_uptime_out_memory");
     124           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     125           0 :                 return tevent_req_post(req, ev);
     126             :         }
     127             : 
     128             :         /* make a temporary copy, that we pass to the dispatch function */
     129           0 :         state->tmp = state->orig;
     130             : 
     131           0 :         subreq = dcerpc_irpc_uptime_r_send(state, ev, h, &state->tmp);
     132           0 :         if (tevent_req_nomem(subreq, req)) {
     133           0 :                 return tevent_req_post(req, ev);
     134             :         }
     135           0 :         tevent_req_set_callback(subreq, dcerpc_irpc_uptime_done, req);
     136           0 :         return req;
     137             : }
     138             : 
     139           0 : static void dcerpc_irpc_uptime_done(struct tevent_req *subreq)
     140             : {
     141           0 :         struct tevent_req *req = tevent_req_callback_data(
     142             :                 subreq, struct tevent_req);
     143           0 :         struct dcerpc_irpc_uptime_state *state = tevent_req_data(
     144             :                 req, struct dcerpc_irpc_uptime_state);
     145           0 :         NTSTATUS status;
     146           0 :         TALLOC_CTX *mem_ctx;
     147             : 
     148           0 :         if (state->out_mem_ctx) {
     149           0 :                 mem_ctx = state->out_mem_ctx;
     150             :         } else {
     151           0 :                 mem_ctx = state;
     152             :         }
     153             : 
     154           0 :         status = dcerpc_irpc_uptime_r_recv(subreq, mem_ctx);
     155           0 :         TALLOC_FREE(subreq);
     156           0 :         if (tevent_req_nterror(req, status)) {
     157           0 :                 return;
     158             :         }
     159             : 
     160             :         /* Copy out parameters */
     161           0 :         *state->orig.out.start_time = *state->tmp.out.start_time;
     162             : 
     163             :         /* Reset temporary structure */
     164           0 :         NDR_ZERO_STRUCT(state->tmp);
     165             : 
     166           0 :         tevent_req_done(req);
     167             : }
     168             : 
     169           0 : NTSTATUS dcerpc_irpc_uptime_recv(struct tevent_req *req,
     170             :                                  TALLOC_CTX *mem_ctx)
     171             : {
     172           0 :         struct dcerpc_irpc_uptime_state *state = tevent_req_data(
     173             :                 req, struct dcerpc_irpc_uptime_state);
     174           0 :         NTSTATUS status;
     175             : 
     176           0 :         if (tevent_req_is_nterror(req, &status)) {
     177           0 :                 tevent_req_received(req);
     178           0 :                 return status;
     179             :         }
     180             : 
     181             :         /* Steal possible out parameters to the callers context */
     182           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     183             : 
     184           0 :         tevent_req_received(req);
     185           0 :         return NT_STATUS_OK;
     186             : }
     187             : 
     188           0 : NTSTATUS dcerpc_irpc_uptime(struct dcerpc_binding_handle *h,
     189             :                             TALLOC_CTX *mem_ctx,
     190             :                             NTTIME *_start_time /* [out] [ref] */)
     191             : {
     192           0 :         struct irpc_uptime r;
     193           0 :         NTSTATUS status;
     194             : 
     195             :         /* In parameters */
     196             : 
     197             :         /* Out parameters */
     198           0 :         r.out.start_time = _start_time;
     199             : 
     200           0 :         status = dcerpc_irpc_uptime_r(h, mem_ctx, &r);
     201           0 :         if (!NT_STATUS_IS_OK(status)) {
     202           0 :                 return status;
     203             :         }
     204             : 
     205             :         /* Return variables */
     206           0 :         *_start_time = *r.out.start_time;
     207             : 
     208             :         /* Return result */
     209             : 
     210           0 :         return NT_STATUS_OK;
     211             : }
     212             : 
     213             : struct dcerpc_nbtd_information_r_state {
     214             :         TALLOC_CTX *out_mem_ctx;
     215             : };
     216             : 
     217             : static void dcerpc_nbtd_information_r_done(struct tevent_req *subreq);
     218             : 
     219           0 : struct tevent_req *dcerpc_nbtd_information_r_send(TALLOC_CTX *mem_ctx,
     220             :         struct tevent_context *ev,
     221             :         struct dcerpc_binding_handle *h,
     222             :         struct nbtd_information *r)
     223             : {
     224           0 :         struct tevent_req *req;
     225           0 :         struct dcerpc_nbtd_information_r_state *state;
     226           0 :         struct tevent_req *subreq;
     227             : 
     228           0 :         req = tevent_req_create(mem_ctx, &state,
     229             :                                 struct dcerpc_nbtd_information_r_state);
     230           0 :         if (req == NULL) {
     231           0 :                 return NULL;
     232             :         }
     233             : 
     234           0 :         state->out_mem_ctx = talloc_new(state);
     235           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     236           0 :                 return tevent_req_post(req, ev);
     237             :         }
     238             : 
     239           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     240             :                         NULL, &ndr_table_irpc,
     241           0 :                         NDR_NBTD_INFORMATION, state->out_mem_ctx, r);
     242           0 :         if (tevent_req_nomem(subreq, req)) {
     243           0 :                 return tevent_req_post(req, ev);
     244             :         }
     245           0 :         tevent_req_set_callback(subreq, dcerpc_nbtd_information_r_done, req);
     246             : 
     247           0 :         return req;
     248             : }
     249             : 
     250           0 : static void dcerpc_nbtd_information_r_done(struct tevent_req *subreq)
     251             : {
     252           0 :         struct tevent_req *req =
     253           0 :                 tevent_req_callback_data(subreq,
     254             :                 struct tevent_req);
     255           0 :         NTSTATUS status;
     256             : 
     257           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     258           0 :         TALLOC_FREE(subreq);
     259           0 :         if (tevent_req_nterror(req, status)) {
     260           0 :                 return;
     261             :         }
     262             : 
     263           0 :         tevent_req_done(req);
     264             : }
     265             : 
     266           0 : NTSTATUS dcerpc_nbtd_information_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     267             : {
     268           0 :         struct dcerpc_nbtd_information_r_state *state =
     269           0 :                 tevent_req_data(req,
     270             :                 struct dcerpc_nbtd_information_r_state);
     271           0 :         NTSTATUS status;
     272             : 
     273           0 :         if (tevent_req_is_nterror(req, &status)) {
     274           0 :                 tevent_req_received(req);
     275           0 :                 return status;
     276             :         }
     277             : 
     278           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     279             : 
     280           0 :         tevent_req_received(req);
     281           0 :         return NT_STATUS_OK;
     282             : }
     283             : 
     284           0 : NTSTATUS dcerpc_nbtd_information_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct nbtd_information *r)
     285             : {
     286           0 :         NTSTATUS status;
     287             : 
     288           0 :         status = dcerpc_binding_handle_call(h,
     289             :                         NULL, &ndr_table_irpc,
     290             :                         NDR_NBTD_INFORMATION, mem_ctx, r);
     291             : 
     292           0 :         return status;
     293             : }
     294             : 
     295             : /*
     296             :  * The following functions are skipped because
     297             :  * an [out] argument info is not a pointer or array:
     298             :  *
     299             :  * dcerpc_nbtd_information_send()
     300             :  * dcerpc_nbtd_information_recv()
     301             :  * dcerpc_nbtd_information()
     302             :  */
     303             : 
     304             : struct dcerpc_nbtd_getdcname_r_state {
     305             :         TALLOC_CTX *out_mem_ctx;
     306             : };
     307             : 
     308             : static void dcerpc_nbtd_getdcname_r_done(struct tevent_req *subreq);
     309             : 
     310           0 : struct tevent_req *dcerpc_nbtd_getdcname_r_send(TALLOC_CTX *mem_ctx,
     311             :         struct tevent_context *ev,
     312             :         struct dcerpc_binding_handle *h,
     313             :         struct nbtd_getdcname *r)
     314             : {
     315           0 :         struct tevent_req *req;
     316           0 :         struct dcerpc_nbtd_getdcname_r_state *state;
     317           0 :         struct tevent_req *subreq;
     318             : 
     319           0 :         req = tevent_req_create(mem_ctx, &state,
     320             :                                 struct dcerpc_nbtd_getdcname_r_state);
     321           0 :         if (req == NULL) {
     322           0 :                 return NULL;
     323             :         }
     324             : 
     325           0 :         state->out_mem_ctx = talloc_new(state);
     326           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     327           0 :                 return tevent_req_post(req, ev);
     328             :         }
     329             : 
     330           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     331             :                         NULL, &ndr_table_irpc,
     332           0 :                         NDR_NBTD_GETDCNAME, state->out_mem_ctx, r);
     333           0 :         if (tevent_req_nomem(subreq, req)) {
     334           0 :                 return tevent_req_post(req, ev);
     335             :         }
     336           0 :         tevent_req_set_callback(subreq, dcerpc_nbtd_getdcname_r_done, req);
     337             : 
     338           0 :         return req;
     339             : }
     340             : 
     341           0 : static void dcerpc_nbtd_getdcname_r_done(struct tevent_req *subreq)
     342             : {
     343           0 :         struct tevent_req *req =
     344           0 :                 tevent_req_callback_data(subreq,
     345             :                 struct tevent_req);
     346           0 :         NTSTATUS status;
     347             : 
     348           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     349           0 :         TALLOC_FREE(subreq);
     350           0 :         if (tevent_req_nterror(req, status)) {
     351           0 :                 return;
     352             :         }
     353             : 
     354           0 :         tevent_req_done(req);
     355             : }
     356             : 
     357           0 : NTSTATUS dcerpc_nbtd_getdcname_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     358             : {
     359           0 :         struct dcerpc_nbtd_getdcname_r_state *state =
     360           0 :                 tevent_req_data(req,
     361             :                 struct dcerpc_nbtd_getdcname_r_state);
     362           0 :         NTSTATUS status;
     363             : 
     364           0 :         if (tevent_req_is_nterror(req, &status)) {
     365           0 :                 tevent_req_received(req);
     366           0 :                 return status;
     367             :         }
     368             : 
     369           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     370             : 
     371           0 :         tevent_req_received(req);
     372           0 :         return NT_STATUS_OK;
     373             : }
     374             : 
     375           0 : NTSTATUS dcerpc_nbtd_getdcname_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct nbtd_getdcname *r)
     376             : {
     377           0 :         NTSTATUS status;
     378             : 
     379           0 :         status = dcerpc_binding_handle_call(h,
     380             :                         NULL, &ndr_table_irpc,
     381             :                         NDR_NBTD_GETDCNAME, mem_ctx, r);
     382             : 
     383           0 :         return status;
     384             : }
     385             : 
     386             : /*
     387             :  * The following functions are skipped because
     388             :  * an [out] argument dcname is a pointer to a string type:
     389             :  *
     390             :  * dcerpc_nbtd_getdcname_send()
     391             :  * dcerpc_nbtd_getdcname_recv()
     392             :  * dcerpc_nbtd_getdcname()
     393             :  */
     394             : 
     395             : struct dcerpc_nbtd_proxy_wins_challenge_r_state {
     396             :         TALLOC_CTX *out_mem_ctx;
     397             : };
     398             : 
     399             : static void dcerpc_nbtd_proxy_wins_challenge_r_done(struct tevent_req *subreq);
     400             : 
     401          21 : struct tevent_req *dcerpc_nbtd_proxy_wins_challenge_r_send(TALLOC_CTX *mem_ctx,
     402             :         struct tevent_context *ev,
     403             :         struct dcerpc_binding_handle *h,
     404             :         struct nbtd_proxy_wins_challenge *r)
     405             : {
     406           0 :         struct tevent_req *req;
     407           0 :         struct dcerpc_nbtd_proxy_wins_challenge_r_state *state;
     408           0 :         struct tevent_req *subreq;
     409             : 
     410          21 :         req = tevent_req_create(mem_ctx, &state,
     411             :                                 struct dcerpc_nbtd_proxy_wins_challenge_r_state);
     412          21 :         if (req == NULL) {
     413           0 :                 return NULL;
     414             :         }
     415             : 
     416          21 :         state->out_mem_ctx = talloc_new(state);
     417          21 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     418           0 :                 return tevent_req_post(req, ev);
     419             :         }
     420             : 
     421          21 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     422             :                         NULL, &ndr_table_irpc,
     423          21 :                         NDR_NBTD_PROXY_WINS_CHALLENGE, state->out_mem_ctx, r);
     424          21 :         if (tevent_req_nomem(subreq, req)) {
     425           0 :                 return tevent_req_post(req, ev);
     426             :         }
     427          21 :         tevent_req_set_callback(subreq, dcerpc_nbtd_proxy_wins_challenge_r_done, req);
     428             : 
     429          21 :         return req;
     430             : }
     431             : 
     432          21 : static void dcerpc_nbtd_proxy_wins_challenge_r_done(struct tevent_req *subreq)
     433             : {
     434           0 :         struct tevent_req *req =
     435          21 :                 tevent_req_callback_data(subreq,
     436             :                 struct tevent_req);
     437           0 :         NTSTATUS status;
     438             : 
     439          21 :         status = dcerpc_binding_handle_call_recv(subreq);
     440          21 :         TALLOC_FREE(subreq);
     441          21 :         if (tevent_req_nterror(req, status)) {
     442           5 :                 return;
     443             :         }
     444             : 
     445          16 :         tevent_req_done(req);
     446             : }
     447             : 
     448          21 : NTSTATUS dcerpc_nbtd_proxy_wins_challenge_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     449             : {
     450           0 :         struct dcerpc_nbtd_proxy_wins_challenge_r_state *state =
     451          21 :                 tevent_req_data(req,
     452             :                 struct dcerpc_nbtd_proxy_wins_challenge_r_state);
     453           0 :         NTSTATUS status;
     454             : 
     455          21 :         if (tevent_req_is_nterror(req, &status)) {
     456           5 :                 tevent_req_received(req);
     457           5 :                 return status;
     458             :         }
     459             : 
     460          16 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     461             : 
     462          16 :         tevent_req_received(req);
     463          16 :         return NT_STATUS_OK;
     464             : }
     465             : 
     466           0 : NTSTATUS dcerpc_nbtd_proxy_wins_challenge_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct nbtd_proxy_wins_challenge *r)
     467             : {
     468           0 :         NTSTATUS status;
     469             : 
     470           0 :         status = dcerpc_binding_handle_call(h,
     471             :                         NULL, &ndr_table_irpc,
     472             :                         NDR_NBTD_PROXY_WINS_CHALLENGE, mem_ctx, r);
     473             : 
     474           0 :         return status;
     475             : }
     476             : 
     477             : /*
     478             :  * The following functions are skipped because
     479             :  * an [out] argument num_addrs is not a pointer or array:
     480             :  *
     481             :  * dcerpc_nbtd_proxy_wins_challenge_send()
     482             :  * dcerpc_nbtd_proxy_wins_challenge_recv()
     483             :  * dcerpc_nbtd_proxy_wins_challenge()
     484             :  */
     485             : 
     486             : struct dcerpc_nbtd_proxy_wins_release_demand_r_state {
     487             :         TALLOC_CTX *out_mem_ctx;
     488             : };
     489             : 
     490             : static void dcerpc_nbtd_proxy_wins_release_demand_r_done(struct tevent_req *subreq);
     491             : 
     492          10 : struct tevent_req *dcerpc_nbtd_proxy_wins_release_demand_r_send(TALLOC_CTX *mem_ctx,
     493             :         struct tevent_context *ev,
     494             :         struct dcerpc_binding_handle *h,
     495             :         struct nbtd_proxy_wins_release_demand *r)
     496             : {
     497           0 :         struct tevent_req *req;
     498           0 :         struct dcerpc_nbtd_proxy_wins_release_demand_r_state *state;
     499           0 :         struct tevent_req *subreq;
     500             : 
     501          10 :         req = tevent_req_create(mem_ctx, &state,
     502             :                                 struct dcerpc_nbtd_proxy_wins_release_demand_r_state);
     503          10 :         if (req == NULL) {
     504           0 :                 return NULL;
     505             :         }
     506             : 
     507          10 :         state->out_mem_ctx = NULL;
     508             : 
     509          10 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     510             :                         NULL, &ndr_table_irpc,
     511             :                         NDR_NBTD_PROXY_WINS_RELEASE_DEMAND, state, r);
     512          10 :         if (tevent_req_nomem(subreq, req)) {
     513           0 :                 return tevent_req_post(req, ev);
     514             :         }
     515          10 :         tevent_req_set_callback(subreq, dcerpc_nbtd_proxy_wins_release_demand_r_done, req);
     516             : 
     517          10 :         return req;
     518             : }
     519             : 
     520          10 : static void dcerpc_nbtd_proxy_wins_release_demand_r_done(struct tevent_req *subreq)
     521             : {
     522           0 :         struct tevent_req *req =
     523          10 :                 tevent_req_callback_data(subreq,
     524             :                 struct tevent_req);
     525           0 :         NTSTATUS status;
     526             : 
     527          10 :         status = dcerpc_binding_handle_call_recv(subreq);
     528          10 :         TALLOC_FREE(subreq);
     529          10 :         if (tevent_req_nterror(req, status)) {
     530           1 :                 return;
     531             :         }
     532             : 
     533           9 :         tevent_req_done(req);
     534             : }
     535             : 
     536          10 : NTSTATUS dcerpc_nbtd_proxy_wins_release_demand_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     537             : {
     538           0 :         struct dcerpc_nbtd_proxy_wins_release_demand_r_state *state =
     539          10 :                 tevent_req_data(req,
     540             :                 struct dcerpc_nbtd_proxy_wins_release_demand_r_state);
     541           0 :         NTSTATUS status;
     542             : 
     543          10 :         if (tevent_req_is_nterror(req, &status)) {
     544           1 :                 tevent_req_received(req);
     545           1 :                 return status;
     546             :         }
     547             : 
     548           9 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     549             : 
     550           9 :         tevent_req_received(req);
     551           9 :         return NT_STATUS_OK;
     552             : }
     553             : 
     554           0 : NTSTATUS dcerpc_nbtd_proxy_wins_release_demand_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct nbtd_proxy_wins_release_demand *r)
     555             : {
     556           0 :         NTSTATUS status;
     557             : 
     558           0 :         status = dcerpc_binding_handle_call(h,
     559             :                         NULL, &ndr_table_irpc,
     560             :                         NDR_NBTD_PROXY_WINS_RELEASE_DEMAND, mem_ctx, r);
     561             : 
     562           0 :         return status;
     563             : }
     564             : 
     565             : struct dcerpc_nbtd_proxy_wins_release_demand_state {
     566             :         struct nbtd_proxy_wins_release_demand orig;
     567             :         struct nbtd_proxy_wins_release_demand tmp;
     568             :         TALLOC_CTX *out_mem_ctx;
     569             : };
     570             : 
     571             : static void dcerpc_nbtd_proxy_wins_release_demand_done(struct tevent_req *subreq);
     572             : 
     573           0 : struct tevent_req *dcerpc_nbtd_proxy_wins_release_demand_send(TALLOC_CTX *mem_ctx,
     574             :                                                               struct tevent_context *ev,
     575             :                                                               struct dcerpc_binding_handle *h,
     576             :                                                               struct nbt_name _name /* [in]  */,
     577             :                                                               uint32_t _num_addrs /* [in]  */,
     578             :                                                               struct nbtd_proxy_wins_addr *_addrs /* [in]  */)
     579             : {
     580           0 :         struct tevent_req *req;
     581           0 :         struct dcerpc_nbtd_proxy_wins_release_demand_state *state;
     582           0 :         struct tevent_req *subreq;
     583             : 
     584           0 :         req = tevent_req_create(mem_ctx, &state,
     585             :                                 struct dcerpc_nbtd_proxy_wins_release_demand_state);
     586           0 :         if (req == NULL) {
     587           0 :                 return NULL;
     588             :         }
     589           0 :         state->out_mem_ctx = NULL;
     590             : 
     591             :         /* In parameters */
     592           0 :         state->orig.in.name = _name;
     593           0 :         state->orig.in.num_addrs = _num_addrs;
     594           0 :         state->orig.in.addrs = _addrs;
     595             : 
     596             :         /* Out parameters */
     597             : 
     598             :         /* make a temporary copy, that we pass to the dispatch function */
     599           0 :         state->tmp = state->orig;
     600             : 
     601           0 :         subreq = dcerpc_nbtd_proxy_wins_release_demand_r_send(state, ev, h, &state->tmp);
     602           0 :         if (tevent_req_nomem(subreq, req)) {
     603           0 :                 return tevent_req_post(req, ev);
     604             :         }
     605           0 :         tevent_req_set_callback(subreq, dcerpc_nbtd_proxy_wins_release_demand_done, req);
     606           0 :         return req;
     607             : }
     608             : 
     609           0 : static void dcerpc_nbtd_proxy_wins_release_demand_done(struct tevent_req *subreq)
     610             : {
     611           0 :         struct tevent_req *req = tevent_req_callback_data(
     612             :                 subreq, struct tevent_req);
     613           0 :         struct dcerpc_nbtd_proxy_wins_release_demand_state *state = tevent_req_data(
     614             :                 req, struct dcerpc_nbtd_proxy_wins_release_demand_state);
     615           0 :         NTSTATUS status;
     616           0 :         TALLOC_CTX *mem_ctx;
     617             : 
     618           0 :         if (state->out_mem_ctx) {
     619           0 :                 mem_ctx = state->out_mem_ctx;
     620             :         } else {
     621           0 :                 mem_ctx = state;
     622             :         }
     623             : 
     624           0 :         status = dcerpc_nbtd_proxy_wins_release_demand_r_recv(subreq, mem_ctx);
     625           0 :         TALLOC_FREE(subreq);
     626           0 :         if (tevent_req_nterror(req, status)) {
     627           0 :                 return;
     628             :         }
     629             : 
     630             :         /* Copy out parameters */
     631             : 
     632             :         /* Reset temporary structure */
     633           0 :         NDR_ZERO_STRUCT(state->tmp);
     634             : 
     635           0 :         tevent_req_done(req);
     636             : }
     637             : 
     638           0 : NTSTATUS dcerpc_nbtd_proxy_wins_release_demand_recv(struct tevent_req *req,
     639             :                                                     TALLOC_CTX *mem_ctx)
     640             : {
     641           0 :         struct dcerpc_nbtd_proxy_wins_release_demand_state *state = tevent_req_data(
     642             :                 req, struct dcerpc_nbtd_proxy_wins_release_demand_state);
     643           0 :         NTSTATUS status;
     644             : 
     645           0 :         if (tevent_req_is_nterror(req, &status)) {
     646           0 :                 tevent_req_received(req);
     647           0 :                 return status;
     648             :         }
     649             : 
     650             :         /* Steal possible out parameters to the callers context */
     651           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     652             : 
     653           0 :         tevent_req_received(req);
     654           0 :         return NT_STATUS_OK;
     655             : }
     656             : 
     657           0 : NTSTATUS dcerpc_nbtd_proxy_wins_release_demand(struct dcerpc_binding_handle *h,
     658             :                                                TALLOC_CTX *mem_ctx,
     659             :                                                struct nbt_name _name /* [in]  */,
     660             :                                                uint32_t _num_addrs /* [in]  */,
     661             :                                                struct nbtd_proxy_wins_addr *_addrs /* [in]  */)
     662             : {
     663           0 :         struct nbtd_proxy_wins_release_demand r;
     664           0 :         NTSTATUS status;
     665             : 
     666             :         /* In parameters */
     667           0 :         r.in.name = _name;
     668           0 :         r.in.num_addrs = _num_addrs;
     669           0 :         r.in.addrs = _addrs;
     670             : 
     671             :         /* Out parameters */
     672             : 
     673           0 :         status = dcerpc_nbtd_proxy_wins_release_demand_r(h, mem_ctx, &r);
     674           0 :         if (!NT_STATUS_IS_OK(status)) {
     675           0 :                 return status;
     676             :         }
     677             : 
     678             :         /* Return variables */
     679             : 
     680             :         /* Return result */
     681             : 
     682           0 :         return NT_STATUS_OK;
     683             : }
     684             : 
     685             : struct dcerpc_kdc_check_generic_kerberos_r_state {
     686             :         TALLOC_CTX *out_mem_ctx;
     687             : };
     688             : 
     689             : static void dcerpc_kdc_check_generic_kerberos_r_done(struct tevent_req *subreq);
     690             : 
     691         250 : struct tevent_req *dcerpc_kdc_check_generic_kerberos_r_send(TALLOC_CTX *mem_ctx,
     692             :         struct tevent_context *ev,
     693             :         struct dcerpc_binding_handle *h,
     694             :         struct kdc_check_generic_kerberos *r)
     695             : {
     696           0 :         struct tevent_req *req;
     697           0 :         struct dcerpc_kdc_check_generic_kerberos_r_state *state;
     698           0 :         struct tevent_req *subreq;
     699             : 
     700         250 :         req = tevent_req_create(mem_ctx, &state,
     701             :                                 struct dcerpc_kdc_check_generic_kerberos_r_state);
     702         250 :         if (req == NULL) {
     703           0 :                 return NULL;
     704             :         }
     705             : 
     706         250 :         state->out_mem_ctx = talloc_new(state);
     707         250 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     708           0 :                 return tevent_req_post(req, ev);
     709             :         }
     710             : 
     711         250 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     712             :                         NULL, &ndr_table_irpc,
     713         250 :                         NDR_KDC_CHECK_GENERIC_KERBEROS, state->out_mem_ctx, r);
     714         250 :         if (tevent_req_nomem(subreq, req)) {
     715           0 :                 return tevent_req_post(req, ev);
     716             :         }
     717         250 :         tevent_req_set_callback(subreq, dcerpc_kdc_check_generic_kerberos_r_done, req);
     718             : 
     719         250 :         return req;
     720             : }
     721             : 
     722         250 : static void dcerpc_kdc_check_generic_kerberos_r_done(struct tevent_req *subreq)
     723             : {
     724           0 :         struct tevent_req *req =
     725         250 :                 tevent_req_callback_data(subreq,
     726             :                 struct tevent_req);
     727           0 :         NTSTATUS status;
     728             : 
     729         250 :         status = dcerpc_binding_handle_call_recv(subreq);
     730         250 :         TALLOC_FREE(subreq);
     731         250 :         if (tevent_req_nterror(req, status)) {
     732         200 :                 return;
     733             :         }
     734             : 
     735          50 :         tevent_req_done(req);
     736             : }
     737             : 
     738         250 : NTSTATUS dcerpc_kdc_check_generic_kerberos_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     739             : {
     740           0 :         struct dcerpc_kdc_check_generic_kerberos_r_state *state =
     741         250 :                 tevent_req_data(req,
     742             :                 struct dcerpc_kdc_check_generic_kerberos_r_state);
     743           0 :         NTSTATUS status;
     744             : 
     745         250 :         if (tevent_req_is_nterror(req, &status)) {
     746         200 :                 tevent_req_received(req);
     747         200 :                 return status;
     748             :         }
     749             : 
     750          50 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     751             : 
     752          50 :         tevent_req_received(req);
     753          50 :         return NT_STATUS_OK;
     754             : }
     755             : 
     756           0 : NTSTATUS dcerpc_kdc_check_generic_kerberos_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct kdc_check_generic_kerberos *r)
     757             : {
     758           0 :         NTSTATUS status;
     759             : 
     760           0 :         status = dcerpc_binding_handle_call(h,
     761             :                         NULL, &ndr_table_irpc,
     762             :                         NDR_KDC_CHECK_GENERIC_KERBEROS, mem_ctx, r);
     763             : 
     764           0 :         return status;
     765             : }
     766             : 
     767             : /*
     768             :  * The following functions are skipped because
     769             :  * an [out] argument generic_reply is not a pointer or array:
     770             :  *
     771             :  * dcerpc_kdc_check_generic_kerberos_send()
     772             :  * dcerpc_kdc_check_generic_kerberos_recv()
     773             :  * dcerpc_kdc_check_generic_kerberos()
     774             :  */
     775             : 
     776             : struct dcerpc_smbsrv_information_r_state {
     777             :         TALLOC_CTX *out_mem_ctx;
     778             : };
     779             : 
     780             : static void dcerpc_smbsrv_information_r_done(struct tevent_req *subreq);
     781             : 
     782           0 : struct tevent_req *dcerpc_smbsrv_information_r_send(TALLOC_CTX *mem_ctx,
     783             :         struct tevent_context *ev,
     784             :         struct dcerpc_binding_handle *h,
     785             :         struct smbsrv_information *r)
     786             : {
     787           0 :         struct tevent_req *req;
     788           0 :         struct dcerpc_smbsrv_information_r_state *state;
     789           0 :         struct tevent_req *subreq;
     790             : 
     791           0 :         req = tevent_req_create(mem_ctx, &state,
     792             :                                 struct dcerpc_smbsrv_information_r_state);
     793           0 :         if (req == NULL) {
     794           0 :                 return NULL;
     795             :         }
     796             : 
     797           0 :         state->out_mem_ctx = talloc_new(state);
     798           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     799           0 :                 return tevent_req_post(req, ev);
     800             :         }
     801             : 
     802           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     803             :                         NULL, &ndr_table_irpc,
     804           0 :                         NDR_SMBSRV_INFORMATION, state->out_mem_ctx, r);
     805           0 :         if (tevent_req_nomem(subreq, req)) {
     806           0 :                 return tevent_req_post(req, ev);
     807             :         }
     808           0 :         tevent_req_set_callback(subreq, dcerpc_smbsrv_information_r_done, req);
     809             : 
     810           0 :         return req;
     811             : }
     812             : 
     813           0 : static void dcerpc_smbsrv_information_r_done(struct tevent_req *subreq)
     814             : {
     815           0 :         struct tevent_req *req =
     816           0 :                 tevent_req_callback_data(subreq,
     817             :                 struct tevent_req);
     818           0 :         NTSTATUS status;
     819             : 
     820           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     821           0 :         TALLOC_FREE(subreq);
     822           0 :         if (tevent_req_nterror(req, status)) {
     823           0 :                 return;
     824             :         }
     825             : 
     826           0 :         tevent_req_done(req);
     827             : }
     828             : 
     829           0 : NTSTATUS dcerpc_smbsrv_information_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     830             : {
     831           0 :         struct dcerpc_smbsrv_information_r_state *state =
     832           0 :                 tevent_req_data(req,
     833             :                 struct dcerpc_smbsrv_information_r_state);
     834           0 :         NTSTATUS status;
     835             : 
     836           0 :         if (tevent_req_is_nterror(req, &status)) {
     837           0 :                 tevent_req_received(req);
     838           0 :                 return status;
     839             :         }
     840             : 
     841           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     842             : 
     843           0 :         tevent_req_received(req);
     844           0 :         return NT_STATUS_OK;
     845             : }
     846             : 
     847           0 : NTSTATUS dcerpc_smbsrv_information_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct smbsrv_information *r)
     848             : {
     849           0 :         NTSTATUS status;
     850             : 
     851           0 :         status = dcerpc_binding_handle_call(h,
     852             :                         NULL, &ndr_table_irpc,
     853             :                         NDR_SMBSRV_INFORMATION, mem_ctx, r);
     854             : 
     855           0 :         return status;
     856             : }
     857             : 
     858             : /*
     859             :  * The following functions are skipped because
     860             :  * an [out] argument info is not a pointer or array:
     861             :  *
     862             :  * dcerpc_smbsrv_information_send()
     863             :  * dcerpc_smbsrv_information_recv()
     864             :  * dcerpc_smbsrv_information()
     865             :  */
     866             : 
     867             : struct dcerpc_samba_terminate_r_state {
     868             :         TALLOC_CTX *out_mem_ctx;
     869             : };
     870             : 
     871             : static void dcerpc_samba_terminate_r_done(struct tevent_req *subreq);
     872             : 
     873           0 : struct tevent_req *dcerpc_samba_terminate_r_send(TALLOC_CTX *mem_ctx,
     874             :         struct tevent_context *ev,
     875             :         struct dcerpc_binding_handle *h,
     876             :         struct samba_terminate *r)
     877             : {
     878           0 :         struct tevent_req *req;
     879           0 :         struct dcerpc_samba_terminate_r_state *state;
     880           0 :         struct tevent_req *subreq;
     881             : 
     882           0 :         req = tevent_req_create(mem_ctx, &state,
     883             :                                 struct dcerpc_samba_terminate_r_state);
     884           0 :         if (req == NULL) {
     885           0 :                 return NULL;
     886             :         }
     887             : 
     888           0 :         state->out_mem_ctx = NULL;
     889             : 
     890           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     891             :                         NULL, &ndr_table_irpc,
     892             :                         NDR_SAMBA_TERMINATE, state, r);
     893           0 :         if (tevent_req_nomem(subreq, req)) {
     894           0 :                 return tevent_req_post(req, ev);
     895             :         }
     896           0 :         tevent_req_set_callback(subreq, dcerpc_samba_terminate_r_done, req);
     897             : 
     898           0 :         return req;
     899             : }
     900             : 
     901           0 : static void dcerpc_samba_terminate_r_done(struct tevent_req *subreq)
     902             : {
     903           0 :         struct tevent_req *req =
     904           0 :                 tevent_req_callback_data(subreq,
     905             :                 struct tevent_req);
     906           0 :         NTSTATUS status;
     907             : 
     908           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     909           0 :         TALLOC_FREE(subreq);
     910           0 :         if (tevent_req_nterror(req, status)) {
     911           0 :                 return;
     912             :         }
     913             : 
     914           0 :         tevent_req_done(req);
     915             : }
     916             : 
     917           0 : NTSTATUS dcerpc_samba_terminate_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     918             : {
     919           0 :         struct dcerpc_samba_terminate_r_state *state =
     920           0 :                 tevent_req_data(req,
     921             :                 struct dcerpc_samba_terminate_r_state);
     922           0 :         NTSTATUS status;
     923             : 
     924           0 :         if (tevent_req_is_nterror(req, &status)) {
     925           0 :                 tevent_req_received(req);
     926           0 :                 return status;
     927             :         }
     928             : 
     929           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     930             : 
     931           0 :         tevent_req_received(req);
     932           0 :         return NT_STATUS_OK;
     933             : }
     934             : 
     935           0 : NTSTATUS dcerpc_samba_terminate_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct samba_terminate *r)
     936             : {
     937           0 :         NTSTATUS status;
     938             : 
     939           0 :         status = dcerpc_binding_handle_call(h,
     940             :                         NULL, &ndr_table_irpc,
     941             :                         NDR_SAMBA_TERMINATE, mem_ctx, r);
     942             : 
     943           0 :         return status;
     944             : }
     945             : 
     946             : struct dcerpc_samba_terminate_state {
     947             :         struct samba_terminate orig;
     948             :         struct samba_terminate tmp;
     949             :         TALLOC_CTX *out_mem_ctx;
     950             : };
     951             : 
     952             : static void dcerpc_samba_terminate_done(struct tevent_req *subreq);
     953             : 
     954           0 : struct tevent_req *dcerpc_samba_terminate_send(TALLOC_CTX *mem_ctx,
     955             :                                                struct tevent_context *ev,
     956             :                                                struct dcerpc_binding_handle *h,
     957             :                                                const char * _reason /* [in] [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */)
     958             : {
     959           0 :         struct tevent_req *req;
     960           0 :         struct dcerpc_samba_terminate_state *state;
     961           0 :         struct tevent_req *subreq;
     962             : 
     963           0 :         req = tevent_req_create(mem_ctx, &state,
     964             :                                 struct dcerpc_samba_terminate_state);
     965           0 :         if (req == NULL) {
     966           0 :                 return NULL;
     967             :         }
     968           0 :         state->out_mem_ctx = NULL;
     969             : 
     970             :         /* In parameters */
     971           0 :         state->orig.in.reason = _reason;
     972             : 
     973             :         /* Out parameters */
     974             : 
     975             :         /* make a temporary copy, that we pass to the dispatch function */
     976           0 :         state->tmp = state->orig;
     977             : 
     978           0 :         subreq = dcerpc_samba_terminate_r_send(state, ev, h, &state->tmp);
     979           0 :         if (tevent_req_nomem(subreq, req)) {
     980           0 :                 return tevent_req_post(req, ev);
     981             :         }
     982           0 :         tevent_req_set_callback(subreq, dcerpc_samba_terminate_done, req);
     983           0 :         return req;
     984             : }
     985             : 
     986           0 : static void dcerpc_samba_terminate_done(struct tevent_req *subreq)
     987             : {
     988           0 :         struct tevent_req *req = tevent_req_callback_data(
     989             :                 subreq, struct tevent_req);
     990           0 :         struct dcerpc_samba_terminate_state *state = tevent_req_data(
     991             :                 req, struct dcerpc_samba_terminate_state);
     992           0 :         NTSTATUS status;
     993           0 :         TALLOC_CTX *mem_ctx;
     994             : 
     995           0 :         if (state->out_mem_ctx) {
     996           0 :                 mem_ctx = state->out_mem_ctx;
     997             :         } else {
     998           0 :                 mem_ctx = state;
     999             :         }
    1000             : 
    1001           0 :         status = dcerpc_samba_terminate_r_recv(subreq, mem_ctx);
    1002           0 :         TALLOC_FREE(subreq);
    1003           0 :         if (tevent_req_nterror(req, status)) {
    1004           0 :                 return;
    1005             :         }
    1006             : 
    1007             :         /* Copy out parameters */
    1008             : 
    1009             :         /* Reset temporary structure */
    1010           0 :         NDR_ZERO_STRUCT(state->tmp);
    1011             : 
    1012           0 :         tevent_req_done(req);
    1013             : }
    1014             : 
    1015           0 : NTSTATUS dcerpc_samba_terminate_recv(struct tevent_req *req,
    1016             :                                      TALLOC_CTX *mem_ctx)
    1017             : {
    1018           0 :         struct dcerpc_samba_terminate_state *state = tevent_req_data(
    1019             :                 req, struct dcerpc_samba_terminate_state);
    1020           0 :         NTSTATUS status;
    1021             : 
    1022           0 :         if (tevent_req_is_nterror(req, &status)) {
    1023           0 :                 tevent_req_received(req);
    1024           0 :                 return status;
    1025             :         }
    1026             : 
    1027             :         /* Steal possible out parameters to the callers context */
    1028           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1029             : 
    1030           0 :         tevent_req_received(req);
    1031           0 :         return NT_STATUS_OK;
    1032             : }
    1033             : 
    1034           0 : NTSTATUS dcerpc_samba_terminate(struct dcerpc_binding_handle *h,
    1035             :                                 TALLOC_CTX *mem_ctx,
    1036             :                                 const char * _reason /* [in] [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */)
    1037             : {
    1038           0 :         struct samba_terminate r;
    1039           0 :         NTSTATUS status;
    1040             : 
    1041             :         /* In parameters */
    1042           0 :         r.in.reason = _reason;
    1043             : 
    1044             :         /* Out parameters */
    1045             : 
    1046           0 :         status = dcerpc_samba_terminate_r(h, mem_ctx, &r);
    1047           0 :         if (!NT_STATUS_IS_OK(status)) {
    1048           0 :                 return status;
    1049             :         }
    1050             : 
    1051             :         /* Return variables */
    1052             : 
    1053             :         /* Return result */
    1054             : 
    1055           0 :         return NT_STATUS_OK;
    1056             : }
    1057             : 
    1058             : struct dcerpc_dreplsrv_refresh_r_state {
    1059             :         TALLOC_CTX *out_mem_ctx;
    1060             : };
    1061             : 
    1062             : static void dcerpc_dreplsrv_refresh_r_done(struct tevent_req *subreq);
    1063             : 
    1064        1645 : struct tevent_req *dcerpc_dreplsrv_refresh_r_send(TALLOC_CTX *mem_ctx,
    1065             :         struct tevent_context *ev,
    1066             :         struct dcerpc_binding_handle *h,
    1067             :         struct dreplsrv_refresh *r)
    1068             : {
    1069           0 :         struct tevent_req *req;
    1070           0 :         struct dcerpc_dreplsrv_refresh_r_state *state;
    1071           0 :         struct tevent_req *subreq;
    1072             : 
    1073        1645 :         req = tevent_req_create(mem_ctx, &state,
    1074             :                                 struct dcerpc_dreplsrv_refresh_r_state);
    1075        1645 :         if (req == NULL) {
    1076           0 :                 return NULL;
    1077             :         }
    1078             : 
    1079        1645 :         state->out_mem_ctx = NULL;
    1080             : 
    1081        1645 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1082             :                         NULL, &ndr_table_irpc,
    1083             :                         NDR_DREPLSRV_REFRESH, state, r);
    1084        1645 :         if (tevent_req_nomem(subreq, req)) {
    1085           0 :                 return tevent_req_post(req, ev);
    1086             :         }
    1087        1645 :         tevent_req_set_callback(subreq, dcerpc_dreplsrv_refresh_r_done, req);
    1088             : 
    1089        1645 :         return req;
    1090             : }
    1091             : 
    1092           0 : static void dcerpc_dreplsrv_refresh_r_done(struct tevent_req *subreq)
    1093             : {
    1094           0 :         struct tevent_req *req =
    1095           0 :                 tevent_req_callback_data(subreq,
    1096             :                 struct tevent_req);
    1097           0 :         NTSTATUS status;
    1098             : 
    1099           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1100           0 :         TALLOC_FREE(subreq);
    1101           0 :         if (tevent_req_nterror(req, status)) {
    1102           0 :                 return;
    1103             :         }
    1104             : 
    1105           0 :         tevent_req_done(req);
    1106             : }
    1107             : 
    1108           0 : NTSTATUS dcerpc_dreplsrv_refresh_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1109             : {
    1110           0 :         struct dcerpc_dreplsrv_refresh_r_state *state =
    1111           0 :                 tevent_req_data(req,
    1112             :                 struct dcerpc_dreplsrv_refresh_r_state);
    1113           0 :         NTSTATUS status;
    1114             : 
    1115           0 :         if (tevent_req_is_nterror(req, &status)) {
    1116           0 :                 tevent_req_received(req);
    1117           0 :                 return status;
    1118             :         }
    1119             : 
    1120           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1121             : 
    1122           0 :         tevent_req_received(req);
    1123           0 :         return NT_STATUS_OK;
    1124             : }
    1125             : 
    1126           0 : NTSTATUS dcerpc_dreplsrv_refresh_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dreplsrv_refresh *r)
    1127             : {
    1128           0 :         NTSTATUS status;
    1129             : 
    1130           0 :         status = dcerpc_binding_handle_call(h,
    1131             :                         NULL, &ndr_table_irpc,
    1132             :                         NDR_DREPLSRV_REFRESH, mem_ctx, r);
    1133             : 
    1134           0 :         return status;
    1135             : }
    1136             : 
    1137             : struct dcerpc_dreplsrv_refresh_state {
    1138             :         struct dreplsrv_refresh orig;
    1139             :         struct dreplsrv_refresh tmp;
    1140             :         TALLOC_CTX *out_mem_ctx;
    1141             : };
    1142             : 
    1143             : static void dcerpc_dreplsrv_refresh_done(struct tevent_req *subreq);
    1144             : 
    1145           0 : struct tevent_req *dcerpc_dreplsrv_refresh_send(TALLOC_CTX *mem_ctx,
    1146             :                                                 struct tevent_context *ev,
    1147             :                                                 struct dcerpc_binding_handle *h)
    1148             : {
    1149           0 :         struct tevent_req *req;
    1150           0 :         struct dcerpc_dreplsrv_refresh_state *state;
    1151           0 :         struct tevent_req *subreq;
    1152             : 
    1153           0 :         req = tevent_req_create(mem_ctx, &state,
    1154             :                                 struct dcerpc_dreplsrv_refresh_state);
    1155           0 :         if (req == NULL) {
    1156           0 :                 return NULL;
    1157             :         }
    1158           0 :         state->out_mem_ctx = NULL;
    1159             : 
    1160             :         /* In parameters */
    1161             : 
    1162             :         /* Out parameters */
    1163             : 
    1164             :         /* Result */
    1165           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1166             : 
    1167             :         /* make a temporary copy, that we pass to the dispatch function */
    1168           0 :         state->tmp = state->orig;
    1169             : 
    1170           0 :         subreq = dcerpc_dreplsrv_refresh_r_send(state, ev, h, &state->tmp);
    1171           0 :         if (tevent_req_nomem(subreq, req)) {
    1172           0 :                 return tevent_req_post(req, ev);
    1173             :         }
    1174           0 :         tevent_req_set_callback(subreq, dcerpc_dreplsrv_refresh_done, req);
    1175           0 :         return req;
    1176             : }
    1177             : 
    1178           0 : static void dcerpc_dreplsrv_refresh_done(struct tevent_req *subreq)
    1179             : {
    1180           0 :         struct tevent_req *req = tevent_req_callback_data(
    1181             :                 subreq, struct tevent_req);
    1182           0 :         struct dcerpc_dreplsrv_refresh_state *state = tevent_req_data(
    1183             :                 req, struct dcerpc_dreplsrv_refresh_state);
    1184           0 :         NTSTATUS status;
    1185           0 :         TALLOC_CTX *mem_ctx;
    1186             : 
    1187           0 :         if (state->out_mem_ctx) {
    1188           0 :                 mem_ctx = state->out_mem_ctx;
    1189             :         } else {
    1190           0 :                 mem_ctx = state;
    1191             :         }
    1192             : 
    1193           0 :         status = dcerpc_dreplsrv_refresh_r_recv(subreq, mem_ctx);
    1194           0 :         TALLOC_FREE(subreq);
    1195           0 :         if (tevent_req_nterror(req, status)) {
    1196           0 :                 return;
    1197             :         }
    1198             : 
    1199             :         /* Copy out parameters */
    1200             : 
    1201             :         /* Copy result */
    1202           0 :         state->orig.out.result = state->tmp.out.result;
    1203             : 
    1204             :         /* Reset temporary structure */
    1205           0 :         NDR_ZERO_STRUCT(state->tmp);
    1206             : 
    1207           0 :         tevent_req_done(req);
    1208             : }
    1209             : 
    1210           0 : NTSTATUS dcerpc_dreplsrv_refresh_recv(struct tevent_req *req,
    1211             :                                       TALLOC_CTX *mem_ctx,
    1212             :                                       WERROR *result)
    1213             : {
    1214           0 :         struct dcerpc_dreplsrv_refresh_state *state = tevent_req_data(
    1215             :                 req, struct dcerpc_dreplsrv_refresh_state);
    1216           0 :         NTSTATUS status;
    1217             : 
    1218           0 :         if (tevent_req_is_nterror(req, &status)) {
    1219           0 :                 tevent_req_received(req);
    1220           0 :                 return status;
    1221             :         }
    1222             : 
    1223             :         /* Steal possible out parameters to the callers context */
    1224           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1225             : 
    1226             :         /* Return result */
    1227           0 :         *result = state->orig.out.result;
    1228             : 
    1229           0 :         tevent_req_received(req);
    1230           0 :         return NT_STATUS_OK;
    1231             : }
    1232             : 
    1233           0 : NTSTATUS dcerpc_dreplsrv_refresh(struct dcerpc_binding_handle *h,
    1234             :                                  TALLOC_CTX *mem_ctx,
    1235             :                                  WERROR *result)
    1236             : {
    1237           0 :         struct dreplsrv_refresh r;
    1238           0 :         NTSTATUS status;
    1239             : 
    1240             :         /* In parameters */
    1241             : 
    1242             :         /* Out parameters */
    1243             : 
    1244             :         /* Result */
    1245           0 :         NDR_ZERO_STRUCT(r.out.result);
    1246             : 
    1247           0 :         status = dcerpc_dreplsrv_refresh_r(h, mem_ctx, &r);
    1248           0 :         if (!NT_STATUS_IS_OK(status)) {
    1249           0 :                 return status;
    1250             :         }
    1251             : 
    1252             :         /* Return variables */
    1253             : 
    1254             :         /* Return result */
    1255           0 :         *result = r.out.result;
    1256             : 
    1257           0 :         return NT_STATUS_OK;
    1258             : }
    1259             : 
    1260             : struct dcerpc_drepl_takeFSMORole_r_state {
    1261             :         TALLOC_CTX *out_mem_ctx;
    1262             : };
    1263             : 
    1264             : static void dcerpc_drepl_takeFSMORole_r_done(struct tevent_req *subreq);
    1265             : 
    1266          22 : struct tevent_req *dcerpc_drepl_takeFSMORole_r_send(TALLOC_CTX *mem_ctx,
    1267             :         struct tevent_context *ev,
    1268             :         struct dcerpc_binding_handle *h,
    1269             :         struct drepl_takeFSMORole *r)
    1270             : {
    1271           0 :         struct tevent_req *req;
    1272           0 :         struct dcerpc_drepl_takeFSMORole_r_state *state;
    1273           0 :         struct tevent_req *subreq;
    1274             : 
    1275          22 :         req = tevent_req_create(mem_ctx, &state,
    1276             :                                 struct dcerpc_drepl_takeFSMORole_r_state);
    1277          22 :         if (req == NULL) {
    1278           0 :                 return NULL;
    1279             :         }
    1280             : 
    1281          22 :         state->out_mem_ctx = NULL;
    1282             : 
    1283          22 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1284             :                         NULL, &ndr_table_irpc,
    1285             :                         NDR_DREPL_TAKEFSMOROLE, state, r);
    1286          22 :         if (tevent_req_nomem(subreq, req)) {
    1287           0 :                 return tevent_req_post(req, ev);
    1288             :         }
    1289          22 :         tevent_req_set_callback(subreq, dcerpc_drepl_takeFSMORole_r_done, req);
    1290             : 
    1291          22 :         return req;
    1292             : }
    1293             : 
    1294          22 : static void dcerpc_drepl_takeFSMORole_r_done(struct tevent_req *subreq)
    1295             : {
    1296           0 :         struct tevent_req *req =
    1297          22 :                 tevent_req_callback_data(subreq,
    1298             :                 struct tevent_req);
    1299           0 :         NTSTATUS status;
    1300             : 
    1301          22 :         status = dcerpc_binding_handle_call_recv(subreq);
    1302          22 :         TALLOC_FREE(subreq);
    1303          22 :         if (tevent_req_nterror(req, status)) {
    1304           0 :                 return;
    1305             :         }
    1306             : 
    1307          22 :         tevent_req_done(req);
    1308             : }
    1309             : 
    1310          22 : NTSTATUS dcerpc_drepl_takeFSMORole_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1311             : {
    1312           0 :         struct dcerpc_drepl_takeFSMORole_r_state *state =
    1313          22 :                 tevent_req_data(req,
    1314             :                 struct dcerpc_drepl_takeFSMORole_r_state);
    1315           0 :         NTSTATUS status;
    1316             : 
    1317          22 :         if (tevent_req_is_nterror(req, &status)) {
    1318           0 :                 tevent_req_received(req);
    1319           0 :                 return status;
    1320             :         }
    1321             : 
    1322          22 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1323             : 
    1324          22 :         tevent_req_received(req);
    1325          22 :         return NT_STATUS_OK;
    1326             : }
    1327             : 
    1328           0 : NTSTATUS dcerpc_drepl_takeFSMORole_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct drepl_takeFSMORole *r)
    1329             : {
    1330           0 :         NTSTATUS status;
    1331             : 
    1332           0 :         status = dcerpc_binding_handle_call(h,
    1333             :                         NULL, &ndr_table_irpc,
    1334             :                         NDR_DREPL_TAKEFSMOROLE, mem_ctx, r);
    1335             : 
    1336           0 :         return status;
    1337             : }
    1338             : 
    1339             : struct dcerpc_drepl_takeFSMORole_state {
    1340             :         struct drepl_takeFSMORole orig;
    1341             :         struct drepl_takeFSMORole tmp;
    1342             :         TALLOC_CTX *out_mem_ctx;
    1343             : };
    1344             : 
    1345             : static void dcerpc_drepl_takeFSMORole_done(struct tevent_req *subreq);
    1346             : 
    1347          22 : struct tevent_req *dcerpc_drepl_takeFSMORole_send(TALLOC_CTX *mem_ctx,
    1348             :                                                   struct tevent_context *ev,
    1349             :                                                   struct dcerpc_binding_handle *h,
    1350             :                                                   enum drepl_role_master _role /* [in]  */)
    1351             : {
    1352           0 :         struct tevent_req *req;
    1353           0 :         struct dcerpc_drepl_takeFSMORole_state *state;
    1354           0 :         struct tevent_req *subreq;
    1355             : 
    1356          22 :         req = tevent_req_create(mem_ctx, &state,
    1357             :                                 struct dcerpc_drepl_takeFSMORole_state);
    1358          22 :         if (req == NULL) {
    1359           0 :                 return NULL;
    1360             :         }
    1361          22 :         state->out_mem_ctx = NULL;
    1362             : 
    1363             :         /* In parameters */
    1364          22 :         state->orig.in.role = _role;
    1365             : 
    1366             :         /* Out parameters */
    1367             : 
    1368             :         /* Result */
    1369          22 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1370             : 
    1371             :         /* make a temporary copy, that we pass to the dispatch function */
    1372          22 :         state->tmp = state->orig;
    1373             : 
    1374          22 :         subreq = dcerpc_drepl_takeFSMORole_r_send(state, ev, h, &state->tmp);
    1375          22 :         if (tevent_req_nomem(subreq, req)) {
    1376           0 :                 return tevent_req_post(req, ev);
    1377             :         }
    1378          22 :         tevent_req_set_callback(subreq, dcerpc_drepl_takeFSMORole_done, req);
    1379          22 :         return req;
    1380             : }
    1381             : 
    1382          22 : static void dcerpc_drepl_takeFSMORole_done(struct tevent_req *subreq)
    1383             : {
    1384          22 :         struct tevent_req *req = tevent_req_callback_data(
    1385             :                 subreq, struct tevent_req);
    1386          22 :         struct dcerpc_drepl_takeFSMORole_state *state = tevent_req_data(
    1387             :                 req, struct dcerpc_drepl_takeFSMORole_state);
    1388           0 :         NTSTATUS status;
    1389           0 :         TALLOC_CTX *mem_ctx;
    1390             : 
    1391          22 :         if (state->out_mem_ctx) {
    1392           0 :                 mem_ctx = state->out_mem_ctx;
    1393             :         } else {
    1394          22 :                 mem_ctx = state;
    1395             :         }
    1396             : 
    1397          22 :         status = dcerpc_drepl_takeFSMORole_r_recv(subreq, mem_ctx);
    1398          22 :         TALLOC_FREE(subreq);
    1399          22 :         if (tevent_req_nterror(req, status)) {
    1400           0 :                 return;
    1401             :         }
    1402             : 
    1403             :         /* Copy out parameters */
    1404             : 
    1405             :         /* Copy result */
    1406          22 :         state->orig.out.result = state->tmp.out.result;
    1407             : 
    1408             :         /* Reset temporary structure */
    1409          22 :         NDR_ZERO_STRUCT(state->tmp);
    1410             : 
    1411          22 :         tevent_req_done(req);
    1412             : }
    1413             : 
    1414          22 : NTSTATUS dcerpc_drepl_takeFSMORole_recv(struct tevent_req *req,
    1415             :                                         TALLOC_CTX *mem_ctx,
    1416             :                                         WERROR *result)
    1417             : {
    1418          22 :         struct dcerpc_drepl_takeFSMORole_state *state = tevent_req_data(
    1419             :                 req, struct dcerpc_drepl_takeFSMORole_state);
    1420           0 :         NTSTATUS status;
    1421             : 
    1422          22 :         if (tevent_req_is_nterror(req, &status)) {
    1423           0 :                 tevent_req_received(req);
    1424           0 :                 return status;
    1425             :         }
    1426             : 
    1427             :         /* Steal possible out parameters to the callers context */
    1428          22 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1429             : 
    1430             :         /* Return result */
    1431          22 :         *result = state->orig.out.result;
    1432             : 
    1433          22 :         tevent_req_received(req);
    1434          22 :         return NT_STATUS_OK;
    1435             : }
    1436             : 
    1437           0 : NTSTATUS dcerpc_drepl_takeFSMORole(struct dcerpc_binding_handle *h,
    1438             :                                    TALLOC_CTX *mem_ctx,
    1439             :                                    enum drepl_role_master _role /* [in]  */,
    1440             :                                    WERROR *result)
    1441             : {
    1442           0 :         struct drepl_takeFSMORole r;
    1443           0 :         NTSTATUS status;
    1444             : 
    1445             :         /* In parameters */
    1446           0 :         r.in.role = _role;
    1447             : 
    1448             :         /* Out parameters */
    1449             : 
    1450             :         /* Result */
    1451           0 :         NDR_ZERO_STRUCT(r.out.result);
    1452             : 
    1453           0 :         status = dcerpc_drepl_takeFSMORole_r(h, mem_ctx, &r);
    1454           0 :         if (!NT_STATUS_IS_OK(status)) {
    1455           0 :                 return status;
    1456             :         }
    1457             : 
    1458             :         /* Return variables */
    1459             : 
    1460             :         /* Return result */
    1461           0 :         *result = r.out.result;
    1462             : 
    1463           0 :         return NT_STATUS_OK;
    1464             : }
    1465             : 
    1466             : struct dcerpc_drepl_trigger_repl_secret_r_state {
    1467             :         TALLOC_CTX *out_mem_ctx;
    1468             : };
    1469             : 
    1470             : static void dcerpc_drepl_trigger_repl_secret_r_done(struct tevent_req *subreq);
    1471             : 
    1472        1794 : struct tevent_req *dcerpc_drepl_trigger_repl_secret_r_send(TALLOC_CTX *mem_ctx,
    1473             :         struct tevent_context *ev,
    1474             :         struct dcerpc_binding_handle *h,
    1475             :         struct drepl_trigger_repl_secret *r)
    1476             : {
    1477           0 :         struct tevent_req *req;
    1478           0 :         struct dcerpc_drepl_trigger_repl_secret_r_state *state;
    1479           0 :         struct tevent_req *subreq;
    1480             : 
    1481        1794 :         req = tevent_req_create(mem_ctx, &state,
    1482             :                                 struct dcerpc_drepl_trigger_repl_secret_r_state);
    1483        1794 :         if (req == NULL) {
    1484           0 :                 return NULL;
    1485             :         }
    1486             : 
    1487        1794 :         state->out_mem_ctx = NULL;
    1488             : 
    1489        1794 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1490             :                         NULL, &ndr_table_irpc,
    1491             :                         NDR_DREPL_TRIGGER_REPL_SECRET, state, r);
    1492        1794 :         if (tevent_req_nomem(subreq, req)) {
    1493           0 :                 return tevent_req_post(req, ev);
    1494             :         }
    1495        1794 :         tevent_req_set_callback(subreq, dcerpc_drepl_trigger_repl_secret_r_done, req);
    1496             : 
    1497        1794 :         return req;
    1498             : }
    1499             : 
    1500           0 : static void dcerpc_drepl_trigger_repl_secret_r_done(struct tevent_req *subreq)
    1501             : {
    1502           0 :         struct tevent_req *req =
    1503           0 :                 tevent_req_callback_data(subreq,
    1504             :                 struct tevent_req);
    1505           0 :         NTSTATUS status;
    1506             : 
    1507           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1508           0 :         TALLOC_FREE(subreq);
    1509           0 :         if (tevent_req_nterror(req, status)) {
    1510           0 :                 return;
    1511             :         }
    1512             : 
    1513           0 :         tevent_req_done(req);
    1514             : }
    1515             : 
    1516           0 : NTSTATUS dcerpc_drepl_trigger_repl_secret_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1517             : {
    1518           0 :         struct dcerpc_drepl_trigger_repl_secret_r_state *state =
    1519           0 :                 tevent_req_data(req,
    1520             :                 struct dcerpc_drepl_trigger_repl_secret_r_state);
    1521           0 :         NTSTATUS status;
    1522             : 
    1523           0 :         if (tevent_req_is_nterror(req, &status)) {
    1524           0 :                 tevent_req_received(req);
    1525           0 :                 return status;
    1526             :         }
    1527             : 
    1528           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1529             : 
    1530           0 :         tevent_req_received(req);
    1531           0 :         return NT_STATUS_OK;
    1532             : }
    1533             : 
    1534           0 : NTSTATUS dcerpc_drepl_trigger_repl_secret_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct drepl_trigger_repl_secret *r)
    1535             : {
    1536           0 :         NTSTATUS status;
    1537             : 
    1538           0 :         status = dcerpc_binding_handle_call(h,
    1539             :                         NULL, &ndr_table_irpc,
    1540             :                         NDR_DREPL_TRIGGER_REPL_SECRET, mem_ctx, r);
    1541             : 
    1542           0 :         return status;
    1543             : }
    1544             : 
    1545             : struct dcerpc_drepl_trigger_repl_secret_state {
    1546             :         struct drepl_trigger_repl_secret orig;
    1547             :         struct drepl_trigger_repl_secret tmp;
    1548             :         TALLOC_CTX *out_mem_ctx;
    1549             : };
    1550             : 
    1551             : static void dcerpc_drepl_trigger_repl_secret_done(struct tevent_req *subreq);
    1552             : 
    1553           0 : struct tevent_req *dcerpc_drepl_trigger_repl_secret_send(TALLOC_CTX *mem_ctx,
    1554             :                                                          struct tevent_context *ev,
    1555             :                                                          struct dcerpc_binding_handle *h,
    1556             :                                                          const char * _user_dn /* [in] [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */)
    1557             : {
    1558           0 :         struct tevent_req *req;
    1559           0 :         struct dcerpc_drepl_trigger_repl_secret_state *state;
    1560           0 :         struct tevent_req *subreq;
    1561             : 
    1562           0 :         req = tevent_req_create(mem_ctx, &state,
    1563             :                                 struct dcerpc_drepl_trigger_repl_secret_state);
    1564           0 :         if (req == NULL) {
    1565           0 :                 return NULL;
    1566             :         }
    1567           0 :         state->out_mem_ctx = NULL;
    1568             : 
    1569             :         /* In parameters */
    1570           0 :         state->orig.in.user_dn = _user_dn;
    1571             : 
    1572             :         /* Out parameters */
    1573             : 
    1574             :         /* make a temporary copy, that we pass to the dispatch function */
    1575           0 :         state->tmp = state->orig;
    1576             : 
    1577           0 :         subreq = dcerpc_drepl_trigger_repl_secret_r_send(state, ev, h, &state->tmp);
    1578           0 :         if (tevent_req_nomem(subreq, req)) {
    1579           0 :                 return tevent_req_post(req, ev);
    1580             :         }
    1581           0 :         tevent_req_set_callback(subreq, dcerpc_drepl_trigger_repl_secret_done, req);
    1582           0 :         return req;
    1583             : }
    1584             : 
    1585           0 : static void dcerpc_drepl_trigger_repl_secret_done(struct tevent_req *subreq)
    1586             : {
    1587           0 :         struct tevent_req *req = tevent_req_callback_data(
    1588             :                 subreq, struct tevent_req);
    1589           0 :         struct dcerpc_drepl_trigger_repl_secret_state *state = tevent_req_data(
    1590             :                 req, struct dcerpc_drepl_trigger_repl_secret_state);
    1591           0 :         NTSTATUS status;
    1592           0 :         TALLOC_CTX *mem_ctx;
    1593             : 
    1594           0 :         if (state->out_mem_ctx) {
    1595           0 :                 mem_ctx = state->out_mem_ctx;
    1596             :         } else {
    1597           0 :                 mem_ctx = state;
    1598             :         }
    1599             : 
    1600           0 :         status = dcerpc_drepl_trigger_repl_secret_r_recv(subreq, mem_ctx);
    1601           0 :         TALLOC_FREE(subreq);
    1602           0 :         if (tevent_req_nterror(req, status)) {
    1603           0 :                 return;
    1604             :         }
    1605             : 
    1606             :         /* Copy out parameters */
    1607             : 
    1608             :         /* Reset temporary structure */
    1609           0 :         NDR_ZERO_STRUCT(state->tmp);
    1610             : 
    1611           0 :         tevent_req_done(req);
    1612             : }
    1613             : 
    1614           0 : NTSTATUS dcerpc_drepl_trigger_repl_secret_recv(struct tevent_req *req,
    1615             :                                                TALLOC_CTX *mem_ctx)
    1616             : {
    1617           0 :         struct dcerpc_drepl_trigger_repl_secret_state *state = tevent_req_data(
    1618             :                 req, struct dcerpc_drepl_trigger_repl_secret_state);
    1619           0 :         NTSTATUS status;
    1620             : 
    1621           0 :         if (tevent_req_is_nterror(req, &status)) {
    1622           0 :                 tevent_req_received(req);
    1623           0 :                 return status;
    1624             :         }
    1625             : 
    1626             :         /* Steal possible out parameters to the callers context */
    1627           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1628             : 
    1629           0 :         tevent_req_received(req);
    1630           0 :         return NT_STATUS_OK;
    1631             : }
    1632             : 
    1633           0 : NTSTATUS dcerpc_drepl_trigger_repl_secret(struct dcerpc_binding_handle *h,
    1634             :                                           TALLOC_CTX *mem_ctx,
    1635             :                                           const char * _user_dn /* [in] [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */)
    1636             : {
    1637           0 :         struct drepl_trigger_repl_secret r;
    1638           0 :         NTSTATUS status;
    1639             : 
    1640             :         /* In parameters */
    1641           0 :         r.in.user_dn = _user_dn;
    1642             : 
    1643             :         /* Out parameters */
    1644             : 
    1645           0 :         status = dcerpc_drepl_trigger_repl_secret_r(h, mem_ctx, &r);
    1646           0 :         if (!NT_STATUS_IS_OK(status)) {
    1647           0 :                 return status;
    1648             :         }
    1649             : 
    1650             :         /* Return variables */
    1651             : 
    1652             :         /* Return result */
    1653             : 
    1654           0 :         return NT_STATUS_OK;
    1655             : }
    1656             : 
    1657             : struct dcerpc_dnsupdate_RODC_r_state {
    1658             :         TALLOC_CTX *out_mem_ctx;
    1659             : };
    1660             : 
    1661             : static void dcerpc_dnsupdate_RODC_r_done(struct tevent_req *subreq);
    1662             : 
    1663           5 : struct tevent_req *dcerpc_dnsupdate_RODC_r_send(TALLOC_CTX *mem_ctx,
    1664             :         struct tevent_context *ev,
    1665             :         struct dcerpc_binding_handle *h,
    1666             :         struct dnsupdate_RODC *r)
    1667             : {
    1668           0 :         struct tevent_req *req;
    1669           0 :         struct dcerpc_dnsupdate_RODC_r_state *state;
    1670           0 :         struct tevent_req *subreq;
    1671             : 
    1672           5 :         req = tevent_req_create(mem_ctx, &state,
    1673             :                                 struct dcerpc_dnsupdate_RODC_r_state);
    1674           5 :         if (req == NULL) {
    1675           0 :                 return NULL;
    1676             :         }
    1677             : 
    1678           5 :         state->out_mem_ctx = talloc_new(state);
    1679           5 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1680           0 :                 return tevent_req_post(req, ev);
    1681             :         }
    1682             : 
    1683           5 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1684             :                         NULL, &ndr_table_irpc,
    1685           5 :                         NDR_DNSUPDATE_RODC, state->out_mem_ctx, r);
    1686           5 :         if (tevent_req_nomem(subreq, req)) {
    1687           0 :                 return tevent_req_post(req, ev);
    1688             :         }
    1689           5 :         tevent_req_set_callback(subreq, dcerpc_dnsupdate_RODC_r_done, req);
    1690             : 
    1691           5 :         return req;
    1692             : }
    1693             : 
    1694           5 : static void dcerpc_dnsupdate_RODC_r_done(struct tevent_req *subreq)
    1695             : {
    1696           0 :         struct tevent_req *req =
    1697           5 :                 tevent_req_callback_data(subreq,
    1698             :                 struct tevent_req);
    1699           0 :         NTSTATUS status;
    1700             : 
    1701           5 :         status = dcerpc_binding_handle_call_recv(subreq);
    1702           5 :         TALLOC_FREE(subreq);
    1703           5 :         if (tevent_req_nterror(req, status)) {
    1704           0 :                 return;
    1705             :         }
    1706             : 
    1707           5 :         tevent_req_done(req);
    1708             : }
    1709             : 
    1710           5 : NTSTATUS dcerpc_dnsupdate_RODC_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1711             : {
    1712           0 :         struct dcerpc_dnsupdate_RODC_r_state *state =
    1713           5 :                 tevent_req_data(req,
    1714             :                 struct dcerpc_dnsupdate_RODC_r_state);
    1715           0 :         NTSTATUS status;
    1716             : 
    1717           5 :         if (tevent_req_is_nterror(req, &status)) {
    1718           0 :                 tevent_req_received(req);
    1719           0 :                 return status;
    1720             :         }
    1721             : 
    1722           5 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1723             : 
    1724           5 :         tevent_req_received(req);
    1725           5 :         return NT_STATUS_OK;
    1726             : }
    1727             : 
    1728           0 : NTSTATUS dcerpc_dnsupdate_RODC_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dnsupdate_RODC *r)
    1729             : {
    1730           0 :         NTSTATUS status;
    1731             : 
    1732           0 :         status = dcerpc_binding_handle_call(h,
    1733             :                         NULL, &ndr_table_irpc,
    1734             :                         NDR_DNSUPDATE_RODC, mem_ctx, r);
    1735             : 
    1736           0 :         return status;
    1737             : }
    1738             : 
    1739             : struct dcerpc_dnsupdate_RODC_state {
    1740             :         struct dnsupdate_RODC orig;
    1741             :         struct dnsupdate_RODC tmp;
    1742             :         TALLOC_CTX *out_mem_ctx;
    1743             : };
    1744             : 
    1745             : static void dcerpc_dnsupdate_RODC_done(struct tevent_req *subreq);
    1746             : 
    1747           0 : struct tevent_req *dcerpc_dnsupdate_RODC_send(TALLOC_CTX *mem_ctx,
    1748             :                                               struct tevent_context *ev,
    1749             :                                               struct dcerpc_binding_handle *h,
    1750             :                                               struct dom_sid *_dom_sid /* [in] [unique] */,
    1751             :                                               const char *_site_name /* [in] [charset(UTF16),unique] */,
    1752             :                                               uint32_t _dns_ttl /* [in]  */,
    1753             :                                               struct NL_DNS_NAME_INFO_ARRAY *_dns_names /* [in,out] [ref] */)
    1754             : {
    1755           0 :         struct tevent_req *req;
    1756           0 :         struct dcerpc_dnsupdate_RODC_state *state;
    1757           0 :         struct tevent_req *subreq;
    1758             : 
    1759           0 :         req = tevent_req_create(mem_ctx, &state,
    1760             :                                 struct dcerpc_dnsupdate_RODC_state);
    1761           0 :         if (req == NULL) {
    1762           0 :                 return NULL;
    1763             :         }
    1764           0 :         state->out_mem_ctx = NULL;
    1765             : 
    1766             :         /* In parameters */
    1767           0 :         state->orig.in.dom_sid = _dom_sid;
    1768           0 :         state->orig.in.site_name = _site_name;
    1769           0 :         state->orig.in.dns_ttl = _dns_ttl;
    1770           0 :         state->orig.in.dns_names = _dns_names;
    1771             : 
    1772             :         /* Out parameters */
    1773           0 :         state->orig.out.dns_names = _dns_names;
    1774             : 
    1775             :         /* Result */
    1776           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1777             : 
    1778           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1779             :                              "dcerpc_dnsupdate_RODC_out_memory");
    1780           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1781           0 :                 return tevent_req_post(req, ev);
    1782             :         }
    1783             : 
    1784             :         /* make a temporary copy, that we pass to the dispatch function */
    1785           0 :         state->tmp = state->orig;
    1786             : 
    1787           0 :         subreq = dcerpc_dnsupdate_RODC_r_send(state, ev, h, &state->tmp);
    1788           0 :         if (tevent_req_nomem(subreq, req)) {
    1789           0 :                 return tevent_req_post(req, ev);
    1790             :         }
    1791           0 :         tevent_req_set_callback(subreq, dcerpc_dnsupdate_RODC_done, req);
    1792           0 :         return req;
    1793             : }
    1794             : 
    1795           0 : static void dcerpc_dnsupdate_RODC_done(struct tevent_req *subreq)
    1796             : {
    1797           0 :         struct tevent_req *req = tevent_req_callback_data(
    1798             :                 subreq, struct tevent_req);
    1799           0 :         struct dcerpc_dnsupdate_RODC_state *state = tevent_req_data(
    1800             :                 req, struct dcerpc_dnsupdate_RODC_state);
    1801           0 :         NTSTATUS status;
    1802           0 :         TALLOC_CTX *mem_ctx;
    1803             : 
    1804           0 :         if (state->out_mem_ctx) {
    1805           0 :                 mem_ctx = state->out_mem_ctx;
    1806             :         } else {
    1807           0 :                 mem_ctx = state;
    1808             :         }
    1809             : 
    1810           0 :         status = dcerpc_dnsupdate_RODC_r_recv(subreq, mem_ctx);
    1811           0 :         TALLOC_FREE(subreq);
    1812           0 :         if (tevent_req_nterror(req, status)) {
    1813           0 :                 return;
    1814             :         }
    1815             : 
    1816             :         /* Copy out parameters */
    1817           0 :         *state->orig.out.dns_names = *state->tmp.out.dns_names;
    1818             : 
    1819             :         /* Copy result */
    1820           0 :         state->orig.out.result = state->tmp.out.result;
    1821             : 
    1822             :         /* Reset temporary structure */
    1823           0 :         NDR_ZERO_STRUCT(state->tmp);
    1824             : 
    1825           0 :         tevent_req_done(req);
    1826             : }
    1827             : 
    1828           0 : NTSTATUS dcerpc_dnsupdate_RODC_recv(struct tevent_req *req,
    1829             :                                     TALLOC_CTX *mem_ctx,
    1830             :                                     NTSTATUS *result)
    1831             : {
    1832           0 :         struct dcerpc_dnsupdate_RODC_state *state = tevent_req_data(
    1833             :                 req, struct dcerpc_dnsupdate_RODC_state);
    1834           0 :         NTSTATUS status;
    1835             : 
    1836           0 :         if (tevent_req_is_nterror(req, &status)) {
    1837           0 :                 tevent_req_received(req);
    1838           0 :                 return status;
    1839             :         }
    1840             : 
    1841             :         /* Steal possible out parameters to the callers context */
    1842           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1843             : 
    1844             :         /* Return result */
    1845           0 :         *result = state->orig.out.result;
    1846             : 
    1847           0 :         tevent_req_received(req);
    1848           0 :         return NT_STATUS_OK;
    1849             : }
    1850             : 
    1851           0 : NTSTATUS dcerpc_dnsupdate_RODC(struct dcerpc_binding_handle *h,
    1852             :                                TALLOC_CTX *mem_ctx,
    1853             :                                struct dom_sid *_dom_sid /* [in] [unique] */,
    1854             :                                const char *_site_name /* [in] [charset(UTF16),unique] */,
    1855             :                                uint32_t _dns_ttl /* [in]  */,
    1856             :                                struct NL_DNS_NAME_INFO_ARRAY *_dns_names /* [in,out] [ref] */,
    1857             :                                NTSTATUS *result)
    1858             : {
    1859           0 :         struct dnsupdate_RODC r;
    1860           0 :         NTSTATUS status;
    1861             : 
    1862             :         /* In parameters */
    1863           0 :         r.in.dom_sid = _dom_sid;
    1864           0 :         r.in.site_name = _site_name;
    1865           0 :         r.in.dns_ttl = _dns_ttl;
    1866           0 :         r.in.dns_names = _dns_names;
    1867             : 
    1868             :         /* Out parameters */
    1869           0 :         r.out.dns_names = _dns_names;
    1870             : 
    1871             :         /* Result */
    1872           0 :         NDR_ZERO_STRUCT(r.out.result);
    1873             : 
    1874           0 :         status = dcerpc_dnsupdate_RODC_r(h, mem_ctx, &r);
    1875           0 :         if (!NT_STATUS_IS_OK(status)) {
    1876           0 :                 return status;
    1877             :         }
    1878             : 
    1879             :         /* Return variables */
    1880           0 :         *_dns_names = *r.out.dns_names;
    1881             : 
    1882             :         /* Return result */
    1883           0 :         *result = r.out.result;
    1884             : 
    1885           0 :         return NT_STATUS_OK;
    1886             : }
    1887             : 
    1888             : struct dcerpc_dnssrv_reload_dns_zones_r_state {
    1889             :         TALLOC_CTX *out_mem_ctx;
    1890             : };
    1891             : 
    1892             : static void dcerpc_dnssrv_reload_dns_zones_r_done(struct tevent_req *subreq);
    1893             : 
    1894        1224 : struct tevent_req *dcerpc_dnssrv_reload_dns_zones_r_send(TALLOC_CTX *mem_ctx,
    1895             :         struct tevent_context *ev,
    1896             :         struct dcerpc_binding_handle *h,
    1897             :         struct dnssrv_reload_dns_zones *r)
    1898             : {
    1899           0 :         struct tevent_req *req;
    1900           0 :         struct dcerpc_dnssrv_reload_dns_zones_r_state *state;
    1901           0 :         struct tevent_req *subreq;
    1902             : 
    1903        1224 :         req = tevent_req_create(mem_ctx, &state,
    1904             :                                 struct dcerpc_dnssrv_reload_dns_zones_r_state);
    1905        1224 :         if (req == NULL) {
    1906           0 :                 return NULL;
    1907             :         }
    1908             : 
    1909        1224 :         state->out_mem_ctx = NULL;
    1910             : 
    1911        1224 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1912             :                         NULL, &ndr_table_irpc,
    1913             :                         NDR_DNSSRV_RELOAD_DNS_ZONES, state, r);
    1914        1224 :         if (tevent_req_nomem(subreq, req)) {
    1915           0 :                 return tevent_req_post(req, ev);
    1916             :         }
    1917        1224 :         tevent_req_set_callback(subreq, dcerpc_dnssrv_reload_dns_zones_r_done, req);
    1918             : 
    1919        1224 :         return req;
    1920             : }
    1921             : 
    1922           0 : static void dcerpc_dnssrv_reload_dns_zones_r_done(struct tevent_req *subreq)
    1923             : {
    1924           0 :         struct tevent_req *req =
    1925           0 :                 tevent_req_callback_data(subreq,
    1926             :                 struct tevent_req);
    1927           0 :         NTSTATUS status;
    1928             : 
    1929           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1930           0 :         TALLOC_FREE(subreq);
    1931           0 :         if (tevent_req_nterror(req, status)) {
    1932           0 :                 return;
    1933             :         }
    1934             : 
    1935           0 :         tevent_req_done(req);
    1936             : }
    1937             : 
    1938           0 : NTSTATUS dcerpc_dnssrv_reload_dns_zones_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1939             : {
    1940           0 :         struct dcerpc_dnssrv_reload_dns_zones_r_state *state =
    1941           0 :                 tevent_req_data(req,
    1942             :                 struct dcerpc_dnssrv_reload_dns_zones_r_state);
    1943           0 :         NTSTATUS status;
    1944             : 
    1945           0 :         if (tevent_req_is_nterror(req, &status)) {
    1946           0 :                 tevent_req_received(req);
    1947           0 :                 return status;
    1948             :         }
    1949             : 
    1950           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1951             : 
    1952           0 :         tevent_req_received(req);
    1953           0 :         return NT_STATUS_OK;
    1954             : }
    1955             : 
    1956           0 : NTSTATUS dcerpc_dnssrv_reload_dns_zones_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dnssrv_reload_dns_zones *r)
    1957             : {
    1958           0 :         NTSTATUS status;
    1959             : 
    1960           0 :         status = dcerpc_binding_handle_call(h,
    1961             :                         NULL, &ndr_table_irpc,
    1962             :                         NDR_DNSSRV_RELOAD_DNS_ZONES, mem_ctx, r);
    1963             : 
    1964           0 :         return status;
    1965             : }
    1966             : 
    1967             : struct dcerpc_dnssrv_reload_dns_zones_state {
    1968             :         struct dnssrv_reload_dns_zones orig;
    1969             :         struct dnssrv_reload_dns_zones tmp;
    1970             :         TALLOC_CTX *out_mem_ctx;
    1971             : };
    1972             : 
    1973             : static void dcerpc_dnssrv_reload_dns_zones_done(struct tevent_req *subreq);
    1974             : 
    1975           0 : struct tevent_req *dcerpc_dnssrv_reload_dns_zones_send(TALLOC_CTX *mem_ctx,
    1976             :                                                        struct tevent_context *ev,
    1977             :                                                        struct dcerpc_binding_handle *h)
    1978             : {
    1979           0 :         struct tevent_req *req;
    1980           0 :         struct dcerpc_dnssrv_reload_dns_zones_state *state;
    1981           0 :         struct tevent_req *subreq;
    1982             : 
    1983           0 :         req = tevent_req_create(mem_ctx, &state,
    1984             :                                 struct dcerpc_dnssrv_reload_dns_zones_state);
    1985           0 :         if (req == NULL) {
    1986           0 :                 return NULL;
    1987             :         }
    1988           0 :         state->out_mem_ctx = NULL;
    1989             : 
    1990             :         /* In parameters */
    1991             : 
    1992             :         /* Out parameters */
    1993             : 
    1994             :         /* Result */
    1995           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1996             : 
    1997             :         /* make a temporary copy, that we pass to the dispatch function */
    1998           0 :         state->tmp = state->orig;
    1999             : 
    2000           0 :         subreq = dcerpc_dnssrv_reload_dns_zones_r_send(state, ev, h, &state->tmp);
    2001           0 :         if (tevent_req_nomem(subreq, req)) {
    2002           0 :                 return tevent_req_post(req, ev);
    2003             :         }
    2004           0 :         tevent_req_set_callback(subreq, dcerpc_dnssrv_reload_dns_zones_done, req);
    2005           0 :         return req;
    2006             : }
    2007             : 
    2008           0 : static void dcerpc_dnssrv_reload_dns_zones_done(struct tevent_req *subreq)
    2009             : {
    2010           0 :         struct tevent_req *req = tevent_req_callback_data(
    2011             :                 subreq, struct tevent_req);
    2012           0 :         struct dcerpc_dnssrv_reload_dns_zones_state *state = tevent_req_data(
    2013             :                 req, struct dcerpc_dnssrv_reload_dns_zones_state);
    2014           0 :         NTSTATUS status;
    2015           0 :         TALLOC_CTX *mem_ctx;
    2016             : 
    2017           0 :         if (state->out_mem_ctx) {
    2018           0 :                 mem_ctx = state->out_mem_ctx;
    2019             :         } else {
    2020           0 :                 mem_ctx = state;
    2021             :         }
    2022             : 
    2023           0 :         status = dcerpc_dnssrv_reload_dns_zones_r_recv(subreq, mem_ctx);
    2024           0 :         TALLOC_FREE(subreq);
    2025           0 :         if (tevent_req_nterror(req, status)) {
    2026           0 :                 return;
    2027             :         }
    2028             : 
    2029             :         /* Copy out parameters */
    2030             : 
    2031             :         /* Copy result */
    2032           0 :         state->orig.out.result = state->tmp.out.result;
    2033             : 
    2034             :         /* Reset temporary structure */
    2035           0 :         NDR_ZERO_STRUCT(state->tmp);
    2036             : 
    2037           0 :         tevent_req_done(req);
    2038             : }
    2039             : 
    2040           0 : NTSTATUS dcerpc_dnssrv_reload_dns_zones_recv(struct tevent_req *req,
    2041             :                                              TALLOC_CTX *mem_ctx,
    2042             :                                              NTSTATUS *result)
    2043             : {
    2044           0 :         struct dcerpc_dnssrv_reload_dns_zones_state *state = tevent_req_data(
    2045             :                 req, struct dcerpc_dnssrv_reload_dns_zones_state);
    2046           0 :         NTSTATUS status;
    2047             : 
    2048           0 :         if (tevent_req_is_nterror(req, &status)) {
    2049           0 :                 tevent_req_received(req);
    2050           0 :                 return status;
    2051             :         }
    2052             : 
    2053             :         /* Steal possible out parameters to the callers context */
    2054           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2055             : 
    2056             :         /* Return result */
    2057           0 :         *result = state->orig.out.result;
    2058             : 
    2059           0 :         tevent_req_received(req);
    2060           0 :         return NT_STATUS_OK;
    2061             : }
    2062             : 
    2063           0 : NTSTATUS dcerpc_dnssrv_reload_dns_zones(struct dcerpc_binding_handle *h,
    2064             :                                         TALLOC_CTX *mem_ctx,
    2065             :                                         NTSTATUS *result)
    2066             : {
    2067           0 :         struct dnssrv_reload_dns_zones r;
    2068           0 :         NTSTATUS status;
    2069             : 
    2070             :         /* In parameters */
    2071             : 
    2072             :         /* Out parameters */
    2073             : 
    2074             :         /* Result */
    2075           0 :         NDR_ZERO_STRUCT(r.out.result);
    2076             : 
    2077           0 :         status = dcerpc_dnssrv_reload_dns_zones_r(h, mem_ctx, &r);
    2078           0 :         if (!NT_STATUS_IS_OK(status)) {
    2079           0 :                 return status;
    2080             :         }
    2081             : 
    2082             :         /* Return variables */
    2083             : 
    2084             :         /* Return result */
    2085           0 :         *result = r.out.result;
    2086             : 
    2087           0 :         return NT_STATUS_OK;
    2088             : }
    2089             : 

Generated by: LCOV version 1.14