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