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_srvsvc.h"
7 : #include "bin/default/librpc/gen_ndr/ndr_srvsvc_c.h"
8 :
9 : /* srvsvc - client functions generated by pidl */
10 :
11 : struct dcerpc_srvsvc_NetCharDevEnum_r_state {
12 : TALLOC_CTX *out_mem_ctx;
13 : };
14 :
15 : static void dcerpc_srvsvc_NetCharDevEnum_r_done(struct tevent_req *subreq);
16 :
17 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevEnum_r_send(TALLOC_CTX *mem_ctx,
18 : struct tevent_context *ev,
19 : struct dcerpc_binding_handle *h,
20 : struct srvsvc_NetCharDevEnum *r)
21 : {
22 0 : struct tevent_req *req;
23 0 : struct dcerpc_srvsvc_NetCharDevEnum_r_state *state;
24 0 : struct tevent_req *subreq;
25 :
26 0 : req = tevent_req_create(mem_ctx, &state,
27 : struct dcerpc_srvsvc_NetCharDevEnum_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_srvsvc,
39 0 : NDR_SRVSVC_NETCHARDEVENUM, 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_srvsvc_NetCharDevEnum_r_done, req);
44 :
45 0 : return req;
46 : }
47 :
48 0 : static void dcerpc_srvsvc_NetCharDevEnum_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_srvsvc_NetCharDevEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
65 : {
66 0 : struct dcerpc_srvsvc_NetCharDevEnum_r_state *state =
67 0 : tevent_req_data(req,
68 : struct dcerpc_srvsvc_NetCharDevEnum_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 10 : NTSTATUS dcerpc_srvsvc_NetCharDevEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetCharDevEnum *r)
83 : {
84 0 : NTSTATUS status;
85 :
86 10 : status = dcerpc_binding_handle_call(h,
87 : NULL, &ndr_table_srvsvc,
88 : NDR_SRVSVC_NETCHARDEVENUM, mem_ctx, r);
89 :
90 10 : return status;
91 : }
92 :
93 : struct dcerpc_srvsvc_NetCharDevEnum_state {
94 : struct srvsvc_NetCharDevEnum orig;
95 : struct srvsvc_NetCharDevEnum tmp;
96 : TALLOC_CTX *out_mem_ctx;
97 : };
98 :
99 : static void dcerpc_srvsvc_NetCharDevEnum_done(struct tevent_req *subreq);
100 :
101 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevEnum_send(TALLOC_CTX *mem_ctx,
102 : struct tevent_context *ev,
103 : struct dcerpc_binding_handle *h,
104 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
105 : struct srvsvc_NetCharDevInfoCtr *_info_ctr /* [in,out] [ref] */,
106 : uint32_t _max_buffer /* [in] */,
107 : uint32_t *_totalentries /* [out] [ref] */,
108 : uint32_t *_resume_handle /* [in,out] [unique] */)
109 : {
110 0 : struct tevent_req *req;
111 0 : struct dcerpc_srvsvc_NetCharDevEnum_state *state;
112 0 : struct tevent_req *subreq;
113 :
114 0 : req = tevent_req_create(mem_ctx, &state,
115 : struct dcerpc_srvsvc_NetCharDevEnum_state);
116 0 : if (req == NULL) {
117 0 : return NULL;
118 : }
119 0 : state->out_mem_ctx = NULL;
120 :
121 : /* In parameters */
122 0 : state->orig.in.server_unc = _server_unc;
123 0 : state->orig.in.info_ctr = _info_ctr;
124 0 : state->orig.in.max_buffer = _max_buffer;
125 0 : state->orig.in.resume_handle = _resume_handle;
126 :
127 : /* Out parameters */
128 0 : state->orig.out.info_ctr = _info_ctr;
129 0 : state->orig.out.totalentries = _totalentries;
130 0 : state->orig.out.resume_handle = _resume_handle;
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_srvsvc_NetCharDevEnum_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_srvsvc_NetCharDevEnum_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_srvsvc_NetCharDevEnum_done, req);
149 0 : return req;
150 : }
151 :
152 0 : static void dcerpc_srvsvc_NetCharDevEnum_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_srvsvc_NetCharDevEnum_state *state = tevent_req_data(
157 : req, struct dcerpc_srvsvc_NetCharDevEnum_state);
158 0 : NTSTATUS status;
159 0 : 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_srvsvc_NetCharDevEnum_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.info_ctr = *state->tmp.out.info_ctr;
175 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
176 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
177 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
178 : }
179 :
180 : /* Copy result */
181 0 : state->orig.out.result = state->tmp.out.result;
182 :
183 : /* Reset temporary structure */
184 0 : NDR_ZERO_STRUCT(state->tmp);
185 :
186 0 : tevent_req_done(req);
187 : }
188 :
189 0 : NTSTATUS dcerpc_srvsvc_NetCharDevEnum_recv(struct tevent_req *req,
190 : TALLOC_CTX *mem_ctx,
191 : WERROR *result)
192 : {
193 0 : struct dcerpc_srvsvc_NetCharDevEnum_state *state = tevent_req_data(
194 : req, struct dcerpc_srvsvc_NetCharDevEnum_state);
195 0 : NTSTATUS status;
196 :
197 0 : if (tevent_req_is_nterror(req, &status)) {
198 0 : tevent_req_received(req);
199 0 : return status;
200 : }
201 :
202 : /* Steal possible out parameters to the callers context */
203 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
204 :
205 : /* Return result */
206 0 : *result = state->orig.out.result;
207 :
208 0 : tevent_req_received(req);
209 0 : return NT_STATUS_OK;
210 : }
211 :
212 0 : NTSTATUS dcerpc_srvsvc_NetCharDevEnum(struct dcerpc_binding_handle *h,
213 : TALLOC_CTX *mem_ctx,
214 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
215 : struct srvsvc_NetCharDevInfoCtr *_info_ctr /* [in,out] [ref] */,
216 : uint32_t _max_buffer /* [in] */,
217 : uint32_t *_totalentries /* [out] [ref] */,
218 : uint32_t *_resume_handle /* [in,out] [unique] */,
219 : WERROR *result)
220 : {
221 0 : struct srvsvc_NetCharDevEnum r;
222 0 : NTSTATUS status;
223 :
224 : /* In parameters */
225 0 : r.in.server_unc = _server_unc;
226 0 : r.in.info_ctr = _info_ctr;
227 0 : r.in.max_buffer = _max_buffer;
228 0 : r.in.resume_handle = _resume_handle;
229 :
230 : /* Out parameters */
231 0 : r.out.info_ctr = _info_ctr;
232 0 : r.out.totalentries = _totalentries;
233 0 : r.out.resume_handle = _resume_handle;
234 :
235 : /* Result */
236 0 : NDR_ZERO_STRUCT(r.out.result);
237 :
238 0 : status = dcerpc_srvsvc_NetCharDevEnum_r(h, mem_ctx, &r);
239 0 : if (!NT_STATUS_IS_OK(status)) {
240 0 : return status;
241 : }
242 :
243 : /* Return variables */
244 0 : *_info_ctr = *r.out.info_ctr;
245 0 : *_totalentries = *r.out.totalentries;
246 0 : if (_resume_handle && r.out.resume_handle) {
247 0 : *_resume_handle = *r.out.resume_handle;
248 : }
249 :
250 : /* Return result */
251 0 : *result = r.out.result;
252 :
253 0 : return NT_STATUS_OK;
254 : }
255 :
256 : struct dcerpc_srvsvc_NetCharDevGetInfo_r_state {
257 : TALLOC_CTX *out_mem_ctx;
258 : };
259 :
260 : static void dcerpc_srvsvc_NetCharDevGetInfo_r_done(struct tevent_req *subreq);
261 :
262 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevGetInfo_r_send(TALLOC_CTX *mem_ctx,
263 : struct tevent_context *ev,
264 : struct dcerpc_binding_handle *h,
265 : struct srvsvc_NetCharDevGetInfo *r)
266 : {
267 0 : struct tevent_req *req;
268 0 : struct dcerpc_srvsvc_NetCharDevGetInfo_r_state *state;
269 0 : struct tevent_req *subreq;
270 :
271 0 : req = tevent_req_create(mem_ctx, &state,
272 : struct dcerpc_srvsvc_NetCharDevGetInfo_r_state);
273 0 : if (req == NULL) {
274 0 : return NULL;
275 : }
276 :
277 0 : state->out_mem_ctx = talloc_new(state);
278 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
279 0 : return tevent_req_post(req, ev);
280 : }
281 :
282 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
283 : NULL, &ndr_table_srvsvc,
284 0 : NDR_SRVSVC_NETCHARDEVGETINFO, state->out_mem_ctx, r);
285 0 : if (tevent_req_nomem(subreq, req)) {
286 0 : return tevent_req_post(req, ev);
287 : }
288 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevGetInfo_r_done, req);
289 :
290 0 : return req;
291 : }
292 :
293 0 : static void dcerpc_srvsvc_NetCharDevGetInfo_r_done(struct tevent_req *subreq)
294 : {
295 0 : struct tevent_req *req =
296 0 : tevent_req_callback_data(subreq,
297 : struct tevent_req);
298 0 : NTSTATUS status;
299 :
300 0 : status = dcerpc_binding_handle_call_recv(subreq);
301 0 : TALLOC_FREE(subreq);
302 0 : if (tevent_req_nterror(req, status)) {
303 0 : return;
304 : }
305 :
306 0 : tevent_req_done(req);
307 : }
308 :
309 0 : NTSTATUS dcerpc_srvsvc_NetCharDevGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
310 : {
311 0 : struct dcerpc_srvsvc_NetCharDevGetInfo_r_state *state =
312 0 : tevent_req_data(req,
313 : struct dcerpc_srvsvc_NetCharDevGetInfo_r_state);
314 0 : NTSTATUS status;
315 :
316 0 : if (tevent_req_is_nterror(req, &status)) {
317 0 : tevent_req_received(req);
318 0 : return status;
319 : }
320 :
321 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
322 :
323 0 : tevent_req_received(req);
324 0 : return NT_STATUS_OK;
325 : }
326 :
327 0 : NTSTATUS dcerpc_srvsvc_NetCharDevGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetCharDevGetInfo *r)
328 : {
329 0 : NTSTATUS status;
330 :
331 0 : status = dcerpc_binding_handle_call(h,
332 : NULL, &ndr_table_srvsvc,
333 : NDR_SRVSVC_NETCHARDEVGETINFO, mem_ctx, r);
334 :
335 0 : return status;
336 : }
337 :
338 : struct dcerpc_srvsvc_NetCharDevGetInfo_state {
339 : struct srvsvc_NetCharDevGetInfo orig;
340 : struct srvsvc_NetCharDevGetInfo tmp;
341 : TALLOC_CTX *out_mem_ctx;
342 : };
343 :
344 : static void dcerpc_srvsvc_NetCharDevGetInfo_done(struct tevent_req *subreq);
345 :
346 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevGetInfo_send(TALLOC_CTX *mem_ctx,
347 : struct tevent_context *ev,
348 : struct dcerpc_binding_handle *h,
349 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
350 : const char *_device_name /* [in] [charset(UTF16)] */,
351 : uint32_t _level /* [in] */,
352 : union srvsvc_NetCharDevInfo *_info /* [out] [ref,switch_is(level)] */)
353 : {
354 0 : struct tevent_req *req;
355 0 : struct dcerpc_srvsvc_NetCharDevGetInfo_state *state;
356 0 : struct tevent_req *subreq;
357 :
358 0 : req = tevent_req_create(mem_ctx, &state,
359 : struct dcerpc_srvsvc_NetCharDevGetInfo_state);
360 0 : if (req == NULL) {
361 0 : return NULL;
362 : }
363 0 : state->out_mem_ctx = NULL;
364 :
365 : /* In parameters */
366 0 : state->orig.in.server_unc = _server_unc;
367 0 : state->orig.in.device_name = _device_name;
368 0 : state->orig.in.level = _level;
369 :
370 : /* Out parameters */
371 0 : state->orig.out.info = _info;
372 :
373 : /* Result */
374 0 : NDR_ZERO_STRUCT(state->orig.out.result);
375 :
376 0 : state->out_mem_ctx = talloc_named_const(state, 0,
377 : "dcerpc_srvsvc_NetCharDevGetInfo_out_memory");
378 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
379 0 : return tevent_req_post(req, ev);
380 : }
381 :
382 : /* make a temporary copy, that we pass to the dispatch function */
383 0 : state->tmp = state->orig;
384 :
385 0 : subreq = dcerpc_srvsvc_NetCharDevGetInfo_r_send(state, ev, h, &state->tmp);
386 0 : if (tevent_req_nomem(subreq, req)) {
387 0 : return tevent_req_post(req, ev);
388 : }
389 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevGetInfo_done, req);
390 0 : return req;
391 : }
392 :
393 0 : static void dcerpc_srvsvc_NetCharDevGetInfo_done(struct tevent_req *subreq)
394 : {
395 0 : struct tevent_req *req = tevent_req_callback_data(
396 : subreq, struct tevent_req);
397 0 : struct dcerpc_srvsvc_NetCharDevGetInfo_state *state = tevent_req_data(
398 : req, struct dcerpc_srvsvc_NetCharDevGetInfo_state);
399 0 : NTSTATUS status;
400 0 : TALLOC_CTX *mem_ctx;
401 :
402 0 : if (state->out_mem_ctx) {
403 0 : mem_ctx = state->out_mem_ctx;
404 : } else {
405 0 : mem_ctx = state;
406 : }
407 :
408 0 : status = dcerpc_srvsvc_NetCharDevGetInfo_r_recv(subreq, mem_ctx);
409 0 : TALLOC_FREE(subreq);
410 0 : if (tevent_req_nterror(req, status)) {
411 0 : return;
412 : }
413 :
414 : /* Copy out parameters */
415 0 : *state->orig.out.info = *state->tmp.out.info;
416 :
417 : /* Copy result */
418 0 : state->orig.out.result = state->tmp.out.result;
419 :
420 : /* Reset temporary structure */
421 0 : NDR_ZERO_STRUCT(state->tmp);
422 :
423 0 : tevent_req_done(req);
424 : }
425 :
426 0 : NTSTATUS dcerpc_srvsvc_NetCharDevGetInfo_recv(struct tevent_req *req,
427 : TALLOC_CTX *mem_ctx,
428 : WERROR *result)
429 : {
430 0 : struct dcerpc_srvsvc_NetCharDevGetInfo_state *state = tevent_req_data(
431 : req, struct dcerpc_srvsvc_NetCharDevGetInfo_state);
432 0 : NTSTATUS status;
433 :
434 0 : if (tevent_req_is_nterror(req, &status)) {
435 0 : tevent_req_received(req);
436 0 : return status;
437 : }
438 :
439 : /* Steal possible out parameters to the callers context */
440 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
441 :
442 : /* Return result */
443 0 : *result = state->orig.out.result;
444 :
445 0 : tevent_req_received(req);
446 0 : return NT_STATUS_OK;
447 : }
448 :
449 0 : NTSTATUS dcerpc_srvsvc_NetCharDevGetInfo(struct dcerpc_binding_handle *h,
450 : TALLOC_CTX *mem_ctx,
451 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
452 : const char *_device_name /* [in] [charset(UTF16)] */,
453 : uint32_t _level /* [in] */,
454 : union srvsvc_NetCharDevInfo *_info /* [out] [ref,switch_is(level)] */,
455 : WERROR *result)
456 : {
457 0 : struct srvsvc_NetCharDevGetInfo r;
458 0 : NTSTATUS status;
459 :
460 : /* In parameters */
461 0 : r.in.server_unc = _server_unc;
462 0 : r.in.device_name = _device_name;
463 0 : r.in.level = _level;
464 :
465 : /* Out parameters */
466 0 : r.out.info = _info;
467 :
468 : /* Result */
469 0 : NDR_ZERO_STRUCT(r.out.result);
470 :
471 0 : status = dcerpc_srvsvc_NetCharDevGetInfo_r(h, mem_ctx, &r);
472 0 : if (!NT_STATUS_IS_OK(status)) {
473 0 : return status;
474 : }
475 :
476 : /* Return variables */
477 0 : *_info = *r.out.info;
478 :
479 : /* Return result */
480 0 : *result = r.out.result;
481 :
482 0 : return NT_STATUS_OK;
483 : }
484 :
485 : struct dcerpc_srvsvc_NetCharDevControl_r_state {
486 : TALLOC_CTX *out_mem_ctx;
487 : };
488 :
489 : static void dcerpc_srvsvc_NetCharDevControl_r_done(struct tevent_req *subreq);
490 :
491 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevControl_r_send(TALLOC_CTX *mem_ctx,
492 : struct tevent_context *ev,
493 : struct dcerpc_binding_handle *h,
494 : struct srvsvc_NetCharDevControl *r)
495 : {
496 0 : struct tevent_req *req;
497 0 : struct dcerpc_srvsvc_NetCharDevControl_r_state *state;
498 0 : struct tevent_req *subreq;
499 :
500 0 : req = tevent_req_create(mem_ctx, &state,
501 : struct dcerpc_srvsvc_NetCharDevControl_r_state);
502 0 : if (req == NULL) {
503 0 : return NULL;
504 : }
505 :
506 0 : state->out_mem_ctx = NULL;
507 :
508 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
509 : NULL, &ndr_table_srvsvc,
510 : NDR_SRVSVC_NETCHARDEVCONTROL, state, r);
511 0 : if (tevent_req_nomem(subreq, req)) {
512 0 : return tevent_req_post(req, ev);
513 : }
514 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevControl_r_done, req);
515 :
516 0 : return req;
517 : }
518 :
519 0 : static void dcerpc_srvsvc_NetCharDevControl_r_done(struct tevent_req *subreq)
520 : {
521 0 : struct tevent_req *req =
522 0 : tevent_req_callback_data(subreq,
523 : struct tevent_req);
524 0 : NTSTATUS status;
525 :
526 0 : status = dcerpc_binding_handle_call_recv(subreq);
527 0 : TALLOC_FREE(subreq);
528 0 : if (tevent_req_nterror(req, status)) {
529 0 : return;
530 : }
531 :
532 0 : tevent_req_done(req);
533 : }
534 :
535 0 : NTSTATUS dcerpc_srvsvc_NetCharDevControl_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
536 : {
537 0 : struct dcerpc_srvsvc_NetCharDevControl_r_state *state =
538 0 : tevent_req_data(req,
539 : struct dcerpc_srvsvc_NetCharDevControl_r_state);
540 0 : NTSTATUS status;
541 :
542 0 : if (tevent_req_is_nterror(req, &status)) {
543 0 : tevent_req_received(req);
544 0 : return status;
545 : }
546 :
547 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
548 :
549 0 : tevent_req_received(req);
550 0 : return NT_STATUS_OK;
551 : }
552 :
553 0 : NTSTATUS dcerpc_srvsvc_NetCharDevControl_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetCharDevControl *r)
554 : {
555 0 : NTSTATUS status;
556 :
557 0 : status = dcerpc_binding_handle_call(h,
558 : NULL, &ndr_table_srvsvc,
559 : NDR_SRVSVC_NETCHARDEVCONTROL, mem_ctx, r);
560 :
561 0 : return status;
562 : }
563 :
564 : struct dcerpc_srvsvc_NetCharDevControl_state {
565 : struct srvsvc_NetCharDevControl orig;
566 : struct srvsvc_NetCharDevControl tmp;
567 : TALLOC_CTX *out_mem_ctx;
568 : };
569 :
570 : static void dcerpc_srvsvc_NetCharDevControl_done(struct tevent_req *subreq);
571 :
572 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevControl_send(TALLOC_CTX *mem_ctx,
573 : struct tevent_context *ev,
574 : struct dcerpc_binding_handle *h,
575 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
576 : const char *_device_name /* [in] [charset(UTF16)] */,
577 : uint32_t _opcode /* [in] */)
578 : {
579 0 : struct tevent_req *req;
580 0 : struct dcerpc_srvsvc_NetCharDevControl_state *state;
581 0 : struct tevent_req *subreq;
582 :
583 0 : req = tevent_req_create(mem_ctx, &state,
584 : struct dcerpc_srvsvc_NetCharDevControl_state);
585 0 : if (req == NULL) {
586 0 : return NULL;
587 : }
588 0 : state->out_mem_ctx = NULL;
589 :
590 : /* In parameters */
591 0 : state->orig.in.server_unc = _server_unc;
592 0 : state->orig.in.device_name = _device_name;
593 0 : state->orig.in.opcode = _opcode;
594 :
595 : /* Out parameters */
596 :
597 : /* Result */
598 0 : NDR_ZERO_STRUCT(state->orig.out.result);
599 :
600 : /* make a temporary copy, that we pass to the dispatch function */
601 0 : state->tmp = state->orig;
602 :
603 0 : subreq = dcerpc_srvsvc_NetCharDevControl_r_send(state, ev, h, &state->tmp);
604 0 : if (tevent_req_nomem(subreq, req)) {
605 0 : return tevent_req_post(req, ev);
606 : }
607 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevControl_done, req);
608 0 : return req;
609 : }
610 :
611 0 : static void dcerpc_srvsvc_NetCharDevControl_done(struct tevent_req *subreq)
612 : {
613 0 : struct tevent_req *req = tevent_req_callback_data(
614 : subreq, struct tevent_req);
615 0 : struct dcerpc_srvsvc_NetCharDevControl_state *state = tevent_req_data(
616 : req, struct dcerpc_srvsvc_NetCharDevControl_state);
617 0 : NTSTATUS status;
618 0 : TALLOC_CTX *mem_ctx;
619 :
620 0 : if (state->out_mem_ctx) {
621 0 : mem_ctx = state->out_mem_ctx;
622 : } else {
623 0 : mem_ctx = state;
624 : }
625 :
626 0 : status = dcerpc_srvsvc_NetCharDevControl_r_recv(subreq, mem_ctx);
627 0 : TALLOC_FREE(subreq);
628 0 : if (tevent_req_nterror(req, status)) {
629 0 : return;
630 : }
631 :
632 : /* Copy out parameters */
633 :
634 : /* Copy result */
635 0 : state->orig.out.result = state->tmp.out.result;
636 :
637 : /* Reset temporary structure */
638 0 : NDR_ZERO_STRUCT(state->tmp);
639 :
640 0 : tevent_req_done(req);
641 : }
642 :
643 0 : NTSTATUS dcerpc_srvsvc_NetCharDevControl_recv(struct tevent_req *req,
644 : TALLOC_CTX *mem_ctx,
645 : WERROR *result)
646 : {
647 0 : struct dcerpc_srvsvc_NetCharDevControl_state *state = tevent_req_data(
648 : req, struct dcerpc_srvsvc_NetCharDevControl_state);
649 0 : NTSTATUS status;
650 :
651 0 : if (tevent_req_is_nterror(req, &status)) {
652 0 : tevent_req_received(req);
653 0 : return status;
654 : }
655 :
656 : /* Steal possible out parameters to the callers context */
657 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
658 :
659 : /* Return result */
660 0 : *result = state->orig.out.result;
661 :
662 0 : tevent_req_received(req);
663 0 : return NT_STATUS_OK;
664 : }
665 :
666 0 : NTSTATUS dcerpc_srvsvc_NetCharDevControl(struct dcerpc_binding_handle *h,
667 : TALLOC_CTX *mem_ctx,
668 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
669 : const char *_device_name /* [in] [charset(UTF16)] */,
670 : uint32_t _opcode /* [in] */,
671 : WERROR *result)
672 : {
673 0 : struct srvsvc_NetCharDevControl r;
674 0 : NTSTATUS status;
675 :
676 : /* In parameters */
677 0 : r.in.server_unc = _server_unc;
678 0 : r.in.device_name = _device_name;
679 0 : r.in.opcode = _opcode;
680 :
681 : /* Out parameters */
682 :
683 : /* Result */
684 0 : NDR_ZERO_STRUCT(r.out.result);
685 :
686 0 : status = dcerpc_srvsvc_NetCharDevControl_r(h, mem_ctx, &r);
687 0 : if (!NT_STATUS_IS_OK(status)) {
688 0 : return status;
689 : }
690 :
691 : /* Return variables */
692 :
693 : /* Return result */
694 0 : *result = r.out.result;
695 :
696 0 : return NT_STATUS_OK;
697 : }
698 :
699 : struct dcerpc_srvsvc_NetCharDevQEnum_r_state {
700 : TALLOC_CTX *out_mem_ctx;
701 : };
702 :
703 : static void dcerpc_srvsvc_NetCharDevQEnum_r_done(struct tevent_req *subreq);
704 :
705 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQEnum_r_send(TALLOC_CTX *mem_ctx,
706 : struct tevent_context *ev,
707 : struct dcerpc_binding_handle *h,
708 : struct srvsvc_NetCharDevQEnum *r)
709 : {
710 0 : struct tevent_req *req;
711 0 : struct dcerpc_srvsvc_NetCharDevQEnum_r_state *state;
712 0 : struct tevent_req *subreq;
713 :
714 0 : req = tevent_req_create(mem_ctx, &state,
715 : struct dcerpc_srvsvc_NetCharDevQEnum_r_state);
716 0 : if (req == NULL) {
717 0 : return NULL;
718 : }
719 :
720 0 : state->out_mem_ctx = talloc_new(state);
721 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
722 0 : return tevent_req_post(req, ev);
723 : }
724 :
725 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
726 : NULL, &ndr_table_srvsvc,
727 0 : NDR_SRVSVC_NETCHARDEVQENUM, state->out_mem_ctx, r);
728 0 : if (tevent_req_nomem(subreq, req)) {
729 0 : return tevent_req_post(req, ev);
730 : }
731 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQEnum_r_done, req);
732 :
733 0 : return req;
734 : }
735 :
736 0 : static void dcerpc_srvsvc_NetCharDevQEnum_r_done(struct tevent_req *subreq)
737 : {
738 0 : struct tevent_req *req =
739 0 : tevent_req_callback_data(subreq,
740 : struct tevent_req);
741 0 : NTSTATUS status;
742 :
743 0 : status = dcerpc_binding_handle_call_recv(subreq);
744 0 : TALLOC_FREE(subreq);
745 0 : if (tevent_req_nterror(req, status)) {
746 0 : return;
747 : }
748 :
749 0 : tevent_req_done(req);
750 : }
751 :
752 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
753 : {
754 0 : struct dcerpc_srvsvc_NetCharDevQEnum_r_state *state =
755 0 : tevent_req_data(req,
756 : struct dcerpc_srvsvc_NetCharDevQEnum_r_state);
757 0 : NTSTATUS status;
758 :
759 0 : if (tevent_req_is_nterror(req, &status)) {
760 0 : tevent_req_received(req);
761 0 : return status;
762 : }
763 :
764 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
765 :
766 0 : tevent_req_received(req);
767 0 : return NT_STATUS_OK;
768 : }
769 :
770 10 : NTSTATUS dcerpc_srvsvc_NetCharDevQEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetCharDevQEnum *r)
771 : {
772 0 : NTSTATUS status;
773 :
774 10 : status = dcerpc_binding_handle_call(h,
775 : NULL, &ndr_table_srvsvc,
776 : NDR_SRVSVC_NETCHARDEVQENUM, mem_ctx, r);
777 :
778 10 : return status;
779 : }
780 :
781 : struct dcerpc_srvsvc_NetCharDevQEnum_state {
782 : struct srvsvc_NetCharDevQEnum orig;
783 : struct srvsvc_NetCharDevQEnum tmp;
784 : TALLOC_CTX *out_mem_ctx;
785 : };
786 :
787 : static void dcerpc_srvsvc_NetCharDevQEnum_done(struct tevent_req *subreq);
788 :
789 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQEnum_send(TALLOC_CTX *mem_ctx,
790 : struct tevent_context *ev,
791 : struct dcerpc_binding_handle *h,
792 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
793 : const char *_user /* [in] [charset(UTF16),unique] */,
794 : struct srvsvc_NetCharDevQInfoCtr *_info_ctr /* [in,out] [ref] */,
795 : uint32_t _max_buffer /* [in] */,
796 : uint32_t *_totalentries /* [out] [ref] */,
797 : uint32_t *_resume_handle /* [in,out] [unique] */)
798 : {
799 0 : struct tevent_req *req;
800 0 : struct dcerpc_srvsvc_NetCharDevQEnum_state *state;
801 0 : struct tevent_req *subreq;
802 :
803 0 : req = tevent_req_create(mem_ctx, &state,
804 : struct dcerpc_srvsvc_NetCharDevQEnum_state);
805 0 : if (req == NULL) {
806 0 : return NULL;
807 : }
808 0 : state->out_mem_ctx = NULL;
809 :
810 : /* In parameters */
811 0 : state->orig.in.server_unc = _server_unc;
812 0 : state->orig.in.user = _user;
813 0 : state->orig.in.info_ctr = _info_ctr;
814 0 : state->orig.in.max_buffer = _max_buffer;
815 0 : state->orig.in.resume_handle = _resume_handle;
816 :
817 : /* Out parameters */
818 0 : state->orig.out.info_ctr = _info_ctr;
819 0 : state->orig.out.totalentries = _totalentries;
820 0 : state->orig.out.resume_handle = _resume_handle;
821 :
822 : /* Result */
823 0 : NDR_ZERO_STRUCT(state->orig.out.result);
824 :
825 0 : state->out_mem_ctx = talloc_named_const(state, 0,
826 : "dcerpc_srvsvc_NetCharDevQEnum_out_memory");
827 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
828 0 : return tevent_req_post(req, ev);
829 : }
830 :
831 : /* make a temporary copy, that we pass to the dispatch function */
832 0 : state->tmp = state->orig;
833 :
834 0 : subreq = dcerpc_srvsvc_NetCharDevQEnum_r_send(state, ev, h, &state->tmp);
835 0 : if (tevent_req_nomem(subreq, req)) {
836 0 : return tevent_req_post(req, ev);
837 : }
838 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQEnum_done, req);
839 0 : return req;
840 : }
841 :
842 0 : static void dcerpc_srvsvc_NetCharDevQEnum_done(struct tevent_req *subreq)
843 : {
844 0 : struct tevent_req *req = tevent_req_callback_data(
845 : subreq, struct tevent_req);
846 0 : struct dcerpc_srvsvc_NetCharDevQEnum_state *state = tevent_req_data(
847 : req, struct dcerpc_srvsvc_NetCharDevQEnum_state);
848 0 : NTSTATUS status;
849 0 : TALLOC_CTX *mem_ctx;
850 :
851 0 : if (state->out_mem_ctx) {
852 0 : mem_ctx = state->out_mem_ctx;
853 : } else {
854 0 : mem_ctx = state;
855 : }
856 :
857 0 : status = dcerpc_srvsvc_NetCharDevQEnum_r_recv(subreq, mem_ctx);
858 0 : TALLOC_FREE(subreq);
859 0 : if (tevent_req_nterror(req, status)) {
860 0 : return;
861 : }
862 :
863 : /* Copy out parameters */
864 0 : *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
865 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
866 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
867 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
868 : }
869 :
870 : /* Copy result */
871 0 : state->orig.out.result = state->tmp.out.result;
872 :
873 : /* Reset temporary structure */
874 0 : NDR_ZERO_STRUCT(state->tmp);
875 :
876 0 : tevent_req_done(req);
877 : }
878 :
879 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQEnum_recv(struct tevent_req *req,
880 : TALLOC_CTX *mem_ctx,
881 : WERROR *result)
882 : {
883 0 : struct dcerpc_srvsvc_NetCharDevQEnum_state *state = tevent_req_data(
884 : req, struct dcerpc_srvsvc_NetCharDevQEnum_state);
885 0 : NTSTATUS status;
886 :
887 0 : if (tevent_req_is_nterror(req, &status)) {
888 0 : tevent_req_received(req);
889 0 : return status;
890 : }
891 :
892 : /* Steal possible out parameters to the callers context */
893 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
894 :
895 : /* Return result */
896 0 : *result = state->orig.out.result;
897 :
898 0 : tevent_req_received(req);
899 0 : return NT_STATUS_OK;
900 : }
901 :
902 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQEnum(struct dcerpc_binding_handle *h,
903 : TALLOC_CTX *mem_ctx,
904 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
905 : const char *_user /* [in] [charset(UTF16),unique] */,
906 : struct srvsvc_NetCharDevQInfoCtr *_info_ctr /* [in,out] [ref] */,
907 : uint32_t _max_buffer /* [in] */,
908 : uint32_t *_totalentries /* [out] [ref] */,
909 : uint32_t *_resume_handle /* [in,out] [unique] */,
910 : WERROR *result)
911 : {
912 0 : struct srvsvc_NetCharDevQEnum r;
913 0 : NTSTATUS status;
914 :
915 : /* In parameters */
916 0 : r.in.server_unc = _server_unc;
917 0 : r.in.user = _user;
918 0 : r.in.info_ctr = _info_ctr;
919 0 : r.in.max_buffer = _max_buffer;
920 0 : r.in.resume_handle = _resume_handle;
921 :
922 : /* Out parameters */
923 0 : r.out.info_ctr = _info_ctr;
924 0 : r.out.totalentries = _totalentries;
925 0 : r.out.resume_handle = _resume_handle;
926 :
927 : /* Result */
928 0 : NDR_ZERO_STRUCT(r.out.result);
929 :
930 0 : status = dcerpc_srvsvc_NetCharDevQEnum_r(h, mem_ctx, &r);
931 0 : if (!NT_STATUS_IS_OK(status)) {
932 0 : return status;
933 : }
934 :
935 : /* Return variables */
936 0 : *_info_ctr = *r.out.info_ctr;
937 0 : *_totalentries = *r.out.totalentries;
938 0 : if (_resume_handle && r.out.resume_handle) {
939 0 : *_resume_handle = *r.out.resume_handle;
940 : }
941 :
942 : /* Return result */
943 0 : *result = r.out.result;
944 :
945 0 : return NT_STATUS_OK;
946 : }
947 :
948 : struct dcerpc_srvsvc_NetCharDevQGetInfo_r_state {
949 : TALLOC_CTX *out_mem_ctx;
950 : };
951 :
952 : static void dcerpc_srvsvc_NetCharDevQGetInfo_r_done(struct tevent_req *subreq);
953 :
954 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQGetInfo_r_send(TALLOC_CTX *mem_ctx,
955 : struct tevent_context *ev,
956 : struct dcerpc_binding_handle *h,
957 : struct srvsvc_NetCharDevQGetInfo *r)
958 : {
959 0 : struct tevent_req *req;
960 0 : struct dcerpc_srvsvc_NetCharDevQGetInfo_r_state *state;
961 0 : struct tevent_req *subreq;
962 :
963 0 : req = tevent_req_create(mem_ctx, &state,
964 : struct dcerpc_srvsvc_NetCharDevQGetInfo_r_state);
965 0 : if (req == NULL) {
966 0 : return NULL;
967 : }
968 :
969 0 : state->out_mem_ctx = talloc_new(state);
970 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
971 0 : return tevent_req_post(req, ev);
972 : }
973 :
974 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
975 : NULL, &ndr_table_srvsvc,
976 0 : NDR_SRVSVC_NETCHARDEVQGETINFO, state->out_mem_ctx, r);
977 0 : if (tevent_req_nomem(subreq, req)) {
978 0 : return tevent_req_post(req, ev);
979 : }
980 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQGetInfo_r_done, req);
981 :
982 0 : return req;
983 : }
984 :
985 0 : static void dcerpc_srvsvc_NetCharDevQGetInfo_r_done(struct tevent_req *subreq)
986 : {
987 0 : struct tevent_req *req =
988 0 : tevent_req_callback_data(subreq,
989 : struct tevent_req);
990 0 : NTSTATUS status;
991 :
992 0 : status = dcerpc_binding_handle_call_recv(subreq);
993 0 : TALLOC_FREE(subreq);
994 0 : if (tevent_req_nterror(req, status)) {
995 0 : return;
996 : }
997 :
998 0 : tevent_req_done(req);
999 : }
1000 :
1001 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1002 : {
1003 0 : struct dcerpc_srvsvc_NetCharDevQGetInfo_r_state *state =
1004 0 : tevent_req_data(req,
1005 : struct dcerpc_srvsvc_NetCharDevQGetInfo_r_state);
1006 0 : NTSTATUS status;
1007 :
1008 0 : if (tevent_req_is_nterror(req, &status)) {
1009 0 : tevent_req_received(req);
1010 0 : return status;
1011 : }
1012 :
1013 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1014 :
1015 0 : tevent_req_received(req);
1016 0 : return NT_STATUS_OK;
1017 : }
1018 :
1019 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetCharDevQGetInfo *r)
1020 : {
1021 0 : NTSTATUS status;
1022 :
1023 0 : status = dcerpc_binding_handle_call(h,
1024 : NULL, &ndr_table_srvsvc,
1025 : NDR_SRVSVC_NETCHARDEVQGETINFO, mem_ctx, r);
1026 :
1027 0 : return status;
1028 : }
1029 :
1030 : struct dcerpc_srvsvc_NetCharDevQGetInfo_state {
1031 : struct srvsvc_NetCharDevQGetInfo orig;
1032 : struct srvsvc_NetCharDevQGetInfo tmp;
1033 : TALLOC_CTX *out_mem_ctx;
1034 : };
1035 :
1036 : static void dcerpc_srvsvc_NetCharDevQGetInfo_done(struct tevent_req *subreq);
1037 :
1038 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQGetInfo_send(TALLOC_CTX *mem_ctx,
1039 : struct tevent_context *ev,
1040 : struct dcerpc_binding_handle *h,
1041 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1042 : const char *_queue_name /* [in] [charset(UTF16)] */,
1043 : const char *_user /* [in] [charset(UTF16)] */,
1044 : uint32_t _level /* [in] */,
1045 : union srvsvc_NetCharDevQInfo *_info /* [out] [ref,switch_is(level)] */)
1046 : {
1047 0 : struct tevent_req *req;
1048 0 : struct dcerpc_srvsvc_NetCharDevQGetInfo_state *state;
1049 0 : struct tevent_req *subreq;
1050 :
1051 0 : req = tevent_req_create(mem_ctx, &state,
1052 : struct dcerpc_srvsvc_NetCharDevQGetInfo_state);
1053 0 : if (req == NULL) {
1054 0 : return NULL;
1055 : }
1056 0 : state->out_mem_ctx = NULL;
1057 :
1058 : /* In parameters */
1059 0 : state->orig.in.server_unc = _server_unc;
1060 0 : state->orig.in.queue_name = _queue_name;
1061 0 : state->orig.in.user = _user;
1062 0 : state->orig.in.level = _level;
1063 :
1064 : /* Out parameters */
1065 0 : state->orig.out.info = _info;
1066 :
1067 : /* Result */
1068 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1069 :
1070 0 : state->out_mem_ctx = talloc_named_const(state, 0,
1071 : "dcerpc_srvsvc_NetCharDevQGetInfo_out_memory");
1072 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1073 0 : return tevent_req_post(req, ev);
1074 : }
1075 :
1076 : /* make a temporary copy, that we pass to the dispatch function */
1077 0 : state->tmp = state->orig;
1078 :
1079 0 : subreq = dcerpc_srvsvc_NetCharDevQGetInfo_r_send(state, ev, h, &state->tmp);
1080 0 : if (tevent_req_nomem(subreq, req)) {
1081 0 : return tevent_req_post(req, ev);
1082 : }
1083 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQGetInfo_done, req);
1084 0 : return req;
1085 : }
1086 :
1087 0 : static void dcerpc_srvsvc_NetCharDevQGetInfo_done(struct tevent_req *subreq)
1088 : {
1089 0 : struct tevent_req *req = tevent_req_callback_data(
1090 : subreq, struct tevent_req);
1091 0 : struct dcerpc_srvsvc_NetCharDevQGetInfo_state *state = tevent_req_data(
1092 : req, struct dcerpc_srvsvc_NetCharDevQGetInfo_state);
1093 0 : NTSTATUS status;
1094 0 : TALLOC_CTX *mem_ctx;
1095 :
1096 0 : if (state->out_mem_ctx) {
1097 0 : mem_ctx = state->out_mem_ctx;
1098 : } else {
1099 0 : mem_ctx = state;
1100 : }
1101 :
1102 0 : status = dcerpc_srvsvc_NetCharDevQGetInfo_r_recv(subreq, mem_ctx);
1103 0 : TALLOC_FREE(subreq);
1104 0 : if (tevent_req_nterror(req, status)) {
1105 0 : return;
1106 : }
1107 :
1108 : /* Copy out parameters */
1109 0 : *state->orig.out.info = *state->tmp.out.info;
1110 :
1111 : /* Copy result */
1112 0 : state->orig.out.result = state->tmp.out.result;
1113 :
1114 : /* Reset temporary structure */
1115 0 : NDR_ZERO_STRUCT(state->tmp);
1116 :
1117 0 : tevent_req_done(req);
1118 : }
1119 :
1120 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQGetInfo_recv(struct tevent_req *req,
1121 : TALLOC_CTX *mem_ctx,
1122 : WERROR *result)
1123 : {
1124 0 : struct dcerpc_srvsvc_NetCharDevQGetInfo_state *state = tevent_req_data(
1125 : req, struct dcerpc_srvsvc_NetCharDevQGetInfo_state);
1126 0 : NTSTATUS status;
1127 :
1128 0 : if (tevent_req_is_nterror(req, &status)) {
1129 0 : tevent_req_received(req);
1130 0 : return status;
1131 : }
1132 :
1133 : /* Steal possible out parameters to the callers context */
1134 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1135 :
1136 : /* Return result */
1137 0 : *result = state->orig.out.result;
1138 :
1139 0 : tevent_req_received(req);
1140 0 : return NT_STATUS_OK;
1141 : }
1142 :
1143 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQGetInfo(struct dcerpc_binding_handle *h,
1144 : TALLOC_CTX *mem_ctx,
1145 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1146 : const char *_queue_name /* [in] [charset(UTF16)] */,
1147 : const char *_user /* [in] [charset(UTF16)] */,
1148 : uint32_t _level /* [in] */,
1149 : union srvsvc_NetCharDevQInfo *_info /* [out] [ref,switch_is(level)] */,
1150 : WERROR *result)
1151 : {
1152 0 : struct srvsvc_NetCharDevQGetInfo r;
1153 0 : NTSTATUS status;
1154 :
1155 : /* In parameters */
1156 0 : r.in.server_unc = _server_unc;
1157 0 : r.in.queue_name = _queue_name;
1158 0 : r.in.user = _user;
1159 0 : r.in.level = _level;
1160 :
1161 : /* Out parameters */
1162 0 : r.out.info = _info;
1163 :
1164 : /* Result */
1165 0 : NDR_ZERO_STRUCT(r.out.result);
1166 :
1167 0 : status = dcerpc_srvsvc_NetCharDevQGetInfo_r(h, mem_ctx, &r);
1168 0 : if (!NT_STATUS_IS_OK(status)) {
1169 0 : return status;
1170 : }
1171 :
1172 : /* Return variables */
1173 0 : *_info = *r.out.info;
1174 :
1175 : /* Return result */
1176 0 : *result = r.out.result;
1177 :
1178 0 : return NT_STATUS_OK;
1179 : }
1180 :
1181 : struct dcerpc_srvsvc_NetCharDevQSetInfo_r_state {
1182 : TALLOC_CTX *out_mem_ctx;
1183 : };
1184 :
1185 : static void dcerpc_srvsvc_NetCharDevQSetInfo_r_done(struct tevent_req *subreq);
1186 :
1187 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQSetInfo_r_send(TALLOC_CTX *mem_ctx,
1188 : struct tevent_context *ev,
1189 : struct dcerpc_binding_handle *h,
1190 : struct srvsvc_NetCharDevQSetInfo *r)
1191 : {
1192 0 : struct tevent_req *req;
1193 0 : struct dcerpc_srvsvc_NetCharDevQSetInfo_r_state *state;
1194 0 : struct tevent_req *subreq;
1195 :
1196 0 : req = tevent_req_create(mem_ctx, &state,
1197 : struct dcerpc_srvsvc_NetCharDevQSetInfo_r_state);
1198 0 : if (req == NULL) {
1199 0 : return NULL;
1200 : }
1201 :
1202 0 : state->out_mem_ctx = talloc_new(state);
1203 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1204 0 : return tevent_req_post(req, ev);
1205 : }
1206 :
1207 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
1208 : NULL, &ndr_table_srvsvc,
1209 0 : NDR_SRVSVC_NETCHARDEVQSETINFO, state->out_mem_ctx, r);
1210 0 : if (tevent_req_nomem(subreq, req)) {
1211 0 : return tevent_req_post(req, ev);
1212 : }
1213 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQSetInfo_r_done, req);
1214 :
1215 0 : return req;
1216 : }
1217 :
1218 0 : static void dcerpc_srvsvc_NetCharDevQSetInfo_r_done(struct tevent_req *subreq)
1219 : {
1220 0 : struct tevent_req *req =
1221 0 : tevent_req_callback_data(subreq,
1222 : struct tevent_req);
1223 0 : NTSTATUS status;
1224 :
1225 0 : status = dcerpc_binding_handle_call_recv(subreq);
1226 0 : TALLOC_FREE(subreq);
1227 0 : if (tevent_req_nterror(req, status)) {
1228 0 : return;
1229 : }
1230 :
1231 0 : tevent_req_done(req);
1232 : }
1233 :
1234 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQSetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1235 : {
1236 0 : struct dcerpc_srvsvc_NetCharDevQSetInfo_r_state *state =
1237 0 : tevent_req_data(req,
1238 : struct dcerpc_srvsvc_NetCharDevQSetInfo_r_state);
1239 0 : NTSTATUS status;
1240 :
1241 0 : if (tevent_req_is_nterror(req, &status)) {
1242 0 : tevent_req_received(req);
1243 0 : return status;
1244 : }
1245 :
1246 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1247 :
1248 0 : tevent_req_received(req);
1249 0 : return NT_STATUS_OK;
1250 : }
1251 :
1252 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQSetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetCharDevQSetInfo *r)
1253 : {
1254 0 : NTSTATUS status;
1255 :
1256 0 : status = dcerpc_binding_handle_call(h,
1257 : NULL, &ndr_table_srvsvc,
1258 : NDR_SRVSVC_NETCHARDEVQSETINFO, mem_ctx, r);
1259 :
1260 0 : return status;
1261 : }
1262 :
1263 : struct dcerpc_srvsvc_NetCharDevQSetInfo_state {
1264 : struct srvsvc_NetCharDevQSetInfo orig;
1265 : struct srvsvc_NetCharDevQSetInfo tmp;
1266 : TALLOC_CTX *out_mem_ctx;
1267 : };
1268 :
1269 : static void dcerpc_srvsvc_NetCharDevQSetInfo_done(struct tevent_req *subreq);
1270 :
1271 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQSetInfo_send(TALLOC_CTX *mem_ctx,
1272 : struct tevent_context *ev,
1273 : struct dcerpc_binding_handle *h,
1274 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1275 : const char *_queue_name /* [in] [charset(UTF16)] */,
1276 : uint32_t _level /* [in] */,
1277 : union srvsvc_NetCharDevQInfo _info /* [in] [switch_is(level)] */,
1278 : uint32_t *_parm_error /* [in,out] [unique] */)
1279 : {
1280 0 : struct tevent_req *req;
1281 0 : struct dcerpc_srvsvc_NetCharDevQSetInfo_state *state;
1282 0 : struct tevent_req *subreq;
1283 :
1284 0 : req = tevent_req_create(mem_ctx, &state,
1285 : struct dcerpc_srvsvc_NetCharDevQSetInfo_state);
1286 0 : if (req == NULL) {
1287 0 : return NULL;
1288 : }
1289 0 : state->out_mem_ctx = NULL;
1290 :
1291 : /* In parameters */
1292 0 : state->orig.in.server_unc = _server_unc;
1293 0 : state->orig.in.queue_name = _queue_name;
1294 0 : state->orig.in.level = _level;
1295 0 : state->orig.in.info = _info;
1296 0 : state->orig.in.parm_error = _parm_error;
1297 :
1298 : /* Out parameters */
1299 0 : state->orig.out.parm_error = _parm_error;
1300 :
1301 : /* Result */
1302 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1303 :
1304 0 : state->out_mem_ctx = talloc_named_const(state, 0,
1305 : "dcerpc_srvsvc_NetCharDevQSetInfo_out_memory");
1306 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1307 0 : return tevent_req_post(req, ev);
1308 : }
1309 :
1310 : /* make a temporary copy, that we pass to the dispatch function */
1311 0 : state->tmp = state->orig;
1312 :
1313 0 : subreq = dcerpc_srvsvc_NetCharDevQSetInfo_r_send(state, ev, h, &state->tmp);
1314 0 : if (tevent_req_nomem(subreq, req)) {
1315 0 : return tevent_req_post(req, ev);
1316 : }
1317 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQSetInfo_done, req);
1318 0 : return req;
1319 : }
1320 :
1321 0 : static void dcerpc_srvsvc_NetCharDevQSetInfo_done(struct tevent_req *subreq)
1322 : {
1323 0 : struct tevent_req *req = tevent_req_callback_data(
1324 : subreq, struct tevent_req);
1325 0 : struct dcerpc_srvsvc_NetCharDevQSetInfo_state *state = tevent_req_data(
1326 : req, struct dcerpc_srvsvc_NetCharDevQSetInfo_state);
1327 0 : NTSTATUS status;
1328 0 : TALLOC_CTX *mem_ctx;
1329 :
1330 0 : if (state->out_mem_ctx) {
1331 0 : mem_ctx = state->out_mem_ctx;
1332 : } else {
1333 0 : mem_ctx = state;
1334 : }
1335 :
1336 0 : status = dcerpc_srvsvc_NetCharDevQSetInfo_r_recv(subreq, mem_ctx);
1337 0 : TALLOC_FREE(subreq);
1338 0 : if (tevent_req_nterror(req, status)) {
1339 0 : return;
1340 : }
1341 :
1342 : /* Copy out parameters */
1343 0 : if (state->orig.out.parm_error && state->tmp.out.parm_error) {
1344 0 : *state->orig.out.parm_error = *state->tmp.out.parm_error;
1345 : }
1346 :
1347 : /* Copy result */
1348 0 : state->orig.out.result = state->tmp.out.result;
1349 :
1350 : /* Reset temporary structure */
1351 0 : NDR_ZERO_STRUCT(state->tmp);
1352 :
1353 0 : tevent_req_done(req);
1354 : }
1355 :
1356 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQSetInfo_recv(struct tevent_req *req,
1357 : TALLOC_CTX *mem_ctx,
1358 : WERROR *result)
1359 : {
1360 0 : struct dcerpc_srvsvc_NetCharDevQSetInfo_state *state = tevent_req_data(
1361 : req, struct dcerpc_srvsvc_NetCharDevQSetInfo_state);
1362 0 : NTSTATUS status;
1363 :
1364 0 : if (tevent_req_is_nterror(req, &status)) {
1365 0 : tevent_req_received(req);
1366 0 : return status;
1367 : }
1368 :
1369 : /* Steal possible out parameters to the callers context */
1370 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1371 :
1372 : /* Return result */
1373 0 : *result = state->orig.out.result;
1374 :
1375 0 : tevent_req_received(req);
1376 0 : return NT_STATUS_OK;
1377 : }
1378 :
1379 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQSetInfo(struct dcerpc_binding_handle *h,
1380 : TALLOC_CTX *mem_ctx,
1381 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1382 : const char *_queue_name /* [in] [charset(UTF16)] */,
1383 : uint32_t _level /* [in] */,
1384 : union srvsvc_NetCharDevQInfo _info /* [in] [switch_is(level)] */,
1385 : uint32_t *_parm_error /* [in,out] [unique] */,
1386 : WERROR *result)
1387 : {
1388 0 : struct srvsvc_NetCharDevQSetInfo r;
1389 0 : NTSTATUS status;
1390 :
1391 : /* In parameters */
1392 0 : r.in.server_unc = _server_unc;
1393 0 : r.in.queue_name = _queue_name;
1394 0 : r.in.level = _level;
1395 0 : r.in.info = _info;
1396 0 : r.in.parm_error = _parm_error;
1397 :
1398 : /* Out parameters */
1399 0 : r.out.parm_error = _parm_error;
1400 :
1401 : /* Result */
1402 0 : NDR_ZERO_STRUCT(r.out.result);
1403 :
1404 0 : status = dcerpc_srvsvc_NetCharDevQSetInfo_r(h, mem_ctx, &r);
1405 0 : if (!NT_STATUS_IS_OK(status)) {
1406 0 : return status;
1407 : }
1408 :
1409 : /* Return variables */
1410 0 : if (_parm_error && r.out.parm_error) {
1411 0 : *_parm_error = *r.out.parm_error;
1412 : }
1413 :
1414 : /* Return result */
1415 0 : *result = r.out.result;
1416 :
1417 0 : return NT_STATUS_OK;
1418 : }
1419 :
1420 : struct dcerpc_srvsvc_NetCharDevQPurge_r_state {
1421 : TALLOC_CTX *out_mem_ctx;
1422 : };
1423 :
1424 : static void dcerpc_srvsvc_NetCharDevQPurge_r_done(struct tevent_req *subreq);
1425 :
1426 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQPurge_r_send(TALLOC_CTX *mem_ctx,
1427 : struct tevent_context *ev,
1428 : struct dcerpc_binding_handle *h,
1429 : struct srvsvc_NetCharDevQPurge *r)
1430 : {
1431 0 : struct tevent_req *req;
1432 0 : struct dcerpc_srvsvc_NetCharDevQPurge_r_state *state;
1433 0 : struct tevent_req *subreq;
1434 :
1435 0 : req = tevent_req_create(mem_ctx, &state,
1436 : struct dcerpc_srvsvc_NetCharDevQPurge_r_state);
1437 0 : if (req == NULL) {
1438 0 : return NULL;
1439 : }
1440 :
1441 0 : state->out_mem_ctx = NULL;
1442 :
1443 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
1444 : NULL, &ndr_table_srvsvc,
1445 : NDR_SRVSVC_NETCHARDEVQPURGE, state, r);
1446 0 : if (tevent_req_nomem(subreq, req)) {
1447 0 : return tevent_req_post(req, ev);
1448 : }
1449 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQPurge_r_done, req);
1450 :
1451 0 : return req;
1452 : }
1453 :
1454 0 : static void dcerpc_srvsvc_NetCharDevQPurge_r_done(struct tevent_req *subreq)
1455 : {
1456 0 : struct tevent_req *req =
1457 0 : tevent_req_callback_data(subreq,
1458 : struct tevent_req);
1459 0 : NTSTATUS status;
1460 :
1461 0 : status = dcerpc_binding_handle_call_recv(subreq);
1462 0 : TALLOC_FREE(subreq);
1463 0 : if (tevent_req_nterror(req, status)) {
1464 0 : return;
1465 : }
1466 :
1467 0 : tevent_req_done(req);
1468 : }
1469 :
1470 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQPurge_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1471 : {
1472 0 : struct dcerpc_srvsvc_NetCharDevQPurge_r_state *state =
1473 0 : tevent_req_data(req,
1474 : struct dcerpc_srvsvc_NetCharDevQPurge_r_state);
1475 0 : NTSTATUS status;
1476 :
1477 0 : if (tevent_req_is_nterror(req, &status)) {
1478 0 : tevent_req_received(req);
1479 0 : return status;
1480 : }
1481 :
1482 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1483 :
1484 0 : tevent_req_received(req);
1485 0 : return NT_STATUS_OK;
1486 : }
1487 :
1488 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQPurge_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetCharDevQPurge *r)
1489 : {
1490 0 : NTSTATUS status;
1491 :
1492 0 : status = dcerpc_binding_handle_call(h,
1493 : NULL, &ndr_table_srvsvc,
1494 : NDR_SRVSVC_NETCHARDEVQPURGE, mem_ctx, r);
1495 :
1496 0 : return status;
1497 : }
1498 :
1499 : struct dcerpc_srvsvc_NetCharDevQPurge_state {
1500 : struct srvsvc_NetCharDevQPurge orig;
1501 : struct srvsvc_NetCharDevQPurge tmp;
1502 : TALLOC_CTX *out_mem_ctx;
1503 : };
1504 :
1505 : static void dcerpc_srvsvc_NetCharDevQPurge_done(struct tevent_req *subreq);
1506 :
1507 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQPurge_send(TALLOC_CTX *mem_ctx,
1508 : struct tevent_context *ev,
1509 : struct dcerpc_binding_handle *h,
1510 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1511 : const char *_queue_name /* [in] [charset(UTF16)] */)
1512 : {
1513 0 : struct tevent_req *req;
1514 0 : struct dcerpc_srvsvc_NetCharDevQPurge_state *state;
1515 0 : struct tevent_req *subreq;
1516 :
1517 0 : req = tevent_req_create(mem_ctx, &state,
1518 : struct dcerpc_srvsvc_NetCharDevQPurge_state);
1519 0 : if (req == NULL) {
1520 0 : return NULL;
1521 : }
1522 0 : state->out_mem_ctx = NULL;
1523 :
1524 : /* In parameters */
1525 0 : state->orig.in.server_unc = _server_unc;
1526 0 : state->orig.in.queue_name = _queue_name;
1527 :
1528 : /* Out parameters */
1529 :
1530 : /* Result */
1531 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1532 :
1533 : /* make a temporary copy, that we pass to the dispatch function */
1534 0 : state->tmp = state->orig;
1535 :
1536 0 : subreq = dcerpc_srvsvc_NetCharDevQPurge_r_send(state, ev, h, &state->tmp);
1537 0 : if (tevent_req_nomem(subreq, req)) {
1538 0 : return tevent_req_post(req, ev);
1539 : }
1540 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQPurge_done, req);
1541 0 : return req;
1542 : }
1543 :
1544 0 : static void dcerpc_srvsvc_NetCharDevQPurge_done(struct tevent_req *subreq)
1545 : {
1546 0 : struct tevent_req *req = tevent_req_callback_data(
1547 : subreq, struct tevent_req);
1548 0 : struct dcerpc_srvsvc_NetCharDevQPurge_state *state = tevent_req_data(
1549 : req, struct dcerpc_srvsvc_NetCharDevQPurge_state);
1550 0 : NTSTATUS status;
1551 0 : TALLOC_CTX *mem_ctx;
1552 :
1553 0 : if (state->out_mem_ctx) {
1554 0 : mem_ctx = state->out_mem_ctx;
1555 : } else {
1556 0 : mem_ctx = state;
1557 : }
1558 :
1559 0 : status = dcerpc_srvsvc_NetCharDevQPurge_r_recv(subreq, mem_ctx);
1560 0 : TALLOC_FREE(subreq);
1561 0 : if (tevent_req_nterror(req, status)) {
1562 0 : return;
1563 : }
1564 :
1565 : /* Copy out parameters */
1566 :
1567 : /* Copy result */
1568 0 : state->orig.out.result = state->tmp.out.result;
1569 :
1570 : /* Reset temporary structure */
1571 0 : NDR_ZERO_STRUCT(state->tmp);
1572 :
1573 0 : tevent_req_done(req);
1574 : }
1575 :
1576 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQPurge_recv(struct tevent_req *req,
1577 : TALLOC_CTX *mem_ctx,
1578 : WERROR *result)
1579 : {
1580 0 : struct dcerpc_srvsvc_NetCharDevQPurge_state *state = tevent_req_data(
1581 : req, struct dcerpc_srvsvc_NetCharDevQPurge_state);
1582 0 : NTSTATUS status;
1583 :
1584 0 : if (tevent_req_is_nterror(req, &status)) {
1585 0 : tevent_req_received(req);
1586 0 : return status;
1587 : }
1588 :
1589 : /* Steal possible out parameters to the callers context */
1590 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1591 :
1592 : /* Return result */
1593 0 : *result = state->orig.out.result;
1594 :
1595 0 : tevent_req_received(req);
1596 0 : return NT_STATUS_OK;
1597 : }
1598 :
1599 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQPurge(struct dcerpc_binding_handle *h,
1600 : TALLOC_CTX *mem_ctx,
1601 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1602 : const char *_queue_name /* [in] [charset(UTF16)] */,
1603 : WERROR *result)
1604 : {
1605 0 : struct srvsvc_NetCharDevQPurge r;
1606 0 : NTSTATUS status;
1607 :
1608 : /* In parameters */
1609 0 : r.in.server_unc = _server_unc;
1610 0 : r.in.queue_name = _queue_name;
1611 :
1612 : /* Out parameters */
1613 :
1614 : /* Result */
1615 0 : NDR_ZERO_STRUCT(r.out.result);
1616 :
1617 0 : status = dcerpc_srvsvc_NetCharDevQPurge_r(h, mem_ctx, &r);
1618 0 : if (!NT_STATUS_IS_OK(status)) {
1619 0 : return status;
1620 : }
1621 :
1622 : /* Return variables */
1623 :
1624 : /* Return result */
1625 0 : *result = r.out.result;
1626 :
1627 0 : return NT_STATUS_OK;
1628 : }
1629 :
1630 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_r_state {
1631 : TALLOC_CTX *out_mem_ctx;
1632 : };
1633 :
1634 : static void dcerpc_srvsvc_NetCharDevQPurgeSelf_r_done(struct tevent_req *subreq);
1635 :
1636 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQPurgeSelf_r_send(TALLOC_CTX *mem_ctx,
1637 : struct tevent_context *ev,
1638 : struct dcerpc_binding_handle *h,
1639 : struct srvsvc_NetCharDevQPurgeSelf *r)
1640 : {
1641 0 : struct tevent_req *req;
1642 0 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_r_state *state;
1643 0 : struct tevent_req *subreq;
1644 :
1645 0 : req = tevent_req_create(mem_ctx, &state,
1646 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_r_state);
1647 0 : if (req == NULL) {
1648 0 : return NULL;
1649 : }
1650 :
1651 0 : state->out_mem_ctx = NULL;
1652 :
1653 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
1654 : NULL, &ndr_table_srvsvc,
1655 : NDR_SRVSVC_NETCHARDEVQPURGESELF, state, r);
1656 0 : if (tevent_req_nomem(subreq, req)) {
1657 0 : return tevent_req_post(req, ev);
1658 : }
1659 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQPurgeSelf_r_done, req);
1660 :
1661 0 : return req;
1662 : }
1663 :
1664 0 : static void dcerpc_srvsvc_NetCharDevQPurgeSelf_r_done(struct tevent_req *subreq)
1665 : {
1666 0 : struct tevent_req *req =
1667 0 : tevent_req_callback_data(subreq,
1668 : struct tevent_req);
1669 0 : NTSTATUS status;
1670 :
1671 0 : status = dcerpc_binding_handle_call_recv(subreq);
1672 0 : TALLOC_FREE(subreq);
1673 0 : if (tevent_req_nterror(req, status)) {
1674 0 : return;
1675 : }
1676 :
1677 0 : tevent_req_done(req);
1678 : }
1679 :
1680 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQPurgeSelf_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1681 : {
1682 0 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_r_state *state =
1683 0 : tevent_req_data(req,
1684 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_r_state);
1685 0 : NTSTATUS status;
1686 :
1687 0 : if (tevent_req_is_nterror(req, &status)) {
1688 0 : tevent_req_received(req);
1689 0 : return status;
1690 : }
1691 :
1692 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1693 :
1694 0 : tevent_req_received(req);
1695 0 : return NT_STATUS_OK;
1696 : }
1697 :
1698 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQPurgeSelf_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetCharDevQPurgeSelf *r)
1699 : {
1700 0 : NTSTATUS status;
1701 :
1702 0 : status = dcerpc_binding_handle_call(h,
1703 : NULL, &ndr_table_srvsvc,
1704 : NDR_SRVSVC_NETCHARDEVQPURGESELF, mem_ctx, r);
1705 :
1706 0 : return status;
1707 : }
1708 :
1709 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_state {
1710 : struct srvsvc_NetCharDevQPurgeSelf orig;
1711 : struct srvsvc_NetCharDevQPurgeSelf tmp;
1712 : TALLOC_CTX *out_mem_ctx;
1713 : };
1714 :
1715 : static void dcerpc_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req *subreq);
1716 :
1717 0 : struct tevent_req *dcerpc_srvsvc_NetCharDevQPurgeSelf_send(TALLOC_CTX *mem_ctx,
1718 : struct tevent_context *ev,
1719 : struct dcerpc_binding_handle *h,
1720 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1721 : const char *_queue_name /* [in] [charset(UTF16)] */,
1722 : const char *_computer_name /* [in] [charset(UTF16)] */)
1723 : {
1724 0 : struct tevent_req *req;
1725 0 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_state *state;
1726 0 : struct tevent_req *subreq;
1727 :
1728 0 : req = tevent_req_create(mem_ctx, &state,
1729 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_state);
1730 0 : if (req == NULL) {
1731 0 : return NULL;
1732 : }
1733 0 : state->out_mem_ctx = NULL;
1734 :
1735 : /* In parameters */
1736 0 : state->orig.in.server_unc = _server_unc;
1737 0 : state->orig.in.queue_name = _queue_name;
1738 0 : state->orig.in.computer_name = _computer_name;
1739 :
1740 : /* Out parameters */
1741 :
1742 : /* Result */
1743 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1744 :
1745 : /* make a temporary copy, that we pass to the dispatch function */
1746 0 : state->tmp = state->orig;
1747 :
1748 0 : subreq = dcerpc_srvsvc_NetCharDevQPurgeSelf_r_send(state, ev, h, &state->tmp);
1749 0 : if (tevent_req_nomem(subreq, req)) {
1750 0 : return tevent_req_post(req, ev);
1751 : }
1752 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetCharDevQPurgeSelf_done, req);
1753 0 : return req;
1754 : }
1755 :
1756 0 : static void dcerpc_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req *subreq)
1757 : {
1758 0 : struct tevent_req *req = tevent_req_callback_data(
1759 : subreq, struct tevent_req);
1760 0 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_state *state = tevent_req_data(
1761 : req, struct dcerpc_srvsvc_NetCharDevQPurgeSelf_state);
1762 0 : NTSTATUS status;
1763 0 : TALLOC_CTX *mem_ctx;
1764 :
1765 0 : if (state->out_mem_ctx) {
1766 0 : mem_ctx = state->out_mem_ctx;
1767 : } else {
1768 0 : mem_ctx = state;
1769 : }
1770 :
1771 0 : status = dcerpc_srvsvc_NetCharDevQPurgeSelf_r_recv(subreq, mem_ctx);
1772 0 : TALLOC_FREE(subreq);
1773 0 : if (tevent_req_nterror(req, status)) {
1774 0 : return;
1775 : }
1776 :
1777 : /* Copy out parameters */
1778 :
1779 : /* Copy result */
1780 0 : state->orig.out.result = state->tmp.out.result;
1781 :
1782 : /* Reset temporary structure */
1783 0 : NDR_ZERO_STRUCT(state->tmp);
1784 :
1785 0 : tevent_req_done(req);
1786 : }
1787 :
1788 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQPurgeSelf_recv(struct tevent_req *req,
1789 : TALLOC_CTX *mem_ctx,
1790 : WERROR *result)
1791 : {
1792 0 : struct dcerpc_srvsvc_NetCharDevQPurgeSelf_state *state = tevent_req_data(
1793 : req, struct dcerpc_srvsvc_NetCharDevQPurgeSelf_state);
1794 0 : NTSTATUS status;
1795 :
1796 0 : if (tevent_req_is_nterror(req, &status)) {
1797 0 : tevent_req_received(req);
1798 0 : return status;
1799 : }
1800 :
1801 : /* Steal possible out parameters to the callers context */
1802 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1803 :
1804 : /* Return result */
1805 0 : *result = state->orig.out.result;
1806 :
1807 0 : tevent_req_received(req);
1808 0 : return NT_STATUS_OK;
1809 : }
1810 :
1811 0 : NTSTATUS dcerpc_srvsvc_NetCharDevQPurgeSelf(struct dcerpc_binding_handle *h,
1812 : TALLOC_CTX *mem_ctx,
1813 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1814 : const char *_queue_name /* [in] [charset(UTF16)] */,
1815 : const char *_computer_name /* [in] [charset(UTF16)] */,
1816 : WERROR *result)
1817 : {
1818 0 : struct srvsvc_NetCharDevQPurgeSelf r;
1819 0 : NTSTATUS status;
1820 :
1821 : /* In parameters */
1822 0 : r.in.server_unc = _server_unc;
1823 0 : r.in.queue_name = _queue_name;
1824 0 : r.in.computer_name = _computer_name;
1825 :
1826 : /* Out parameters */
1827 :
1828 : /* Result */
1829 0 : NDR_ZERO_STRUCT(r.out.result);
1830 :
1831 0 : status = dcerpc_srvsvc_NetCharDevQPurgeSelf_r(h, mem_ctx, &r);
1832 0 : if (!NT_STATUS_IS_OK(status)) {
1833 0 : return status;
1834 : }
1835 :
1836 : /* Return variables */
1837 :
1838 : /* Return result */
1839 0 : *result = r.out.result;
1840 :
1841 0 : return NT_STATUS_OK;
1842 : }
1843 :
1844 : struct dcerpc_srvsvc_NetConnEnum_r_state {
1845 : TALLOC_CTX *out_mem_ctx;
1846 : };
1847 :
1848 : static void dcerpc_srvsvc_NetConnEnum_r_done(struct tevent_req *subreq);
1849 :
1850 0 : struct tevent_req *dcerpc_srvsvc_NetConnEnum_r_send(TALLOC_CTX *mem_ctx,
1851 : struct tevent_context *ev,
1852 : struct dcerpc_binding_handle *h,
1853 : struct srvsvc_NetConnEnum *r)
1854 : {
1855 0 : struct tevent_req *req;
1856 0 : struct dcerpc_srvsvc_NetConnEnum_r_state *state;
1857 0 : struct tevent_req *subreq;
1858 :
1859 0 : req = tevent_req_create(mem_ctx, &state,
1860 : struct dcerpc_srvsvc_NetConnEnum_r_state);
1861 0 : if (req == NULL) {
1862 0 : return NULL;
1863 : }
1864 :
1865 0 : state->out_mem_ctx = talloc_new(state);
1866 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1867 0 : return tevent_req_post(req, ev);
1868 : }
1869 :
1870 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
1871 : NULL, &ndr_table_srvsvc,
1872 0 : NDR_SRVSVC_NETCONNENUM, state->out_mem_ctx, r);
1873 0 : if (tevent_req_nomem(subreq, req)) {
1874 0 : return tevent_req_post(req, ev);
1875 : }
1876 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetConnEnum_r_done, req);
1877 :
1878 0 : return req;
1879 : }
1880 :
1881 0 : static void dcerpc_srvsvc_NetConnEnum_r_done(struct tevent_req *subreq)
1882 : {
1883 0 : struct tevent_req *req =
1884 0 : tevent_req_callback_data(subreq,
1885 : struct tevent_req);
1886 0 : NTSTATUS status;
1887 :
1888 0 : status = dcerpc_binding_handle_call_recv(subreq);
1889 0 : TALLOC_FREE(subreq);
1890 0 : if (tevent_req_nterror(req, status)) {
1891 0 : return;
1892 : }
1893 :
1894 0 : tevent_req_done(req);
1895 : }
1896 :
1897 0 : NTSTATUS dcerpc_srvsvc_NetConnEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1898 : {
1899 0 : struct dcerpc_srvsvc_NetConnEnum_r_state *state =
1900 0 : tevent_req_data(req,
1901 : struct dcerpc_srvsvc_NetConnEnum_r_state);
1902 0 : NTSTATUS status;
1903 :
1904 0 : if (tevent_req_is_nterror(req, &status)) {
1905 0 : tevent_req_received(req);
1906 0 : return status;
1907 : }
1908 :
1909 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
1910 :
1911 0 : tevent_req_received(req);
1912 0 : return NT_STATUS_OK;
1913 : }
1914 :
1915 14 : NTSTATUS dcerpc_srvsvc_NetConnEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetConnEnum *r)
1916 : {
1917 0 : NTSTATUS status;
1918 :
1919 14 : status = dcerpc_binding_handle_call(h,
1920 : NULL, &ndr_table_srvsvc,
1921 : NDR_SRVSVC_NETCONNENUM, mem_ctx, r);
1922 :
1923 14 : return status;
1924 : }
1925 :
1926 : struct dcerpc_srvsvc_NetConnEnum_state {
1927 : struct srvsvc_NetConnEnum orig;
1928 : struct srvsvc_NetConnEnum tmp;
1929 : TALLOC_CTX *out_mem_ctx;
1930 : };
1931 :
1932 : static void dcerpc_srvsvc_NetConnEnum_done(struct tevent_req *subreq);
1933 :
1934 0 : struct tevent_req *dcerpc_srvsvc_NetConnEnum_send(TALLOC_CTX *mem_ctx,
1935 : struct tevent_context *ev,
1936 : struct dcerpc_binding_handle *h,
1937 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
1938 : const char *_path /* [in] [charset(UTF16),unique] */,
1939 : struct srvsvc_NetConnInfoCtr *_info_ctr /* [in,out] [ref] */,
1940 : uint32_t _max_buffer /* [in] */,
1941 : uint32_t *_totalentries /* [out] [ref] */,
1942 : uint32_t *_resume_handle /* [in,out] [unique] */)
1943 : {
1944 0 : struct tevent_req *req;
1945 0 : struct dcerpc_srvsvc_NetConnEnum_state *state;
1946 0 : struct tevent_req *subreq;
1947 :
1948 0 : req = tevent_req_create(mem_ctx, &state,
1949 : struct dcerpc_srvsvc_NetConnEnum_state);
1950 0 : if (req == NULL) {
1951 0 : return NULL;
1952 : }
1953 0 : state->out_mem_ctx = NULL;
1954 :
1955 : /* In parameters */
1956 0 : state->orig.in.server_unc = _server_unc;
1957 0 : state->orig.in.path = _path;
1958 0 : state->orig.in.info_ctr = _info_ctr;
1959 0 : state->orig.in.max_buffer = _max_buffer;
1960 0 : state->orig.in.resume_handle = _resume_handle;
1961 :
1962 : /* Out parameters */
1963 0 : state->orig.out.info_ctr = _info_ctr;
1964 0 : state->orig.out.totalentries = _totalentries;
1965 0 : state->orig.out.resume_handle = _resume_handle;
1966 :
1967 : /* Result */
1968 0 : NDR_ZERO_STRUCT(state->orig.out.result);
1969 :
1970 0 : state->out_mem_ctx = talloc_named_const(state, 0,
1971 : "dcerpc_srvsvc_NetConnEnum_out_memory");
1972 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
1973 0 : return tevent_req_post(req, ev);
1974 : }
1975 :
1976 : /* make a temporary copy, that we pass to the dispatch function */
1977 0 : state->tmp = state->orig;
1978 :
1979 0 : subreq = dcerpc_srvsvc_NetConnEnum_r_send(state, ev, h, &state->tmp);
1980 0 : if (tevent_req_nomem(subreq, req)) {
1981 0 : return tevent_req_post(req, ev);
1982 : }
1983 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetConnEnum_done, req);
1984 0 : return req;
1985 : }
1986 :
1987 0 : static void dcerpc_srvsvc_NetConnEnum_done(struct tevent_req *subreq)
1988 : {
1989 0 : struct tevent_req *req = tevent_req_callback_data(
1990 : subreq, struct tevent_req);
1991 0 : struct dcerpc_srvsvc_NetConnEnum_state *state = tevent_req_data(
1992 : req, struct dcerpc_srvsvc_NetConnEnum_state);
1993 0 : NTSTATUS status;
1994 0 : TALLOC_CTX *mem_ctx;
1995 :
1996 0 : if (state->out_mem_ctx) {
1997 0 : mem_ctx = state->out_mem_ctx;
1998 : } else {
1999 0 : mem_ctx = state;
2000 : }
2001 :
2002 0 : status = dcerpc_srvsvc_NetConnEnum_r_recv(subreq, mem_ctx);
2003 0 : TALLOC_FREE(subreq);
2004 0 : if (tevent_req_nterror(req, status)) {
2005 0 : return;
2006 : }
2007 :
2008 : /* Copy out parameters */
2009 0 : *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
2010 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
2011 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
2012 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
2013 : }
2014 :
2015 : /* Copy result */
2016 0 : state->orig.out.result = state->tmp.out.result;
2017 :
2018 : /* Reset temporary structure */
2019 0 : NDR_ZERO_STRUCT(state->tmp);
2020 :
2021 0 : tevent_req_done(req);
2022 : }
2023 :
2024 0 : NTSTATUS dcerpc_srvsvc_NetConnEnum_recv(struct tevent_req *req,
2025 : TALLOC_CTX *mem_ctx,
2026 : WERROR *result)
2027 : {
2028 0 : struct dcerpc_srvsvc_NetConnEnum_state *state = tevent_req_data(
2029 : req, struct dcerpc_srvsvc_NetConnEnum_state);
2030 0 : NTSTATUS status;
2031 :
2032 0 : if (tevent_req_is_nterror(req, &status)) {
2033 0 : tevent_req_received(req);
2034 0 : return status;
2035 : }
2036 :
2037 : /* Steal possible out parameters to the callers context */
2038 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2039 :
2040 : /* Return result */
2041 0 : *result = state->orig.out.result;
2042 :
2043 0 : tevent_req_received(req);
2044 0 : return NT_STATUS_OK;
2045 : }
2046 :
2047 0 : NTSTATUS dcerpc_srvsvc_NetConnEnum(struct dcerpc_binding_handle *h,
2048 : TALLOC_CTX *mem_ctx,
2049 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2050 : const char *_path /* [in] [charset(UTF16),unique] */,
2051 : struct srvsvc_NetConnInfoCtr *_info_ctr /* [in,out] [ref] */,
2052 : uint32_t _max_buffer /* [in] */,
2053 : uint32_t *_totalentries /* [out] [ref] */,
2054 : uint32_t *_resume_handle /* [in,out] [unique] */,
2055 : WERROR *result)
2056 : {
2057 0 : struct srvsvc_NetConnEnum r;
2058 0 : NTSTATUS status;
2059 :
2060 : /* In parameters */
2061 0 : r.in.server_unc = _server_unc;
2062 0 : r.in.path = _path;
2063 0 : r.in.info_ctr = _info_ctr;
2064 0 : r.in.max_buffer = _max_buffer;
2065 0 : r.in.resume_handle = _resume_handle;
2066 :
2067 : /* Out parameters */
2068 0 : r.out.info_ctr = _info_ctr;
2069 0 : r.out.totalentries = _totalentries;
2070 0 : r.out.resume_handle = _resume_handle;
2071 :
2072 : /* Result */
2073 0 : NDR_ZERO_STRUCT(r.out.result);
2074 :
2075 0 : status = dcerpc_srvsvc_NetConnEnum_r(h, mem_ctx, &r);
2076 0 : if (!NT_STATUS_IS_OK(status)) {
2077 0 : return status;
2078 : }
2079 :
2080 : /* Return variables */
2081 0 : *_info_ctr = *r.out.info_ctr;
2082 0 : *_totalentries = *r.out.totalentries;
2083 0 : if (_resume_handle && r.out.resume_handle) {
2084 0 : *_resume_handle = *r.out.resume_handle;
2085 : }
2086 :
2087 : /* Return result */
2088 0 : *result = r.out.result;
2089 :
2090 0 : return NT_STATUS_OK;
2091 : }
2092 :
2093 : struct dcerpc_srvsvc_NetFileEnum_r_state {
2094 : TALLOC_CTX *out_mem_ctx;
2095 : };
2096 :
2097 : static void dcerpc_srvsvc_NetFileEnum_r_done(struct tevent_req *subreq);
2098 :
2099 0 : struct tevent_req *dcerpc_srvsvc_NetFileEnum_r_send(TALLOC_CTX *mem_ctx,
2100 : struct tevent_context *ev,
2101 : struct dcerpc_binding_handle *h,
2102 : struct srvsvc_NetFileEnum *r)
2103 : {
2104 0 : struct tevent_req *req;
2105 0 : struct dcerpc_srvsvc_NetFileEnum_r_state *state;
2106 0 : struct tevent_req *subreq;
2107 :
2108 0 : req = tevent_req_create(mem_ctx, &state,
2109 : struct dcerpc_srvsvc_NetFileEnum_r_state);
2110 0 : if (req == NULL) {
2111 0 : return NULL;
2112 : }
2113 :
2114 0 : state->out_mem_ctx = talloc_new(state);
2115 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2116 0 : return tevent_req_post(req, ev);
2117 : }
2118 :
2119 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2120 : NULL, &ndr_table_srvsvc,
2121 0 : NDR_SRVSVC_NETFILEENUM, state->out_mem_ctx, r);
2122 0 : if (tevent_req_nomem(subreq, req)) {
2123 0 : return tevent_req_post(req, ev);
2124 : }
2125 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetFileEnum_r_done, req);
2126 :
2127 0 : return req;
2128 : }
2129 :
2130 0 : static void dcerpc_srvsvc_NetFileEnum_r_done(struct tevent_req *subreq)
2131 : {
2132 0 : struct tevent_req *req =
2133 0 : tevent_req_callback_data(subreq,
2134 : struct tevent_req);
2135 0 : NTSTATUS status;
2136 :
2137 0 : status = dcerpc_binding_handle_call_recv(subreq);
2138 0 : TALLOC_FREE(subreq);
2139 0 : if (tevent_req_nterror(req, status)) {
2140 0 : return;
2141 : }
2142 :
2143 0 : tevent_req_done(req);
2144 : }
2145 :
2146 0 : NTSTATUS dcerpc_srvsvc_NetFileEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2147 : {
2148 0 : struct dcerpc_srvsvc_NetFileEnum_r_state *state =
2149 0 : tevent_req_data(req,
2150 : struct dcerpc_srvsvc_NetFileEnum_r_state);
2151 0 : NTSTATUS status;
2152 :
2153 0 : if (tevent_req_is_nterror(req, &status)) {
2154 0 : tevent_req_received(req);
2155 0 : return status;
2156 : }
2157 :
2158 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2159 :
2160 0 : tevent_req_received(req);
2161 0 : return NT_STATUS_OK;
2162 : }
2163 :
2164 16 : NTSTATUS dcerpc_srvsvc_NetFileEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetFileEnum *r)
2165 : {
2166 0 : NTSTATUS status;
2167 :
2168 16 : status = dcerpc_binding_handle_call(h,
2169 : NULL, &ndr_table_srvsvc,
2170 : NDR_SRVSVC_NETFILEENUM, mem_ctx, r);
2171 :
2172 16 : return status;
2173 : }
2174 :
2175 : struct dcerpc_srvsvc_NetFileEnum_state {
2176 : struct srvsvc_NetFileEnum orig;
2177 : struct srvsvc_NetFileEnum tmp;
2178 : TALLOC_CTX *out_mem_ctx;
2179 : };
2180 :
2181 : static void dcerpc_srvsvc_NetFileEnum_done(struct tevent_req *subreq);
2182 :
2183 0 : struct tevent_req *dcerpc_srvsvc_NetFileEnum_send(TALLOC_CTX *mem_ctx,
2184 : struct tevent_context *ev,
2185 : struct dcerpc_binding_handle *h,
2186 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2187 : const char *_path /* [in] [charset(UTF16),unique] */,
2188 : const char *_user /* [in] [charset(UTF16),unique] */,
2189 : struct srvsvc_NetFileInfoCtr *_info_ctr /* [in,out] [ref] */,
2190 : uint32_t _max_buffer /* [in] */,
2191 : uint32_t *_totalentries /* [out] [ref] */,
2192 : uint32_t *_resume_handle /* [in,out] [unique] */)
2193 : {
2194 0 : struct tevent_req *req;
2195 0 : struct dcerpc_srvsvc_NetFileEnum_state *state;
2196 0 : struct tevent_req *subreq;
2197 :
2198 0 : req = tevent_req_create(mem_ctx, &state,
2199 : struct dcerpc_srvsvc_NetFileEnum_state);
2200 0 : if (req == NULL) {
2201 0 : return NULL;
2202 : }
2203 0 : state->out_mem_ctx = NULL;
2204 :
2205 : /* In parameters */
2206 0 : state->orig.in.server_unc = _server_unc;
2207 0 : state->orig.in.path = _path;
2208 0 : state->orig.in.user = _user;
2209 0 : state->orig.in.info_ctr = _info_ctr;
2210 0 : state->orig.in.max_buffer = _max_buffer;
2211 0 : state->orig.in.resume_handle = _resume_handle;
2212 :
2213 : /* Out parameters */
2214 0 : state->orig.out.info_ctr = _info_ctr;
2215 0 : state->orig.out.totalentries = _totalentries;
2216 0 : state->orig.out.resume_handle = _resume_handle;
2217 :
2218 : /* Result */
2219 0 : NDR_ZERO_STRUCT(state->orig.out.result);
2220 :
2221 0 : state->out_mem_ctx = talloc_named_const(state, 0,
2222 : "dcerpc_srvsvc_NetFileEnum_out_memory");
2223 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2224 0 : return tevent_req_post(req, ev);
2225 : }
2226 :
2227 : /* make a temporary copy, that we pass to the dispatch function */
2228 0 : state->tmp = state->orig;
2229 :
2230 0 : subreq = dcerpc_srvsvc_NetFileEnum_r_send(state, ev, h, &state->tmp);
2231 0 : if (tevent_req_nomem(subreq, req)) {
2232 0 : return tevent_req_post(req, ev);
2233 : }
2234 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetFileEnum_done, req);
2235 0 : return req;
2236 : }
2237 :
2238 0 : static void dcerpc_srvsvc_NetFileEnum_done(struct tevent_req *subreq)
2239 : {
2240 0 : struct tevent_req *req = tevent_req_callback_data(
2241 : subreq, struct tevent_req);
2242 0 : struct dcerpc_srvsvc_NetFileEnum_state *state = tevent_req_data(
2243 : req, struct dcerpc_srvsvc_NetFileEnum_state);
2244 0 : NTSTATUS status;
2245 0 : TALLOC_CTX *mem_ctx;
2246 :
2247 0 : if (state->out_mem_ctx) {
2248 0 : mem_ctx = state->out_mem_ctx;
2249 : } else {
2250 0 : mem_ctx = state;
2251 : }
2252 :
2253 0 : status = dcerpc_srvsvc_NetFileEnum_r_recv(subreq, mem_ctx);
2254 0 : TALLOC_FREE(subreq);
2255 0 : if (tevent_req_nterror(req, status)) {
2256 0 : return;
2257 : }
2258 :
2259 : /* Copy out parameters */
2260 0 : *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
2261 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
2262 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
2263 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
2264 : }
2265 :
2266 : /* Copy result */
2267 0 : state->orig.out.result = state->tmp.out.result;
2268 :
2269 : /* Reset temporary structure */
2270 0 : NDR_ZERO_STRUCT(state->tmp);
2271 :
2272 0 : tevent_req_done(req);
2273 : }
2274 :
2275 0 : NTSTATUS dcerpc_srvsvc_NetFileEnum_recv(struct tevent_req *req,
2276 : TALLOC_CTX *mem_ctx,
2277 : WERROR *result)
2278 : {
2279 0 : struct dcerpc_srvsvc_NetFileEnum_state *state = tevent_req_data(
2280 : req, struct dcerpc_srvsvc_NetFileEnum_state);
2281 0 : NTSTATUS status;
2282 :
2283 0 : if (tevent_req_is_nterror(req, &status)) {
2284 0 : tevent_req_received(req);
2285 0 : return status;
2286 : }
2287 :
2288 : /* Steal possible out parameters to the callers context */
2289 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2290 :
2291 : /* Return result */
2292 0 : *result = state->orig.out.result;
2293 :
2294 0 : tevent_req_received(req);
2295 0 : return NT_STATUS_OK;
2296 : }
2297 :
2298 2 : NTSTATUS dcerpc_srvsvc_NetFileEnum(struct dcerpc_binding_handle *h,
2299 : TALLOC_CTX *mem_ctx,
2300 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2301 : const char *_path /* [in] [charset(UTF16),unique] */,
2302 : const char *_user /* [in] [charset(UTF16),unique] */,
2303 : struct srvsvc_NetFileInfoCtr *_info_ctr /* [in,out] [ref] */,
2304 : uint32_t _max_buffer /* [in] */,
2305 : uint32_t *_totalentries /* [out] [ref] */,
2306 : uint32_t *_resume_handle /* [in,out] [unique] */,
2307 : WERROR *result)
2308 : {
2309 0 : struct srvsvc_NetFileEnum r;
2310 0 : NTSTATUS status;
2311 :
2312 : /* In parameters */
2313 2 : r.in.server_unc = _server_unc;
2314 2 : r.in.path = _path;
2315 2 : r.in.user = _user;
2316 2 : r.in.info_ctr = _info_ctr;
2317 2 : r.in.max_buffer = _max_buffer;
2318 2 : r.in.resume_handle = _resume_handle;
2319 :
2320 : /* Out parameters */
2321 2 : r.out.info_ctr = _info_ctr;
2322 2 : r.out.totalentries = _totalentries;
2323 2 : r.out.resume_handle = _resume_handle;
2324 :
2325 : /* Result */
2326 2 : NDR_ZERO_STRUCT(r.out.result);
2327 :
2328 2 : status = dcerpc_srvsvc_NetFileEnum_r(h, mem_ctx, &r);
2329 2 : if (!NT_STATUS_IS_OK(status)) {
2330 0 : return status;
2331 : }
2332 :
2333 : /* Return variables */
2334 2 : *_info_ctr = *r.out.info_ctr;
2335 2 : *_totalentries = *r.out.totalentries;
2336 2 : if (_resume_handle && r.out.resume_handle) {
2337 2 : *_resume_handle = *r.out.resume_handle;
2338 : }
2339 :
2340 : /* Return result */
2341 2 : *result = r.out.result;
2342 :
2343 2 : return NT_STATUS_OK;
2344 : }
2345 :
2346 : struct dcerpc_srvsvc_NetFileGetInfo_r_state {
2347 : TALLOC_CTX *out_mem_ctx;
2348 : };
2349 :
2350 : static void dcerpc_srvsvc_NetFileGetInfo_r_done(struct tevent_req *subreq);
2351 :
2352 0 : struct tevent_req *dcerpc_srvsvc_NetFileGetInfo_r_send(TALLOC_CTX *mem_ctx,
2353 : struct tevent_context *ev,
2354 : struct dcerpc_binding_handle *h,
2355 : struct srvsvc_NetFileGetInfo *r)
2356 : {
2357 0 : struct tevent_req *req;
2358 0 : struct dcerpc_srvsvc_NetFileGetInfo_r_state *state;
2359 0 : struct tevent_req *subreq;
2360 :
2361 0 : req = tevent_req_create(mem_ctx, &state,
2362 : struct dcerpc_srvsvc_NetFileGetInfo_r_state);
2363 0 : if (req == NULL) {
2364 0 : return NULL;
2365 : }
2366 :
2367 0 : state->out_mem_ctx = talloc_new(state);
2368 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2369 0 : return tevent_req_post(req, ev);
2370 : }
2371 :
2372 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2373 : NULL, &ndr_table_srvsvc,
2374 0 : NDR_SRVSVC_NETFILEGETINFO, state->out_mem_ctx, r);
2375 0 : if (tevent_req_nomem(subreq, req)) {
2376 0 : return tevent_req_post(req, ev);
2377 : }
2378 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetFileGetInfo_r_done, req);
2379 :
2380 0 : return req;
2381 : }
2382 :
2383 0 : static void dcerpc_srvsvc_NetFileGetInfo_r_done(struct tevent_req *subreq)
2384 : {
2385 0 : struct tevent_req *req =
2386 0 : tevent_req_callback_data(subreq,
2387 : struct tevent_req);
2388 0 : NTSTATUS status;
2389 :
2390 0 : status = dcerpc_binding_handle_call_recv(subreq);
2391 0 : TALLOC_FREE(subreq);
2392 0 : if (tevent_req_nterror(req, status)) {
2393 0 : return;
2394 : }
2395 :
2396 0 : tevent_req_done(req);
2397 : }
2398 :
2399 0 : NTSTATUS dcerpc_srvsvc_NetFileGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2400 : {
2401 0 : struct dcerpc_srvsvc_NetFileGetInfo_r_state *state =
2402 0 : tevent_req_data(req,
2403 : struct dcerpc_srvsvc_NetFileGetInfo_r_state);
2404 0 : NTSTATUS status;
2405 :
2406 0 : if (tevent_req_is_nterror(req, &status)) {
2407 0 : tevent_req_received(req);
2408 0 : return status;
2409 : }
2410 :
2411 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2412 :
2413 0 : tevent_req_received(req);
2414 0 : return NT_STATUS_OK;
2415 : }
2416 :
2417 0 : NTSTATUS dcerpc_srvsvc_NetFileGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetFileGetInfo *r)
2418 : {
2419 0 : NTSTATUS status;
2420 :
2421 0 : status = dcerpc_binding_handle_call(h,
2422 : NULL, &ndr_table_srvsvc,
2423 : NDR_SRVSVC_NETFILEGETINFO, mem_ctx, r);
2424 :
2425 0 : return status;
2426 : }
2427 :
2428 : struct dcerpc_srvsvc_NetFileGetInfo_state {
2429 : struct srvsvc_NetFileGetInfo orig;
2430 : struct srvsvc_NetFileGetInfo tmp;
2431 : TALLOC_CTX *out_mem_ctx;
2432 : };
2433 :
2434 : static void dcerpc_srvsvc_NetFileGetInfo_done(struct tevent_req *subreq);
2435 :
2436 0 : struct tevent_req *dcerpc_srvsvc_NetFileGetInfo_send(TALLOC_CTX *mem_ctx,
2437 : struct tevent_context *ev,
2438 : struct dcerpc_binding_handle *h,
2439 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2440 : uint32_t _fid /* [in] */,
2441 : uint32_t _level /* [in] */,
2442 : union srvsvc_NetFileInfo *_info /* [out] [ref,switch_is(level)] */)
2443 : {
2444 0 : struct tevent_req *req;
2445 0 : struct dcerpc_srvsvc_NetFileGetInfo_state *state;
2446 0 : struct tevent_req *subreq;
2447 :
2448 0 : req = tevent_req_create(mem_ctx, &state,
2449 : struct dcerpc_srvsvc_NetFileGetInfo_state);
2450 0 : if (req == NULL) {
2451 0 : return NULL;
2452 : }
2453 0 : state->out_mem_ctx = NULL;
2454 :
2455 : /* In parameters */
2456 0 : state->orig.in.server_unc = _server_unc;
2457 0 : state->orig.in.fid = _fid;
2458 0 : state->orig.in.level = _level;
2459 :
2460 : /* Out parameters */
2461 0 : state->orig.out.info = _info;
2462 :
2463 : /* Result */
2464 0 : NDR_ZERO_STRUCT(state->orig.out.result);
2465 :
2466 0 : state->out_mem_ctx = talloc_named_const(state, 0,
2467 : "dcerpc_srvsvc_NetFileGetInfo_out_memory");
2468 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2469 0 : return tevent_req_post(req, ev);
2470 : }
2471 :
2472 : /* make a temporary copy, that we pass to the dispatch function */
2473 0 : state->tmp = state->orig;
2474 :
2475 0 : subreq = dcerpc_srvsvc_NetFileGetInfo_r_send(state, ev, h, &state->tmp);
2476 0 : if (tevent_req_nomem(subreq, req)) {
2477 0 : return tevent_req_post(req, ev);
2478 : }
2479 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetFileGetInfo_done, req);
2480 0 : return req;
2481 : }
2482 :
2483 0 : static void dcerpc_srvsvc_NetFileGetInfo_done(struct tevent_req *subreq)
2484 : {
2485 0 : struct tevent_req *req = tevent_req_callback_data(
2486 : subreq, struct tevent_req);
2487 0 : struct dcerpc_srvsvc_NetFileGetInfo_state *state = tevent_req_data(
2488 : req, struct dcerpc_srvsvc_NetFileGetInfo_state);
2489 0 : NTSTATUS status;
2490 0 : TALLOC_CTX *mem_ctx;
2491 :
2492 0 : if (state->out_mem_ctx) {
2493 0 : mem_ctx = state->out_mem_ctx;
2494 : } else {
2495 0 : mem_ctx = state;
2496 : }
2497 :
2498 0 : status = dcerpc_srvsvc_NetFileGetInfo_r_recv(subreq, mem_ctx);
2499 0 : TALLOC_FREE(subreq);
2500 0 : if (tevent_req_nterror(req, status)) {
2501 0 : return;
2502 : }
2503 :
2504 : /* Copy out parameters */
2505 0 : *state->orig.out.info = *state->tmp.out.info;
2506 :
2507 : /* Copy result */
2508 0 : state->orig.out.result = state->tmp.out.result;
2509 :
2510 : /* Reset temporary structure */
2511 0 : NDR_ZERO_STRUCT(state->tmp);
2512 :
2513 0 : tevent_req_done(req);
2514 : }
2515 :
2516 0 : NTSTATUS dcerpc_srvsvc_NetFileGetInfo_recv(struct tevent_req *req,
2517 : TALLOC_CTX *mem_ctx,
2518 : WERROR *result)
2519 : {
2520 0 : struct dcerpc_srvsvc_NetFileGetInfo_state *state = tevent_req_data(
2521 : req, struct dcerpc_srvsvc_NetFileGetInfo_state);
2522 0 : NTSTATUS status;
2523 :
2524 0 : if (tevent_req_is_nterror(req, &status)) {
2525 0 : tevent_req_received(req);
2526 0 : return status;
2527 : }
2528 :
2529 : /* Steal possible out parameters to the callers context */
2530 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2531 :
2532 : /* Return result */
2533 0 : *result = state->orig.out.result;
2534 :
2535 0 : tevent_req_received(req);
2536 0 : return NT_STATUS_OK;
2537 : }
2538 :
2539 0 : NTSTATUS dcerpc_srvsvc_NetFileGetInfo(struct dcerpc_binding_handle *h,
2540 : TALLOC_CTX *mem_ctx,
2541 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2542 : uint32_t _fid /* [in] */,
2543 : uint32_t _level /* [in] */,
2544 : union srvsvc_NetFileInfo *_info /* [out] [ref,switch_is(level)] */,
2545 : WERROR *result)
2546 : {
2547 0 : struct srvsvc_NetFileGetInfo r;
2548 0 : NTSTATUS status;
2549 :
2550 : /* In parameters */
2551 0 : r.in.server_unc = _server_unc;
2552 0 : r.in.fid = _fid;
2553 0 : r.in.level = _level;
2554 :
2555 : /* Out parameters */
2556 0 : r.out.info = _info;
2557 :
2558 : /* Result */
2559 0 : NDR_ZERO_STRUCT(r.out.result);
2560 :
2561 0 : status = dcerpc_srvsvc_NetFileGetInfo_r(h, mem_ctx, &r);
2562 0 : if (!NT_STATUS_IS_OK(status)) {
2563 0 : return status;
2564 : }
2565 :
2566 : /* Return variables */
2567 0 : *_info = *r.out.info;
2568 :
2569 : /* Return result */
2570 0 : *result = r.out.result;
2571 :
2572 0 : return NT_STATUS_OK;
2573 : }
2574 :
2575 : struct dcerpc_srvsvc_NetFileClose_r_state {
2576 : TALLOC_CTX *out_mem_ctx;
2577 : };
2578 :
2579 : static void dcerpc_srvsvc_NetFileClose_r_done(struct tevent_req *subreq);
2580 :
2581 0 : struct tevent_req *dcerpc_srvsvc_NetFileClose_r_send(TALLOC_CTX *mem_ctx,
2582 : struct tevent_context *ev,
2583 : struct dcerpc_binding_handle *h,
2584 : struct srvsvc_NetFileClose *r)
2585 : {
2586 0 : struct tevent_req *req;
2587 0 : struct dcerpc_srvsvc_NetFileClose_r_state *state;
2588 0 : struct tevent_req *subreq;
2589 :
2590 0 : req = tevent_req_create(mem_ctx, &state,
2591 : struct dcerpc_srvsvc_NetFileClose_r_state);
2592 0 : if (req == NULL) {
2593 0 : return NULL;
2594 : }
2595 :
2596 0 : state->out_mem_ctx = NULL;
2597 :
2598 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2599 : NULL, &ndr_table_srvsvc,
2600 : NDR_SRVSVC_NETFILECLOSE, state, r);
2601 0 : if (tevent_req_nomem(subreq, req)) {
2602 0 : return tevent_req_post(req, ev);
2603 : }
2604 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetFileClose_r_done, req);
2605 :
2606 0 : return req;
2607 : }
2608 :
2609 0 : static void dcerpc_srvsvc_NetFileClose_r_done(struct tevent_req *subreq)
2610 : {
2611 0 : struct tevent_req *req =
2612 0 : tevent_req_callback_data(subreq,
2613 : struct tevent_req);
2614 0 : NTSTATUS status;
2615 :
2616 0 : status = dcerpc_binding_handle_call_recv(subreq);
2617 0 : TALLOC_FREE(subreq);
2618 0 : if (tevent_req_nterror(req, status)) {
2619 0 : return;
2620 : }
2621 :
2622 0 : tevent_req_done(req);
2623 : }
2624 :
2625 0 : NTSTATUS dcerpc_srvsvc_NetFileClose_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2626 : {
2627 0 : struct dcerpc_srvsvc_NetFileClose_r_state *state =
2628 0 : tevent_req_data(req,
2629 : struct dcerpc_srvsvc_NetFileClose_r_state);
2630 0 : NTSTATUS status;
2631 :
2632 0 : if (tevent_req_is_nterror(req, &status)) {
2633 0 : tevent_req_received(req);
2634 0 : return status;
2635 : }
2636 :
2637 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2638 :
2639 0 : tevent_req_received(req);
2640 0 : return NT_STATUS_OK;
2641 : }
2642 :
2643 0 : NTSTATUS dcerpc_srvsvc_NetFileClose_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetFileClose *r)
2644 : {
2645 0 : NTSTATUS status;
2646 :
2647 0 : status = dcerpc_binding_handle_call(h,
2648 : NULL, &ndr_table_srvsvc,
2649 : NDR_SRVSVC_NETFILECLOSE, mem_ctx, r);
2650 :
2651 0 : return status;
2652 : }
2653 :
2654 : struct dcerpc_srvsvc_NetFileClose_state {
2655 : struct srvsvc_NetFileClose orig;
2656 : struct srvsvc_NetFileClose tmp;
2657 : TALLOC_CTX *out_mem_ctx;
2658 : };
2659 :
2660 : static void dcerpc_srvsvc_NetFileClose_done(struct tevent_req *subreq);
2661 :
2662 0 : struct tevent_req *dcerpc_srvsvc_NetFileClose_send(TALLOC_CTX *mem_ctx,
2663 : struct tevent_context *ev,
2664 : struct dcerpc_binding_handle *h,
2665 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2666 : uint32_t _fid /* [in] */)
2667 : {
2668 0 : struct tevent_req *req;
2669 0 : struct dcerpc_srvsvc_NetFileClose_state *state;
2670 0 : struct tevent_req *subreq;
2671 :
2672 0 : req = tevent_req_create(mem_ctx, &state,
2673 : struct dcerpc_srvsvc_NetFileClose_state);
2674 0 : if (req == NULL) {
2675 0 : return NULL;
2676 : }
2677 0 : state->out_mem_ctx = NULL;
2678 :
2679 : /* In parameters */
2680 0 : state->orig.in.server_unc = _server_unc;
2681 0 : state->orig.in.fid = _fid;
2682 :
2683 : /* Out parameters */
2684 :
2685 : /* Result */
2686 0 : NDR_ZERO_STRUCT(state->orig.out.result);
2687 :
2688 : /* make a temporary copy, that we pass to the dispatch function */
2689 0 : state->tmp = state->orig;
2690 :
2691 0 : subreq = dcerpc_srvsvc_NetFileClose_r_send(state, ev, h, &state->tmp);
2692 0 : if (tevent_req_nomem(subreq, req)) {
2693 0 : return tevent_req_post(req, ev);
2694 : }
2695 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetFileClose_done, req);
2696 0 : return req;
2697 : }
2698 :
2699 0 : static void dcerpc_srvsvc_NetFileClose_done(struct tevent_req *subreq)
2700 : {
2701 0 : struct tevent_req *req = tevent_req_callback_data(
2702 : subreq, struct tevent_req);
2703 0 : struct dcerpc_srvsvc_NetFileClose_state *state = tevent_req_data(
2704 : req, struct dcerpc_srvsvc_NetFileClose_state);
2705 0 : NTSTATUS status;
2706 0 : TALLOC_CTX *mem_ctx;
2707 :
2708 0 : if (state->out_mem_ctx) {
2709 0 : mem_ctx = state->out_mem_ctx;
2710 : } else {
2711 0 : mem_ctx = state;
2712 : }
2713 :
2714 0 : status = dcerpc_srvsvc_NetFileClose_r_recv(subreq, mem_ctx);
2715 0 : TALLOC_FREE(subreq);
2716 0 : if (tevent_req_nterror(req, status)) {
2717 0 : return;
2718 : }
2719 :
2720 : /* Copy out parameters */
2721 :
2722 : /* Copy result */
2723 0 : state->orig.out.result = state->tmp.out.result;
2724 :
2725 : /* Reset temporary structure */
2726 0 : NDR_ZERO_STRUCT(state->tmp);
2727 :
2728 0 : tevent_req_done(req);
2729 : }
2730 :
2731 0 : NTSTATUS dcerpc_srvsvc_NetFileClose_recv(struct tevent_req *req,
2732 : TALLOC_CTX *mem_ctx,
2733 : WERROR *result)
2734 : {
2735 0 : struct dcerpc_srvsvc_NetFileClose_state *state = tevent_req_data(
2736 : req, struct dcerpc_srvsvc_NetFileClose_state);
2737 0 : NTSTATUS status;
2738 :
2739 0 : if (tevent_req_is_nterror(req, &status)) {
2740 0 : tevent_req_received(req);
2741 0 : return status;
2742 : }
2743 :
2744 : /* Steal possible out parameters to the callers context */
2745 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2746 :
2747 : /* Return result */
2748 0 : *result = state->orig.out.result;
2749 :
2750 0 : tevent_req_received(req);
2751 0 : return NT_STATUS_OK;
2752 : }
2753 :
2754 0 : NTSTATUS dcerpc_srvsvc_NetFileClose(struct dcerpc_binding_handle *h,
2755 : TALLOC_CTX *mem_ctx,
2756 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2757 : uint32_t _fid /* [in] */,
2758 : WERROR *result)
2759 : {
2760 0 : struct srvsvc_NetFileClose r;
2761 0 : NTSTATUS status;
2762 :
2763 : /* In parameters */
2764 0 : r.in.server_unc = _server_unc;
2765 0 : r.in.fid = _fid;
2766 :
2767 : /* Out parameters */
2768 :
2769 : /* Result */
2770 0 : NDR_ZERO_STRUCT(r.out.result);
2771 :
2772 0 : status = dcerpc_srvsvc_NetFileClose_r(h, mem_ctx, &r);
2773 0 : if (!NT_STATUS_IS_OK(status)) {
2774 0 : return status;
2775 : }
2776 :
2777 : /* Return variables */
2778 :
2779 : /* Return result */
2780 0 : *result = r.out.result;
2781 :
2782 0 : return NT_STATUS_OK;
2783 : }
2784 :
2785 : struct dcerpc_srvsvc_NetSessEnum_r_state {
2786 : TALLOC_CTX *out_mem_ctx;
2787 : };
2788 :
2789 : static void dcerpc_srvsvc_NetSessEnum_r_done(struct tevent_req *subreq);
2790 :
2791 0 : struct tevent_req *dcerpc_srvsvc_NetSessEnum_r_send(TALLOC_CTX *mem_ctx,
2792 : struct tevent_context *ev,
2793 : struct dcerpc_binding_handle *h,
2794 : struct srvsvc_NetSessEnum *r)
2795 : {
2796 0 : struct tevent_req *req;
2797 0 : struct dcerpc_srvsvc_NetSessEnum_r_state *state;
2798 0 : struct tevent_req *subreq;
2799 :
2800 0 : req = tevent_req_create(mem_ctx, &state,
2801 : struct dcerpc_srvsvc_NetSessEnum_r_state);
2802 0 : if (req == NULL) {
2803 0 : return NULL;
2804 : }
2805 :
2806 0 : state->out_mem_ctx = talloc_new(state);
2807 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2808 0 : return tevent_req_post(req, ev);
2809 : }
2810 :
2811 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
2812 : NULL, &ndr_table_srvsvc,
2813 0 : NDR_SRVSVC_NETSESSENUM, state->out_mem_ctx, r);
2814 0 : if (tevent_req_nomem(subreq, req)) {
2815 0 : return tevent_req_post(req, ev);
2816 : }
2817 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSessEnum_r_done, req);
2818 :
2819 0 : return req;
2820 : }
2821 :
2822 0 : static void dcerpc_srvsvc_NetSessEnum_r_done(struct tevent_req *subreq)
2823 : {
2824 0 : struct tevent_req *req =
2825 0 : tevent_req_callback_data(subreq,
2826 : struct tevent_req);
2827 0 : NTSTATUS status;
2828 :
2829 0 : status = dcerpc_binding_handle_call_recv(subreq);
2830 0 : TALLOC_FREE(subreq);
2831 0 : if (tevent_req_nterror(req, status)) {
2832 0 : return;
2833 : }
2834 :
2835 0 : tevent_req_done(req);
2836 : }
2837 :
2838 0 : NTSTATUS dcerpc_srvsvc_NetSessEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2839 : {
2840 0 : struct dcerpc_srvsvc_NetSessEnum_r_state *state =
2841 0 : tevent_req_data(req,
2842 : struct dcerpc_srvsvc_NetSessEnum_r_state);
2843 0 : NTSTATUS status;
2844 :
2845 0 : if (tevent_req_is_nterror(req, &status)) {
2846 0 : tevent_req_received(req);
2847 0 : return status;
2848 : }
2849 :
2850 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2851 :
2852 0 : tevent_req_received(req);
2853 0 : return NT_STATUS_OK;
2854 : }
2855 :
2856 49 : NTSTATUS dcerpc_srvsvc_NetSessEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetSessEnum *r)
2857 : {
2858 0 : NTSTATUS status;
2859 :
2860 49 : status = dcerpc_binding_handle_call(h,
2861 : NULL, &ndr_table_srvsvc,
2862 : NDR_SRVSVC_NETSESSENUM, mem_ctx, r);
2863 :
2864 49 : return status;
2865 : }
2866 :
2867 : struct dcerpc_srvsvc_NetSessEnum_state {
2868 : struct srvsvc_NetSessEnum orig;
2869 : struct srvsvc_NetSessEnum tmp;
2870 : TALLOC_CTX *out_mem_ctx;
2871 : };
2872 :
2873 : static void dcerpc_srvsvc_NetSessEnum_done(struct tevent_req *subreq);
2874 :
2875 0 : struct tevent_req *dcerpc_srvsvc_NetSessEnum_send(TALLOC_CTX *mem_ctx,
2876 : struct tevent_context *ev,
2877 : struct dcerpc_binding_handle *h,
2878 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2879 : const char *_client /* [in] [charset(UTF16),unique] */,
2880 : const char *_user /* [in] [charset(UTF16),unique] */,
2881 : struct srvsvc_NetSessInfoCtr *_info_ctr /* [in,out] [ref] */,
2882 : uint32_t _max_buffer /* [in] */,
2883 : uint32_t *_totalentries /* [out] [ref] */,
2884 : uint32_t *_resume_handle /* [in,out] [unique] */)
2885 : {
2886 0 : struct tevent_req *req;
2887 0 : struct dcerpc_srvsvc_NetSessEnum_state *state;
2888 0 : struct tevent_req *subreq;
2889 :
2890 0 : req = tevent_req_create(mem_ctx, &state,
2891 : struct dcerpc_srvsvc_NetSessEnum_state);
2892 0 : if (req == NULL) {
2893 0 : return NULL;
2894 : }
2895 0 : state->out_mem_ctx = NULL;
2896 :
2897 : /* In parameters */
2898 0 : state->orig.in.server_unc = _server_unc;
2899 0 : state->orig.in.client = _client;
2900 0 : state->orig.in.user = _user;
2901 0 : state->orig.in.info_ctr = _info_ctr;
2902 0 : state->orig.in.max_buffer = _max_buffer;
2903 0 : state->orig.in.resume_handle = _resume_handle;
2904 :
2905 : /* Out parameters */
2906 0 : state->orig.out.info_ctr = _info_ctr;
2907 0 : state->orig.out.totalentries = _totalentries;
2908 0 : state->orig.out.resume_handle = _resume_handle;
2909 :
2910 : /* Result */
2911 0 : NDR_ZERO_STRUCT(state->orig.out.result);
2912 :
2913 0 : state->out_mem_ctx = talloc_named_const(state, 0,
2914 : "dcerpc_srvsvc_NetSessEnum_out_memory");
2915 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
2916 0 : return tevent_req_post(req, ev);
2917 : }
2918 :
2919 : /* make a temporary copy, that we pass to the dispatch function */
2920 0 : state->tmp = state->orig;
2921 :
2922 0 : subreq = dcerpc_srvsvc_NetSessEnum_r_send(state, ev, h, &state->tmp);
2923 0 : if (tevent_req_nomem(subreq, req)) {
2924 0 : return tevent_req_post(req, ev);
2925 : }
2926 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSessEnum_done, req);
2927 0 : return req;
2928 : }
2929 :
2930 0 : static void dcerpc_srvsvc_NetSessEnum_done(struct tevent_req *subreq)
2931 : {
2932 0 : struct tevent_req *req = tevent_req_callback_data(
2933 : subreq, struct tevent_req);
2934 0 : struct dcerpc_srvsvc_NetSessEnum_state *state = tevent_req_data(
2935 : req, struct dcerpc_srvsvc_NetSessEnum_state);
2936 0 : NTSTATUS status;
2937 0 : TALLOC_CTX *mem_ctx;
2938 :
2939 0 : if (state->out_mem_ctx) {
2940 0 : mem_ctx = state->out_mem_ctx;
2941 : } else {
2942 0 : mem_ctx = state;
2943 : }
2944 :
2945 0 : status = dcerpc_srvsvc_NetSessEnum_r_recv(subreq, mem_ctx);
2946 0 : TALLOC_FREE(subreq);
2947 0 : if (tevent_req_nterror(req, status)) {
2948 0 : return;
2949 : }
2950 :
2951 : /* Copy out parameters */
2952 0 : *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
2953 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
2954 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
2955 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
2956 : }
2957 :
2958 : /* Copy result */
2959 0 : state->orig.out.result = state->tmp.out.result;
2960 :
2961 : /* Reset temporary structure */
2962 0 : NDR_ZERO_STRUCT(state->tmp);
2963 :
2964 0 : tevent_req_done(req);
2965 : }
2966 :
2967 0 : NTSTATUS dcerpc_srvsvc_NetSessEnum_recv(struct tevent_req *req,
2968 : TALLOC_CTX *mem_ctx,
2969 : WERROR *result)
2970 : {
2971 0 : struct dcerpc_srvsvc_NetSessEnum_state *state = tevent_req_data(
2972 : req, struct dcerpc_srvsvc_NetSessEnum_state);
2973 0 : NTSTATUS status;
2974 :
2975 0 : if (tevent_req_is_nterror(req, &status)) {
2976 0 : tevent_req_received(req);
2977 0 : return status;
2978 : }
2979 :
2980 : /* Steal possible out parameters to the callers context */
2981 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
2982 :
2983 : /* Return result */
2984 0 : *result = state->orig.out.result;
2985 :
2986 0 : tevent_req_received(req);
2987 0 : return NT_STATUS_OK;
2988 : }
2989 :
2990 14 : NTSTATUS dcerpc_srvsvc_NetSessEnum(struct dcerpc_binding_handle *h,
2991 : TALLOC_CTX *mem_ctx,
2992 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
2993 : const char *_client /* [in] [charset(UTF16),unique] */,
2994 : const char *_user /* [in] [charset(UTF16),unique] */,
2995 : struct srvsvc_NetSessInfoCtr *_info_ctr /* [in,out] [ref] */,
2996 : uint32_t _max_buffer /* [in] */,
2997 : uint32_t *_totalentries /* [out] [ref] */,
2998 : uint32_t *_resume_handle /* [in,out] [unique] */,
2999 : WERROR *result)
3000 : {
3001 0 : struct srvsvc_NetSessEnum r;
3002 0 : NTSTATUS status;
3003 :
3004 : /* In parameters */
3005 14 : r.in.server_unc = _server_unc;
3006 14 : r.in.client = _client;
3007 14 : r.in.user = _user;
3008 14 : r.in.info_ctr = _info_ctr;
3009 14 : r.in.max_buffer = _max_buffer;
3010 14 : r.in.resume_handle = _resume_handle;
3011 :
3012 : /* Out parameters */
3013 14 : r.out.info_ctr = _info_ctr;
3014 14 : r.out.totalentries = _totalentries;
3015 14 : r.out.resume_handle = _resume_handle;
3016 :
3017 : /* Result */
3018 14 : NDR_ZERO_STRUCT(r.out.result);
3019 :
3020 14 : status = dcerpc_srvsvc_NetSessEnum_r(h, mem_ctx, &r);
3021 14 : if (!NT_STATUS_IS_OK(status)) {
3022 0 : return status;
3023 : }
3024 :
3025 : /* Return variables */
3026 14 : *_info_ctr = *r.out.info_ctr;
3027 14 : *_totalentries = *r.out.totalentries;
3028 14 : if (_resume_handle && r.out.resume_handle) {
3029 8 : *_resume_handle = *r.out.resume_handle;
3030 : }
3031 :
3032 : /* Return result */
3033 14 : *result = r.out.result;
3034 :
3035 14 : return NT_STATUS_OK;
3036 : }
3037 :
3038 : struct dcerpc_srvsvc_NetSessDel_r_state {
3039 : TALLOC_CTX *out_mem_ctx;
3040 : };
3041 :
3042 : static void dcerpc_srvsvc_NetSessDel_r_done(struct tevent_req *subreq);
3043 :
3044 0 : struct tevent_req *dcerpc_srvsvc_NetSessDel_r_send(TALLOC_CTX *mem_ctx,
3045 : struct tevent_context *ev,
3046 : struct dcerpc_binding_handle *h,
3047 : struct srvsvc_NetSessDel *r)
3048 : {
3049 0 : struct tevent_req *req;
3050 0 : struct dcerpc_srvsvc_NetSessDel_r_state *state;
3051 0 : struct tevent_req *subreq;
3052 :
3053 0 : req = tevent_req_create(mem_ctx, &state,
3054 : struct dcerpc_srvsvc_NetSessDel_r_state);
3055 0 : if (req == NULL) {
3056 0 : return NULL;
3057 : }
3058 :
3059 0 : state->out_mem_ctx = NULL;
3060 :
3061 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3062 : NULL, &ndr_table_srvsvc,
3063 : NDR_SRVSVC_NETSESSDEL, state, r);
3064 0 : if (tevent_req_nomem(subreq, req)) {
3065 0 : return tevent_req_post(req, ev);
3066 : }
3067 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSessDel_r_done, req);
3068 :
3069 0 : return req;
3070 : }
3071 :
3072 0 : static void dcerpc_srvsvc_NetSessDel_r_done(struct tevent_req *subreq)
3073 : {
3074 0 : struct tevent_req *req =
3075 0 : tevent_req_callback_data(subreq,
3076 : struct tevent_req);
3077 0 : NTSTATUS status;
3078 :
3079 0 : status = dcerpc_binding_handle_call_recv(subreq);
3080 0 : TALLOC_FREE(subreq);
3081 0 : if (tevent_req_nterror(req, status)) {
3082 0 : return;
3083 : }
3084 :
3085 0 : tevent_req_done(req);
3086 : }
3087 :
3088 0 : NTSTATUS dcerpc_srvsvc_NetSessDel_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3089 : {
3090 0 : struct dcerpc_srvsvc_NetSessDel_r_state *state =
3091 0 : tevent_req_data(req,
3092 : struct dcerpc_srvsvc_NetSessDel_r_state);
3093 0 : NTSTATUS status;
3094 :
3095 0 : if (tevent_req_is_nterror(req, &status)) {
3096 0 : tevent_req_received(req);
3097 0 : return status;
3098 : }
3099 :
3100 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3101 :
3102 0 : tevent_req_received(req);
3103 0 : return NT_STATUS_OK;
3104 : }
3105 :
3106 0 : NTSTATUS dcerpc_srvsvc_NetSessDel_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetSessDel *r)
3107 : {
3108 0 : NTSTATUS status;
3109 :
3110 0 : status = dcerpc_binding_handle_call(h,
3111 : NULL, &ndr_table_srvsvc,
3112 : NDR_SRVSVC_NETSESSDEL, mem_ctx, r);
3113 :
3114 0 : return status;
3115 : }
3116 :
3117 : struct dcerpc_srvsvc_NetSessDel_state {
3118 : struct srvsvc_NetSessDel orig;
3119 : struct srvsvc_NetSessDel tmp;
3120 : TALLOC_CTX *out_mem_ctx;
3121 : };
3122 :
3123 : static void dcerpc_srvsvc_NetSessDel_done(struct tevent_req *subreq);
3124 :
3125 0 : struct tevent_req *dcerpc_srvsvc_NetSessDel_send(TALLOC_CTX *mem_ctx,
3126 : struct tevent_context *ev,
3127 : struct dcerpc_binding_handle *h,
3128 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
3129 : const char *_client /* [in] [charset(UTF16),unique] */,
3130 : const char *_user /* [in] [charset(UTF16),unique] */)
3131 : {
3132 0 : struct tevent_req *req;
3133 0 : struct dcerpc_srvsvc_NetSessDel_state *state;
3134 0 : struct tevent_req *subreq;
3135 :
3136 0 : req = tevent_req_create(mem_ctx, &state,
3137 : struct dcerpc_srvsvc_NetSessDel_state);
3138 0 : if (req == NULL) {
3139 0 : return NULL;
3140 : }
3141 0 : state->out_mem_ctx = NULL;
3142 :
3143 : /* In parameters */
3144 0 : state->orig.in.server_unc = _server_unc;
3145 0 : state->orig.in.client = _client;
3146 0 : state->orig.in.user = _user;
3147 :
3148 : /* Out parameters */
3149 :
3150 : /* Result */
3151 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3152 :
3153 : /* make a temporary copy, that we pass to the dispatch function */
3154 0 : state->tmp = state->orig;
3155 :
3156 0 : subreq = dcerpc_srvsvc_NetSessDel_r_send(state, ev, h, &state->tmp);
3157 0 : if (tevent_req_nomem(subreq, req)) {
3158 0 : return tevent_req_post(req, ev);
3159 : }
3160 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSessDel_done, req);
3161 0 : return req;
3162 : }
3163 :
3164 0 : static void dcerpc_srvsvc_NetSessDel_done(struct tevent_req *subreq)
3165 : {
3166 0 : struct tevent_req *req = tevent_req_callback_data(
3167 : subreq, struct tevent_req);
3168 0 : struct dcerpc_srvsvc_NetSessDel_state *state = tevent_req_data(
3169 : req, struct dcerpc_srvsvc_NetSessDel_state);
3170 0 : NTSTATUS status;
3171 0 : TALLOC_CTX *mem_ctx;
3172 :
3173 0 : if (state->out_mem_ctx) {
3174 0 : mem_ctx = state->out_mem_ctx;
3175 : } else {
3176 0 : mem_ctx = state;
3177 : }
3178 :
3179 0 : status = dcerpc_srvsvc_NetSessDel_r_recv(subreq, mem_ctx);
3180 0 : TALLOC_FREE(subreq);
3181 0 : if (tevent_req_nterror(req, status)) {
3182 0 : return;
3183 : }
3184 :
3185 : /* Copy out parameters */
3186 :
3187 : /* Copy result */
3188 0 : state->orig.out.result = state->tmp.out.result;
3189 :
3190 : /* Reset temporary structure */
3191 0 : NDR_ZERO_STRUCT(state->tmp);
3192 :
3193 0 : tevent_req_done(req);
3194 : }
3195 :
3196 0 : NTSTATUS dcerpc_srvsvc_NetSessDel_recv(struct tevent_req *req,
3197 : TALLOC_CTX *mem_ctx,
3198 : WERROR *result)
3199 : {
3200 0 : struct dcerpc_srvsvc_NetSessDel_state *state = tevent_req_data(
3201 : req, struct dcerpc_srvsvc_NetSessDel_state);
3202 0 : NTSTATUS status;
3203 :
3204 0 : if (tevent_req_is_nterror(req, &status)) {
3205 0 : tevent_req_received(req);
3206 0 : return status;
3207 : }
3208 :
3209 : /* Steal possible out parameters to the callers context */
3210 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3211 :
3212 : /* Return result */
3213 0 : *result = state->orig.out.result;
3214 :
3215 0 : tevent_req_received(req);
3216 0 : return NT_STATUS_OK;
3217 : }
3218 :
3219 0 : NTSTATUS dcerpc_srvsvc_NetSessDel(struct dcerpc_binding_handle *h,
3220 : TALLOC_CTX *mem_ctx,
3221 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
3222 : const char *_client /* [in] [charset(UTF16),unique] */,
3223 : const char *_user /* [in] [charset(UTF16),unique] */,
3224 : WERROR *result)
3225 : {
3226 0 : struct srvsvc_NetSessDel r;
3227 0 : NTSTATUS status;
3228 :
3229 : /* In parameters */
3230 0 : r.in.server_unc = _server_unc;
3231 0 : r.in.client = _client;
3232 0 : r.in.user = _user;
3233 :
3234 : /* Out parameters */
3235 :
3236 : /* Result */
3237 0 : NDR_ZERO_STRUCT(r.out.result);
3238 :
3239 0 : status = dcerpc_srvsvc_NetSessDel_r(h, mem_ctx, &r);
3240 0 : if (!NT_STATUS_IS_OK(status)) {
3241 0 : return status;
3242 : }
3243 :
3244 : /* Return variables */
3245 :
3246 : /* Return result */
3247 0 : *result = r.out.result;
3248 :
3249 0 : return NT_STATUS_OK;
3250 : }
3251 :
3252 : struct dcerpc_srvsvc_NetShareAdd_r_state {
3253 : TALLOC_CTX *out_mem_ctx;
3254 : };
3255 :
3256 : static void dcerpc_srvsvc_NetShareAdd_r_done(struct tevent_req *subreq);
3257 :
3258 0 : struct tevent_req *dcerpc_srvsvc_NetShareAdd_r_send(TALLOC_CTX *mem_ctx,
3259 : struct tevent_context *ev,
3260 : struct dcerpc_binding_handle *h,
3261 : struct srvsvc_NetShareAdd *r)
3262 : {
3263 0 : struct tevent_req *req;
3264 0 : struct dcerpc_srvsvc_NetShareAdd_r_state *state;
3265 0 : struct tevent_req *subreq;
3266 :
3267 0 : req = tevent_req_create(mem_ctx, &state,
3268 : struct dcerpc_srvsvc_NetShareAdd_r_state);
3269 0 : if (req == NULL) {
3270 0 : return NULL;
3271 : }
3272 :
3273 0 : state->out_mem_ctx = talloc_new(state);
3274 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3275 0 : return tevent_req_post(req, ev);
3276 : }
3277 :
3278 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3279 : NULL, &ndr_table_srvsvc,
3280 0 : NDR_SRVSVC_NETSHAREADD, state->out_mem_ctx, r);
3281 0 : if (tevent_req_nomem(subreq, req)) {
3282 0 : return tevent_req_post(req, ev);
3283 : }
3284 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareAdd_r_done, req);
3285 :
3286 0 : return req;
3287 : }
3288 :
3289 0 : static void dcerpc_srvsvc_NetShareAdd_r_done(struct tevent_req *subreq)
3290 : {
3291 0 : struct tevent_req *req =
3292 0 : tevent_req_callback_data(subreq,
3293 : struct tevent_req);
3294 0 : NTSTATUS status;
3295 :
3296 0 : status = dcerpc_binding_handle_call_recv(subreq);
3297 0 : TALLOC_FREE(subreq);
3298 0 : if (tevent_req_nterror(req, status)) {
3299 0 : return;
3300 : }
3301 :
3302 0 : tevent_req_done(req);
3303 : }
3304 :
3305 0 : NTSTATUS dcerpc_srvsvc_NetShareAdd_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3306 : {
3307 0 : struct dcerpc_srvsvc_NetShareAdd_r_state *state =
3308 0 : tevent_req_data(req,
3309 : struct dcerpc_srvsvc_NetShareAdd_r_state);
3310 0 : NTSTATUS status;
3311 :
3312 0 : if (tevent_req_is_nterror(req, &status)) {
3313 0 : tevent_req_received(req);
3314 0 : return status;
3315 : }
3316 :
3317 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3318 :
3319 0 : tevent_req_received(req);
3320 0 : return NT_STATUS_OK;
3321 : }
3322 :
3323 4 : NTSTATUS dcerpc_srvsvc_NetShareAdd_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareAdd *r)
3324 : {
3325 0 : NTSTATUS status;
3326 :
3327 4 : status = dcerpc_binding_handle_call(h,
3328 : NULL, &ndr_table_srvsvc,
3329 : NDR_SRVSVC_NETSHAREADD, mem_ctx, r);
3330 :
3331 4 : return status;
3332 : }
3333 :
3334 : struct dcerpc_srvsvc_NetShareAdd_state {
3335 : struct srvsvc_NetShareAdd orig;
3336 : struct srvsvc_NetShareAdd tmp;
3337 : TALLOC_CTX *out_mem_ctx;
3338 : };
3339 :
3340 : static void dcerpc_srvsvc_NetShareAdd_done(struct tevent_req *subreq);
3341 :
3342 0 : struct tevent_req *dcerpc_srvsvc_NetShareAdd_send(TALLOC_CTX *mem_ctx,
3343 : struct tevent_context *ev,
3344 : struct dcerpc_binding_handle *h,
3345 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
3346 : uint32_t _level /* [in] */,
3347 : union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */,
3348 : uint32_t *_parm_error /* [in,out] [unique] */)
3349 : {
3350 0 : struct tevent_req *req;
3351 0 : struct dcerpc_srvsvc_NetShareAdd_state *state;
3352 0 : struct tevent_req *subreq;
3353 :
3354 0 : req = tevent_req_create(mem_ctx, &state,
3355 : struct dcerpc_srvsvc_NetShareAdd_state);
3356 0 : if (req == NULL) {
3357 0 : return NULL;
3358 : }
3359 0 : state->out_mem_ctx = NULL;
3360 :
3361 : /* In parameters */
3362 0 : state->orig.in.server_unc = _server_unc;
3363 0 : state->orig.in.level = _level;
3364 0 : state->orig.in.info = _info;
3365 0 : state->orig.in.parm_error = _parm_error;
3366 :
3367 : /* Out parameters */
3368 0 : state->orig.out.parm_error = _parm_error;
3369 :
3370 : /* Result */
3371 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3372 :
3373 0 : state->out_mem_ctx = talloc_named_const(state, 0,
3374 : "dcerpc_srvsvc_NetShareAdd_out_memory");
3375 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3376 0 : return tevent_req_post(req, ev);
3377 : }
3378 :
3379 : /* make a temporary copy, that we pass to the dispatch function */
3380 0 : state->tmp = state->orig;
3381 :
3382 0 : subreq = dcerpc_srvsvc_NetShareAdd_r_send(state, ev, h, &state->tmp);
3383 0 : if (tevent_req_nomem(subreq, req)) {
3384 0 : return tevent_req_post(req, ev);
3385 : }
3386 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareAdd_done, req);
3387 0 : return req;
3388 : }
3389 :
3390 0 : static void dcerpc_srvsvc_NetShareAdd_done(struct tevent_req *subreq)
3391 : {
3392 0 : struct tevent_req *req = tevent_req_callback_data(
3393 : subreq, struct tevent_req);
3394 0 : struct dcerpc_srvsvc_NetShareAdd_state *state = tevent_req_data(
3395 : req, struct dcerpc_srvsvc_NetShareAdd_state);
3396 0 : NTSTATUS status;
3397 0 : TALLOC_CTX *mem_ctx;
3398 :
3399 0 : if (state->out_mem_ctx) {
3400 0 : mem_ctx = state->out_mem_ctx;
3401 : } else {
3402 0 : mem_ctx = state;
3403 : }
3404 :
3405 0 : status = dcerpc_srvsvc_NetShareAdd_r_recv(subreq, mem_ctx);
3406 0 : TALLOC_FREE(subreq);
3407 0 : if (tevent_req_nterror(req, status)) {
3408 0 : return;
3409 : }
3410 :
3411 : /* Copy out parameters */
3412 0 : if (state->orig.out.parm_error && state->tmp.out.parm_error) {
3413 0 : *state->orig.out.parm_error = *state->tmp.out.parm_error;
3414 : }
3415 :
3416 : /* Copy result */
3417 0 : state->orig.out.result = state->tmp.out.result;
3418 :
3419 : /* Reset temporary structure */
3420 0 : NDR_ZERO_STRUCT(state->tmp);
3421 :
3422 0 : tevent_req_done(req);
3423 : }
3424 :
3425 0 : NTSTATUS dcerpc_srvsvc_NetShareAdd_recv(struct tevent_req *req,
3426 : TALLOC_CTX *mem_ctx,
3427 : WERROR *result)
3428 : {
3429 0 : struct dcerpc_srvsvc_NetShareAdd_state *state = tevent_req_data(
3430 : req, struct dcerpc_srvsvc_NetShareAdd_state);
3431 0 : NTSTATUS status;
3432 :
3433 0 : if (tevent_req_is_nterror(req, &status)) {
3434 0 : tevent_req_received(req);
3435 0 : return status;
3436 : }
3437 :
3438 : /* Steal possible out parameters to the callers context */
3439 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3440 :
3441 : /* Return result */
3442 0 : *result = state->orig.out.result;
3443 :
3444 0 : tevent_req_received(req);
3445 0 : return NT_STATUS_OK;
3446 : }
3447 :
3448 3 : NTSTATUS dcerpc_srvsvc_NetShareAdd(struct dcerpc_binding_handle *h,
3449 : TALLOC_CTX *mem_ctx,
3450 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
3451 : uint32_t _level /* [in] */,
3452 : union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */,
3453 : uint32_t *_parm_error /* [in,out] [unique] */,
3454 : WERROR *result)
3455 : {
3456 0 : struct srvsvc_NetShareAdd r;
3457 0 : NTSTATUS status;
3458 :
3459 : /* In parameters */
3460 3 : r.in.server_unc = _server_unc;
3461 3 : r.in.level = _level;
3462 3 : r.in.info = _info;
3463 3 : r.in.parm_error = _parm_error;
3464 :
3465 : /* Out parameters */
3466 3 : r.out.parm_error = _parm_error;
3467 :
3468 : /* Result */
3469 3 : NDR_ZERO_STRUCT(r.out.result);
3470 :
3471 3 : status = dcerpc_srvsvc_NetShareAdd_r(h, mem_ctx, &r);
3472 3 : if (!NT_STATUS_IS_OK(status)) {
3473 0 : return status;
3474 : }
3475 :
3476 : /* Return variables */
3477 3 : if (_parm_error && r.out.parm_error) {
3478 3 : *_parm_error = *r.out.parm_error;
3479 : }
3480 :
3481 : /* Return result */
3482 3 : *result = r.out.result;
3483 :
3484 3 : return NT_STATUS_OK;
3485 : }
3486 :
3487 : struct dcerpc_srvsvc_NetShareEnumAll_r_state {
3488 : TALLOC_CTX *out_mem_ctx;
3489 : };
3490 :
3491 : static void dcerpc_srvsvc_NetShareEnumAll_r_done(struct tevent_req *subreq);
3492 :
3493 0 : struct tevent_req *dcerpc_srvsvc_NetShareEnumAll_r_send(TALLOC_CTX *mem_ctx,
3494 : struct tevent_context *ev,
3495 : struct dcerpc_binding_handle *h,
3496 : struct srvsvc_NetShareEnumAll *r)
3497 : {
3498 0 : struct tevent_req *req;
3499 0 : struct dcerpc_srvsvc_NetShareEnumAll_r_state *state;
3500 0 : struct tevent_req *subreq;
3501 :
3502 0 : req = tevent_req_create(mem_ctx, &state,
3503 : struct dcerpc_srvsvc_NetShareEnumAll_r_state);
3504 0 : if (req == NULL) {
3505 0 : return NULL;
3506 : }
3507 :
3508 0 : state->out_mem_ctx = talloc_new(state);
3509 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3510 0 : return tevent_req_post(req, ev);
3511 : }
3512 :
3513 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3514 : NULL, &ndr_table_srvsvc,
3515 0 : NDR_SRVSVC_NETSHAREENUMALL, state->out_mem_ctx, r);
3516 0 : if (tevent_req_nomem(subreq, req)) {
3517 0 : return tevent_req_post(req, ev);
3518 : }
3519 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareEnumAll_r_done, req);
3520 :
3521 0 : return req;
3522 : }
3523 :
3524 0 : static void dcerpc_srvsvc_NetShareEnumAll_r_done(struct tevent_req *subreq)
3525 : {
3526 0 : struct tevent_req *req =
3527 0 : tevent_req_callback_data(subreq,
3528 : struct tevent_req);
3529 0 : NTSTATUS status;
3530 :
3531 0 : status = dcerpc_binding_handle_call_recv(subreq);
3532 0 : TALLOC_FREE(subreq);
3533 0 : if (tevent_req_nterror(req, status)) {
3534 0 : return;
3535 : }
3536 :
3537 0 : tevent_req_done(req);
3538 : }
3539 :
3540 0 : NTSTATUS dcerpc_srvsvc_NetShareEnumAll_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3541 : {
3542 0 : struct dcerpc_srvsvc_NetShareEnumAll_r_state *state =
3543 0 : tevent_req_data(req,
3544 : struct dcerpc_srvsvc_NetShareEnumAll_r_state);
3545 0 : NTSTATUS status;
3546 :
3547 0 : if (tevent_req_is_nterror(req, &status)) {
3548 0 : tevent_req_received(req);
3549 0 : return status;
3550 : }
3551 :
3552 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3553 :
3554 0 : tevent_req_received(req);
3555 0 : return NT_STATUS_OK;
3556 : }
3557 :
3558 174 : NTSTATUS dcerpc_srvsvc_NetShareEnumAll_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareEnumAll *r)
3559 : {
3560 0 : NTSTATUS status;
3561 :
3562 174 : status = dcerpc_binding_handle_call(h,
3563 : NULL, &ndr_table_srvsvc,
3564 : NDR_SRVSVC_NETSHAREENUMALL, mem_ctx, r);
3565 :
3566 174 : return status;
3567 : }
3568 :
3569 : struct dcerpc_srvsvc_NetShareEnumAll_state {
3570 : struct srvsvc_NetShareEnumAll orig;
3571 : struct srvsvc_NetShareEnumAll tmp;
3572 : TALLOC_CTX *out_mem_ctx;
3573 : };
3574 :
3575 : static void dcerpc_srvsvc_NetShareEnumAll_done(struct tevent_req *subreq);
3576 :
3577 0 : struct tevent_req *dcerpc_srvsvc_NetShareEnumAll_send(TALLOC_CTX *mem_ctx,
3578 : struct tevent_context *ev,
3579 : struct dcerpc_binding_handle *h,
3580 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
3581 : struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */,
3582 : uint32_t _max_buffer /* [in] */,
3583 : uint32_t *_totalentries /* [out] [ref] */,
3584 : uint32_t *_resume_handle /* [in,out] [unique] */)
3585 : {
3586 0 : struct tevent_req *req;
3587 0 : struct dcerpc_srvsvc_NetShareEnumAll_state *state;
3588 0 : struct tevent_req *subreq;
3589 :
3590 0 : req = tevent_req_create(mem_ctx, &state,
3591 : struct dcerpc_srvsvc_NetShareEnumAll_state);
3592 0 : if (req == NULL) {
3593 0 : return NULL;
3594 : }
3595 0 : state->out_mem_ctx = NULL;
3596 :
3597 : /* In parameters */
3598 0 : state->orig.in.server_unc = _server_unc;
3599 0 : state->orig.in.info_ctr = _info_ctr;
3600 0 : state->orig.in.max_buffer = _max_buffer;
3601 0 : state->orig.in.resume_handle = _resume_handle;
3602 :
3603 : /* Out parameters */
3604 0 : state->orig.out.info_ctr = _info_ctr;
3605 0 : state->orig.out.totalentries = _totalentries;
3606 0 : state->orig.out.resume_handle = _resume_handle;
3607 :
3608 : /* Result */
3609 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3610 :
3611 0 : state->out_mem_ctx = talloc_named_const(state, 0,
3612 : "dcerpc_srvsvc_NetShareEnumAll_out_memory");
3613 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3614 0 : return tevent_req_post(req, ev);
3615 : }
3616 :
3617 : /* make a temporary copy, that we pass to the dispatch function */
3618 0 : state->tmp = state->orig;
3619 :
3620 0 : subreq = dcerpc_srvsvc_NetShareEnumAll_r_send(state, ev, h, &state->tmp);
3621 0 : if (tevent_req_nomem(subreq, req)) {
3622 0 : return tevent_req_post(req, ev);
3623 : }
3624 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareEnumAll_done, req);
3625 0 : return req;
3626 : }
3627 :
3628 0 : static void dcerpc_srvsvc_NetShareEnumAll_done(struct tevent_req *subreq)
3629 : {
3630 0 : struct tevent_req *req = tevent_req_callback_data(
3631 : subreq, struct tevent_req);
3632 0 : struct dcerpc_srvsvc_NetShareEnumAll_state *state = tevent_req_data(
3633 : req, struct dcerpc_srvsvc_NetShareEnumAll_state);
3634 0 : NTSTATUS status;
3635 0 : TALLOC_CTX *mem_ctx;
3636 :
3637 0 : if (state->out_mem_ctx) {
3638 0 : mem_ctx = state->out_mem_ctx;
3639 : } else {
3640 0 : mem_ctx = state;
3641 : }
3642 :
3643 0 : status = dcerpc_srvsvc_NetShareEnumAll_r_recv(subreq, mem_ctx);
3644 0 : TALLOC_FREE(subreq);
3645 0 : if (tevent_req_nterror(req, status)) {
3646 0 : return;
3647 : }
3648 :
3649 : /* Copy out parameters */
3650 0 : *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
3651 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
3652 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
3653 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
3654 : }
3655 :
3656 : /* Copy result */
3657 0 : state->orig.out.result = state->tmp.out.result;
3658 :
3659 : /* Reset temporary structure */
3660 0 : NDR_ZERO_STRUCT(state->tmp);
3661 :
3662 0 : tevent_req_done(req);
3663 : }
3664 :
3665 0 : NTSTATUS dcerpc_srvsvc_NetShareEnumAll_recv(struct tevent_req *req,
3666 : TALLOC_CTX *mem_ctx,
3667 : WERROR *result)
3668 : {
3669 0 : struct dcerpc_srvsvc_NetShareEnumAll_state *state = tevent_req_data(
3670 : req, struct dcerpc_srvsvc_NetShareEnumAll_state);
3671 0 : NTSTATUS status;
3672 :
3673 0 : if (tevent_req_is_nterror(req, &status)) {
3674 0 : tevent_req_received(req);
3675 0 : return status;
3676 : }
3677 :
3678 : /* Steal possible out parameters to the callers context */
3679 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3680 :
3681 : /* Return result */
3682 0 : *result = state->orig.out.result;
3683 :
3684 0 : tevent_req_received(req);
3685 0 : return NT_STATUS_OK;
3686 : }
3687 :
3688 113 : NTSTATUS dcerpc_srvsvc_NetShareEnumAll(struct dcerpc_binding_handle *h,
3689 : TALLOC_CTX *mem_ctx,
3690 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
3691 : struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */,
3692 : uint32_t _max_buffer /* [in] */,
3693 : uint32_t *_totalentries /* [out] [ref] */,
3694 : uint32_t *_resume_handle /* [in,out] [unique] */,
3695 : WERROR *result)
3696 : {
3697 0 : struct srvsvc_NetShareEnumAll r;
3698 0 : NTSTATUS status;
3699 :
3700 : /* In parameters */
3701 113 : r.in.server_unc = _server_unc;
3702 113 : r.in.info_ctr = _info_ctr;
3703 113 : r.in.max_buffer = _max_buffer;
3704 113 : r.in.resume_handle = _resume_handle;
3705 :
3706 : /* Out parameters */
3707 113 : r.out.info_ctr = _info_ctr;
3708 113 : r.out.totalentries = _totalentries;
3709 113 : r.out.resume_handle = _resume_handle;
3710 :
3711 : /* Result */
3712 113 : NDR_ZERO_STRUCT(r.out.result);
3713 :
3714 113 : status = dcerpc_srvsvc_NetShareEnumAll_r(h, mem_ctx, &r);
3715 113 : if (!NT_STATUS_IS_OK(status)) {
3716 0 : return status;
3717 : }
3718 :
3719 : /* Return variables */
3720 113 : *_info_ctr = *r.out.info_ctr;
3721 113 : *_totalentries = *r.out.totalentries;
3722 113 : if (_resume_handle && r.out.resume_handle) {
3723 101 : *_resume_handle = *r.out.resume_handle;
3724 : }
3725 :
3726 : /* Return result */
3727 113 : *result = r.out.result;
3728 :
3729 113 : return NT_STATUS_OK;
3730 : }
3731 :
3732 : struct dcerpc_srvsvc_NetShareGetInfo_r_state {
3733 : TALLOC_CTX *out_mem_ctx;
3734 : };
3735 :
3736 : static void dcerpc_srvsvc_NetShareGetInfo_r_done(struct tevent_req *subreq);
3737 :
3738 0 : struct tevent_req *dcerpc_srvsvc_NetShareGetInfo_r_send(TALLOC_CTX *mem_ctx,
3739 : struct tevent_context *ev,
3740 : struct dcerpc_binding_handle *h,
3741 : struct srvsvc_NetShareGetInfo *r)
3742 : {
3743 0 : struct tevent_req *req;
3744 0 : struct dcerpc_srvsvc_NetShareGetInfo_r_state *state;
3745 0 : struct tevent_req *subreq;
3746 :
3747 0 : req = tevent_req_create(mem_ctx, &state,
3748 : struct dcerpc_srvsvc_NetShareGetInfo_r_state);
3749 0 : if (req == NULL) {
3750 0 : return NULL;
3751 : }
3752 :
3753 0 : state->out_mem_ctx = talloc_new(state);
3754 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3755 0 : return tevent_req_post(req, ev);
3756 : }
3757 :
3758 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3759 : NULL, &ndr_table_srvsvc,
3760 0 : NDR_SRVSVC_NETSHAREGETINFO, state->out_mem_ctx, r);
3761 0 : if (tevent_req_nomem(subreq, req)) {
3762 0 : return tevent_req_post(req, ev);
3763 : }
3764 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareGetInfo_r_done, req);
3765 :
3766 0 : return req;
3767 : }
3768 :
3769 0 : static void dcerpc_srvsvc_NetShareGetInfo_r_done(struct tevent_req *subreq)
3770 : {
3771 0 : struct tevent_req *req =
3772 0 : tevent_req_callback_data(subreq,
3773 : struct tevent_req);
3774 0 : NTSTATUS status;
3775 :
3776 0 : status = dcerpc_binding_handle_call_recv(subreq);
3777 0 : TALLOC_FREE(subreq);
3778 0 : if (tevent_req_nterror(req, status)) {
3779 0 : return;
3780 : }
3781 :
3782 0 : tevent_req_done(req);
3783 : }
3784 :
3785 0 : NTSTATUS dcerpc_srvsvc_NetShareGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3786 : {
3787 0 : struct dcerpc_srvsvc_NetShareGetInfo_r_state *state =
3788 0 : tevent_req_data(req,
3789 : struct dcerpc_srvsvc_NetShareGetInfo_r_state);
3790 0 : NTSTATUS status;
3791 :
3792 0 : if (tevent_req_is_nterror(req, &status)) {
3793 0 : tevent_req_received(req);
3794 0 : return status;
3795 : }
3796 :
3797 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3798 :
3799 0 : tevent_req_received(req);
3800 0 : return NT_STATUS_OK;
3801 : }
3802 :
3803 1590 : NTSTATUS dcerpc_srvsvc_NetShareGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareGetInfo *r)
3804 : {
3805 0 : NTSTATUS status;
3806 :
3807 1590 : status = dcerpc_binding_handle_call(h,
3808 : NULL, &ndr_table_srvsvc,
3809 : NDR_SRVSVC_NETSHAREGETINFO, mem_ctx, r);
3810 :
3811 1590 : return status;
3812 : }
3813 :
3814 : struct dcerpc_srvsvc_NetShareGetInfo_state {
3815 : struct srvsvc_NetShareGetInfo orig;
3816 : struct srvsvc_NetShareGetInfo tmp;
3817 : TALLOC_CTX *out_mem_ctx;
3818 : };
3819 :
3820 : static void dcerpc_srvsvc_NetShareGetInfo_done(struct tevent_req *subreq);
3821 :
3822 0 : struct tevent_req *dcerpc_srvsvc_NetShareGetInfo_send(TALLOC_CTX *mem_ctx,
3823 : struct tevent_context *ev,
3824 : struct dcerpc_binding_handle *h,
3825 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
3826 : const char *_share_name /* [in] [charset(UTF16)] */,
3827 : uint32_t _level /* [in] */,
3828 : union srvsvc_NetShareInfo *_info /* [out] [ref,switch_is(level)] */)
3829 : {
3830 0 : struct tevent_req *req;
3831 0 : struct dcerpc_srvsvc_NetShareGetInfo_state *state;
3832 0 : struct tevent_req *subreq;
3833 :
3834 0 : req = tevent_req_create(mem_ctx, &state,
3835 : struct dcerpc_srvsvc_NetShareGetInfo_state);
3836 0 : if (req == NULL) {
3837 0 : return NULL;
3838 : }
3839 0 : state->out_mem_ctx = NULL;
3840 :
3841 : /* In parameters */
3842 0 : state->orig.in.server_unc = _server_unc;
3843 0 : state->orig.in.share_name = _share_name;
3844 0 : state->orig.in.level = _level;
3845 :
3846 : /* Out parameters */
3847 0 : state->orig.out.info = _info;
3848 :
3849 : /* Result */
3850 0 : NDR_ZERO_STRUCT(state->orig.out.result);
3851 :
3852 0 : state->out_mem_ctx = talloc_named_const(state, 0,
3853 : "dcerpc_srvsvc_NetShareGetInfo_out_memory");
3854 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3855 0 : return tevent_req_post(req, ev);
3856 : }
3857 :
3858 : /* make a temporary copy, that we pass to the dispatch function */
3859 0 : state->tmp = state->orig;
3860 :
3861 0 : subreq = dcerpc_srvsvc_NetShareGetInfo_r_send(state, ev, h, &state->tmp);
3862 0 : if (tevent_req_nomem(subreq, req)) {
3863 0 : return tevent_req_post(req, ev);
3864 : }
3865 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareGetInfo_done, req);
3866 0 : return req;
3867 : }
3868 :
3869 0 : static void dcerpc_srvsvc_NetShareGetInfo_done(struct tevent_req *subreq)
3870 : {
3871 0 : struct tevent_req *req = tevent_req_callback_data(
3872 : subreq, struct tevent_req);
3873 0 : struct dcerpc_srvsvc_NetShareGetInfo_state *state = tevent_req_data(
3874 : req, struct dcerpc_srvsvc_NetShareGetInfo_state);
3875 0 : NTSTATUS status;
3876 0 : TALLOC_CTX *mem_ctx;
3877 :
3878 0 : if (state->out_mem_ctx) {
3879 0 : mem_ctx = state->out_mem_ctx;
3880 : } else {
3881 0 : mem_ctx = state;
3882 : }
3883 :
3884 0 : status = dcerpc_srvsvc_NetShareGetInfo_r_recv(subreq, mem_ctx);
3885 0 : TALLOC_FREE(subreq);
3886 0 : if (tevent_req_nterror(req, status)) {
3887 0 : return;
3888 : }
3889 :
3890 : /* Copy out parameters */
3891 0 : *state->orig.out.info = *state->tmp.out.info;
3892 :
3893 : /* Copy result */
3894 0 : state->orig.out.result = state->tmp.out.result;
3895 :
3896 : /* Reset temporary structure */
3897 0 : NDR_ZERO_STRUCT(state->tmp);
3898 :
3899 0 : tevent_req_done(req);
3900 : }
3901 :
3902 0 : NTSTATUS dcerpc_srvsvc_NetShareGetInfo_recv(struct tevent_req *req,
3903 : TALLOC_CTX *mem_ctx,
3904 : WERROR *result)
3905 : {
3906 0 : struct dcerpc_srvsvc_NetShareGetInfo_state *state = tevent_req_data(
3907 : req, struct dcerpc_srvsvc_NetShareGetInfo_state);
3908 0 : NTSTATUS status;
3909 :
3910 0 : if (tevent_req_is_nterror(req, &status)) {
3911 0 : tevent_req_received(req);
3912 0 : return status;
3913 : }
3914 :
3915 : /* Steal possible out parameters to the callers context */
3916 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
3917 :
3918 : /* Return result */
3919 0 : *result = state->orig.out.result;
3920 :
3921 0 : tevent_req_received(req);
3922 0 : return NT_STATUS_OK;
3923 : }
3924 :
3925 1235 : NTSTATUS dcerpc_srvsvc_NetShareGetInfo(struct dcerpc_binding_handle *h,
3926 : TALLOC_CTX *mem_ctx,
3927 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
3928 : const char *_share_name /* [in] [charset(UTF16)] */,
3929 : uint32_t _level /* [in] */,
3930 : union srvsvc_NetShareInfo *_info /* [out] [ref,switch_is(level)] */,
3931 : WERROR *result)
3932 : {
3933 0 : struct srvsvc_NetShareGetInfo r;
3934 0 : NTSTATUS status;
3935 :
3936 : /* In parameters */
3937 1235 : r.in.server_unc = _server_unc;
3938 1235 : r.in.share_name = _share_name;
3939 1235 : r.in.level = _level;
3940 :
3941 : /* Out parameters */
3942 1235 : r.out.info = _info;
3943 :
3944 : /* Result */
3945 1235 : NDR_ZERO_STRUCT(r.out.result);
3946 :
3947 1235 : status = dcerpc_srvsvc_NetShareGetInfo_r(h, mem_ctx, &r);
3948 1235 : if (!NT_STATUS_IS_OK(status)) {
3949 0 : return status;
3950 : }
3951 :
3952 : /* Return variables */
3953 1235 : *_info = *r.out.info;
3954 :
3955 : /* Return result */
3956 1235 : *result = r.out.result;
3957 :
3958 1235 : return NT_STATUS_OK;
3959 : }
3960 :
3961 : struct dcerpc_srvsvc_NetShareSetInfo_r_state {
3962 : TALLOC_CTX *out_mem_ctx;
3963 : };
3964 :
3965 : static void dcerpc_srvsvc_NetShareSetInfo_r_done(struct tevent_req *subreq);
3966 :
3967 0 : struct tevent_req *dcerpc_srvsvc_NetShareSetInfo_r_send(TALLOC_CTX *mem_ctx,
3968 : struct tevent_context *ev,
3969 : struct dcerpc_binding_handle *h,
3970 : struct srvsvc_NetShareSetInfo *r)
3971 : {
3972 0 : struct tevent_req *req;
3973 0 : struct dcerpc_srvsvc_NetShareSetInfo_r_state *state;
3974 0 : struct tevent_req *subreq;
3975 :
3976 0 : req = tevent_req_create(mem_ctx, &state,
3977 : struct dcerpc_srvsvc_NetShareSetInfo_r_state);
3978 0 : if (req == NULL) {
3979 0 : return NULL;
3980 : }
3981 :
3982 0 : state->out_mem_ctx = talloc_new(state);
3983 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
3984 0 : return tevent_req_post(req, ev);
3985 : }
3986 :
3987 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
3988 : NULL, &ndr_table_srvsvc,
3989 0 : NDR_SRVSVC_NETSHARESETINFO, state->out_mem_ctx, r);
3990 0 : if (tevent_req_nomem(subreq, req)) {
3991 0 : return tevent_req_post(req, ev);
3992 : }
3993 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareSetInfo_r_done, req);
3994 :
3995 0 : return req;
3996 : }
3997 :
3998 0 : static void dcerpc_srvsvc_NetShareSetInfo_r_done(struct tevent_req *subreq)
3999 : {
4000 0 : struct tevent_req *req =
4001 0 : tevent_req_callback_data(subreq,
4002 : struct tevent_req);
4003 0 : NTSTATUS status;
4004 :
4005 0 : status = dcerpc_binding_handle_call_recv(subreq);
4006 0 : TALLOC_FREE(subreq);
4007 0 : if (tevent_req_nterror(req, status)) {
4008 0 : return;
4009 : }
4010 :
4011 0 : tevent_req_done(req);
4012 : }
4013 :
4014 0 : NTSTATUS dcerpc_srvsvc_NetShareSetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4015 : {
4016 0 : struct dcerpc_srvsvc_NetShareSetInfo_r_state *state =
4017 0 : tevent_req_data(req,
4018 : struct dcerpc_srvsvc_NetShareSetInfo_r_state);
4019 0 : NTSTATUS status;
4020 :
4021 0 : if (tevent_req_is_nterror(req, &status)) {
4022 0 : tevent_req_received(req);
4023 0 : return status;
4024 : }
4025 :
4026 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4027 :
4028 0 : tevent_req_received(req);
4029 0 : return NT_STATUS_OK;
4030 : }
4031 :
4032 33 : NTSTATUS dcerpc_srvsvc_NetShareSetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareSetInfo *r)
4033 : {
4034 0 : NTSTATUS status;
4035 :
4036 33 : status = dcerpc_binding_handle_call(h,
4037 : NULL, &ndr_table_srvsvc,
4038 : NDR_SRVSVC_NETSHARESETINFO, mem_ctx, r);
4039 :
4040 33 : return status;
4041 : }
4042 :
4043 : struct dcerpc_srvsvc_NetShareSetInfo_state {
4044 : struct srvsvc_NetShareSetInfo orig;
4045 : struct srvsvc_NetShareSetInfo tmp;
4046 : TALLOC_CTX *out_mem_ctx;
4047 : };
4048 :
4049 : static void dcerpc_srvsvc_NetShareSetInfo_done(struct tevent_req *subreq);
4050 :
4051 0 : struct tevent_req *dcerpc_srvsvc_NetShareSetInfo_send(TALLOC_CTX *mem_ctx,
4052 : struct tevent_context *ev,
4053 : struct dcerpc_binding_handle *h,
4054 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4055 : const char *_share_name /* [in] [charset(UTF16)] */,
4056 : uint32_t _level /* [in] */,
4057 : union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */,
4058 : uint32_t *_parm_error /* [in,out] [unique] */)
4059 : {
4060 0 : struct tevent_req *req;
4061 0 : struct dcerpc_srvsvc_NetShareSetInfo_state *state;
4062 0 : struct tevent_req *subreq;
4063 :
4064 0 : req = tevent_req_create(mem_ctx, &state,
4065 : struct dcerpc_srvsvc_NetShareSetInfo_state);
4066 0 : if (req == NULL) {
4067 0 : return NULL;
4068 : }
4069 0 : state->out_mem_ctx = NULL;
4070 :
4071 : /* In parameters */
4072 0 : state->orig.in.server_unc = _server_unc;
4073 0 : state->orig.in.share_name = _share_name;
4074 0 : state->orig.in.level = _level;
4075 0 : state->orig.in.info = _info;
4076 0 : state->orig.in.parm_error = _parm_error;
4077 :
4078 : /* Out parameters */
4079 0 : state->orig.out.parm_error = _parm_error;
4080 :
4081 : /* Result */
4082 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4083 :
4084 0 : state->out_mem_ctx = talloc_named_const(state, 0,
4085 : "dcerpc_srvsvc_NetShareSetInfo_out_memory");
4086 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4087 0 : return tevent_req_post(req, ev);
4088 : }
4089 :
4090 : /* make a temporary copy, that we pass to the dispatch function */
4091 0 : state->tmp = state->orig;
4092 :
4093 0 : subreq = dcerpc_srvsvc_NetShareSetInfo_r_send(state, ev, h, &state->tmp);
4094 0 : if (tevent_req_nomem(subreq, req)) {
4095 0 : return tevent_req_post(req, ev);
4096 : }
4097 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareSetInfo_done, req);
4098 0 : return req;
4099 : }
4100 :
4101 0 : static void dcerpc_srvsvc_NetShareSetInfo_done(struct tevent_req *subreq)
4102 : {
4103 0 : struct tevent_req *req = tevent_req_callback_data(
4104 : subreq, struct tevent_req);
4105 0 : struct dcerpc_srvsvc_NetShareSetInfo_state *state = tevent_req_data(
4106 : req, struct dcerpc_srvsvc_NetShareSetInfo_state);
4107 0 : NTSTATUS status;
4108 0 : TALLOC_CTX *mem_ctx;
4109 :
4110 0 : if (state->out_mem_ctx) {
4111 0 : mem_ctx = state->out_mem_ctx;
4112 : } else {
4113 0 : mem_ctx = state;
4114 : }
4115 :
4116 0 : status = dcerpc_srvsvc_NetShareSetInfo_r_recv(subreq, mem_ctx);
4117 0 : TALLOC_FREE(subreq);
4118 0 : if (tevent_req_nterror(req, status)) {
4119 0 : return;
4120 : }
4121 :
4122 : /* Copy out parameters */
4123 0 : if (state->orig.out.parm_error && state->tmp.out.parm_error) {
4124 0 : *state->orig.out.parm_error = *state->tmp.out.parm_error;
4125 : }
4126 :
4127 : /* Copy result */
4128 0 : state->orig.out.result = state->tmp.out.result;
4129 :
4130 : /* Reset temporary structure */
4131 0 : NDR_ZERO_STRUCT(state->tmp);
4132 :
4133 0 : tevent_req_done(req);
4134 : }
4135 :
4136 0 : NTSTATUS dcerpc_srvsvc_NetShareSetInfo_recv(struct tevent_req *req,
4137 : TALLOC_CTX *mem_ctx,
4138 : WERROR *result)
4139 : {
4140 0 : struct dcerpc_srvsvc_NetShareSetInfo_state *state = tevent_req_data(
4141 : req, struct dcerpc_srvsvc_NetShareSetInfo_state);
4142 0 : NTSTATUS status;
4143 :
4144 0 : if (tevent_req_is_nterror(req, &status)) {
4145 0 : tevent_req_received(req);
4146 0 : return status;
4147 : }
4148 :
4149 : /* Steal possible out parameters to the callers context */
4150 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4151 :
4152 : /* Return result */
4153 0 : *result = state->orig.out.result;
4154 :
4155 0 : tevent_req_received(req);
4156 0 : return NT_STATUS_OK;
4157 : }
4158 :
4159 3 : NTSTATUS dcerpc_srvsvc_NetShareSetInfo(struct dcerpc_binding_handle *h,
4160 : TALLOC_CTX *mem_ctx,
4161 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4162 : const char *_share_name /* [in] [charset(UTF16)] */,
4163 : uint32_t _level /* [in] */,
4164 : union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */,
4165 : uint32_t *_parm_error /* [in,out] [unique] */,
4166 : WERROR *result)
4167 : {
4168 0 : struct srvsvc_NetShareSetInfo r;
4169 0 : NTSTATUS status;
4170 :
4171 : /* In parameters */
4172 3 : r.in.server_unc = _server_unc;
4173 3 : r.in.share_name = _share_name;
4174 3 : r.in.level = _level;
4175 3 : r.in.info = _info;
4176 3 : r.in.parm_error = _parm_error;
4177 :
4178 : /* Out parameters */
4179 3 : r.out.parm_error = _parm_error;
4180 :
4181 : /* Result */
4182 3 : NDR_ZERO_STRUCT(r.out.result);
4183 :
4184 3 : status = dcerpc_srvsvc_NetShareSetInfo_r(h, mem_ctx, &r);
4185 3 : if (!NT_STATUS_IS_OK(status)) {
4186 0 : return status;
4187 : }
4188 :
4189 : /* Return variables */
4190 3 : if (_parm_error && r.out.parm_error) {
4191 3 : *_parm_error = *r.out.parm_error;
4192 : }
4193 :
4194 : /* Return result */
4195 3 : *result = r.out.result;
4196 :
4197 3 : return NT_STATUS_OK;
4198 : }
4199 :
4200 : struct dcerpc_srvsvc_NetShareDel_r_state {
4201 : TALLOC_CTX *out_mem_ctx;
4202 : };
4203 :
4204 : static void dcerpc_srvsvc_NetShareDel_r_done(struct tevent_req *subreq);
4205 :
4206 0 : struct tevent_req *dcerpc_srvsvc_NetShareDel_r_send(TALLOC_CTX *mem_ctx,
4207 : struct tevent_context *ev,
4208 : struct dcerpc_binding_handle *h,
4209 : struct srvsvc_NetShareDel *r)
4210 : {
4211 0 : struct tevent_req *req;
4212 0 : struct dcerpc_srvsvc_NetShareDel_r_state *state;
4213 0 : struct tevent_req *subreq;
4214 :
4215 0 : req = tevent_req_create(mem_ctx, &state,
4216 : struct dcerpc_srvsvc_NetShareDel_r_state);
4217 0 : if (req == NULL) {
4218 0 : return NULL;
4219 : }
4220 :
4221 0 : state->out_mem_ctx = NULL;
4222 :
4223 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4224 : NULL, &ndr_table_srvsvc,
4225 : NDR_SRVSVC_NETSHAREDEL, state, r);
4226 0 : if (tevent_req_nomem(subreq, req)) {
4227 0 : return tevent_req_post(req, ev);
4228 : }
4229 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareDel_r_done, req);
4230 :
4231 0 : return req;
4232 : }
4233 :
4234 0 : static void dcerpc_srvsvc_NetShareDel_r_done(struct tevent_req *subreq)
4235 : {
4236 0 : struct tevent_req *req =
4237 0 : tevent_req_callback_data(subreq,
4238 : struct tevent_req);
4239 0 : NTSTATUS status;
4240 :
4241 0 : status = dcerpc_binding_handle_call_recv(subreq);
4242 0 : TALLOC_FREE(subreq);
4243 0 : if (tevent_req_nterror(req, status)) {
4244 0 : return;
4245 : }
4246 :
4247 0 : tevent_req_done(req);
4248 : }
4249 :
4250 0 : NTSTATUS dcerpc_srvsvc_NetShareDel_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4251 : {
4252 0 : struct dcerpc_srvsvc_NetShareDel_r_state *state =
4253 0 : tevent_req_data(req,
4254 : struct dcerpc_srvsvc_NetShareDel_r_state);
4255 0 : NTSTATUS status;
4256 :
4257 0 : if (tevent_req_is_nterror(req, &status)) {
4258 0 : tevent_req_received(req);
4259 0 : return status;
4260 : }
4261 :
4262 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4263 :
4264 0 : tevent_req_received(req);
4265 0 : return NT_STATUS_OK;
4266 : }
4267 :
4268 4 : NTSTATUS dcerpc_srvsvc_NetShareDel_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareDel *r)
4269 : {
4270 0 : NTSTATUS status;
4271 :
4272 4 : status = dcerpc_binding_handle_call(h,
4273 : NULL, &ndr_table_srvsvc,
4274 : NDR_SRVSVC_NETSHAREDEL, mem_ctx, r);
4275 :
4276 4 : return status;
4277 : }
4278 :
4279 : struct dcerpc_srvsvc_NetShareDel_state {
4280 : struct srvsvc_NetShareDel orig;
4281 : struct srvsvc_NetShareDel tmp;
4282 : TALLOC_CTX *out_mem_ctx;
4283 : };
4284 :
4285 : static void dcerpc_srvsvc_NetShareDel_done(struct tevent_req *subreq);
4286 :
4287 0 : struct tevent_req *dcerpc_srvsvc_NetShareDel_send(TALLOC_CTX *mem_ctx,
4288 : struct tevent_context *ev,
4289 : struct dcerpc_binding_handle *h,
4290 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4291 : const char *_share_name /* [in] [charset(UTF16)] */,
4292 : uint32_t _reserved /* [in] */)
4293 : {
4294 0 : struct tevent_req *req;
4295 0 : struct dcerpc_srvsvc_NetShareDel_state *state;
4296 0 : struct tevent_req *subreq;
4297 :
4298 0 : req = tevent_req_create(mem_ctx, &state,
4299 : struct dcerpc_srvsvc_NetShareDel_state);
4300 0 : if (req == NULL) {
4301 0 : return NULL;
4302 : }
4303 0 : state->out_mem_ctx = NULL;
4304 :
4305 : /* In parameters */
4306 0 : state->orig.in.server_unc = _server_unc;
4307 0 : state->orig.in.share_name = _share_name;
4308 0 : state->orig.in.reserved = _reserved;
4309 :
4310 : /* Out parameters */
4311 :
4312 : /* Result */
4313 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4314 :
4315 : /* make a temporary copy, that we pass to the dispatch function */
4316 0 : state->tmp = state->orig;
4317 :
4318 0 : subreq = dcerpc_srvsvc_NetShareDel_r_send(state, ev, h, &state->tmp);
4319 0 : if (tevent_req_nomem(subreq, req)) {
4320 0 : return tevent_req_post(req, ev);
4321 : }
4322 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareDel_done, req);
4323 0 : return req;
4324 : }
4325 :
4326 0 : static void dcerpc_srvsvc_NetShareDel_done(struct tevent_req *subreq)
4327 : {
4328 0 : struct tevent_req *req = tevent_req_callback_data(
4329 : subreq, struct tevent_req);
4330 0 : struct dcerpc_srvsvc_NetShareDel_state *state = tevent_req_data(
4331 : req, struct dcerpc_srvsvc_NetShareDel_state);
4332 0 : NTSTATUS status;
4333 0 : TALLOC_CTX *mem_ctx;
4334 :
4335 0 : if (state->out_mem_ctx) {
4336 0 : mem_ctx = state->out_mem_ctx;
4337 : } else {
4338 0 : mem_ctx = state;
4339 : }
4340 :
4341 0 : status = dcerpc_srvsvc_NetShareDel_r_recv(subreq, mem_ctx);
4342 0 : TALLOC_FREE(subreq);
4343 0 : if (tevent_req_nterror(req, status)) {
4344 0 : return;
4345 : }
4346 :
4347 : /* Copy out parameters */
4348 :
4349 : /* Copy result */
4350 0 : state->orig.out.result = state->tmp.out.result;
4351 :
4352 : /* Reset temporary structure */
4353 0 : NDR_ZERO_STRUCT(state->tmp);
4354 :
4355 0 : tevent_req_done(req);
4356 : }
4357 :
4358 0 : NTSTATUS dcerpc_srvsvc_NetShareDel_recv(struct tevent_req *req,
4359 : TALLOC_CTX *mem_ctx,
4360 : WERROR *result)
4361 : {
4362 0 : struct dcerpc_srvsvc_NetShareDel_state *state = tevent_req_data(
4363 : req, struct dcerpc_srvsvc_NetShareDel_state);
4364 0 : NTSTATUS status;
4365 :
4366 0 : if (tevent_req_is_nterror(req, &status)) {
4367 0 : tevent_req_received(req);
4368 0 : return status;
4369 : }
4370 :
4371 : /* Steal possible out parameters to the callers context */
4372 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4373 :
4374 : /* Return result */
4375 0 : *result = state->orig.out.result;
4376 :
4377 0 : tevent_req_received(req);
4378 0 : return NT_STATUS_OK;
4379 : }
4380 :
4381 3 : NTSTATUS dcerpc_srvsvc_NetShareDel(struct dcerpc_binding_handle *h,
4382 : TALLOC_CTX *mem_ctx,
4383 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4384 : const char *_share_name /* [in] [charset(UTF16)] */,
4385 : uint32_t _reserved /* [in] */,
4386 : WERROR *result)
4387 : {
4388 0 : struct srvsvc_NetShareDel r;
4389 0 : NTSTATUS status;
4390 :
4391 : /* In parameters */
4392 3 : r.in.server_unc = _server_unc;
4393 3 : r.in.share_name = _share_name;
4394 3 : r.in.reserved = _reserved;
4395 :
4396 : /* Out parameters */
4397 :
4398 : /* Result */
4399 3 : NDR_ZERO_STRUCT(r.out.result);
4400 :
4401 3 : status = dcerpc_srvsvc_NetShareDel_r(h, mem_ctx, &r);
4402 3 : if (!NT_STATUS_IS_OK(status)) {
4403 0 : return status;
4404 : }
4405 :
4406 : /* Return variables */
4407 :
4408 : /* Return result */
4409 3 : *result = r.out.result;
4410 :
4411 3 : return NT_STATUS_OK;
4412 : }
4413 :
4414 : struct dcerpc_srvsvc_NetShareDelSticky_r_state {
4415 : TALLOC_CTX *out_mem_ctx;
4416 : };
4417 :
4418 : static void dcerpc_srvsvc_NetShareDelSticky_r_done(struct tevent_req *subreq);
4419 :
4420 0 : struct tevent_req *dcerpc_srvsvc_NetShareDelSticky_r_send(TALLOC_CTX *mem_ctx,
4421 : struct tevent_context *ev,
4422 : struct dcerpc_binding_handle *h,
4423 : struct srvsvc_NetShareDelSticky *r)
4424 : {
4425 0 : struct tevent_req *req;
4426 0 : struct dcerpc_srvsvc_NetShareDelSticky_r_state *state;
4427 0 : struct tevent_req *subreq;
4428 :
4429 0 : req = tevent_req_create(mem_ctx, &state,
4430 : struct dcerpc_srvsvc_NetShareDelSticky_r_state);
4431 0 : if (req == NULL) {
4432 0 : return NULL;
4433 : }
4434 :
4435 0 : state->out_mem_ctx = NULL;
4436 :
4437 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4438 : NULL, &ndr_table_srvsvc,
4439 : NDR_SRVSVC_NETSHAREDELSTICKY, state, r);
4440 0 : if (tevent_req_nomem(subreq, req)) {
4441 0 : return tevent_req_post(req, ev);
4442 : }
4443 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareDelSticky_r_done, req);
4444 :
4445 0 : return req;
4446 : }
4447 :
4448 0 : static void dcerpc_srvsvc_NetShareDelSticky_r_done(struct tevent_req *subreq)
4449 : {
4450 0 : struct tevent_req *req =
4451 0 : tevent_req_callback_data(subreq,
4452 : struct tevent_req);
4453 0 : NTSTATUS status;
4454 :
4455 0 : status = dcerpc_binding_handle_call_recv(subreq);
4456 0 : TALLOC_FREE(subreq);
4457 0 : if (tevent_req_nterror(req, status)) {
4458 0 : return;
4459 : }
4460 :
4461 0 : tevent_req_done(req);
4462 : }
4463 :
4464 0 : NTSTATUS dcerpc_srvsvc_NetShareDelSticky_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4465 : {
4466 0 : struct dcerpc_srvsvc_NetShareDelSticky_r_state *state =
4467 0 : tevent_req_data(req,
4468 : struct dcerpc_srvsvc_NetShareDelSticky_r_state);
4469 0 : NTSTATUS status;
4470 :
4471 0 : if (tevent_req_is_nterror(req, &status)) {
4472 0 : tevent_req_received(req);
4473 0 : return status;
4474 : }
4475 :
4476 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4477 :
4478 0 : tevent_req_received(req);
4479 0 : return NT_STATUS_OK;
4480 : }
4481 :
4482 0 : NTSTATUS dcerpc_srvsvc_NetShareDelSticky_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareDelSticky *r)
4483 : {
4484 0 : NTSTATUS status;
4485 :
4486 0 : status = dcerpc_binding_handle_call(h,
4487 : NULL, &ndr_table_srvsvc,
4488 : NDR_SRVSVC_NETSHAREDELSTICKY, mem_ctx, r);
4489 :
4490 0 : return status;
4491 : }
4492 :
4493 : struct dcerpc_srvsvc_NetShareDelSticky_state {
4494 : struct srvsvc_NetShareDelSticky orig;
4495 : struct srvsvc_NetShareDelSticky tmp;
4496 : TALLOC_CTX *out_mem_ctx;
4497 : };
4498 :
4499 : static void dcerpc_srvsvc_NetShareDelSticky_done(struct tevent_req *subreq);
4500 :
4501 0 : struct tevent_req *dcerpc_srvsvc_NetShareDelSticky_send(TALLOC_CTX *mem_ctx,
4502 : struct tevent_context *ev,
4503 : struct dcerpc_binding_handle *h,
4504 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4505 : const char *_share_name /* [in] [charset(UTF16)] */,
4506 : uint32_t _reserved /* [in] */)
4507 : {
4508 0 : struct tevent_req *req;
4509 0 : struct dcerpc_srvsvc_NetShareDelSticky_state *state;
4510 0 : struct tevent_req *subreq;
4511 :
4512 0 : req = tevent_req_create(mem_ctx, &state,
4513 : struct dcerpc_srvsvc_NetShareDelSticky_state);
4514 0 : if (req == NULL) {
4515 0 : return NULL;
4516 : }
4517 0 : state->out_mem_ctx = NULL;
4518 :
4519 : /* In parameters */
4520 0 : state->orig.in.server_unc = _server_unc;
4521 0 : state->orig.in.share_name = _share_name;
4522 0 : state->orig.in.reserved = _reserved;
4523 :
4524 : /* Out parameters */
4525 :
4526 : /* Result */
4527 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4528 :
4529 : /* make a temporary copy, that we pass to the dispatch function */
4530 0 : state->tmp = state->orig;
4531 :
4532 0 : subreq = dcerpc_srvsvc_NetShareDelSticky_r_send(state, ev, h, &state->tmp);
4533 0 : if (tevent_req_nomem(subreq, req)) {
4534 0 : return tevent_req_post(req, ev);
4535 : }
4536 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareDelSticky_done, req);
4537 0 : return req;
4538 : }
4539 :
4540 0 : static void dcerpc_srvsvc_NetShareDelSticky_done(struct tevent_req *subreq)
4541 : {
4542 0 : struct tevent_req *req = tevent_req_callback_data(
4543 : subreq, struct tevent_req);
4544 0 : struct dcerpc_srvsvc_NetShareDelSticky_state *state = tevent_req_data(
4545 : req, struct dcerpc_srvsvc_NetShareDelSticky_state);
4546 0 : NTSTATUS status;
4547 0 : TALLOC_CTX *mem_ctx;
4548 :
4549 0 : if (state->out_mem_ctx) {
4550 0 : mem_ctx = state->out_mem_ctx;
4551 : } else {
4552 0 : mem_ctx = state;
4553 : }
4554 :
4555 0 : status = dcerpc_srvsvc_NetShareDelSticky_r_recv(subreq, mem_ctx);
4556 0 : TALLOC_FREE(subreq);
4557 0 : if (tevent_req_nterror(req, status)) {
4558 0 : return;
4559 : }
4560 :
4561 : /* Copy out parameters */
4562 :
4563 : /* Copy result */
4564 0 : state->orig.out.result = state->tmp.out.result;
4565 :
4566 : /* Reset temporary structure */
4567 0 : NDR_ZERO_STRUCT(state->tmp);
4568 :
4569 0 : tevent_req_done(req);
4570 : }
4571 :
4572 0 : NTSTATUS dcerpc_srvsvc_NetShareDelSticky_recv(struct tevent_req *req,
4573 : TALLOC_CTX *mem_ctx,
4574 : WERROR *result)
4575 : {
4576 0 : struct dcerpc_srvsvc_NetShareDelSticky_state *state = tevent_req_data(
4577 : req, struct dcerpc_srvsvc_NetShareDelSticky_state);
4578 0 : NTSTATUS status;
4579 :
4580 0 : if (tevent_req_is_nterror(req, &status)) {
4581 0 : tevent_req_received(req);
4582 0 : return status;
4583 : }
4584 :
4585 : /* Steal possible out parameters to the callers context */
4586 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4587 :
4588 : /* Return result */
4589 0 : *result = state->orig.out.result;
4590 :
4591 0 : tevent_req_received(req);
4592 0 : return NT_STATUS_OK;
4593 : }
4594 :
4595 0 : NTSTATUS dcerpc_srvsvc_NetShareDelSticky(struct dcerpc_binding_handle *h,
4596 : TALLOC_CTX *mem_ctx,
4597 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4598 : const char *_share_name /* [in] [charset(UTF16)] */,
4599 : uint32_t _reserved /* [in] */,
4600 : WERROR *result)
4601 : {
4602 0 : struct srvsvc_NetShareDelSticky r;
4603 0 : NTSTATUS status;
4604 :
4605 : /* In parameters */
4606 0 : r.in.server_unc = _server_unc;
4607 0 : r.in.share_name = _share_name;
4608 0 : r.in.reserved = _reserved;
4609 :
4610 : /* Out parameters */
4611 :
4612 : /* Result */
4613 0 : NDR_ZERO_STRUCT(r.out.result);
4614 :
4615 0 : status = dcerpc_srvsvc_NetShareDelSticky_r(h, mem_ctx, &r);
4616 0 : if (!NT_STATUS_IS_OK(status)) {
4617 0 : return status;
4618 : }
4619 :
4620 : /* Return variables */
4621 :
4622 : /* Return result */
4623 0 : *result = r.out.result;
4624 :
4625 0 : return NT_STATUS_OK;
4626 : }
4627 :
4628 : struct dcerpc_srvsvc_NetShareCheck_r_state {
4629 : TALLOC_CTX *out_mem_ctx;
4630 : };
4631 :
4632 : static void dcerpc_srvsvc_NetShareCheck_r_done(struct tevent_req *subreq);
4633 :
4634 0 : struct tevent_req *dcerpc_srvsvc_NetShareCheck_r_send(TALLOC_CTX *mem_ctx,
4635 : struct tevent_context *ev,
4636 : struct dcerpc_binding_handle *h,
4637 : struct srvsvc_NetShareCheck *r)
4638 : {
4639 0 : struct tevent_req *req;
4640 0 : struct dcerpc_srvsvc_NetShareCheck_r_state *state;
4641 0 : struct tevent_req *subreq;
4642 :
4643 0 : req = tevent_req_create(mem_ctx, &state,
4644 : struct dcerpc_srvsvc_NetShareCheck_r_state);
4645 0 : if (req == NULL) {
4646 0 : return NULL;
4647 : }
4648 :
4649 0 : state->out_mem_ctx = talloc_new(state);
4650 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4651 0 : return tevent_req_post(req, ev);
4652 : }
4653 :
4654 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4655 : NULL, &ndr_table_srvsvc,
4656 0 : NDR_SRVSVC_NETSHARECHECK, state->out_mem_ctx, r);
4657 0 : if (tevent_req_nomem(subreq, req)) {
4658 0 : return tevent_req_post(req, ev);
4659 : }
4660 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareCheck_r_done, req);
4661 :
4662 0 : return req;
4663 : }
4664 :
4665 0 : static void dcerpc_srvsvc_NetShareCheck_r_done(struct tevent_req *subreq)
4666 : {
4667 0 : struct tevent_req *req =
4668 0 : tevent_req_callback_data(subreq,
4669 : struct tevent_req);
4670 0 : NTSTATUS status;
4671 :
4672 0 : status = dcerpc_binding_handle_call_recv(subreq);
4673 0 : TALLOC_FREE(subreq);
4674 0 : if (tevent_req_nterror(req, status)) {
4675 0 : return;
4676 : }
4677 :
4678 0 : tevent_req_done(req);
4679 : }
4680 :
4681 0 : NTSTATUS dcerpc_srvsvc_NetShareCheck_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4682 : {
4683 0 : struct dcerpc_srvsvc_NetShareCheck_r_state *state =
4684 0 : tevent_req_data(req,
4685 : struct dcerpc_srvsvc_NetShareCheck_r_state);
4686 0 : NTSTATUS status;
4687 :
4688 0 : if (tevent_req_is_nterror(req, &status)) {
4689 0 : tevent_req_received(req);
4690 0 : return status;
4691 : }
4692 :
4693 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4694 :
4695 0 : tevent_req_received(req);
4696 0 : return NT_STATUS_OK;
4697 : }
4698 :
4699 50 : NTSTATUS dcerpc_srvsvc_NetShareCheck_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareCheck *r)
4700 : {
4701 0 : NTSTATUS status;
4702 :
4703 50 : status = dcerpc_binding_handle_call(h,
4704 : NULL, &ndr_table_srvsvc,
4705 : NDR_SRVSVC_NETSHARECHECK, mem_ctx, r);
4706 :
4707 50 : return status;
4708 : }
4709 :
4710 : struct dcerpc_srvsvc_NetShareCheck_state {
4711 : struct srvsvc_NetShareCheck orig;
4712 : struct srvsvc_NetShareCheck tmp;
4713 : TALLOC_CTX *out_mem_ctx;
4714 : };
4715 :
4716 : static void dcerpc_srvsvc_NetShareCheck_done(struct tevent_req *subreq);
4717 :
4718 0 : struct tevent_req *dcerpc_srvsvc_NetShareCheck_send(TALLOC_CTX *mem_ctx,
4719 : struct tevent_context *ev,
4720 : struct dcerpc_binding_handle *h,
4721 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4722 : const char *_device_name /* [in] [charset(UTF16)] */,
4723 : enum srvsvc_ShareType *_type /* [out] [ref] */)
4724 : {
4725 0 : struct tevent_req *req;
4726 0 : struct dcerpc_srvsvc_NetShareCheck_state *state;
4727 0 : struct tevent_req *subreq;
4728 :
4729 0 : req = tevent_req_create(mem_ctx, &state,
4730 : struct dcerpc_srvsvc_NetShareCheck_state);
4731 0 : if (req == NULL) {
4732 0 : return NULL;
4733 : }
4734 0 : state->out_mem_ctx = NULL;
4735 :
4736 : /* In parameters */
4737 0 : state->orig.in.server_unc = _server_unc;
4738 0 : state->orig.in.device_name = _device_name;
4739 :
4740 : /* Out parameters */
4741 0 : state->orig.out.type = _type;
4742 :
4743 : /* Result */
4744 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4745 :
4746 0 : state->out_mem_ctx = talloc_named_const(state, 0,
4747 : "dcerpc_srvsvc_NetShareCheck_out_memory");
4748 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4749 0 : return tevent_req_post(req, ev);
4750 : }
4751 :
4752 : /* make a temporary copy, that we pass to the dispatch function */
4753 0 : state->tmp = state->orig;
4754 :
4755 0 : subreq = dcerpc_srvsvc_NetShareCheck_r_send(state, ev, h, &state->tmp);
4756 0 : if (tevent_req_nomem(subreq, req)) {
4757 0 : return tevent_req_post(req, ev);
4758 : }
4759 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareCheck_done, req);
4760 0 : return req;
4761 : }
4762 :
4763 0 : static void dcerpc_srvsvc_NetShareCheck_done(struct tevent_req *subreq)
4764 : {
4765 0 : struct tevent_req *req = tevent_req_callback_data(
4766 : subreq, struct tevent_req);
4767 0 : struct dcerpc_srvsvc_NetShareCheck_state *state = tevent_req_data(
4768 : req, struct dcerpc_srvsvc_NetShareCheck_state);
4769 0 : NTSTATUS status;
4770 0 : TALLOC_CTX *mem_ctx;
4771 :
4772 0 : if (state->out_mem_ctx) {
4773 0 : mem_ctx = state->out_mem_ctx;
4774 : } else {
4775 0 : mem_ctx = state;
4776 : }
4777 :
4778 0 : status = dcerpc_srvsvc_NetShareCheck_r_recv(subreq, mem_ctx);
4779 0 : TALLOC_FREE(subreq);
4780 0 : if (tevent_req_nterror(req, status)) {
4781 0 : return;
4782 : }
4783 :
4784 : /* Copy out parameters */
4785 0 : *state->orig.out.type = *state->tmp.out.type;
4786 :
4787 : /* Copy result */
4788 0 : state->orig.out.result = state->tmp.out.result;
4789 :
4790 : /* Reset temporary structure */
4791 0 : NDR_ZERO_STRUCT(state->tmp);
4792 :
4793 0 : tevent_req_done(req);
4794 : }
4795 :
4796 0 : NTSTATUS dcerpc_srvsvc_NetShareCheck_recv(struct tevent_req *req,
4797 : TALLOC_CTX *mem_ctx,
4798 : WERROR *result)
4799 : {
4800 0 : struct dcerpc_srvsvc_NetShareCheck_state *state = tevent_req_data(
4801 : req, struct dcerpc_srvsvc_NetShareCheck_state);
4802 0 : NTSTATUS status;
4803 :
4804 0 : if (tevent_req_is_nterror(req, &status)) {
4805 0 : tevent_req_received(req);
4806 0 : return status;
4807 : }
4808 :
4809 : /* Steal possible out parameters to the callers context */
4810 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4811 :
4812 : /* Return result */
4813 0 : *result = state->orig.out.result;
4814 :
4815 0 : tevent_req_received(req);
4816 0 : return NT_STATUS_OK;
4817 : }
4818 :
4819 0 : NTSTATUS dcerpc_srvsvc_NetShareCheck(struct dcerpc_binding_handle *h,
4820 : TALLOC_CTX *mem_ctx,
4821 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4822 : const char *_device_name /* [in] [charset(UTF16)] */,
4823 : enum srvsvc_ShareType *_type /* [out] [ref] */,
4824 : WERROR *result)
4825 : {
4826 0 : struct srvsvc_NetShareCheck r;
4827 0 : NTSTATUS status;
4828 :
4829 : /* In parameters */
4830 0 : r.in.server_unc = _server_unc;
4831 0 : r.in.device_name = _device_name;
4832 :
4833 : /* Out parameters */
4834 0 : r.out.type = _type;
4835 :
4836 : /* Result */
4837 0 : NDR_ZERO_STRUCT(r.out.result);
4838 :
4839 0 : status = dcerpc_srvsvc_NetShareCheck_r(h, mem_ctx, &r);
4840 0 : if (!NT_STATUS_IS_OK(status)) {
4841 0 : return status;
4842 : }
4843 :
4844 : /* Return variables */
4845 0 : *_type = *r.out.type;
4846 :
4847 : /* Return result */
4848 0 : *result = r.out.result;
4849 :
4850 0 : return NT_STATUS_OK;
4851 : }
4852 :
4853 : struct dcerpc_srvsvc_NetSrvGetInfo_r_state {
4854 : TALLOC_CTX *out_mem_ctx;
4855 : };
4856 :
4857 : static void dcerpc_srvsvc_NetSrvGetInfo_r_done(struct tevent_req *subreq);
4858 :
4859 0 : struct tevent_req *dcerpc_srvsvc_NetSrvGetInfo_r_send(TALLOC_CTX *mem_ctx,
4860 : struct tevent_context *ev,
4861 : struct dcerpc_binding_handle *h,
4862 : struct srvsvc_NetSrvGetInfo *r)
4863 : {
4864 0 : struct tevent_req *req;
4865 0 : struct dcerpc_srvsvc_NetSrvGetInfo_r_state *state;
4866 0 : struct tevent_req *subreq;
4867 :
4868 0 : req = tevent_req_create(mem_ctx, &state,
4869 : struct dcerpc_srvsvc_NetSrvGetInfo_r_state);
4870 0 : if (req == NULL) {
4871 0 : return NULL;
4872 : }
4873 :
4874 0 : state->out_mem_ctx = talloc_new(state);
4875 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4876 0 : return tevent_req_post(req, ev);
4877 : }
4878 :
4879 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
4880 : NULL, &ndr_table_srvsvc,
4881 0 : NDR_SRVSVC_NETSRVGETINFO, state->out_mem_ctx, r);
4882 0 : if (tevent_req_nomem(subreq, req)) {
4883 0 : return tevent_req_post(req, ev);
4884 : }
4885 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSrvGetInfo_r_done, req);
4886 :
4887 0 : return req;
4888 : }
4889 :
4890 0 : static void dcerpc_srvsvc_NetSrvGetInfo_r_done(struct tevent_req *subreq)
4891 : {
4892 0 : struct tevent_req *req =
4893 0 : tevent_req_callback_data(subreq,
4894 : struct tevent_req);
4895 0 : NTSTATUS status;
4896 :
4897 0 : status = dcerpc_binding_handle_call_recv(subreq);
4898 0 : TALLOC_FREE(subreq);
4899 0 : if (tevent_req_nterror(req, status)) {
4900 0 : return;
4901 : }
4902 :
4903 0 : tevent_req_done(req);
4904 : }
4905 :
4906 0 : NTSTATUS dcerpc_srvsvc_NetSrvGetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
4907 : {
4908 0 : struct dcerpc_srvsvc_NetSrvGetInfo_r_state *state =
4909 0 : tevent_req_data(req,
4910 : struct dcerpc_srvsvc_NetSrvGetInfo_r_state);
4911 0 : NTSTATUS status;
4912 :
4913 0 : if (tevent_req_is_nterror(req, &status)) {
4914 0 : tevent_req_received(req);
4915 0 : return status;
4916 : }
4917 :
4918 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
4919 :
4920 0 : tevent_req_received(req);
4921 0 : return NT_STATUS_OK;
4922 : }
4923 :
4924 64 : NTSTATUS dcerpc_srvsvc_NetSrvGetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetSrvGetInfo *r)
4925 : {
4926 0 : NTSTATUS status;
4927 :
4928 64 : status = dcerpc_binding_handle_call(h,
4929 : NULL, &ndr_table_srvsvc,
4930 : NDR_SRVSVC_NETSRVGETINFO, mem_ctx, r);
4931 :
4932 64 : return status;
4933 : }
4934 :
4935 : struct dcerpc_srvsvc_NetSrvGetInfo_state {
4936 : struct srvsvc_NetSrvGetInfo orig;
4937 : struct srvsvc_NetSrvGetInfo tmp;
4938 : TALLOC_CTX *out_mem_ctx;
4939 : };
4940 :
4941 : static void dcerpc_srvsvc_NetSrvGetInfo_done(struct tevent_req *subreq);
4942 :
4943 0 : struct tevent_req *dcerpc_srvsvc_NetSrvGetInfo_send(TALLOC_CTX *mem_ctx,
4944 : struct tevent_context *ev,
4945 : struct dcerpc_binding_handle *h,
4946 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
4947 : uint32_t _level /* [in] */,
4948 : union srvsvc_NetSrvInfo *_info /* [out] [ref,switch_is(level)] */)
4949 : {
4950 0 : struct tevent_req *req;
4951 0 : struct dcerpc_srvsvc_NetSrvGetInfo_state *state;
4952 0 : struct tevent_req *subreq;
4953 :
4954 0 : req = tevent_req_create(mem_ctx, &state,
4955 : struct dcerpc_srvsvc_NetSrvGetInfo_state);
4956 0 : if (req == NULL) {
4957 0 : return NULL;
4958 : }
4959 0 : state->out_mem_ctx = NULL;
4960 :
4961 : /* In parameters */
4962 0 : state->orig.in.server_unc = _server_unc;
4963 0 : state->orig.in.level = _level;
4964 :
4965 : /* Out parameters */
4966 0 : state->orig.out.info = _info;
4967 :
4968 : /* Result */
4969 0 : NDR_ZERO_STRUCT(state->orig.out.result);
4970 :
4971 0 : state->out_mem_ctx = talloc_named_const(state, 0,
4972 : "dcerpc_srvsvc_NetSrvGetInfo_out_memory");
4973 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
4974 0 : return tevent_req_post(req, ev);
4975 : }
4976 :
4977 : /* make a temporary copy, that we pass to the dispatch function */
4978 0 : state->tmp = state->orig;
4979 :
4980 0 : subreq = dcerpc_srvsvc_NetSrvGetInfo_r_send(state, ev, h, &state->tmp);
4981 0 : if (tevent_req_nomem(subreq, req)) {
4982 0 : return tevent_req_post(req, ev);
4983 : }
4984 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSrvGetInfo_done, req);
4985 0 : return req;
4986 : }
4987 :
4988 0 : static void dcerpc_srvsvc_NetSrvGetInfo_done(struct tevent_req *subreq)
4989 : {
4990 0 : struct tevent_req *req = tevent_req_callback_data(
4991 : subreq, struct tevent_req);
4992 0 : struct dcerpc_srvsvc_NetSrvGetInfo_state *state = tevent_req_data(
4993 : req, struct dcerpc_srvsvc_NetSrvGetInfo_state);
4994 0 : NTSTATUS status;
4995 0 : TALLOC_CTX *mem_ctx;
4996 :
4997 0 : if (state->out_mem_ctx) {
4998 0 : mem_ctx = state->out_mem_ctx;
4999 : } else {
5000 0 : mem_ctx = state;
5001 : }
5002 :
5003 0 : status = dcerpc_srvsvc_NetSrvGetInfo_r_recv(subreq, mem_ctx);
5004 0 : TALLOC_FREE(subreq);
5005 0 : if (tevent_req_nterror(req, status)) {
5006 0 : return;
5007 : }
5008 :
5009 : /* Copy out parameters */
5010 0 : *state->orig.out.info = *state->tmp.out.info;
5011 :
5012 : /* Copy result */
5013 0 : state->orig.out.result = state->tmp.out.result;
5014 :
5015 : /* Reset temporary structure */
5016 0 : NDR_ZERO_STRUCT(state->tmp);
5017 :
5018 0 : tevent_req_done(req);
5019 : }
5020 :
5021 0 : NTSTATUS dcerpc_srvsvc_NetSrvGetInfo_recv(struct tevent_req *req,
5022 : TALLOC_CTX *mem_ctx,
5023 : WERROR *result)
5024 : {
5025 0 : struct dcerpc_srvsvc_NetSrvGetInfo_state *state = tevent_req_data(
5026 : req, struct dcerpc_srvsvc_NetSrvGetInfo_state);
5027 0 : NTSTATUS status;
5028 :
5029 0 : if (tevent_req_is_nterror(req, &status)) {
5030 0 : tevent_req_received(req);
5031 0 : return status;
5032 : }
5033 :
5034 : /* Steal possible out parameters to the callers context */
5035 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5036 :
5037 : /* Return result */
5038 0 : *result = state->orig.out.result;
5039 :
5040 0 : tevent_req_received(req);
5041 0 : return NT_STATUS_OK;
5042 : }
5043 :
5044 24 : NTSTATUS dcerpc_srvsvc_NetSrvGetInfo(struct dcerpc_binding_handle *h,
5045 : TALLOC_CTX *mem_ctx,
5046 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5047 : uint32_t _level /* [in] */,
5048 : union srvsvc_NetSrvInfo *_info /* [out] [ref,switch_is(level)] */,
5049 : WERROR *result)
5050 : {
5051 0 : struct srvsvc_NetSrvGetInfo r;
5052 0 : NTSTATUS status;
5053 :
5054 : /* In parameters */
5055 24 : r.in.server_unc = _server_unc;
5056 24 : r.in.level = _level;
5057 :
5058 : /* Out parameters */
5059 24 : r.out.info = _info;
5060 :
5061 : /* Result */
5062 24 : NDR_ZERO_STRUCT(r.out.result);
5063 :
5064 24 : status = dcerpc_srvsvc_NetSrvGetInfo_r(h, mem_ctx, &r);
5065 24 : if (!NT_STATUS_IS_OK(status)) {
5066 0 : return status;
5067 : }
5068 :
5069 : /* Return variables */
5070 24 : *_info = *r.out.info;
5071 :
5072 : /* Return result */
5073 24 : *result = r.out.result;
5074 :
5075 24 : return NT_STATUS_OK;
5076 : }
5077 :
5078 : struct dcerpc_srvsvc_NetSrvSetInfo_r_state {
5079 : TALLOC_CTX *out_mem_ctx;
5080 : };
5081 :
5082 : static void dcerpc_srvsvc_NetSrvSetInfo_r_done(struct tevent_req *subreq);
5083 :
5084 0 : struct tevent_req *dcerpc_srvsvc_NetSrvSetInfo_r_send(TALLOC_CTX *mem_ctx,
5085 : struct tevent_context *ev,
5086 : struct dcerpc_binding_handle *h,
5087 : struct srvsvc_NetSrvSetInfo *r)
5088 : {
5089 0 : struct tevent_req *req;
5090 0 : struct dcerpc_srvsvc_NetSrvSetInfo_r_state *state;
5091 0 : struct tevent_req *subreq;
5092 :
5093 0 : req = tevent_req_create(mem_ctx, &state,
5094 : struct dcerpc_srvsvc_NetSrvSetInfo_r_state);
5095 0 : if (req == NULL) {
5096 0 : return NULL;
5097 : }
5098 :
5099 0 : state->out_mem_ctx = talloc_new(state);
5100 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5101 0 : return tevent_req_post(req, ev);
5102 : }
5103 :
5104 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
5105 : NULL, &ndr_table_srvsvc,
5106 0 : NDR_SRVSVC_NETSRVSETINFO, state->out_mem_ctx, r);
5107 0 : if (tevent_req_nomem(subreq, req)) {
5108 0 : return tevent_req_post(req, ev);
5109 : }
5110 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSrvSetInfo_r_done, req);
5111 :
5112 0 : return req;
5113 : }
5114 :
5115 0 : static void dcerpc_srvsvc_NetSrvSetInfo_r_done(struct tevent_req *subreq)
5116 : {
5117 0 : struct tevent_req *req =
5118 0 : tevent_req_callback_data(subreq,
5119 : struct tevent_req);
5120 0 : NTSTATUS status;
5121 :
5122 0 : status = dcerpc_binding_handle_call_recv(subreq);
5123 0 : TALLOC_FREE(subreq);
5124 0 : if (tevent_req_nterror(req, status)) {
5125 0 : return;
5126 : }
5127 :
5128 0 : tevent_req_done(req);
5129 : }
5130 :
5131 0 : NTSTATUS dcerpc_srvsvc_NetSrvSetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5132 : {
5133 0 : struct dcerpc_srvsvc_NetSrvSetInfo_r_state *state =
5134 0 : tevent_req_data(req,
5135 : struct dcerpc_srvsvc_NetSrvSetInfo_r_state);
5136 0 : NTSTATUS status;
5137 :
5138 0 : if (tevent_req_is_nterror(req, &status)) {
5139 0 : tevent_req_received(req);
5140 0 : return status;
5141 : }
5142 :
5143 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5144 :
5145 0 : tevent_req_received(req);
5146 0 : return NT_STATUS_OK;
5147 : }
5148 :
5149 0 : NTSTATUS dcerpc_srvsvc_NetSrvSetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetSrvSetInfo *r)
5150 : {
5151 0 : NTSTATUS status;
5152 :
5153 0 : status = dcerpc_binding_handle_call(h,
5154 : NULL, &ndr_table_srvsvc,
5155 : NDR_SRVSVC_NETSRVSETINFO, mem_ctx, r);
5156 :
5157 0 : return status;
5158 : }
5159 :
5160 : struct dcerpc_srvsvc_NetSrvSetInfo_state {
5161 : struct srvsvc_NetSrvSetInfo orig;
5162 : struct srvsvc_NetSrvSetInfo tmp;
5163 : TALLOC_CTX *out_mem_ctx;
5164 : };
5165 :
5166 : static void dcerpc_srvsvc_NetSrvSetInfo_done(struct tevent_req *subreq);
5167 :
5168 0 : struct tevent_req *dcerpc_srvsvc_NetSrvSetInfo_send(TALLOC_CTX *mem_ctx,
5169 : struct tevent_context *ev,
5170 : struct dcerpc_binding_handle *h,
5171 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5172 : uint32_t _level /* [in] */,
5173 : union srvsvc_NetSrvInfo *_info /* [in] [ref,switch_is(level)] */,
5174 : uint32_t *_parm_error /* [in,out] [unique] */)
5175 : {
5176 0 : struct tevent_req *req;
5177 0 : struct dcerpc_srvsvc_NetSrvSetInfo_state *state;
5178 0 : struct tevent_req *subreq;
5179 :
5180 0 : req = tevent_req_create(mem_ctx, &state,
5181 : struct dcerpc_srvsvc_NetSrvSetInfo_state);
5182 0 : if (req == NULL) {
5183 0 : return NULL;
5184 : }
5185 0 : state->out_mem_ctx = NULL;
5186 :
5187 : /* In parameters */
5188 0 : state->orig.in.server_unc = _server_unc;
5189 0 : state->orig.in.level = _level;
5190 0 : state->orig.in.info = _info;
5191 0 : state->orig.in.parm_error = _parm_error;
5192 :
5193 : /* Out parameters */
5194 0 : state->orig.out.parm_error = _parm_error;
5195 :
5196 : /* Result */
5197 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5198 :
5199 0 : state->out_mem_ctx = talloc_named_const(state, 0,
5200 : "dcerpc_srvsvc_NetSrvSetInfo_out_memory");
5201 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5202 0 : return tevent_req_post(req, ev);
5203 : }
5204 :
5205 : /* make a temporary copy, that we pass to the dispatch function */
5206 0 : state->tmp = state->orig;
5207 :
5208 0 : subreq = dcerpc_srvsvc_NetSrvSetInfo_r_send(state, ev, h, &state->tmp);
5209 0 : if (tevent_req_nomem(subreq, req)) {
5210 0 : return tevent_req_post(req, ev);
5211 : }
5212 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSrvSetInfo_done, req);
5213 0 : return req;
5214 : }
5215 :
5216 0 : static void dcerpc_srvsvc_NetSrvSetInfo_done(struct tevent_req *subreq)
5217 : {
5218 0 : struct tevent_req *req = tevent_req_callback_data(
5219 : subreq, struct tevent_req);
5220 0 : struct dcerpc_srvsvc_NetSrvSetInfo_state *state = tevent_req_data(
5221 : req, struct dcerpc_srvsvc_NetSrvSetInfo_state);
5222 0 : NTSTATUS status;
5223 0 : TALLOC_CTX *mem_ctx;
5224 :
5225 0 : if (state->out_mem_ctx) {
5226 0 : mem_ctx = state->out_mem_ctx;
5227 : } else {
5228 0 : mem_ctx = state;
5229 : }
5230 :
5231 0 : status = dcerpc_srvsvc_NetSrvSetInfo_r_recv(subreq, mem_ctx);
5232 0 : TALLOC_FREE(subreq);
5233 0 : if (tevent_req_nterror(req, status)) {
5234 0 : return;
5235 : }
5236 :
5237 : /* Copy out parameters */
5238 0 : if (state->orig.out.parm_error && state->tmp.out.parm_error) {
5239 0 : *state->orig.out.parm_error = *state->tmp.out.parm_error;
5240 : }
5241 :
5242 : /* Copy result */
5243 0 : state->orig.out.result = state->tmp.out.result;
5244 :
5245 : /* Reset temporary structure */
5246 0 : NDR_ZERO_STRUCT(state->tmp);
5247 :
5248 0 : tevent_req_done(req);
5249 : }
5250 :
5251 0 : NTSTATUS dcerpc_srvsvc_NetSrvSetInfo_recv(struct tevent_req *req,
5252 : TALLOC_CTX *mem_ctx,
5253 : WERROR *result)
5254 : {
5255 0 : struct dcerpc_srvsvc_NetSrvSetInfo_state *state = tevent_req_data(
5256 : req, struct dcerpc_srvsvc_NetSrvSetInfo_state);
5257 0 : NTSTATUS status;
5258 :
5259 0 : if (tevent_req_is_nterror(req, &status)) {
5260 0 : tevent_req_received(req);
5261 0 : return status;
5262 : }
5263 :
5264 : /* Steal possible out parameters to the callers context */
5265 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5266 :
5267 : /* Return result */
5268 0 : *result = state->orig.out.result;
5269 :
5270 0 : tevent_req_received(req);
5271 0 : return NT_STATUS_OK;
5272 : }
5273 :
5274 0 : NTSTATUS dcerpc_srvsvc_NetSrvSetInfo(struct dcerpc_binding_handle *h,
5275 : TALLOC_CTX *mem_ctx,
5276 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5277 : uint32_t _level /* [in] */,
5278 : union srvsvc_NetSrvInfo *_info /* [in] [ref,switch_is(level)] */,
5279 : uint32_t *_parm_error /* [in,out] [unique] */,
5280 : WERROR *result)
5281 : {
5282 0 : struct srvsvc_NetSrvSetInfo r;
5283 0 : NTSTATUS status;
5284 :
5285 : /* In parameters */
5286 0 : r.in.server_unc = _server_unc;
5287 0 : r.in.level = _level;
5288 0 : r.in.info = _info;
5289 0 : r.in.parm_error = _parm_error;
5290 :
5291 : /* Out parameters */
5292 0 : r.out.parm_error = _parm_error;
5293 :
5294 : /* Result */
5295 0 : NDR_ZERO_STRUCT(r.out.result);
5296 :
5297 0 : status = dcerpc_srvsvc_NetSrvSetInfo_r(h, mem_ctx, &r);
5298 0 : if (!NT_STATUS_IS_OK(status)) {
5299 0 : return status;
5300 : }
5301 :
5302 : /* Return variables */
5303 0 : if (_parm_error && r.out.parm_error) {
5304 0 : *_parm_error = *r.out.parm_error;
5305 : }
5306 :
5307 : /* Return result */
5308 0 : *result = r.out.result;
5309 :
5310 0 : return NT_STATUS_OK;
5311 : }
5312 :
5313 : struct dcerpc_srvsvc_NetDiskEnum_r_state {
5314 : TALLOC_CTX *out_mem_ctx;
5315 : };
5316 :
5317 : static void dcerpc_srvsvc_NetDiskEnum_r_done(struct tevent_req *subreq);
5318 :
5319 0 : struct tevent_req *dcerpc_srvsvc_NetDiskEnum_r_send(TALLOC_CTX *mem_ctx,
5320 : struct tevent_context *ev,
5321 : struct dcerpc_binding_handle *h,
5322 : struct srvsvc_NetDiskEnum *r)
5323 : {
5324 0 : struct tevent_req *req;
5325 0 : struct dcerpc_srvsvc_NetDiskEnum_r_state *state;
5326 0 : struct tevent_req *subreq;
5327 :
5328 0 : req = tevent_req_create(mem_ctx, &state,
5329 : struct dcerpc_srvsvc_NetDiskEnum_r_state);
5330 0 : if (req == NULL) {
5331 0 : return NULL;
5332 : }
5333 :
5334 0 : state->out_mem_ctx = talloc_new(state);
5335 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5336 0 : return tevent_req_post(req, ev);
5337 : }
5338 :
5339 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
5340 : NULL, &ndr_table_srvsvc,
5341 0 : NDR_SRVSVC_NETDISKENUM, state->out_mem_ctx, r);
5342 0 : if (tevent_req_nomem(subreq, req)) {
5343 0 : return tevent_req_post(req, ev);
5344 : }
5345 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetDiskEnum_r_done, req);
5346 :
5347 0 : return req;
5348 : }
5349 :
5350 0 : static void dcerpc_srvsvc_NetDiskEnum_r_done(struct tevent_req *subreq)
5351 : {
5352 0 : struct tevent_req *req =
5353 0 : tevent_req_callback_data(subreq,
5354 : struct tevent_req);
5355 0 : NTSTATUS status;
5356 :
5357 0 : status = dcerpc_binding_handle_call_recv(subreq);
5358 0 : TALLOC_FREE(subreq);
5359 0 : if (tevent_req_nterror(req, status)) {
5360 0 : return;
5361 : }
5362 :
5363 0 : tevent_req_done(req);
5364 : }
5365 :
5366 0 : NTSTATUS dcerpc_srvsvc_NetDiskEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5367 : {
5368 0 : struct dcerpc_srvsvc_NetDiskEnum_r_state *state =
5369 0 : tevent_req_data(req,
5370 : struct dcerpc_srvsvc_NetDiskEnum_r_state);
5371 0 : NTSTATUS status;
5372 :
5373 0 : if (tevent_req_is_nterror(req, &status)) {
5374 0 : tevent_req_received(req);
5375 0 : return status;
5376 : }
5377 :
5378 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5379 :
5380 0 : tevent_req_received(req);
5381 0 : return NT_STATUS_OK;
5382 : }
5383 :
5384 7 : NTSTATUS dcerpc_srvsvc_NetDiskEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetDiskEnum *r)
5385 : {
5386 0 : NTSTATUS status;
5387 :
5388 7 : status = dcerpc_binding_handle_call(h,
5389 : NULL, &ndr_table_srvsvc,
5390 : NDR_SRVSVC_NETDISKENUM, mem_ctx, r);
5391 :
5392 7 : return status;
5393 : }
5394 :
5395 : struct dcerpc_srvsvc_NetDiskEnum_state {
5396 : struct srvsvc_NetDiskEnum orig;
5397 : struct srvsvc_NetDiskEnum tmp;
5398 : TALLOC_CTX *out_mem_ctx;
5399 : };
5400 :
5401 : static void dcerpc_srvsvc_NetDiskEnum_done(struct tevent_req *subreq);
5402 :
5403 0 : struct tevent_req *dcerpc_srvsvc_NetDiskEnum_send(TALLOC_CTX *mem_ctx,
5404 : struct tevent_context *ev,
5405 : struct dcerpc_binding_handle *h,
5406 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5407 : uint32_t _level /* [in] */,
5408 : struct srvsvc_NetDiskInfo *_info /* [in,out] [ref] */,
5409 : uint32_t _maxlen /* [in] */,
5410 : uint32_t *_totalentries /* [out] [ref] */,
5411 : uint32_t *_resume_handle /* [in,out] [unique] */)
5412 : {
5413 0 : struct tevent_req *req;
5414 0 : struct dcerpc_srvsvc_NetDiskEnum_state *state;
5415 0 : struct tevent_req *subreq;
5416 :
5417 0 : req = tevent_req_create(mem_ctx, &state,
5418 : struct dcerpc_srvsvc_NetDiskEnum_state);
5419 0 : if (req == NULL) {
5420 0 : return NULL;
5421 : }
5422 0 : state->out_mem_ctx = NULL;
5423 :
5424 : /* In parameters */
5425 0 : state->orig.in.server_unc = _server_unc;
5426 0 : state->orig.in.level = _level;
5427 0 : state->orig.in.info = _info;
5428 0 : state->orig.in.maxlen = _maxlen;
5429 0 : state->orig.in.resume_handle = _resume_handle;
5430 :
5431 : /* Out parameters */
5432 0 : state->orig.out.info = _info;
5433 0 : state->orig.out.totalentries = _totalentries;
5434 0 : state->orig.out.resume_handle = _resume_handle;
5435 :
5436 : /* Result */
5437 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5438 :
5439 0 : state->out_mem_ctx = talloc_named_const(state, 0,
5440 : "dcerpc_srvsvc_NetDiskEnum_out_memory");
5441 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5442 0 : return tevent_req_post(req, ev);
5443 : }
5444 :
5445 : /* make a temporary copy, that we pass to the dispatch function */
5446 0 : state->tmp = state->orig;
5447 :
5448 0 : subreq = dcerpc_srvsvc_NetDiskEnum_r_send(state, ev, h, &state->tmp);
5449 0 : if (tevent_req_nomem(subreq, req)) {
5450 0 : return tevent_req_post(req, ev);
5451 : }
5452 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetDiskEnum_done, req);
5453 0 : return req;
5454 : }
5455 :
5456 0 : static void dcerpc_srvsvc_NetDiskEnum_done(struct tevent_req *subreq)
5457 : {
5458 0 : struct tevent_req *req = tevent_req_callback_data(
5459 : subreq, struct tevent_req);
5460 0 : struct dcerpc_srvsvc_NetDiskEnum_state *state = tevent_req_data(
5461 : req, struct dcerpc_srvsvc_NetDiskEnum_state);
5462 0 : NTSTATUS status;
5463 0 : TALLOC_CTX *mem_ctx;
5464 :
5465 0 : if (state->out_mem_ctx) {
5466 0 : mem_ctx = state->out_mem_ctx;
5467 : } else {
5468 0 : mem_ctx = state;
5469 : }
5470 :
5471 0 : status = dcerpc_srvsvc_NetDiskEnum_r_recv(subreq, mem_ctx);
5472 0 : TALLOC_FREE(subreq);
5473 0 : if (tevent_req_nterror(req, status)) {
5474 0 : return;
5475 : }
5476 :
5477 : /* Copy out parameters */
5478 0 : *state->orig.out.info = *state->tmp.out.info;
5479 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
5480 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
5481 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
5482 : }
5483 :
5484 : /* Copy result */
5485 0 : state->orig.out.result = state->tmp.out.result;
5486 :
5487 : /* Reset temporary structure */
5488 0 : NDR_ZERO_STRUCT(state->tmp);
5489 :
5490 0 : tevent_req_done(req);
5491 : }
5492 :
5493 0 : NTSTATUS dcerpc_srvsvc_NetDiskEnum_recv(struct tevent_req *req,
5494 : TALLOC_CTX *mem_ctx,
5495 : WERROR *result)
5496 : {
5497 0 : struct dcerpc_srvsvc_NetDiskEnum_state *state = tevent_req_data(
5498 : req, struct dcerpc_srvsvc_NetDiskEnum_state);
5499 0 : NTSTATUS status;
5500 :
5501 0 : if (tevent_req_is_nterror(req, &status)) {
5502 0 : tevent_req_received(req);
5503 0 : return status;
5504 : }
5505 :
5506 : /* Steal possible out parameters to the callers context */
5507 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5508 :
5509 : /* Return result */
5510 0 : *result = state->orig.out.result;
5511 :
5512 0 : tevent_req_received(req);
5513 0 : return NT_STATUS_OK;
5514 : }
5515 :
5516 0 : NTSTATUS dcerpc_srvsvc_NetDiskEnum(struct dcerpc_binding_handle *h,
5517 : TALLOC_CTX *mem_ctx,
5518 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5519 : uint32_t _level /* [in] */,
5520 : struct srvsvc_NetDiskInfo *_info /* [in,out] [ref] */,
5521 : uint32_t _maxlen /* [in] */,
5522 : uint32_t *_totalentries /* [out] [ref] */,
5523 : uint32_t *_resume_handle /* [in,out] [unique] */,
5524 : WERROR *result)
5525 : {
5526 0 : struct srvsvc_NetDiskEnum r;
5527 0 : NTSTATUS status;
5528 :
5529 : /* In parameters */
5530 0 : r.in.server_unc = _server_unc;
5531 0 : r.in.level = _level;
5532 0 : r.in.info = _info;
5533 0 : r.in.maxlen = _maxlen;
5534 0 : r.in.resume_handle = _resume_handle;
5535 :
5536 : /* Out parameters */
5537 0 : r.out.info = _info;
5538 0 : r.out.totalentries = _totalentries;
5539 0 : r.out.resume_handle = _resume_handle;
5540 :
5541 : /* Result */
5542 0 : NDR_ZERO_STRUCT(r.out.result);
5543 :
5544 0 : status = dcerpc_srvsvc_NetDiskEnum_r(h, mem_ctx, &r);
5545 0 : if (!NT_STATUS_IS_OK(status)) {
5546 0 : return status;
5547 : }
5548 :
5549 : /* Return variables */
5550 0 : *_info = *r.out.info;
5551 0 : *_totalentries = *r.out.totalentries;
5552 0 : if (_resume_handle && r.out.resume_handle) {
5553 0 : *_resume_handle = *r.out.resume_handle;
5554 : }
5555 :
5556 : /* Return result */
5557 0 : *result = r.out.result;
5558 :
5559 0 : return NT_STATUS_OK;
5560 : }
5561 :
5562 : struct dcerpc_srvsvc_NetServerStatisticsGet_r_state {
5563 : TALLOC_CTX *out_mem_ctx;
5564 : };
5565 :
5566 : static void dcerpc_srvsvc_NetServerStatisticsGet_r_done(struct tevent_req *subreq);
5567 :
5568 0 : struct tevent_req *dcerpc_srvsvc_NetServerStatisticsGet_r_send(TALLOC_CTX *mem_ctx,
5569 : struct tevent_context *ev,
5570 : struct dcerpc_binding_handle *h,
5571 : struct srvsvc_NetServerStatisticsGet *r)
5572 : {
5573 0 : struct tevent_req *req;
5574 0 : struct dcerpc_srvsvc_NetServerStatisticsGet_r_state *state;
5575 0 : struct tevent_req *subreq;
5576 :
5577 0 : req = tevent_req_create(mem_ctx, &state,
5578 : struct dcerpc_srvsvc_NetServerStatisticsGet_r_state);
5579 0 : if (req == NULL) {
5580 0 : return NULL;
5581 : }
5582 :
5583 0 : state->out_mem_ctx = talloc_new(state);
5584 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5585 0 : return tevent_req_post(req, ev);
5586 : }
5587 :
5588 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
5589 : NULL, &ndr_table_srvsvc,
5590 0 : NDR_SRVSVC_NETSERVERSTATISTICSGET, state->out_mem_ctx, r);
5591 0 : if (tevent_req_nomem(subreq, req)) {
5592 0 : return tevent_req_post(req, ev);
5593 : }
5594 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetServerStatisticsGet_r_done, req);
5595 :
5596 0 : return req;
5597 : }
5598 :
5599 0 : static void dcerpc_srvsvc_NetServerStatisticsGet_r_done(struct tevent_req *subreq)
5600 : {
5601 0 : struct tevent_req *req =
5602 0 : tevent_req_callback_data(subreq,
5603 : struct tevent_req);
5604 0 : NTSTATUS status;
5605 :
5606 0 : status = dcerpc_binding_handle_call_recv(subreq);
5607 0 : TALLOC_FREE(subreq);
5608 0 : if (tevent_req_nterror(req, status)) {
5609 0 : return;
5610 : }
5611 :
5612 0 : tevent_req_done(req);
5613 : }
5614 :
5615 0 : NTSTATUS dcerpc_srvsvc_NetServerStatisticsGet_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5616 : {
5617 0 : struct dcerpc_srvsvc_NetServerStatisticsGet_r_state *state =
5618 0 : tevent_req_data(req,
5619 : struct dcerpc_srvsvc_NetServerStatisticsGet_r_state);
5620 0 : NTSTATUS status;
5621 :
5622 0 : if (tevent_req_is_nterror(req, &status)) {
5623 0 : tevent_req_received(req);
5624 0 : return status;
5625 : }
5626 :
5627 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5628 :
5629 0 : tevent_req_received(req);
5630 0 : return NT_STATUS_OK;
5631 : }
5632 :
5633 0 : NTSTATUS dcerpc_srvsvc_NetServerStatisticsGet_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetServerStatisticsGet *r)
5634 : {
5635 0 : NTSTATUS status;
5636 :
5637 0 : status = dcerpc_binding_handle_call(h,
5638 : NULL, &ndr_table_srvsvc,
5639 : NDR_SRVSVC_NETSERVERSTATISTICSGET, mem_ctx, r);
5640 :
5641 0 : return status;
5642 : }
5643 :
5644 : struct dcerpc_srvsvc_NetServerStatisticsGet_state {
5645 : struct srvsvc_NetServerStatisticsGet orig;
5646 : struct srvsvc_NetServerStatisticsGet tmp;
5647 : TALLOC_CTX *out_mem_ctx;
5648 : };
5649 :
5650 : static void dcerpc_srvsvc_NetServerStatisticsGet_done(struct tevent_req *subreq);
5651 :
5652 0 : struct tevent_req *dcerpc_srvsvc_NetServerStatisticsGet_send(TALLOC_CTX *mem_ctx,
5653 : struct tevent_context *ev,
5654 : struct dcerpc_binding_handle *h,
5655 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5656 : const char *_service /* [in] [charset(UTF16),unique] */,
5657 : uint32_t _level /* [in] */,
5658 : uint32_t _options /* [in] */,
5659 : struct srvsvc_Statistics **_stats /* [out] [ref] */)
5660 : {
5661 0 : struct tevent_req *req;
5662 0 : struct dcerpc_srvsvc_NetServerStatisticsGet_state *state;
5663 0 : struct tevent_req *subreq;
5664 :
5665 0 : req = tevent_req_create(mem_ctx, &state,
5666 : struct dcerpc_srvsvc_NetServerStatisticsGet_state);
5667 0 : if (req == NULL) {
5668 0 : return NULL;
5669 : }
5670 0 : state->out_mem_ctx = NULL;
5671 :
5672 : /* In parameters */
5673 0 : state->orig.in.server_unc = _server_unc;
5674 0 : state->orig.in.service = _service;
5675 0 : state->orig.in.level = _level;
5676 0 : state->orig.in.options = _options;
5677 :
5678 : /* Out parameters */
5679 0 : state->orig.out.stats = _stats;
5680 :
5681 : /* Result */
5682 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5683 :
5684 0 : state->out_mem_ctx = talloc_named_const(state, 0,
5685 : "dcerpc_srvsvc_NetServerStatisticsGet_out_memory");
5686 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
5687 0 : return tevent_req_post(req, ev);
5688 : }
5689 :
5690 : /* make a temporary copy, that we pass to the dispatch function */
5691 0 : state->tmp = state->orig;
5692 :
5693 0 : subreq = dcerpc_srvsvc_NetServerStatisticsGet_r_send(state, ev, h, &state->tmp);
5694 0 : if (tevent_req_nomem(subreq, req)) {
5695 0 : return tevent_req_post(req, ev);
5696 : }
5697 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetServerStatisticsGet_done, req);
5698 0 : return req;
5699 : }
5700 :
5701 0 : static void dcerpc_srvsvc_NetServerStatisticsGet_done(struct tevent_req *subreq)
5702 : {
5703 0 : struct tevent_req *req = tevent_req_callback_data(
5704 : subreq, struct tevent_req);
5705 0 : struct dcerpc_srvsvc_NetServerStatisticsGet_state *state = tevent_req_data(
5706 : req, struct dcerpc_srvsvc_NetServerStatisticsGet_state);
5707 0 : NTSTATUS status;
5708 0 : TALLOC_CTX *mem_ctx;
5709 :
5710 0 : if (state->out_mem_ctx) {
5711 0 : mem_ctx = state->out_mem_ctx;
5712 : } else {
5713 0 : mem_ctx = state;
5714 : }
5715 :
5716 0 : status = dcerpc_srvsvc_NetServerStatisticsGet_r_recv(subreq, mem_ctx);
5717 0 : TALLOC_FREE(subreq);
5718 0 : if (tevent_req_nterror(req, status)) {
5719 0 : return;
5720 : }
5721 :
5722 : /* Copy out parameters */
5723 0 : *state->orig.out.stats = *state->tmp.out.stats;
5724 :
5725 : /* Copy result */
5726 0 : state->orig.out.result = state->tmp.out.result;
5727 :
5728 : /* Reset temporary structure */
5729 0 : NDR_ZERO_STRUCT(state->tmp);
5730 :
5731 0 : tevent_req_done(req);
5732 : }
5733 :
5734 0 : NTSTATUS dcerpc_srvsvc_NetServerStatisticsGet_recv(struct tevent_req *req,
5735 : TALLOC_CTX *mem_ctx,
5736 : WERROR *result)
5737 : {
5738 0 : struct dcerpc_srvsvc_NetServerStatisticsGet_state *state = tevent_req_data(
5739 : req, struct dcerpc_srvsvc_NetServerStatisticsGet_state);
5740 0 : NTSTATUS status;
5741 :
5742 0 : if (tevent_req_is_nterror(req, &status)) {
5743 0 : tevent_req_received(req);
5744 0 : return status;
5745 : }
5746 :
5747 : /* Steal possible out parameters to the callers context */
5748 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5749 :
5750 : /* Return result */
5751 0 : *result = state->orig.out.result;
5752 :
5753 0 : tevent_req_received(req);
5754 0 : return NT_STATUS_OK;
5755 : }
5756 :
5757 0 : NTSTATUS dcerpc_srvsvc_NetServerStatisticsGet(struct dcerpc_binding_handle *h,
5758 : TALLOC_CTX *mem_ctx,
5759 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5760 : const char *_service /* [in] [charset(UTF16),unique] */,
5761 : uint32_t _level /* [in] */,
5762 : uint32_t _options /* [in] */,
5763 : struct srvsvc_Statistics **_stats /* [out] [ref] */,
5764 : WERROR *result)
5765 : {
5766 0 : struct srvsvc_NetServerStatisticsGet r;
5767 0 : NTSTATUS status;
5768 :
5769 : /* In parameters */
5770 0 : r.in.server_unc = _server_unc;
5771 0 : r.in.service = _service;
5772 0 : r.in.level = _level;
5773 0 : r.in.options = _options;
5774 :
5775 : /* Out parameters */
5776 0 : r.out.stats = _stats;
5777 :
5778 : /* Result */
5779 0 : NDR_ZERO_STRUCT(r.out.result);
5780 :
5781 0 : status = dcerpc_srvsvc_NetServerStatisticsGet_r(h, mem_ctx, &r);
5782 0 : if (!NT_STATUS_IS_OK(status)) {
5783 0 : return status;
5784 : }
5785 :
5786 : /* Return variables */
5787 0 : *_stats = *r.out.stats;
5788 :
5789 : /* Return result */
5790 0 : *result = r.out.result;
5791 :
5792 0 : return NT_STATUS_OK;
5793 : }
5794 :
5795 : struct dcerpc_srvsvc_NetTransportAdd_r_state {
5796 : TALLOC_CTX *out_mem_ctx;
5797 : };
5798 :
5799 : static void dcerpc_srvsvc_NetTransportAdd_r_done(struct tevent_req *subreq);
5800 :
5801 0 : struct tevent_req *dcerpc_srvsvc_NetTransportAdd_r_send(TALLOC_CTX *mem_ctx,
5802 : struct tevent_context *ev,
5803 : struct dcerpc_binding_handle *h,
5804 : struct srvsvc_NetTransportAdd *r)
5805 : {
5806 0 : struct tevent_req *req;
5807 0 : struct dcerpc_srvsvc_NetTransportAdd_r_state *state;
5808 0 : struct tevent_req *subreq;
5809 :
5810 0 : req = tevent_req_create(mem_ctx, &state,
5811 : struct dcerpc_srvsvc_NetTransportAdd_r_state);
5812 0 : if (req == NULL) {
5813 0 : return NULL;
5814 : }
5815 :
5816 0 : state->out_mem_ctx = NULL;
5817 :
5818 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
5819 : NULL, &ndr_table_srvsvc,
5820 : NDR_SRVSVC_NETTRANSPORTADD, state, r);
5821 0 : if (tevent_req_nomem(subreq, req)) {
5822 0 : return tevent_req_post(req, ev);
5823 : }
5824 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetTransportAdd_r_done, req);
5825 :
5826 0 : return req;
5827 : }
5828 :
5829 0 : static void dcerpc_srvsvc_NetTransportAdd_r_done(struct tevent_req *subreq)
5830 : {
5831 0 : struct tevent_req *req =
5832 0 : tevent_req_callback_data(subreq,
5833 : struct tevent_req);
5834 0 : NTSTATUS status;
5835 :
5836 0 : status = dcerpc_binding_handle_call_recv(subreq);
5837 0 : TALLOC_FREE(subreq);
5838 0 : if (tevent_req_nterror(req, status)) {
5839 0 : return;
5840 : }
5841 :
5842 0 : tevent_req_done(req);
5843 : }
5844 :
5845 0 : NTSTATUS dcerpc_srvsvc_NetTransportAdd_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
5846 : {
5847 0 : struct dcerpc_srvsvc_NetTransportAdd_r_state *state =
5848 0 : tevent_req_data(req,
5849 : struct dcerpc_srvsvc_NetTransportAdd_r_state);
5850 0 : NTSTATUS status;
5851 :
5852 0 : if (tevent_req_is_nterror(req, &status)) {
5853 0 : tevent_req_received(req);
5854 0 : return status;
5855 : }
5856 :
5857 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5858 :
5859 0 : tevent_req_received(req);
5860 0 : return NT_STATUS_OK;
5861 : }
5862 :
5863 0 : NTSTATUS dcerpc_srvsvc_NetTransportAdd_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetTransportAdd *r)
5864 : {
5865 0 : NTSTATUS status;
5866 :
5867 0 : status = dcerpc_binding_handle_call(h,
5868 : NULL, &ndr_table_srvsvc,
5869 : NDR_SRVSVC_NETTRANSPORTADD, mem_ctx, r);
5870 :
5871 0 : return status;
5872 : }
5873 :
5874 : struct dcerpc_srvsvc_NetTransportAdd_state {
5875 : struct srvsvc_NetTransportAdd orig;
5876 : struct srvsvc_NetTransportAdd tmp;
5877 : TALLOC_CTX *out_mem_ctx;
5878 : };
5879 :
5880 : static void dcerpc_srvsvc_NetTransportAdd_done(struct tevent_req *subreq);
5881 :
5882 0 : struct tevent_req *dcerpc_srvsvc_NetTransportAdd_send(TALLOC_CTX *mem_ctx,
5883 : struct tevent_context *ev,
5884 : struct dcerpc_binding_handle *h,
5885 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5886 : uint32_t _level /* [in] */,
5887 : union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */)
5888 : {
5889 0 : struct tevent_req *req;
5890 0 : struct dcerpc_srvsvc_NetTransportAdd_state *state;
5891 0 : struct tevent_req *subreq;
5892 :
5893 0 : req = tevent_req_create(mem_ctx, &state,
5894 : struct dcerpc_srvsvc_NetTransportAdd_state);
5895 0 : if (req == NULL) {
5896 0 : return NULL;
5897 : }
5898 0 : state->out_mem_ctx = NULL;
5899 :
5900 : /* In parameters */
5901 0 : state->orig.in.server_unc = _server_unc;
5902 0 : state->orig.in.level = _level;
5903 0 : state->orig.in.info = _info;
5904 :
5905 : /* Out parameters */
5906 :
5907 : /* Result */
5908 0 : NDR_ZERO_STRUCT(state->orig.out.result);
5909 :
5910 : /* make a temporary copy, that we pass to the dispatch function */
5911 0 : state->tmp = state->orig;
5912 :
5913 0 : subreq = dcerpc_srvsvc_NetTransportAdd_r_send(state, ev, h, &state->tmp);
5914 0 : if (tevent_req_nomem(subreq, req)) {
5915 0 : return tevent_req_post(req, ev);
5916 : }
5917 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetTransportAdd_done, req);
5918 0 : return req;
5919 : }
5920 :
5921 0 : static void dcerpc_srvsvc_NetTransportAdd_done(struct tevent_req *subreq)
5922 : {
5923 0 : struct tevent_req *req = tevent_req_callback_data(
5924 : subreq, struct tevent_req);
5925 0 : struct dcerpc_srvsvc_NetTransportAdd_state *state = tevent_req_data(
5926 : req, struct dcerpc_srvsvc_NetTransportAdd_state);
5927 0 : NTSTATUS status;
5928 0 : TALLOC_CTX *mem_ctx;
5929 :
5930 0 : if (state->out_mem_ctx) {
5931 0 : mem_ctx = state->out_mem_ctx;
5932 : } else {
5933 0 : mem_ctx = state;
5934 : }
5935 :
5936 0 : status = dcerpc_srvsvc_NetTransportAdd_r_recv(subreq, mem_ctx);
5937 0 : TALLOC_FREE(subreq);
5938 0 : if (tevent_req_nterror(req, status)) {
5939 0 : return;
5940 : }
5941 :
5942 : /* Copy out parameters */
5943 :
5944 : /* Copy result */
5945 0 : state->orig.out.result = state->tmp.out.result;
5946 :
5947 : /* Reset temporary structure */
5948 0 : NDR_ZERO_STRUCT(state->tmp);
5949 :
5950 0 : tevent_req_done(req);
5951 : }
5952 :
5953 0 : NTSTATUS dcerpc_srvsvc_NetTransportAdd_recv(struct tevent_req *req,
5954 : TALLOC_CTX *mem_ctx,
5955 : WERROR *result)
5956 : {
5957 0 : struct dcerpc_srvsvc_NetTransportAdd_state *state = tevent_req_data(
5958 : req, struct dcerpc_srvsvc_NetTransportAdd_state);
5959 0 : NTSTATUS status;
5960 :
5961 0 : if (tevent_req_is_nterror(req, &status)) {
5962 0 : tevent_req_received(req);
5963 0 : return status;
5964 : }
5965 :
5966 : /* Steal possible out parameters to the callers context */
5967 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
5968 :
5969 : /* Return result */
5970 0 : *result = state->orig.out.result;
5971 :
5972 0 : tevent_req_received(req);
5973 0 : return NT_STATUS_OK;
5974 : }
5975 :
5976 0 : NTSTATUS dcerpc_srvsvc_NetTransportAdd(struct dcerpc_binding_handle *h,
5977 : TALLOC_CTX *mem_ctx,
5978 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
5979 : uint32_t _level /* [in] */,
5980 : union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */,
5981 : WERROR *result)
5982 : {
5983 0 : struct srvsvc_NetTransportAdd r;
5984 0 : NTSTATUS status;
5985 :
5986 : /* In parameters */
5987 0 : r.in.server_unc = _server_unc;
5988 0 : r.in.level = _level;
5989 0 : r.in.info = _info;
5990 :
5991 : /* Out parameters */
5992 :
5993 : /* Result */
5994 0 : NDR_ZERO_STRUCT(r.out.result);
5995 :
5996 0 : status = dcerpc_srvsvc_NetTransportAdd_r(h, mem_ctx, &r);
5997 0 : if (!NT_STATUS_IS_OK(status)) {
5998 0 : return status;
5999 : }
6000 :
6001 : /* Return variables */
6002 :
6003 : /* Return result */
6004 0 : *result = r.out.result;
6005 :
6006 0 : return NT_STATUS_OK;
6007 : }
6008 :
6009 : struct dcerpc_srvsvc_NetTransportEnum_r_state {
6010 : TALLOC_CTX *out_mem_ctx;
6011 : };
6012 :
6013 : static void dcerpc_srvsvc_NetTransportEnum_r_done(struct tevent_req *subreq);
6014 :
6015 0 : struct tevent_req *dcerpc_srvsvc_NetTransportEnum_r_send(TALLOC_CTX *mem_ctx,
6016 : struct tevent_context *ev,
6017 : struct dcerpc_binding_handle *h,
6018 : struct srvsvc_NetTransportEnum *r)
6019 : {
6020 0 : struct tevent_req *req;
6021 0 : struct dcerpc_srvsvc_NetTransportEnum_r_state *state;
6022 0 : struct tevent_req *subreq;
6023 :
6024 0 : req = tevent_req_create(mem_ctx, &state,
6025 : struct dcerpc_srvsvc_NetTransportEnum_r_state);
6026 0 : if (req == NULL) {
6027 0 : return NULL;
6028 : }
6029 :
6030 0 : state->out_mem_ctx = talloc_new(state);
6031 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6032 0 : return tevent_req_post(req, ev);
6033 : }
6034 :
6035 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6036 : NULL, &ndr_table_srvsvc,
6037 0 : NDR_SRVSVC_NETTRANSPORTENUM, state->out_mem_ctx, r);
6038 0 : if (tevent_req_nomem(subreq, req)) {
6039 0 : return tevent_req_post(req, ev);
6040 : }
6041 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetTransportEnum_r_done, req);
6042 :
6043 0 : return req;
6044 : }
6045 :
6046 0 : static void dcerpc_srvsvc_NetTransportEnum_r_done(struct tevent_req *subreq)
6047 : {
6048 0 : struct tevent_req *req =
6049 0 : tevent_req_callback_data(subreq,
6050 : struct tevent_req);
6051 0 : NTSTATUS status;
6052 :
6053 0 : status = dcerpc_binding_handle_call_recv(subreq);
6054 0 : TALLOC_FREE(subreq);
6055 0 : if (tevent_req_nterror(req, status)) {
6056 0 : return;
6057 : }
6058 :
6059 0 : tevent_req_done(req);
6060 : }
6061 :
6062 0 : NTSTATUS dcerpc_srvsvc_NetTransportEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6063 : {
6064 0 : struct dcerpc_srvsvc_NetTransportEnum_r_state *state =
6065 0 : tevent_req_data(req,
6066 : struct dcerpc_srvsvc_NetTransportEnum_r_state);
6067 0 : NTSTATUS status;
6068 :
6069 0 : if (tevent_req_is_nterror(req, &status)) {
6070 0 : tevent_req_received(req);
6071 0 : return status;
6072 : }
6073 :
6074 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6075 :
6076 0 : tevent_req_received(req);
6077 0 : return NT_STATUS_OK;
6078 : }
6079 :
6080 10 : NTSTATUS dcerpc_srvsvc_NetTransportEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetTransportEnum *r)
6081 : {
6082 0 : NTSTATUS status;
6083 :
6084 10 : status = dcerpc_binding_handle_call(h,
6085 : NULL, &ndr_table_srvsvc,
6086 : NDR_SRVSVC_NETTRANSPORTENUM, mem_ctx, r);
6087 :
6088 10 : return status;
6089 : }
6090 :
6091 : struct dcerpc_srvsvc_NetTransportEnum_state {
6092 : struct srvsvc_NetTransportEnum orig;
6093 : struct srvsvc_NetTransportEnum tmp;
6094 : TALLOC_CTX *out_mem_ctx;
6095 : };
6096 :
6097 : static void dcerpc_srvsvc_NetTransportEnum_done(struct tevent_req *subreq);
6098 :
6099 0 : struct tevent_req *dcerpc_srvsvc_NetTransportEnum_send(TALLOC_CTX *mem_ctx,
6100 : struct tevent_context *ev,
6101 : struct dcerpc_binding_handle *h,
6102 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
6103 : struct srvsvc_NetTransportInfoCtr *_transports /* [in,out] [ref] */,
6104 : uint32_t _max_buffer /* [in] */,
6105 : uint32_t *_totalentries /* [out] [ref] */,
6106 : uint32_t *_resume_handle /* [in,out] [unique] */)
6107 : {
6108 0 : struct tevent_req *req;
6109 0 : struct dcerpc_srvsvc_NetTransportEnum_state *state;
6110 0 : struct tevent_req *subreq;
6111 :
6112 0 : req = tevent_req_create(mem_ctx, &state,
6113 : struct dcerpc_srvsvc_NetTransportEnum_state);
6114 0 : if (req == NULL) {
6115 0 : return NULL;
6116 : }
6117 0 : state->out_mem_ctx = NULL;
6118 :
6119 : /* In parameters */
6120 0 : state->orig.in.server_unc = _server_unc;
6121 0 : state->orig.in.transports = _transports;
6122 0 : state->orig.in.max_buffer = _max_buffer;
6123 0 : state->orig.in.resume_handle = _resume_handle;
6124 :
6125 : /* Out parameters */
6126 0 : state->orig.out.transports = _transports;
6127 0 : state->orig.out.totalentries = _totalentries;
6128 0 : state->orig.out.resume_handle = _resume_handle;
6129 :
6130 : /* Result */
6131 0 : NDR_ZERO_STRUCT(state->orig.out.result);
6132 :
6133 0 : state->out_mem_ctx = talloc_named_const(state, 0,
6134 : "dcerpc_srvsvc_NetTransportEnum_out_memory");
6135 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6136 0 : return tevent_req_post(req, ev);
6137 : }
6138 :
6139 : /* make a temporary copy, that we pass to the dispatch function */
6140 0 : state->tmp = state->orig;
6141 :
6142 0 : subreq = dcerpc_srvsvc_NetTransportEnum_r_send(state, ev, h, &state->tmp);
6143 0 : if (tevent_req_nomem(subreq, req)) {
6144 0 : return tevent_req_post(req, ev);
6145 : }
6146 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetTransportEnum_done, req);
6147 0 : return req;
6148 : }
6149 :
6150 0 : static void dcerpc_srvsvc_NetTransportEnum_done(struct tevent_req *subreq)
6151 : {
6152 0 : struct tevent_req *req = tevent_req_callback_data(
6153 : subreq, struct tevent_req);
6154 0 : struct dcerpc_srvsvc_NetTransportEnum_state *state = tevent_req_data(
6155 : req, struct dcerpc_srvsvc_NetTransportEnum_state);
6156 0 : NTSTATUS status;
6157 0 : TALLOC_CTX *mem_ctx;
6158 :
6159 0 : if (state->out_mem_ctx) {
6160 0 : mem_ctx = state->out_mem_ctx;
6161 : } else {
6162 0 : mem_ctx = state;
6163 : }
6164 :
6165 0 : status = dcerpc_srvsvc_NetTransportEnum_r_recv(subreq, mem_ctx);
6166 0 : TALLOC_FREE(subreq);
6167 0 : if (tevent_req_nterror(req, status)) {
6168 0 : return;
6169 : }
6170 :
6171 : /* Copy out parameters */
6172 0 : *state->orig.out.transports = *state->tmp.out.transports;
6173 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
6174 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
6175 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
6176 : }
6177 :
6178 : /* Copy result */
6179 0 : state->orig.out.result = state->tmp.out.result;
6180 :
6181 : /* Reset temporary structure */
6182 0 : NDR_ZERO_STRUCT(state->tmp);
6183 :
6184 0 : tevent_req_done(req);
6185 : }
6186 :
6187 0 : NTSTATUS dcerpc_srvsvc_NetTransportEnum_recv(struct tevent_req *req,
6188 : TALLOC_CTX *mem_ctx,
6189 : WERROR *result)
6190 : {
6191 0 : struct dcerpc_srvsvc_NetTransportEnum_state *state = tevent_req_data(
6192 : req, struct dcerpc_srvsvc_NetTransportEnum_state);
6193 0 : NTSTATUS status;
6194 :
6195 0 : if (tevent_req_is_nterror(req, &status)) {
6196 0 : tevent_req_received(req);
6197 0 : return status;
6198 : }
6199 :
6200 : /* Steal possible out parameters to the callers context */
6201 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6202 :
6203 : /* Return result */
6204 0 : *result = state->orig.out.result;
6205 :
6206 0 : tevent_req_received(req);
6207 0 : return NT_STATUS_OK;
6208 : }
6209 :
6210 0 : NTSTATUS dcerpc_srvsvc_NetTransportEnum(struct dcerpc_binding_handle *h,
6211 : TALLOC_CTX *mem_ctx,
6212 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
6213 : struct srvsvc_NetTransportInfoCtr *_transports /* [in,out] [ref] */,
6214 : uint32_t _max_buffer /* [in] */,
6215 : uint32_t *_totalentries /* [out] [ref] */,
6216 : uint32_t *_resume_handle /* [in,out] [unique] */,
6217 : WERROR *result)
6218 : {
6219 0 : struct srvsvc_NetTransportEnum r;
6220 0 : NTSTATUS status;
6221 :
6222 : /* In parameters */
6223 0 : r.in.server_unc = _server_unc;
6224 0 : r.in.transports = _transports;
6225 0 : r.in.max_buffer = _max_buffer;
6226 0 : r.in.resume_handle = _resume_handle;
6227 :
6228 : /* Out parameters */
6229 0 : r.out.transports = _transports;
6230 0 : r.out.totalentries = _totalentries;
6231 0 : r.out.resume_handle = _resume_handle;
6232 :
6233 : /* Result */
6234 0 : NDR_ZERO_STRUCT(r.out.result);
6235 :
6236 0 : status = dcerpc_srvsvc_NetTransportEnum_r(h, mem_ctx, &r);
6237 0 : if (!NT_STATUS_IS_OK(status)) {
6238 0 : return status;
6239 : }
6240 :
6241 : /* Return variables */
6242 0 : *_transports = *r.out.transports;
6243 0 : *_totalentries = *r.out.totalentries;
6244 0 : if (_resume_handle && r.out.resume_handle) {
6245 0 : *_resume_handle = *r.out.resume_handle;
6246 : }
6247 :
6248 : /* Return result */
6249 0 : *result = r.out.result;
6250 :
6251 0 : return NT_STATUS_OK;
6252 : }
6253 :
6254 : struct dcerpc_srvsvc_NetTransportDel_r_state {
6255 : TALLOC_CTX *out_mem_ctx;
6256 : };
6257 :
6258 : static void dcerpc_srvsvc_NetTransportDel_r_done(struct tevent_req *subreq);
6259 :
6260 0 : struct tevent_req *dcerpc_srvsvc_NetTransportDel_r_send(TALLOC_CTX *mem_ctx,
6261 : struct tevent_context *ev,
6262 : struct dcerpc_binding_handle *h,
6263 : struct srvsvc_NetTransportDel *r)
6264 : {
6265 0 : struct tevent_req *req;
6266 0 : struct dcerpc_srvsvc_NetTransportDel_r_state *state;
6267 0 : struct tevent_req *subreq;
6268 :
6269 0 : req = tevent_req_create(mem_ctx, &state,
6270 : struct dcerpc_srvsvc_NetTransportDel_r_state);
6271 0 : if (req == NULL) {
6272 0 : return NULL;
6273 : }
6274 :
6275 0 : state->out_mem_ctx = NULL;
6276 :
6277 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6278 : NULL, &ndr_table_srvsvc,
6279 : NDR_SRVSVC_NETTRANSPORTDEL, state, r);
6280 0 : if (tevent_req_nomem(subreq, req)) {
6281 0 : return tevent_req_post(req, ev);
6282 : }
6283 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetTransportDel_r_done, req);
6284 :
6285 0 : return req;
6286 : }
6287 :
6288 0 : static void dcerpc_srvsvc_NetTransportDel_r_done(struct tevent_req *subreq)
6289 : {
6290 0 : struct tevent_req *req =
6291 0 : tevent_req_callback_data(subreq,
6292 : struct tevent_req);
6293 0 : NTSTATUS status;
6294 :
6295 0 : status = dcerpc_binding_handle_call_recv(subreq);
6296 0 : TALLOC_FREE(subreq);
6297 0 : if (tevent_req_nterror(req, status)) {
6298 0 : return;
6299 : }
6300 :
6301 0 : tevent_req_done(req);
6302 : }
6303 :
6304 0 : NTSTATUS dcerpc_srvsvc_NetTransportDel_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6305 : {
6306 0 : struct dcerpc_srvsvc_NetTransportDel_r_state *state =
6307 0 : tevent_req_data(req,
6308 : struct dcerpc_srvsvc_NetTransportDel_r_state);
6309 0 : NTSTATUS status;
6310 :
6311 0 : if (tevent_req_is_nterror(req, &status)) {
6312 0 : tevent_req_received(req);
6313 0 : return status;
6314 : }
6315 :
6316 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6317 :
6318 0 : tevent_req_received(req);
6319 0 : return NT_STATUS_OK;
6320 : }
6321 :
6322 0 : NTSTATUS dcerpc_srvsvc_NetTransportDel_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetTransportDel *r)
6323 : {
6324 0 : NTSTATUS status;
6325 :
6326 0 : status = dcerpc_binding_handle_call(h,
6327 : NULL, &ndr_table_srvsvc,
6328 : NDR_SRVSVC_NETTRANSPORTDEL, mem_ctx, r);
6329 :
6330 0 : return status;
6331 : }
6332 :
6333 : struct dcerpc_srvsvc_NetTransportDel_state {
6334 : struct srvsvc_NetTransportDel orig;
6335 : struct srvsvc_NetTransportDel tmp;
6336 : TALLOC_CTX *out_mem_ctx;
6337 : };
6338 :
6339 : static void dcerpc_srvsvc_NetTransportDel_done(struct tevent_req *subreq);
6340 :
6341 0 : struct tevent_req *dcerpc_srvsvc_NetTransportDel_send(TALLOC_CTX *mem_ctx,
6342 : struct tevent_context *ev,
6343 : struct dcerpc_binding_handle *h,
6344 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
6345 : uint32_t _level /* [in] */,
6346 : struct srvsvc_NetTransportInfo0 *_info0 /* [in] [ref] */)
6347 : {
6348 0 : struct tevent_req *req;
6349 0 : struct dcerpc_srvsvc_NetTransportDel_state *state;
6350 0 : struct tevent_req *subreq;
6351 :
6352 0 : req = tevent_req_create(mem_ctx, &state,
6353 : struct dcerpc_srvsvc_NetTransportDel_state);
6354 0 : if (req == NULL) {
6355 0 : return NULL;
6356 : }
6357 0 : state->out_mem_ctx = NULL;
6358 :
6359 : /* In parameters */
6360 0 : state->orig.in.server_unc = _server_unc;
6361 0 : state->orig.in.level = _level;
6362 0 : state->orig.in.info0 = _info0;
6363 :
6364 : /* Out parameters */
6365 :
6366 : /* Result */
6367 0 : NDR_ZERO_STRUCT(state->orig.out.result);
6368 :
6369 : /* make a temporary copy, that we pass to the dispatch function */
6370 0 : state->tmp = state->orig;
6371 :
6372 0 : subreq = dcerpc_srvsvc_NetTransportDel_r_send(state, ev, h, &state->tmp);
6373 0 : if (tevent_req_nomem(subreq, req)) {
6374 0 : return tevent_req_post(req, ev);
6375 : }
6376 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetTransportDel_done, req);
6377 0 : return req;
6378 : }
6379 :
6380 0 : static void dcerpc_srvsvc_NetTransportDel_done(struct tevent_req *subreq)
6381 : {
6382 0 : struct tevent_req *req = tevent_req_callback_data(
6383 : subreq, struct tevent_req);
6384 0 : struct dcerpc_srvsvc_NetTransportDel_state *state = tevent_req_data(
6385 : req, struct dcerpc_srvsvc_NetTransportDel_state);
6386 0 : NTSTATUS status;
6387 0 : TALLOC_CTX *mem_ctx;
6388 :
6389 0 : if (state->out_mem_ctx) {
6390 0 : mem_ctx = state->out_mem_ctx;
6391 : } else {
6392 0 : mem_ctx = state;
6393 : }
6394 :
6395 0 : status = dcerpc_srvsvc_NetTransportDel_r_recv(subreq, mem_ctx);
6396 0 : TALLOC_FREE(subreq);
6397 0 : if (tevent_req_nterror(req, status)) {
6398 0 : return;
6399 : }
6400 :
6401 : /* Copy out parameters */
6402 :
6403 : /* Copy result */
6404 0 : state->orig.out.result = state->tmp.out.result;
6405 :
6406 : /* Reset temporary structure */
6407 0 : NDR_ZERO_STRUCT(state->tmp);
6408 :
6409 0 : tevent_req_done(req);
6410 : }
6411 :
6412 0 : NTSTATUS dcerpc_srvsvc_NetTransportDel_recv(struct tevent_req *req,
6413 : TALLOC_CTX *mem_ctx,
6414 : WERROR *result)
6415 : {
6416 0 : struct dcerpc_srvsvc_NetTransportDel_state *state = tevent_req_data(
6417 : req, struct dcerpc_srvsvc_NetTransportDel_state);
6418 0 : NTSTATUS status;
6419 :
6420 0 : if (tevent_req_is_nterror(req, &status)) {
6421 0 : tevent_req_received(req);
6422 0 : return status;
6423 : }
6424 :
6425 : /* Steal possible out parameters to the callers context */
6426 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6427 :
6428 : /* Return result */
6429 0 : *result = state->orig.out.result;
6430 :
6431 0 : tevent_req_received(req);
6432 0 : return NT_STATUS_OK;
6433 : }
6434 :
6435 0 : NTSTATUS dcerpc_srvsvc_NetTransportDel(struct dcerpc_binding_handle *h,
6436 : TALLOC_CTX *mem_ctx,
6437 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
6438 : uint32_t _level /* [in] */,
6439 : struct srvsvc_NetTransportInfo0 *_info0 /* [in] [ref] */,
6440 : WERROR *result)
6441 : {
6442 0 : struct srvsvc_NetTransportDel r;
6443 0 : NTSTATUS status;
6444 :
6445 : /* In parameters */
6446 0 : r.in.server_unc = _server_unc;
6447 0 : r.in.level = _level;
6448 0 : r.in.info0 = _info0;
6449 :
6450 : /* Out parameters */
6451 :
6452 : /* Result */
6453 0 : NDR_ZERO_STRUCT(r.out.result);
6454 :
6455 0 : status = dcerpc_srvsvc_NetTransportDel_r(h, mem_ctx, &r);
6456 0 : if (!NT_STATUS_IS_OK(status)) {
6457 0 : return status;
6458 : }
6459 :
6460 : /* Return variables */
6461 :
6462 : /* Return result */
6463 0 : *result = r.out.result;
6464 :
6465 0 : return NT_STATUS_OK;
6466 : }
6467 :
6468 : struct dcerpc_srvsvc_NetRemoteTOD_r_state {
6469 : TALLOC_CTX *out_mem_ctx;
6470 : };
6471 :
6472 : static void dcerpc_srvsvc_NetRemoteTOD_r_done(struct tevent_req *subreq);
6473 :
6474 0 : struct tevent_req *dcerpc_srvsvc_NetRemoteTOD_r_send(TALLOC_CTX *mem_ctx,
6475 : struct tevent_context *ev,
6476 : struct dcerpc_binding_handle *h,
6477 : struct srvsvc_NetRemoteTOD *r)
6478 : {
6479 0 : struct tevent_req *req;
6480 0 : struct dcerpc_srvsvc_NetRemoteTOD_r_state *state;
6481 0 : struct tevent_req *subreq;
6482 :
6483 0 : req = tevent_req_create(mem_ctx, &state,
6484 : struct dcerpc_srvsvc_NetRemoteTOD_r_state);
6485 0 : if (req == NULL) {
6486 0 : return NULL;
6487 : }
6488 :
6489 0 : state->out_mem_ctx = talloc_new(state);
6490 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6491 0 : return tevent_req_post(req, ev);
6492 : }
6493 :
6494 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6495 : NULL, &ndr_table_srvsvc,
6496 0 : NDR_SRVSVC_NETREMOTETOD, state->out_mem_ctx, r);
6497 0 : if (tevent_req_nomem(subreq, req)) {
6498 0 : return tevent_req_post(req, ev);
6499 : }
6500 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetRemoteTOD_r_done, req);
6501 :
6502 0 : return req;
6503 : }
6504 :
6505 0 : static void dcerpc_srvsvc_NetRemoteTOD_r_done(struct tevent_req *subreq)
6506 : {
6507 0 : struct tevent_req *req =
6508 0 : tevent_req_callback_data(subreq,
6509 : struct tevent_req);
6510 0 : NTSTATUS status;
6511 :
6512 0 : status = dcerpc_binding_handle_call_recv(subreq);
6513 0 : TALLOC_FREE(subreq);
6514 0 : if (tevent_req_nterror(req, status)) {
6515 0 : return;
6516 : }
6517 :
6518 0 : tevent_req_done(req);
6519 : }
6520 :
6521 0 : NTSTATUS dcerpc_srvsvc_NetRemoteTOD_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6522 : {
6523 0 : struct dcerpc_srvsvc_NetRemoteTOD_r_state *state =
6524 0 : tevent_req_data(req,
6525 : struct dcerpc_srvsvc_NetRemoteTOD_r_state);
6526 0 : NTSTATUS status;
6527 :
6528 0 : if (tevent_req_is_nterror(req, &status)) {
6529 0 : tevent_req_received(req);
6530 0 : return status;
6531 : }
6532 :
6533 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6534 :
6535 0 : tevent_req_received(req);
6536 0 : return NT_STATUS_OK;
6537 : }
6538 :
6539 32 : NTSTATUS dcerpc_srvsvc_NetRemoteTOD_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetRemoteTOD *r)
6540 : {
6541 0 : NTSTATUS status;
6542 :
6543 32 : status = dcerpc_binding_handle_call(h,
6544 : NULL, &ndr_table_srvsvc,
6545 : NDR_SRVSVC_NETREMOTETOD, mem_ctx, r);
6546 :
6547 32 : return status;
6548 : }
6549 :
6550 : struct dcerpc_srvsvc_NetRemoteTOD_state {
6551 : struct srvsvc_NetRemoteTOD orig;
6552 : struct srvsvc_NetRemoteTOD tmp;
6553 : TALLOC_CTX *out_mem_ctx;
6554 : };
6555 :
6556 : static void dcerpc_srvsvc_NetRemoteTOD_done(struct tevent_req *subreq);
6557 :
6558 0 : struct tevent_req *dcerpc_srvsvc_NetRemoteTOD_send(TALLOC_CTX *mem_ctx,
6559 : struct tevent_context *ev,
6560 : struct dcerpc_binding_handle *h,
6561 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
6562 : struct srvsvc_NetRemoteTODInfo **_info /* [out] [ref] */)
6563 : {
6564 0 : struct tevent_req *req;
6565 0 : struct dcerpc_srvsvc_NetRemoteTOD_state *state;
6566 0 : struct tevent_req *subreq;
6567 :
6568 0 : req = tevent_req_create(mem_ctx, &state,
6569 : struct dcerpc_srvsvc_NetRemoteTOD_state);
6570 0 : if (req == NULL) {
6571 0 : return NULL;
6572 : }
6573 0 : state->out_mem_ctx = NULL;
6574 :
6575 : /* In parameters */
6576 0 : state->orig.in.server_unc = _server_unc;
6577 :
6578 : /* Out parameters */
6579 0 : state->orig.out.info = _info;
6580 :
6581 : /* Result */
6582 0 : NDR_ZERO_STRUCT(state->orig.out.result);
6583 :
6584 0 : state->out_mem_ctx = talloc_named_const(state, 0,
6585 : "dcerpc_srvsvc_NetRemoteTOD_out_memory");
6586 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6587 0 : return tevent_req_post(req, ev);
6588 : }
6589 :
6590 : /* make a temporary copy, that we pass to the dispatch function */
6591 0 : state->tmp = state->orig;
6592 :
6593 0 : subreq = dcerpc_srvsvc_NetRemoteTOD_r_send(state, ev, h, &state->tmp);
6594 0 : if (tevent_req_nomem(subreq, req)) {
6595 0 : return tevent_req_post(req, ev);
6596 : }
6597 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetRemoteTOD_done, req);
6598 0 : return req;
6599 : }
6600 :
6601 0 : static void dcerpc_srvsvc_NetRemoteTOD_done(struct tevent_req *subreq)
6602 : {
6603 0 : struct tevent_req *req = tevent_req_callback_data(
6604 : subreq, struct tevent_req);
6605 0 : struct dcerpc_srvsvc_NetRemoteTOD_state *state = tevent_req_data(
6606 : req, struct dcerpc_srvsvc_NetRemoteTOD_state);
6607 0 : NTSTATUS status;
6608 0 : TALLOC_CTX *mem_ctx;
6609 :
6610 0 : if (state->out_mem_ctx) {
6611 0 : mem_ctx = state->out_mem_ctx;
6612 : } else {
6613 0 : mem_ctx = state;
6614 : }
6615 :
6616 0 : status = dcerpc_srvsvc_NetRemoteTOD_r_recv(subreq, mem_ctx);
6617 0 : TALLOC_FREE(subreq);
6618 0 : if (tevent_req_nterror(req, status)) {
6619 0 : return;
6620 : }
6621 :
6622 : /* Copy out parameters */
6623 0 : *state->orig.out.info = *state->tmp.out.info;
6624 :
6625 : /* Copy result */
6626 0 : state->orig.out.result = state->tmp.out.result;
6627 :
6628 : /* Reset temporary structure */
6629 0 : NDR_ZERO_STRUCT(state->tmp);
6630 :
6631 0 : tevent_req_done(req);
6632 : }
6633 :
6634 0 : NTSTATUS dcerpc_srvsvc_NetRemoteTOD_recv(struct tevent_req *req,
6635 : TALLOC_CTX *mem_ctx,
6636 : WERROR *result)
6637 : {
6638 0 : struct dcerpc_srvsvc_NetRemoteTOD_state *state = tevent_req_data(
6639 : req, struct dcerpc_srvsvc_NetRemoteTOD_state);
6640 0 : NTSTATUS status;
6641 :
6642 0 : if (tevent_req_is_nterror(req, &status)) {
6643 0 : tevent_req_received(req);
6644 0 : return status;
6645 : }
6646 :
6647 : /* Steal possible out parameters to the callers context */
6648 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6649 :
6650 : /* Return result */
6651 0 : *result = state->orig.out.result;
6652 :
6653 0 : tevent_req_received(req);
6654 0 : return NT_STATUS_OK;
6655 : }
6656 :
6657 11 : NTSTATUS dcerpc_srvsvc_NetRemoteTOD(struct dcerpc_binding_handle *h,
6658 : TALLOC_CTX *mem_ctx,
6659 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
6660 : struct srvsvc_NetRemoteTODInfo **_info /* [out] [ref] */,
6661 : WERROR *result)
6662 : {
6663 0 : struct srvsvc_NetRemoteTOD r;
6664 0 : NTSTATUS status;
6665 :
6666 : /* In parameters */
6667 11 : r.in.server_unc = _server_unc;
6668 :
6669 : /* Out parameters */
6670 11 : r.out.info = _info;
6671 :
6672 : /* Result */
6673 11 : NDR_ZERO_STRUCT(r.out.result);
6674 :
6675 11 : status = dcerpc_srvsvc_NetRemoteTOD_r(h, mem_ctx, &r);
6676 11 : if (!NT_STATUS_IS_OK(status)) {
6677 0 : return status;
6678 : }
6679 :
6680 : /* Return variables */
6681 11 : *_info = *r.out.info;
6682 :
6683 : /* Return result */
6684 11 : *result = r.out.result;
6685 :
6686 11 : return NT_STATUS_OK;
6687 : }
6688 :
6689 : struct dcerpc_srvsvc_NetSetServiceBits_r_state {
6690 : TALLOC_CTX *out_mem_ctx;
6691 : };
6692 :
6693 : static void dcerpc_srvsvc_NetSetServiceBits_r_done(struct tevent_req *subreq);
6694 :
6695 0 : struct tevent_req *dcerpc_srvsvc_NetSetServiceBits_r_send(TALLOC_CTX *mem_ctx,
6696 : struct tevent_context *ev,
6697 : struct dcerpc_binding_handle *h,
6698 : struct srvsvc_NetSetServiceBits *r)
6699 : {
6700 0 : struct tevent_req *req;
6701 0 : struct dcerpc_srvsvc_NetSetServiceBits_r_state *state;
6702 0 : struct tevent_req *subreq;
6703 :
6704 0 : req = tevent_req_create(mem_ctx, &state,
6705 : struct dcerpc_srvsvc_NetSetServiceBits_r_state);
6706 0 : if (req == NULL) {
6707 0 : return NULL;
6708 : }
6709 :
6710 0 : state->out_mem_ctx = NULL;
6711 :
6712 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6713 : NULL, &ndr_table_srvsvc,
6714 : NDR_SRVSVC_NETSETSERVICEBITS, state, r);
6715 0 : if (tevent_req_nomem(subreq, req)) {
6716 0 : return tevent_req_post(req, ev);
6717 : }
6718 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSetServiceBits_r_done, req);
6719 :
6720 0 : return req;
6721 : }
6722 :
6723 0 : static void dcerpc_srvsvc_NetSetServiceBits_r_done(struct tevent_req *subreq)
6724 : {
6725 0 : struct tevent_req *req =
6726 0 : tevent_req_callback_data(subreq,
6727 : struct tevent_req);
6728 0 : NTSTATUS status;
6729 :
6730 0 : status = dcerpc_binding_handle_call_recv(subreq);
6731 0 : TALLOC_FREE(subreq);
6732 0 : if (tevent_req_nterror(req, status)) {
6733 0 : return;
6734 : }
6735 :
6736 0 : tevent_req_done(req);
6737 : }
6738 :
6739 0 : NTSTATUS dcerpc_srvsvc_NetSetServiceBits_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6740 : {
6741 0 : struct dcerpc_srvsvc_NetSetServiceBits_r_state *state =
6742 0 : tevent_req_data(req,
6743 : struct dcerpc_srvsvc_NetSetServiceBits_r_state);
6744 0 : NTSTATUS status;
6745 :
6746 0 : if (tevent_req_is_nterror(req, &status)) {
6747 0 : tevent_req_received(req);
6748 0 : return status;
6749 : }
6750 :
6751 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6752 :
6753 0 : tevent_req_received(req);
6754 0 : return NT_STATUS_OK;
6755 : }
6756 :
6757 0 : NTSTATUS dcerpc_srvsvc_NetSetServiceBits_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetSetServiceBits *r)
6758 : {
6759 0 : NTSTATUS status;
6760 :
6761 0 : status = dcerpc_binding_handle_call(h,
6762 : NULL, &ndr_table_srvsvc,
6763 : NDR_SRVSVC_NETSETSERVICEBITS, mem_ctx, r);
6764 :
6765 0 : return status;
6766 : }
6767 :
6768 : struct dcerpc_srvsvc_NetSetServiceBits_state {
6769 : struct srvsvc_NetSetServiceBits orig;
6770 : struct srvsvc_NetSetServiceBits tmp;
6771 : TALLOC_CTX *out_mem_ctx;
6772 : };
6773 :
6774 : static void dcerpc_srvsvc_NetSetServiceBits_done(struct tevent_req *subreq);
6775 :
6776 0 : struct tevent_req *dcerpc_srvsvc_NetSetServiceBits_send(TALLOC_CTX *mem_ctx,
6777 : struct tevent_context *ev,
6778 : struct dcerpc_binding_handle *h,
6779 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
6780 : const char *_transport /* [in] [charset(UTF16),unique] */,
6781 : uint32_t _servicebits /* [in] */,
6782 : uint32_t _updateimmediately /* [in] */)
6783 : {
6784 0 : struct tevent_req *req;
6785 0 : struct dcerpc_srvsvc_NetSetServiceBits_state *state;
6786 0 : struct tevent_req *subreq;
6787 :
6788 0 : req = tevent_req_create(mem_ctx, &state,
6789 : struct dcerpc_srvsvc_NetSetServiceBits_state);
6790 0 : if (req == NULL) {
6791 0 : return NULL;
6792 : }
6793 0 : state->out_mem_ctx = NULL;
6794 :
6795 : /* In parameters */
6796 0 : state->orig.in.server_unc = _server_unc;
6797 0 : state->orig.in.transport = _transport;
6798 0 : state->orig.in.servicebits = _servicebits;
6799 0 : state->orig.in.updateimmediately = _updateimmediately;
6800 :
6801 : /* Out parameters */
6802 :
6803 : /* Result */
6804 0 : NDR_ZERO_STRUCT(state->orig.out.result);
6805 :
6806 : /* make a temporary copy, that we pass to the dispatch function */
6807 0 : state->tmp = state->orig;
6808 :
6809 0 : subreq = dcerpc_srvsvc_NetSetServiceBits_r_send(state, ev, h, &state->tmp);
6810 0 : if (tevent_req_nomem(subreq, req)) {
6811 0 : return tevent_req_post(req, ev);
6812 : }
6813 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSetServiceBits_done, req);
6814 0 : return req;
6815 : }
6816 :
6817 0 : static void dcerpc_srvsvc_NetSetServiceBits_done(struct tevent_req *subreq)
6818 : {
6819 0 : struct tevent_req *req = tevent_req_callback_data(
6820 : subreq, struct tevent_req);
6821 0 : struct dcerpc_srvsvc_NetSetServiceBits_state *state = tevent_req_data(
6822 : req, struct dcerpc_srvsvc_NetSetServiceBits_state);
6823 0 : NTSTATUS status;
6824 0 : TALLOC_CTX *mem_ctx;
6825 :
6826 0 : if (state->out_mem_ctx) {
6827 0 : mem_ctx = state->out_mem_ctx;
6828 : } else {
6829 0 : mem_ctx = state;
6830 : }
6831 :
6832 0 : status = dcerpc_srvsvc_NetSetServiceBits_r_recv(subreq, mem_ctx);
6833 0 : TALLOC_FREE(subreq);
6834 0 : if (tevent_req_nterror(req, status)) {
6835 0 : return;
6836 : }
6837 :
6838 : /* Copy out parameters */
6839 :
6840 : /* Copy result */
6841 0 : state->orig.out.result = state->tmp.out.result;
6842 :
6843 : /* Reset temporary structure */
6844 0 : NDR_ZERO_STRUCT(state->tmp);
6845 :
6846 0 : tevent_req_done(req);
6847 : }
6848 :
6849 0 : NTSTATUS dcerpc_srvsvc_NetSetServiceBits_recv(struct tevent_req *req,
6850 : TALLOC_CTX *mem_ctx,
6851 : WERROR *result)
6852 : {
6853 0 : struct dcerpc_srvsvc_NetSetServiceBits_state *state = tevent_req_data(
6854 : req, struct dcerpc_srvsvc_NetSetServiceBits_state);
6855 0 : NTSTATUS status;
6856 :
6857 0 : if (tevent_req_is_nterror(req, &status)) {
6858 0 : tevent_req_received(req);
6859 0 : return status;
6860 : }
6861 :
6862 : /* Steal possible out parameters to the callers context */
6863 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6864 :
6865 : /* Return result */
6866 0 : *result = state->orig.out.result;
6867 :
6868 0 : tevent_req_received(req);
6869 0 : return NT_STATUS_OK;
6870 : }
6871 :
6872 0 : NTSTATUS dcerpc_srvsvc_NetSetServiceBits(struct dcerpc_binding_handle *h,
6873 : TALLOC_CTX *mem_ctx,
6874 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
6875 : const char *_transport /* [in] [charset(UTF16),unique] */,
6876 : uint32_t _servicebits /* [in] */,
6877 : uint32_t _updateimmediately /* [in] */,
6878 : WERROR *result)
6879 : {
6880 0 : struct srvsvc_NetSetServiceBits r;
6881 0 : NTSTATUS status;
6882 :
6883 : /* In parameters */
6884 0 : r.in.server_unc = _server_unc;
6885 0 : r.in.transport = _transport;
6886 0 : r.in.servicebits = _servicebits;
6887 0 : r.in.updateimmediately = _updateimmediately;
6888 :
6889 : /* Out parameters */
6890 :
6891 : /* Result */
6892 0 : NDR_ZERO_STRUCT(r.out.result);
6893 :
6894 0 : status = dcerpc_srvsvc_NetSetServiceBits_r(h, mem_ctx, &r);
6895 0 : if (!NT_STATUS_IS_OK(status)) {
6896 0 : return status;
6897 : }
6898 :
6899 : /* Return variables */
6900 :
6901 : /* Return result */
6902 0 : *result = r.out.result;
6903 :
6904 0 : return NT_STATUS_OK;
6905 : }
6906 :
6907 : struct dcerpc_srvsvc_NetPathType_r_state {
6908 : TALLOC_CTX *out_mem_ctx;
6909 : };
6910 :
6911 : static void dcerpc_srvsvc_NetPathType_r_done(struct tevent_req *subreq);
6912 :
6913 0 : struct tevent_req *dcerpc_srvsvc_NetPathType_r_send(TALLOC_CTX *mem_ctx,
6914 : struct tevent_context *ev,
6915 : struct dcerpc_binding_handle *h,
6916 : struct srvsvc_NetPathType *r)
6917 : {
6918 0 : struct tevent_req *req;
6919 0 : struct dcerpc_srvsvc_NetPathType_r_state *state;
6920 0 : struct tevent_req *subreq;
6921 :
6922 0 : req = tevent_req_create(mem_ctx, &state,
6923 : struct dcerpc_srvsvc_NetPathType_r_state);
6924 0 : if (req == NULL) {
6925 0 : return NULL;
6926 : }
6927 :
6928 0 : state->out_mem_ctx = talloc_new(state);
6929 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
6930 0 : return tevent_req_post(req, ev);
6931 : }
6932 :
6933 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
6934 : NULL, &ndr_table_srvsvc,
6935 0 : NDR_SRVSVC_NETPATHTYPE, state->out_mem_ctx, r);
6936 0 : if (tevent_req_nomem(subreq, req)) {
6937 0 : return tevent_req_post(req, ev);
6938 : }
6939 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetPathType_r_done, req);
6940 :
6941 0 : return req;
6942 : }
6943 :
6944 0 : static void dcerpc_srvsvc_NetPathType_r_done(struct tevent_req *subreq)
6945 : {
6946 0 : struct tevent_req *req =
6947 0 : tevent_req_callback_data(subreq,
6948 : struct tevent_req);
6949 0 : NTSTATUS status;
6950 :
6951 0 : status = dcerpc_binding_handle_call_recv(subreq);
6952 0 : TALLOC_FREE(subreq);
6953 0 : if (tevent_req_nterror(req, status)) {
6954 0 : return;
6955 : }
6956 :
6957 0 : tevent_req_done(req);
6958 : }
6959 :
6960 0 : NTSTATUS dcerpc_srvsvc_NetPathType_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
6961 : {
6962 0 : struct dcerpc_srvsvc_NetPathType_r_state *state =
6963 0 : tevent_req_data(req,
6964 : struct dcerpc_srvsvc_NetPathType_r_state);
6965 0 : NTSTATUS status;
6966 :
6967 0 : if (tevent_req_is_nterror(req, &status)) {
6968 0 : tevent_req_received(req);
6969 0 : return status;
6970 : }
6971 :
6972 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
6973 :
6974 0 : tevent_req_received(req);
6975 0 : return NT_STATUS_OK;
6976 : }
6977 :
6978 0 : NTSTATUS dcerpc_srvsvc_NetPathType_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetPathType *r)
6979 : {
6980 0 : NTSTATUS status;
6981 :
6982 0 : status = dcerpc_binding_handle_call(h,
6983 : NULL, &ndr_table_srvsvc,
6984 : NDR_SRVSVC_NETPATHTYPE, mem_ctx, r);
6985 :
6986 0 : return status;
6987 : }
6988 :
6989 : struct dcerpc_srvsvc_NetPathType_state {
6990 : struct srvsvc_NetPathType orig;
6991 : struct srvsvc_NetPathType tmp;
6992 : TALLOC_CTX *out_mem_ctx;
6993 : };
6994 :
6995 : static void dcerpc_srvsvc_NetPathType_done(struct tevent_req *subreq);
6996 :
6997 0 : struct tevent_req *dcerpc_srvsvc_NetPathType_send(TALLOC_CTX *mem_ctx,
6998 : struct tevent_context *ev,
6999 : struct dcerpc_binding_handle *h,
7000 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7001 : const char *_path /* [in] [charset(UTF16)] */,
7002 : uint32_t _pathflags /* [in] */,
7003 : uint32_t *_pathtype /* [out] [ref] */)
7004 : {
7005 0 : struct tevent_req *req;
7006 0 : struct dcerpc_srvsvc_NetPathType_state *state;
7007 0 : struct tevent_req *subreq;
7008 :
7009 0 : req = tevent_req_create(mem_ctx, &state,
7010 : struct dcerpc_srvsvc_NetPathType_state);
7011 0 : if (req == NULL) {
7012 0 : return NULL;
7013 : }
7014 0 : state->out_mem_ctx = NULL;
7015 :
7016 : /* In parameters */
7017 0 : state->orig.in.server_unc = _server_unc;
7018 0 : state->orig.in.path = _path;
7019 0 : state->orig.in.pathflags = _pathflags;
7020 :
7021 : /* Out parameters */
7022 0 : state->orig.out.pathtype = _pathtype;
7023 :
7024 : /* Result */
7025 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7026 :
7027 0 : state->out_mem_ctx = talloc_named_const(state, 0,
7028 : "dcerpc_srvsvc_NetPathType_out_memory");
7029 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
7030 0 : return tevent_req_post(req, ev);
7031 : }
7032 :
7033 : /* make a temporary copy, that we pass to the dispatch function */
7034 0 : state->tmp = state->orig;
7035 :
7036 0 : subreq = dcerpc_srvsvc_NetPathType_r_send(state, ev, h, &state->tmp);
7037 0 : if (tevent_req_nomem(subreq, req)) {
7038 0 : return tevent_req_post(req, ev);
7039 : }
7040 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetPathType_done, req);
7041 0 : return req;
7042 : }
7043 :
7044 0 : static void dcerpc_srvsvc_NetPathType_done(struct tevent_req *subreq)
7045 : {
7046 0 : struct tevent_req *req = tevent_req_callback_data(
7047 : subreq, struct tevent_req);
7048 0 : struct dcerpc_srvsvc_NetPathType_state *state = tevent_req_data(
7049 : req, struct dcerpc_srvsvc_NetPathType_state);
7050 0 : NTSTATUS status;
7051 0 : TALLOC_CTX *mem_ctx;
7052 :
7053 0 : if (state->out_mem_ctx) {
7054 0 : mem_ctx = state->out_mem_ctx;
7055 : } else {
7056 0 : mem_ctx = state;
7057 : }
7058 :
7059 0 : status = dcerpc_srvsvc_NetPathType_r_recv(subreq, mem_ctx);
7060 0 : TALLOC_FREE(subreq);
7061 0 : if (tevent_req_nterror(req, status)) {
7062 0 : return;
7063 : }
7064 :
7065 : /* Copy out parameters */
7066 0 : *state->orig.out.pathtype = *state->tmp.out.pathtype;
7067 :
7068 : /* Copy result */
7069 0 : state->orig.out.result = state->tmp.out.result;
7070 :
7071 : /* Reset temporary structure */
7072 0 : NDR_ZERO_STRUCT(state->tmp);
7073 :
7074 0 : tevent_req_done(req);
7075 : }
7076 :
7077 0 : NTSTATUS dcerpc_srvsvc_NetPathType_recv(struct tevent_req *req,
7078 : TALLOC_CTX *mem_ctx,
7079 : WERROR *result)
7080 : {
7081 0 : struct dcerpc_srvsvc_NetPathType_state *state = tevent_req_data(
7082 : req, struct dcerpc_srvsvc_NetPathType_state);
7083 0 : NTSTATUS status;
7084 :
7085 0 : if (tevent_req_is_nterror(req, &status)) {
7086 0 : tevent_req_received(req);
7087 0 : return status;
7088 : }
7089 :
7090 : /* Steal possible out parameters to the callers context */
7091 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7092 :
7093 : /* Return result */
7094 0 : *result = state->orig.out.result;
7095 :
7096 0 : tevent_req_received(req);
7097 0 : return NT_STATUS_OK;
7098 : }
7099 :
7100 0 : NTSTATUS dcerpc_srvsvc_NetPathType(struct dcerpc_binding_handle *h,
7101 : TALLOC_CTX *mem_ctx,
7102 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7103 : const char *_path /* [in] [charset(UTF16)] */,
7104 : uint32_t _pathflags /* [in] */,
7105 : uint32_t *_pathtype /* [out] [ref] */,
7106 : WERROR *result)
7107 : {
7108 0 : struct srvsvc_NetPathType r;
7109 0 : NTSTATUS status;
7110 :
7111 : /* In parameters */
7112 0 : r.in.server_unc = _server_unc;
7113 0 : r.in.path = _path;
7114 0 : r.in.pathflags = _pathflags;
7115 :
7116 : /* Out parameters */
7117 0 : r.out.pathtype = _pathtype;
7118 :
7119 : /* Result */
7120 0 : NDR_ZERO_STRUCT(r.out.result);
7121 :
7122 0 : status = dcerpc_srvsvc_NetPathType_r(h, mem_ctx, &r);
7123 0 : if (!NT_STATUS_IS_OK(status)) {
7124 0 : return status;
7125 : }
7126 :
7127 : /* Return variables */
7128 0 : *_pathtype = *r.out.pathtype;
7129 :
7130 : /* Return result */
7131 0 : *result = r.out.result;
7132 :
7133 0 : return NT_STATUS_OK;
7134 : }
7135 :
7136 : struct dcerpc_srvsvc_NetPathCanonicalize_r_state {
7137 : TALLOC_CTX *out_mem_ctx;
7138 : };
7139 :
7140 : static void dcerpc_srvsvc_NetPathCanonicalize_r_done(struct tevent_req *subreq);
7141 :
7142 0 : struct tevent_req *dcerpc_srvsvc_NetPathCanonicalize_r_send(TALLOC_CTX *mem_ctx,
7143 : struct tevent_context *ev,
7144 : struct dcerpc_binding_handle *h,
7145 : struct srvsvc_NetPathCanonicalize *r)
7146 : {
7147 0 : struct tevent_req *req;
7148 0 : struct dcerpc_srvsvc_NetPathCanonicalize_r_state *state;
7149 0 : struct tevent_req *subreq;
7150 :
7151 0 : req = tevent_req_create(mem_ctx, &state,
7152 : struct dcerpc_srvsvc_NetPathCanonicalize_r_state);
7153 0 : if (req == NULL) {
7154 0 : return NULL;
7155 : }
7156 :
7157 0 : state->out_mem_ctx = talloc_new(state);
7158 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
7159 0 : return tevent_req_post(req, ev);
7160 : }
7161 :
7162 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7163 : NULL, &ndr_table_srvsvc,
7164 0 : NDR_SRVSVC_NETPATHCANONICALIZE, state->out_mem_ctx, r);
7165 0 : if (tevent_req_nomem(subreq, req)) {
7166 0 : return tevent_req_post(req, ev);
7167 : }
7168 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetPathCanonicalize_r_done, req);
7169 :
7170 0 : return req;
7171 : }
7172 :
7173 0 : static void dcerpc_srvsvc_NetPathCanonicalize_r_done(struct tevent_req *subreq)
7174 : {
7175 0 : struct tevent_req *req =
7176 0 : tevent_req_callback_data(subreq,
7177 : struct tevent_req);
7178 0 : NTSTATUS status;
7179 :
7180 0 : status = dcerpc_binding_handle_call_recv(subreq);
7181 0 : TALLOC_FREE(subreq);
7182 0 : if (tevent_req_nterror(req, status)) {
7183 0 : return;
7184 : }
7185 :
7186 0 : tevent_req_done(req);
7187 : }
7188 :
7189 0 : NTSTATUS dcerpc_srvsvc_NetPathCanonicalize_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7190 : {
7191 0 : struct dcerpc_srvsvc_NetPathCanonicalize_r_state *state =
7192 0 : tevent_req_data(req,
7193 : struct dcerpc_srvsvc_NetPathCanonicalize_r_state);
7194 0 : NTSTATUS status;
7195 :
7196 0 : if (tevent_req_is_nterror(req, &status)) {
7197 0 : tevent_req_received(req);
7198 0 : return status;
7199 : }
7200 :
7201 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7202 :
7203 0 : tevent_req_received(req);
7204 0 : return NT_STATUS_OK;
7205 : }
7206 :
7207 0 : NTSTATUS dcerpc_srvsvc_NetPathCanonicalize_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetPathCanonicalize *r)
7208 : {
7209 0 : NTSTATUS status;
7210 :
7211 0 : status = dcerpc_binding_handle_call(h,
7212 : NULL, &ndr_table_srvsvc,
7213 : NDR_SRVSVC_NETPATHCANONICALIZE, mem_ctx, r);
7214 :
7215 0 : return status;
7216 : }
7217 :
7218 : struct dcerpc_srvsvc_NetPathCanonicalize_state {
7219 : struct srvsvc_NetPathCanonicalize orig;
7220 : struct srvsvc_NetPathCanonicalize tmp;
7221 : TALLOC_CTX *out_mem_ctx;
7222 : };
7223 :
7224 : static void dcerpc_srvsvc_NetPathCanonicalize_done(struct tevent_req *subreq);
7225 :
7226 0 : struct tevent_req *dcerpc_srvsvc_NetPathCanonicalize_send(TALLOC_CTX *mem_ctx,
7227 : struct tevent_context *ev,
7228 : struct dcerpc_binding_handle *h,
7229 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7230 : const char *_path /* [in] [charset(UTF16)] */,
7231 : uint8_t *_can_path /* [out] [size_is(maxbuf)] */,
7232 : uint32_t _maxbuf /* [in] */,
7233 : const char *_prefix /* [in] [charset(UTF16)] */,
7234 : uint32_t *_pathtype /* [in,out] [ref] */,
7235 : uint32_t _pathflags /* [in] */)
7236 : {
7237 0 : struct tevent_req *req;
7238 0 : struct dcerpc_srvsvc_NetPathCanonicalize_state *state;
7239 0 : struct tevent_req *subreq;
7240 :
7241 0 : req = tevent_req_create(mem_ctx, &state,
7242 : struct dcerpc_srvsvc_NetPathCanonicalize_state);
7243 0 : if (req == NULL) {
7244 0 : return NULL;
7245 : }
7246 0 : state->out_mem_ctx = NULL;
7247 :
7248 : /* In parameters */
7249 0 : state->orig.in.server_unc = _server_unc;
7250 0 : state->orig.in.path = _path;
7251 0 : state->orig.in.maxbuf = _maxbuf;
7252 0 : state->orig.in.prefix = _prefix;
7253 0 : state->orig.in.pathtype = _pathtype;
7254 0 : state->orig.in.pathflags = _pathflags;
7255 :
7256 : /* Out parameters */
7257 0 : state->orig.out.can_path = _can_path;
7258 0 : state->orig.out.pathtype = _pathtype;
7259 :
7260 : /* Result */
7261 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7262 :
7263 0 : state->out_mem_ctx = talloc_named_const(state, 0,
7264 : "dcerpc_srvsvc_NetPathCanonicalize_out_memory");
7265 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
7266 0 : return tevent_req_post(req, ev);
7267 : }
7268 :
7269 : /* make a temporary copy, that we pass to the dispatch function */
7270 0 : state->tmp = state->orig;
7271 :
7272 0 : subreq = dcerpc_srvsvc_NetPathCanonicalize_r_send(state, ev, h, &state->tmp);
7273 0 : if (tevent_req_nomem(subreq, req)) {
7274 0 : return tevent_req_post(req, ev);
7275 : }
7276 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetPathCanonicalize_done, req);
7277 0 : return req;
7278 : }
7279 :
7280 0 : static void dcerpc_srvsvc_NetPathCanonicalize_done(struct tevent_req *subreq)
7281 : {
7282 0 : struct tevent_req *req = tevent_req_callback_data(
7283 : subreq, struct tevent_req);
7284 0 : struct dcerpc_srvsvc_NetPathCanonicalize_state *state = tevent_req_data(
7285 : req, struct dcerpc_srvsvc_NetPathCanonicalize_state);
7286 0 : NTSTATUS status;
7287 0 : TALLOC_CTX *mem_ctx;
7288 :
7289 0 : if (state->out_mem_ctx) {
7290 0 : mem_ctx = state->out_mem_ctx;
7291 : } else {
7292 0 : mem_ctx = state;
7293 : }
7294 :
7295 0 : status = dcerpc_srvsvc_NetPathCanonicalize_r_recv(subreq, mem_ctx);
7296 0 : TALLOC_FREE(subreq);
7297 0 : if (tevent_req_nterror(req, status)) {
7298 0 : return;
7299 : }
7300 :
7301 : /* Copy out parameters */
7302 : {
7303 0 : size_t _copy_len_can_path;
7304 0 : _copy_len_can_path = state->tmp.in.maxbuf;
7305 0 : if (state->orig.out.can_path != state->tmp.out.can_path) {
7306 0 : memcpy(state->orig.out.can_path, state->tmp.out.can_path, _copy_len_can_path * sizeof(*state->orig.out.can_path));
7307 : }
7308 : }
7309 0 : *state->orig.out.pathtype = *state->tmp.out.pathtype;
7310 :
7311 : /* Copy result */
7312 0 : state->orig.out.result = state->tmp.out.result;
7313 :
7314 : /* Reset temporary structure */
7315 0 : NDR_ZERO_STRUCT(state->tmp);
7316 :
7317 0 : tevent_req_done(req);
7318 : }
7319 :
7320 0 : NTSTATUS dcerpc_srvsvc_NetPathCanonicalize_recv(struct tevent_req *req,
7321 : TALLOC_CTX *mem_ctx,
7322 : WERROR *result)
7323 : {
7324 0 : struct dcerpc_srvsvc_NetPathCanonicalize_state *state = tevent_req_data(
7325 : req, struct dcerpc_srvsvc_NetPathCanonicalize_state);
7326 0 : NTSTATUS status;
7327 :
7328 0 : if (tevent_req_is_nterror(req, &status)) {
7329 0 : tevent_req_received(req);
7330 0 : return status;
7331 : }
7332 :
7333 : /* Steal possible out parameters to the callers context */
7334 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7335 :
7336 : /* Return result */
7337 0 : *result = state->orig.out.result;
7338 :
7339 0 : tevent_req_received(req);
7340 0 : return NT_STATUS_OK;
7341 : }
7342 :
7343 0 : NTSTATUS dcerpc_srvsvc_NetPathCanonicalize(struct dcerpc_binding_handle *h,
7344 : TALLOC_CTX *mem_ctx,
7345 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7346 : const char *_path /* [in] [charset(UTF16)] */,
7347 : uint8_t *_can_path /* [out] [size_is(maxbuf)] */,
7348 : uint32_t _maxbuf /* [in] */,
7349 : const char *_prefix /* [in] [charset(UTF16)] */,
7350 : uint32_t *_pathtype /* [in,out] [ref] */,
7351 : uint32_t _pathflags /* [in] */,
7352 : WERROR *result)
7353 : {
7354 0 : struct srvsvc_NetPathCanonicalize r;
7355 0 : NTSTATUS status;
7356 :
7357 : /* In parameters */
7358 0 : r.in.server_unc = _server_unc;
7359 0 : r.in.path = _path;
7360 0 : r.in.maxbuf = _maxbuf;
7361 0 : r.in.prefix = _prefix;
7362 0 : r.in.pathtype = _pathtype;
7363 0 : r.in.pathflags = _pathflags;
7364 :
7365 : /* Out parameters */
7366 0 : r.out.can_path = _can_path;
7367 0 : r.out.pathtype = _pathtype;
7368 :
7369 : /* Result */
7370 0 : NDR_ZERO_STRUCT(r.out.result);
7371 :
7372 0 : status = dcerpc_srvsvc_NetPathCanonicalize_r(h, mem_ctx, &r);
7373 0 : if (!NT_STATUS_IS_OK(status)) {
7374 0 : return status;
7375 : }
7376 :
7377 : /* Return variables */
7378 : {
7379 0 : size_t _copy_len_can_path;
7380 0 : _copy_len_can_path = r.in.maxbuf;
7381 0 : if (_can_path != r.out.can_path) {
7382 0 : memcpy(_can_path, r.out.can_path, _copy_len_can_path * sizeof(*_can_path));
7383 : }
7384 : }
7385 0 : *_pathtype = *r.out.pathtype;
7386 :
7387 : /* Return result */
7388 0 : *result = r.out.result;
7389 :
7390 0 : return NT_STATUS_OK;
7391 : }
7392 :
7393 : struct dcerpc_srvsvc_NetPathCompare_r_state {
7394 : TALLOC_CTX *out_mem_ctx;
7395 : };
7396 :
7397 : static void dcerpc_srvsvc_NetPathCompare_r_done(struct tevent_req *subreq);
7398 :
7399 0 : struct tevent_req *dcerpc_srvsvc_NetPathCompare_r_send(TALLOC_CTX *mem_ctx,
7400 : struct tevent_context *ev,
7401 : struct dcerpc_binding_handle *h,
7402 : struct srvsvc_NetPathCompare *r)
7403 : {
7404 0 : struct tevent_req *req;
7405 0 : struct dcerpc_srvsvc_NetPathCompare_r_state *state;
7406 0 : struct tevent_req *subreq;
7407 :
7408 0 : req = tevent_req_create(mem_ctx, &state,
7409 : struct dcerpc_srvsvc_NetPathCompare_r_state);
7410 0 : if (req == NULL) {
7411 0 : return NULL;
7412 : }
7413 :
7414 0 : state->out_mem_ctx = NULL;
7415 :
7416 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7417 : NULL, &ndr_table_srvsvc,
7418 : NDR_SRVSVC_NETPATHCOMPARE, state, r);
7419 0 : if (tevent_req_nomem(subreq, req)) {
7420 0 : return tevent_req_post(req, ev);
7421 : }
7422 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetPathCompare_r_done, req);
7423 :
7424 0 : return req;
7425 : }
7426 :
7427 0 : static void dcerpc_srvsvc_NetPathCompare_r_done(struct tevent_req *subreq)
7428 : {
7429 0 : struct tevent_req *req =
7430 0 : tevent_req_callback_data(subreq,
7431 : struct tevent_req);
7432 0 : NTSTATUS status;
7433 :
7434 0 : status = dcerpc_binding_handle_call_recv(subreq);
7435 0 : TALLOC_FREE(subreq);
7436 0 : if (tevent_req_nterror(req, status)) {
7437 0 : return;
7438 : }
7439 :
7440 0 : tevent_req_done(req);
7441 : }
7442 :
7443 0 : NTSTATUS dcerpc_srvsvc_NetPathCompare_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7444 : {
7445 0 : struct dcerpc_srvsvc_NetPathCompare_r_state *state =
7446 0 : tevent_req_data(req,
7447 : struct dcerpc_srvsvc_NetPathCompare_r_state);
7448 0 : NTSTATUS status;
7449 :
7450 0 : if (tevent_req_is_nterror(req, &status)) {
7451 0 : tevent_req_received(req);
7452 0 : return status;
7453 : }
7454 :
7455 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7456 :
7457 0 : tevent_req_received(req);
7458 0 : return NT_STATUS_OK;
7459 : }
7460 :
7461 0 : NTSTATUS dcerpc_srvsvc_NetPathCompare_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetPathCompare *r)
7462 : {
7463 0 : NTSTATUS status;
7464 :
7465 0 : status = dcerpc_binding_handle_call(h,
7466 : NULL, &ndr_table_srvsvc,
7467 : NDR_SRVSVC_NETPATHCOMPARE, mem_ctx, r);
7468 :
7469 0 : return status;
7470 : }
7471 :
7472 : struct dcerpc_srvsvc_NetPathCompare_state {
7473 : struct srvsvc_NetPathCompare orig;
7474 : struct srvsvc_NetPathCompare tmp;
7475 : TALLOC_CTX *out_mem_ctx;
7476 : };
7477 :
7478 : static void dcerpc_srvsvc_NetPathCompare_done(struct tevent_req *subreq);
7479 :
7480 0 : struct tevent_req *dcerpc_srvsvc_NetPathCompare_send(TALLOC_CTX *mem_ctx,
7481 : struct tevent_context *ev,
7482 : struct dcerpc_binding_handle *h,
7483 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7484 : const char *_path1 /* [in] [charset(UTF16)] */,
7485 : const char *_path2 /* [in] [charset(UTF16)] */,
7486 : uint32_t _pathtype /* [in] */,
7487 : uint32_t _pathflags /* [in] */)
7488 : {
7489 0 : struct tevent_req *req;
7490 0 : struct dcerpc_srvsvc_NetPathCompare_state *state;
7491 0 : struct tevent_req *subreq;
7492 :
7493 0 : req = tevent_req_create(mem_ctx, &state,
7494 : struct dcerpc_srvsvc_NetPathCompare_state);
7495 0 : if (req == NULL) {
7496 0 : return NULL;
7497 : }
7498 0 : state->out_mem_ctx = NULL;
7499 :
7500 : /* In parameters */
7501 0 : state->orig.in.server_unc = _server_unc;
7502 0 : state->orig.in.path1 = _path1;
7503 0 : state->orig.in.path2 = _path2;
7504 0 : state->orig.in.pathtype = _pathtype;
7505 0 : state->orig.in.pathflags = _pathflags;
7506 :
7507 : /* Out parameters */
7508 :
7509 : /* Result */
7510 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7511 :
7512 : /* make a temporary copy, that we pass to the dispatch function */
7513 0 : state->tmp = state->orig;
7514 :
7515 0 : subreq = dcerpc_srvsvc_NetPathCompare_r_send(state, ev, h, &state->tmp);
7516 0 : if (tevent_req_nomem(subreq, req)) {
7517 0 : return tevent_req_post(req, ev);
7518 : }
7519 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetPathCompare_done, req);
7520 0 : return req;
7521 : }
7522 :
7523 0 : static void dcerpc_srvsvc_NetPathCompare_done(struct tevent_req *subreq)
7524 : {
7525 0 : struct tevent_req *req = tevent_req_callback_data(
7526 : subreq, struct tevent_req);
7527 0 : struct dcerpc_srvsvc_NetPathCompare_state *state = tevent_req_data(
7528 : req, struct dcerpc_srvsvc_NetPathCompare_state);
7529 0 : NTSTATUS status;
7530 0 : TALLOC_CTX *mem_ctx;
7531 :
7532 0 : if (state->out_mem_ctx) {
7533 0 : mem_ctx = state->out_mem_ctx;
7534 : } else {
7535 0 : mem_ctx = state;
7536 : }
7537 :
7538 0 : status = dcerpc_srvsvc_NetPathCompare_r_recv(subreq, mem_ctx);
7539 0 : TALLOC_FREE(subreq);
7540 0 : if (tevent_req_nterror(req, status)) {
7541 0 : return;
7542 : }
7543 :
7544 : /* Copy out parameters */
7545 :
7546 : /* Copy result */
7547 0 : state->orig.out.result = state->tmp.out.result;
7548 :
7549 : /* Reset temporary structure */
7550 0 : NDR_ZERO_STRUCT(state->tmp);
7551 :
7552 0 : tevent_req_done(req);
7553 : }
7554 :
7555 0 : NTSTATUS dcerpc_srvsvc_NetPathCompare_recv(struct tevent_req *req,
7556 : TALLOC_CTX *mem_ctx,
7557 : WERROR *result)
7558 : {
7559 0 : struct dcerpc_srvsvc_NetPathCompare_state *state = tevent_req_data(
7560 : req, struct dcerpc_srvsvc_NetPathCompare_state);
7561 0 : NTSTATUS status;
7562 :
7563 0 : if (tevent_req_is_nterror(req, &status)) {
7564 0 : tevent_req_received(req);
7565 0 : return status;
7566 : }
7567 :
7568 : /* Steal possible out parameters to the callers context */
7569 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7570 :
7571 : /* Return result */
7572 0 : *result = state->orig.out.result;
7573 :
7574 0 : tevent_req_received(req);
7575 0 : return NT_STATUS_OK;
7576 : }
7577 :
7578 0 : NTSTATUS dcerpc_srvsvc_NetPathCompare(struct dcerpc_binding_handle *h,
7579 : TALLOC_CTX *mem_ctx,
7580 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7581 : const char *_path1 /* [in] [charset(UTF16)] */,
7582 : const char *_path2 /* [in] [charset(UTF16)] */,
7583 : uint32_t _pathtype /* [in] */,
7584 : uint32_t _pathflags /* [in] */,
7585 : WERROR *result)
7586 : {
7587 0 : struct srvsvc_NetPathCompare r;
7588 0 : NTSTATUS status;
7589 :
7590 : /* In parameters */
7591 0 : r.in.server_unc = _server_unc;
7592 0 : r.in.path1 = _path1;
7593 0 : r.in.path2 = _path2;
7594 0 : r.in.pathtype = _pathtype;
7595 0 : r.in.pathflags = _pathflags;
7596 :
7597 : /* Out parameters */
7598 :
7599 : /* Result */
7600 0 : NDR_ZERO_STRUCT(r.out.result);
7601 :
7602 0 : status = dcerpc_srvsvc_NetPathCompare_r(h, mem_ctx, &r);
7603 0 : if (!NT_STATUS_IS_OK(status)) {
7604 0 : return status;
7605 : }
7606 :
7607 : /* Return variables */
7608 :
7609 : /* Return result */
7610 0 : *result = r.out.result;
7611 :
7612 0 : return NT_STATUS_OK;
7613 : }
7614 :
7615 : struct dcerpc_srvsvc_NetNameValidate_r_state {
7616 : TALLOC_CTX *out_mem_ctx;
7617 : };
7618 :
7619 : static void dcerpc_srvsvc_NetNameValidate_r_done(struct tevent_req *subreq);
7620 :
7621 0 : struct tevent_req *dcerpc_srvsvc_NetNameValidate_r_send(TALLOC_CTX *mem_ctx,
7622 : struct tevent_context *ev,
7623 : struct dcerpc_binding_handle *h,
7624 : struct srvsvc_NetNameValidate *r)
7625 : {
7626 0 : struct tevent_req *req;
7627 0 : struct dcerpc_srvsvc_NetNameValidate_r_state *state;
7628 0 : struct tevent_req *subreq;
7629 :
7630 0 : req = tevent_req_create(mem_ctx, &state,
7631 : struct dcerpc_srvsvc_NetNameValidate_r_state);
7632 0 : if (req == NULL) {
7633 0 : return NULL;
7634 : }
7635 :
7636 0 : state->out_mem_ctx = NULL;
7637 :
7638 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7639 : NULL, &ndr_table_srvsvc,
7640 : NDR_SRVSVC_NETNAMEVALIDATE, state, r);
7641 0 : if (tevent_req_nomem(subreq, req)) {
7642 0 : return tevent_req_post(req, ev);
7643 : }
7644 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetNameValidate_r_done, req);
7645 :
7646 0 : return req;
7647 : }
7648 :
7649 0 : static void dcerpc_srvsvc_NetNameValidate_r_done(struct tevent_req *subreq)
7650 : {
7651 0 : struct tevent_req *req =
7652 0 : tevent_req_callback_data(subreq,
7653 : struct tevent_req);
7654 0 : NTSTATUS status;
7655 :
7656 0 : status = dcerpc_binding_handle_call_recv(subreq);
7657 0 : TALLOC_FREE(subreq);
7658 0 : if (tevent_req_nterror(req, status)) {
7659 0 : return;
7660 : }
7661 :
7662 0 : tevent_req_done(req);
7663 : }
7664 :
7665 0 : NTSTATUS dcerpc_srvsvc_NetNameValidate_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7666 : {
7667 0 : struct dcerpc_srvsvc_NetNameValidate_r_state *state =
7668 0 : tevent_req_data(req,
7669 : struct dcerpc_srvsvc_NetNameValidate_r_state);
7670 0 : NTSTATUS status;
7671 :
7672 0 : if (tevent_req_is_nterror(req, &status)) {
7673 0 : tevent_req_received(req);
7674 0 : return status;
7675 : }
7676 :
7677 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7678 :
7679 0 : tevent_req_received(req);
7680 0 : return NT_STATUS_OK;
7681 : }
7682 :
7683 19552 : NTSTATUS dcerpc_srvsvc_NetNameValidate_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetNameValidate *r)
7684 : {
7685 0 : NTSTATUS status;
7686 :
7687 19552 : status = dcerpc_binding_handle_call(h,
7688 : NULL, &ndr_table_srvsvc,
7689 : NDR_SRVSVC_NETNAMEVALIDATE, mem_ctx, r);
7690 :
7691 19552 : return status;
7692 : }
7693 :
7694 : struct dcerpc_srvsvc_NetNameValidate_state {
7695 : struct srvsvc_NetNameValidate orig;
7696 : struct srvsvc_NetNameValidate tmp;
7697 : TALLOC_CTX *out_mem_ctx;
7698 : };
7699 :
7700 : static void dcerpc_srvsvc_NetNameValidate_done(struct tevent_req *subreq);
7701 :
7702 0 : struct tevent_req *dcerpc_srvsvc_NetNameValidate_send(TALLOC_CTX *mem_ctx,
7703 : struct tevent_context *ev,
7704 : struct dcerpc_binding_handle *h,
7705 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7706 : const char *_name /* [in] [charset(UTF16)] */,
7707 : uint32_t _name_type /* [in] */,
7708 : uint32_t _flags /* [in] */)
7709 : {
7710 0 : struct tevent_req *req;
7711 0 : struct dcerpc_srvsvc_NetNameValidate_state *state;
7712 0 : struct tevent_req *subreq;
7713 :
7714 0 : req = tevent_req_create(mem_ctx, &state,
7715 : struct dcerpc_srvsvc_NetNameValidate_state);
7716 0 : if (req == NULL) {
7717 0 : return NULL;
7718 : }
7719 0 : state->out_mem_ctx = NULL;
7720 :
7721 : /* In parameters */
7722 0 : state->orig.in.server_unc = _server_unc;
7723 0 : state->orig.in.name = _name;
7724 0 : state->orig.in.name_type = _name_type;
7725 0 : state->orig.in.flags = _flags;
7726 :
7727 : /* Out parameters */
7728 :
7729 : /* Result */
7730 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7731 :
7732 : /* make a temporary copy, that we pass to the dispatch function */
7733 0 : state->tmp = state->orig;
7734 :
7735 0 : subreq = dcerpc_srvsvc_NetNameValidate_r_send(state, ev, h, &state->tmp);
7736 0 : if (tevent_req_nomem(subreq, req)) {
7737 0 : return tevent_req_post(req, ev);
7738 : }
7739 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetNameValidate_done, req);
7740 0 : return req;
7741 : }
7742 :
7743 0 : static void dcerpc_srvsvc_NetNameValidate_done(struct tevent_req *subreq)
7744 : {
7745 0 : struct tevent_req *req = tevent_req_callback_data(
7746 : subreq, struct tevent_req);
7747 0 : struct dcerpc_srvsvc_NetNameValidate_state *state = tevent_req_data(
7748 : req, struct dcerpc_srvsvc_NetNameValidate_state);
7749 0 : NTSTATUS status;
7750 0 : TALLOC_CTX *mem_ctx;
7751 :
7752 0 : if (state->out_mem_ctx) {
7753 0 : mem_ctx = state->out_mem_ctx;
7754 : } else {
7755 0 : mem_ctx = state;
7756 : }
7757 :
7758 0 : status = dcerpc_srvsvc_NetNameValidate_r_recv(subreq, mem_ctx);
7759 0 : TALLOC_FREE(subreq);
7760 0 : if (tevent_req_nterror(req, status)) {
7761 0 : return;
7762 : }
7763 :
7764 : /* Copy out parameters */
7765 :
7766 : /* Copy result */
7767 0 : state->orig.out.result = state->tmp.out.result;
7768 :
7769 : /* Reset temporary structure */
7770 0 : NDR_ZERO_STRUCT(state->tmp);
7771 :
7772 0 : tevent_req_done(req);
7773 : }
7774 :
7775 0 : NTSTATUS dcerpc_srvsvc_NetNameValidate_recv(struct tevent_req *req,
7776 : TALLOC_CTX *mem_ctx,
7777 : WERROR *result)
7778 : {
7779 0 : struct dcerpc_srvsvc_NetNameValidate_state *state = tevent_req_data(
7780 : req, struct dcerpc_srvsvc_NetNameValidate_state);
7781 0 : NTSTATUS status;
7782 :
7783 0 : if (tevent_req_is_nterror(req, &status)) {
7784 0 : tevent_req_received(req);
7785 0 : return status;
7786 : }
7787 :
7788 : /* Steal possible out parameters to the callers context */
7789 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7790 :
7791 : /* Return result */
7792 0 : *result = state->orig.out.result;
7793 :
7794 0 : tevent_req_received(req);
7795 0 : return NT_STATUS_OK;
7796 : }
7797 :
7798 0 : NTSTATUS dcerpc_srvsvc_NetNameValidate(struct dcerpc_binding_handle *h,
7799 : TALLOC_CTX *mem_ctx,
7800 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7801 : const char *_name /* [in] [charset(UTF16)] */,
7802 : uint32_t _name_type /* [in] */,
7803 : uint32_t _flags /* [in] */,
7804 : WERROR *result)
7805 : {
7806 0 : struct srvsvc_NetNameValidate r;
7807 0 : NTSTATUS status;
7808 :
7809 : /* In parameters */
7810 0 : r.in.server_unc = _server_unc;
7811 0 : r.in.name = _name;
7812 0 : r.in.name_type = _name_type;
7813 0 : r.in.flags = _flags;
7814 :
7815 : /* Out parameters */
7816 :
7817 : /* Result */
7818 0 : NDR_ZERO_STRUCT(r.out.result);
7819 :
7820 0 : status = dcerpc_srvsvc_NetNameValidate_r(h, mem_ctx, &r);
7821 0 : if (!NT_STATUS_IS_OK(status)) {
7822 0 : return status;
7823 : }
7824 :
7825 : /* Return variables */
7826 :
7827 : /* Return result */
7828 0 : *result = r.out.result;
7829 :
7830 0 : return NT_STATUS_OK;
7831 : }
7832 :
7833 : struct dcerpc_srvsvc_NetPRNameCompare_r_state {
7834 : TALLOC_CTX *out_mem_ctx;
7835 : };
7836 :
7837 : static void dcerpc_srvsvc_NetPRNameCompare_r_done(struct tevent_req *subreq);
7838 :
7839 0 : struct tevent_req *dcerpc_srvsvc_NetPRNameCompare_r_send(TALLOC_CTX *mem_ctx,
7840 : struct tevent_context *ev,
7841 : struct dcerpc_binding_handle *h,
7842 : struct srvsvc_NetPRNameCompare *r)
7843 : {
7844 0 : struct tevent_req *req;
7845 0 : struct dcerpc_srvsvc_NetPRNameCompare_r_state *state;
7846 0 : struct tevent_req *subreq;
7847 :
7848 0 : req = tevent_req_create(mem_ctx, &state,
7849 : struct dcerpc_srvsvc_NetPRNameCompare_r_state);
7850 0 : if (req == NULL) {
7851 0 : return NULL;
7852 : }
7853 :
7854 0 : state->out_mem_ctx = NULL;
7855 :
7856 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
7857 : NULL, &ndr_table_srvsvc,
7858 : NDR_SRVSVC_NETPRNAMECOMPARE, state, r);
7859 0 : if (tevent_req_nomem(subreq, req)) {
7860 0 : return tevent_req_post(req, ev);
7861 : }
7862 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetPRNameCompare_r_done, req);
7863 :
7864 0 : return req;
7865 : }
7866 :
7867 0 : static void dcerpc_srvsvc_NetPRNameCompare_r_done(struct tevent_req *subreq)
7868 : {
7869 0 : struct tevent_req *req =
7870 0 : tevent_req_callback_data(subreq,
7871 : struct tevent_req);
7872 0 : NTSTATUS status;
7873 :
7874 0 : status = dcerpc_binding_handle_call_recv(subreq);
7875 0 : TALLOC_FREE(subreq);
7876 0 : if (tevent_req_nterror(req, status)) {
7877 0 : return;
7878 : }
7879 :
7880 0 : tevent_req_done(req);
7881 : }
7882 :
7883 0 : NTSTATUS dcerpc_srvsvc_NetPRNameCompare_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
7884 : {
7885 0 : struct dcerpc_srvsvc_NetPRNameCompare_r_state *state =
7886 0 : tevent_req_data(req,
7887 : struct dcerpc_srvsvc_NetPRNameCompare_r_state);
7888 0 : NTSTATUS status;
7889 :
7890 0 : if (tevent_req_is_nterror(req, &status)) {
7891 0 : tevent_req_received(req);
7892 0 : return status;
7893 : }
7894 :
7895 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
7896 :
7897 0 : tevent_req_received(req);
7898 0 : return NT_STATUS_OK;
7899 : }
7900 :
7901 0 : NTSTATUS dcerpc_srvsvc_NetPRNameCompare_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetPRNameCompare *r)
7902 : {
7903 0 : NTSTATUS status;
7904 :
7905 0 : status = dcerpc_binding_handle_call(h,
7906 : NULL, &ndr_table_srvsvc,
7907 : NDR_SRVSVC_NETPRNAMECOMPARE, mem_ctx, r);
7908 :
7909 0 : return status;
7910 : }
7911 :
7912 : struct dcerpc_srvsvc_NetPRNameCompare_state {
7913 : struct srvsvc_NetPRNameCompare orig;
7914 : struct srvsvc_NetPRNameCompare tmp;
7915 : TALLOC_CTX *out_mem_ctx;
7916 : };
7917 :
7918 : static void dcerpc_srvsvc_NetPRNameCompare_done(struct tevent_req *subreq);
7919 :
7920 0 : struct tevent_req *dcerpc_srvsvc_NetPRNameCompare_send(TALLOC_CTX *mem_ctx,
7921 : struct tevent_context *ev,
7922 : struct dcerpc_binding_handle *h,
7923 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
7924 : const char *_name1 /* [in] [charset(UTF16)] */,
7925 : const char *_name2 /* [in] [charset(UTF16)] */,
7926 : uint32_t _name_type /* [in] */,
7927 : uint32_t _flags /* [in] */)
7928 : {
7929 0 : struct tevent_req *req;
7930 0 : struct dcerpc_srvsvc_NetPRNameCompare_state *state;
7931 0 : struct tevent_req *subreq;
7932 :
7933 0 : req = tevent_req_create(mem_ctx, &state,
7934 : struct dcerpc_srvsvc_NetPRNameCompare_state);
7935 0 : if (req == NULL) {
7936 0 : return NULL;
7937 : }
7938 0 : state->out_mem_ctx = NULL;
7939 :
7940 : /* In parameters */
7941 0 : state->orig.in.server_unc = _server_unc;
7942 0 : state->orig.in.name1 = _name1;
7943 0 : state->orig.in.name2 = _name2;
7944 0 : state->orig.in.name_type = _name_type;
7945 0 : state->orig.in.flags = _flags;
7946 :
7947 : /* Out parameters */
7948 :
7949 : /* Result */
7950 0 : NDR_ZERO_STRUCT(state->orig.out.result);
7951 :
7952 : /* make a temporary copy, that we pass to the dispatch function */
7953 0 : state->tmp = state->orig;
7954 :
7955 0 : subreq = dcerpc_srvsvc_NetPRNameCompare_r_send(state, ev, h, &state->tmp);
7956 0 : if (tevent_req_nomem(subreq, req)) {
7957 0 : return tevent_req_post(req, ev);
7958 : }
7959 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetPRNameCompare_done, req);
7960 0 : return req;
7961 : }
7962 :
7963 0 : static void dcerpc_srvsvc_NetPRNameCompare_done(struct tevent_req *subreq)
7964 : {
7965 0 : struct tevent_req *req = tevent_req_callback_data(
7966 : subreq, struct tevent_req);
7967 0 : struct dcerpc_srvsvc_NetPRNameCompare_state *state = tevent_req_data(
7968 : req, struct dcerpc_srvsvc_NetPRNameCompare_state);
7969 0 : NTSTATUS status;
7970 0 : TALLOC_CTX *mem_ctx;
7971 :
7972 0 : if (state->out_mem_ctx) {
7973 0 : mem_ctx = state->out_mem_ctx;
7974 : } else {
7975 0 : mem_ctx = state;
7976 : }
7977 :
7978 0 : status = dcerpc_srvsvc_NetPRNameCompare_r_recv(subreq, mem_ctx);
7979 0 : TALLOC_FREE(subreq);
7980 0 : if (tevent_req_nterror(req, status)) {
7981 0 : return;
7982 : }
7983 :
7984 : /* Copy out parameters */
7985 :
7986 : /* Copy result */
7987 0 : state->orig.out.result = state->tmp.out.result;
7988 :
7989 : /* Reset temporary structure */
7990 0 : NDR_ZERO_STRUCT(state->tmp);
7991 :
7992 0 : tevent_req_done(req);
7993 : }
7994 :
7995 0 : NTSTATUS dcerpc_srvsvc_NetPRNameCompare_recv(struct tevent_req *req,
7996 : TALLOC_CTX *mem_ctx,
7997 : WERROR *result)
7998 : {
7999 0 : struct dcerpc_srvsvc_NetPRNameCompare_state *state = tevent_req_data(
8000 : req, struct dcerpc_srvsvc_NetPRNameCompare_state);
8001 0 : NTSTATUS status;
8002 :
8003 0 : if (tevent_req_is_nterror(req, &status)) {
8004 0 : tevent_req_received(req);
8005 0 : return status;
8006 : }
8007 :
8008 : /* Steal possible out parameters to the callers context */
8009 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8010 :
8011 : /* Return result */
8012 0 : *result = state->orig.out.result;
8013 :
8014 0 : tevent_req_received(req);
8015 0 : return NT_STATUS_OK;
8016 : }
8017 :
8018 0 : NTSTATUS dcerpc_srvsvc_NetPRNameCompare(struct dcerpc_binding_handle *h,
8019 : TALLOC_CTX *mem_ctx,
8020 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
8021 : const char *_name1 /* [in] [charset(UTF16)] */,
8022 : const char *_name2 /* [in] [charset(UTF16)] */,
8023 : uint32_t _name_type /* [in] */,
8024 : uint32_t _flags /* [in] */,
8025 : WERROR *result)
8026 : {
8027 0 : struct srvsvc_NetPRNameCompare r;
8028 0 : NTSTATUS status;
8029 :
8030 : /* In parameters */
8031 0 : r.in.server_unc = _server_unc;
8032 0 : r.in.name1 = _name1;
8033 0 : r.in.name2 = _name2;
8034 0 : r.in.name_type = _name_type;
8035 0 : r.in.flags = _flags;
8036 :
8037 : /* Out parameters */
8038 :
8039 : /* Result */
8040 0 : NDR_ZERO_STRUCT(r.out.result);
8041 :
8042 0 : status = dcerpc_srvsvc_NetPRNameCompare_r(h, mem_ctx, &r);
8043 0 : if (!NT_STATUS_IS_OK(status)) {
8044 0 : return status;
8045 : }
8046 :
8047 : /* Return variables */
8048 :
8049 : /* Return result */
8050 0 : *result = r.out.result;
8051 :
8052 0 : return NT_STATUS_OK;
8053 : }
8054 :
8055 : struct dcerpc_srvsvc_NetShareEnum_r_state {
8056 : TALLOC_CTX *out_mem_ctx;
8057 : };
8058 :
8059 : static void dcerpc_srvsvc_NetShareEnum_r_done(struct tevent_req *subreq);
8060 :
8061 0 : struct tevent_req *dcerpc_srvsvc_NetShareEnum_r_send(TALLOC_CTX *mem_ctx,
8062 : struct tevent_context *ev,
8063 : struct dcerpc_binding_handle *h,
8064 : struct srvsvc_NetShareEnum *r)
8065 : {
8066 0 : struct tevent_req *req;
8067 0 : struct dcerpc_srvsvc_NetShareEnum_r_state *state;
8068 0 : struct tevent_req *subreq;
8069 :
8070 0 : req = tevent_req_create(mem_ctx, &state,
8071 : struct dcerpc_srvsvc_NetShareEnum_r_state);
8072 0 : if (req == NULL) {
8073 0 : return NULL;
8074 : }
8075 :
8076 0 : state->out_mem_ctx = talloc_new(state);
8077 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8078 0 : return tevent_req_post(req, ev);
8079 : }
8080 :
8081 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
8082 : NULL, &ndr_table_srvsvc,
8083 0 : NDR_SRVSVC_NETSHAREENUM, state->out_mem_ctx, r);
8084 0 : if (tevent_req_nomem(subreq, req)) {
8085 0 : return tevent_req_post(req, ev);
8086 : }
8087 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareEnum_r_done, req);
8088 :
8089 0 : return req;
8090 : }
8091 :
8092 0 : static void dcerpc_srvsvc_NetShareEnum_r_done(struct tevent_req *subreq)
8093 : {
8094 0 : struct tevent_req *req =
8095 0 : tevent_req_callback_data(subreq,
8096 : struct tevent_req);
8097 0 : NTSTATUS status;
8098 :
8099 0 : status = dcerpc_binding_handle_call_recv(subreq);
8100 0 : TALLOC_FREE(subreq);
8101 0 : if (tevent_req_nterror(req, status)) {
8102 0 : return;
8103 : }
8104 :
8105 0 : tevent_req_done(req);
8106 : }
8107 :
8108 0 : NTSTATUS dcerpc_srvsvc_NetShareEnum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
8109 : {
8110 0 : struct dcerpc_srvsvc_NetShareEnum_r_state *state =
8111 0 : tevent_req_data(req,
8112 : struct dcerpc_srvsvc_NetShareEnum_r_state);
8113 0 : NTSTATUS status;
8114 :
8115 0 : if (tevent_req_is_nterror(req, &status)) {
8116 0 : tevent_req_received(req);
8117 0 : return status;
8118 : }
8119 :
8120 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8121 :
8122 0 : tevent_req_received(req);
8123 0 : return NT_STATUS_OK;
8124 : }
8125 :
8126 104 : NTSTATUS dcerpc_srvsvc_NetShareEnum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareEnum *r)
8127 : {
8128 0 : NTSTATUS status;
8129 :
8130 104 : status = dcerpc_binding_handle_call(h,
8131 : NULL, &ndr_table_srvsvc,
8132 : NDR_SRVSVC_NETSHAREENUM, mem_ctx, r);
8133 :
8134 104 : return status;
8135 : }
8136 :
8137 : struct dcerpc_srvsvc_NetShareEnum_state {
8138 : struct srvsvc_NetShareEnum orig;
8139 : struct srvsvc_NetShareEnum tmp;
8140 : TALLOC_CTX *out_mem_ctx;
8141 : };
8142 :
8143 : static void dcerpc_srvsvc_NetShareEnum_done(struct tevent_req *subreq);
8144 :
8145 0 : struct tevent_req *dcerpc_srvsvc_NetShareEnum_send(TALLOC_CTX *mem_ctx,
8146 : struct tevent_context *ev,
8147 : struct dcerpc_binding_handle *h,
8148 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
8149 : struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */,
8150 : uint32_t _max_buffer /* [in] */,
8151 : uint32_t *_totalentries /* [out] [ref] */,
8152 : uint32_t *_resume_handle /* [in,out] [unique] */)
8153 : {
8154 0 : struct tevent_req *req;
8155 0 : struct dcerpc_srvsvc_NetShareEnum_state *state;
8156 0 : struct tevent_req *subreq;
8157 :
8158 0 : req = tevent_req_create(mem_ctx, &state,
8159 : struct dcerpc_srvsvc_NetShareEnum_state);
8160 0 : if (req == NULL) {
8161 0 : return NULL;
8162 : }
8163 0 : state->out_mem_ctx = NULL;
8164 :
8165 : /* In parameters */
8166 0 : state->orig.in.server_unc = _server_unc;
8167 0 : state->orig.in.info_ctr = _info_ctr;
8168 0 : state->orig.in.max_buffer = _max_buffer;
8169 0 : state->orig.in.resume_handle = _resume_handle;
8170 :
8171 : /* Out parameters */
8172 0 : state->orig.out.info_ctr = _info_ctr;
8173 0 : state->orig.out.totalentries = _totalentries;
8174 0 : state->orig.out.resume_handle = _resume_handle;
8175 :
8176 : /* Result */
8177 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8178 :
8179 0 : state->out_mem_ctx = talloc_named_const(state, 0,
8180 : "dcerpc_srvsvc_NetShareEnum_out_memory");
8181 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8182 0 : return tevent_req_post(req, ev);
8183 : }
8184 :
8185 : /* make a temporary copy, that we pass to the dispatch function */
8186 0 : state->tmp = state->orig;
8187 :
8188 0 : subreq = dcerpc_srvsvc_NetShareEnum_r_send(state, ev, h, &state->tmp);
8189 0 : if (tevent_req_nomem(subreq, req)) {
8190 0 : return tevent_req_post(req, ev);
8191 : }
8192 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareEnum_done, req);
8193 0 : return req;
8194 : }
8195 :
8196 0 : static void dcerpc_srvsvc_NetShareEnum_done(struct tevent_req *subreq)
8197 : {
8198 0 : struct tevent_req *req = tevent_req_callback_data(
8199 : subreq, struct tevent_req);
8200 0 : struct dcerpc_srvsvc_NetShareEnum_state *state = tevent_req_data(
8201 : req, struct dcerpc_srvsvc_NetShareEnum_state);
8202 0 : NTSTATUS status;
8203 0 : TALLOC_CTX *mem_ctx;
8204 :
8205 0 : if (state->out_mem_ctx) {
8206 0 : mem_ctx = state->out_mem_ctx;
8207 : } else {
8208 0 : mem_ctx = state;
8209 : }
8210 :
8211 0 : status = dcerpc_srvsvc_NetShareEnum_r_recv(subreq, mem_ctx);
8212 0 : TALLOC_FREE(subreq);
8213 0 : if (tevent_req_nterror(req, status)) {
8214 0 : return;
8215 : }
8216 :
8217 : /* Copy out parameters */
8218 0 : *state->orig.out.info_ctr = *state->tmp.out.info_ctr;
8219 0 : *state->orig.out.totalentries = *state->tmp.out.totalentries;
8220 0 : if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
8221 0 : *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
8222 : }
8223 :
8224 : /* Copy result */
8225 0 : state->orig.out.result = state->tmp.out.result;
8226 :
8227 : /* Reset temporary structure */
8228 0 : NDR_ZERO_STRUCT(state->tmp);
8229 :
8230 0 : tevent_req_done(req);
8231 : }
8232 :
8233 0 : NTSTATUS dcerpc_srvsvc_NetShareEnum_recv(struct tevent_req *req,
8234 : TALLOC_CTX *mem_ctx,
8235 : WERROR *result)
8236 : {
8237 0 : struct dcerpc_srvsvc_NetShareEnum_state *state = tevent_req_data(
8238 : req, struct dcerpc_srvsvc_NetShareEnum_state);
8239 0 : NTSTATUS status;
8240 :
8241 0 : if (tevent_req_is_nterror(req, &status)) {
8242 0 : tevent_req_received(req);
8243 0 : return status;
8244 : }
8245 :
8246 : /* Steal possible out parameters to the callers context */
8247 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8248 :
8249 : /* Return result */
8250 0 : *result = state->orig.out.result;
8251 :
8252 0 : tevent_req_received(req);
8253 0 : return NT_STATUS_OK;
8254 : }
8255 :
8256 6 : NTSTATUS dcerpc_srvsvc_NetShareEnum(struct dcerpc_binding_handle *h,
8257 : TALLOC_CTX *mem_ctx,
8258 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
8259 : struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */,
8260 : uint32_t _max_buffer /* [in] */,
8261 : uint32_t *_totalentries /* [out] [ref] */,
8262 : uint32_t *_resume_handle /* [in,out] [unique] */,
8263 : WERROR *result)
8264 : {
8265 0 : struct srvsvc_NetShareEnum r;
8266 0 : NTSTATUS status;
8267 :
8268 : /* In parameters */
8269 6 : r.in.server_unc = _server_unc;
8270 6 : r.in.info_ctr = _info_ctr;
8271 6 : r.in.max_buffer = _max_buffer;
8272 6 : r.in.resume_handle = _resume_handle;
8273 :
8274 : /* Out parameters */
8275 6 : r.out.info_ctr = _info_ctr;
8276 6 : r.out.totalentries = _totalentries;
8277 6 : r.out.resume_handle = _resume_handle;
8278 :
8279 : /* Result */
8280 6 : NDR_ZERO_STRUCT(r.out.result);
8281 :
8282 6 : status = dcerpc_srvsvc_NetShareEnum_r(h, mem_ctx, &r);
8283 6 : if (!NT_STATUS_IS_OK(status)) {
8284 0 : return status;
8285 : }
8286 :
8287 : /* Return variables */
8288 6 : *_info_ctr = *r.out.info_ctr;
8289 6 : *_totalentries = *r.out.totalentries;
8290 6 : if (_resume_handle && r.out.resume_handle) {
8291 0 : *_resume_handle = *r.out.resume_handle;
8292 : }
8293 :
8294 : /* Return result */
8295 6 : *result = r.out.result;
8296 :
8297 6 : return NT_STATUS_OK;
8298 : }
8299 :
8300 : struct dcerpc_srvsvc_NetShareDelStart_r_state {
8301 : TALLOC_CTX *out_mem_ctx;
8302 : };
8303 :
8304 : static void dcerpc_srvsvc_NetShareDelStart_r_done(struct tevent_req *subreq);
8305 :
8306 0 : struct tevent_req *dcerpc_srvsvc_NetShareDelStart_r_send(TALLOC_CTX *mem_ctx,
8307 : struct tevent_context *ev,
8308 : struct dcerpc_binding_handle *h,
8309 : struct srvsvc_NetShareDelStart *r)
8310 : {
8311 0 : struct tevent_req *req;
8312 0 : struct dcerpc_srvsvc_NetShareDelStart_r_state *state;
8313 0 : struct tevent_req *subreq;
8314 :
8315 0 : req = tevent_req_create(mem_ctx, &state,
8316 : struct dcerpc_srvsvc_NetShareDelStart_r_state);
8317 0 : if (req == NULL) {
8318 0 : return NULL;
8319 : }
8320 :
8321 0 : state->out_mem_ctx = talloc_new(state);
8322 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8323 0 : return tevent_req_post(req, ev);
8324 : }
8325 :
8326 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
8327 : NULL, &ndr_table_srvsvc,
8328 0 : NDR_SRVSVC_NETSHAREDELSTART, state->out_mem_ctx, r);
8329 0 : if (tevent_req_nomem(subreq, req)) {
8330 0 : return tevent_req_post(req, ev);
8331 : }
8332 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareDelStart_r_done, req);
8333 :
8334 0 : return req;
8335 : }
8336 :
8337 0 : static void dcerpc_srvsvc_NetShareDelStart_r_done(struct tevent_req *subreq)
8338 : {
8339 0 : struct tevent_req *req =
8340 0 : tevent_req_callback_data(subreq,
8341 : struct tevent_req);
8342 0 : NTSTATUS status;
8343 :
8344 0 : status = dcerpc_binding_handle_call_recv(subreq);
8345 0 : TALLOC_FREE(subreq);
8346 0 : if (tevent_req_nterror(req, status)) {
8347 0 : return;
8348 : }
8349 :
8350 0 : tevent_req_done(req);
8351 : }
8352 :
8353 0 : NTSTATUS dcerpc_srvsvc_NetShareDelStart_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
8354 : {
8355 0 : struct dcerpc_srvsvc_NetShareDelStart_r_state *state =
8356 0 : tevent_req_data(req,
8357 : struct dcerpc_srvsvc_NetShareDelStart_r_state);
8358 0 : NTSTATUS status;
8359 :
8360 0 : if (tevent_req_is_nterror(req, &status)) {
8361 0 : tevent_req_received(req);
8362 0 : return status;
8363 : }
8364 :
8365 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8366 :
8367 0 : tevent_req_received(req);
8368 0 : return NT_STATUS_OK;
8369 : }
8370 :
8371 0 : NTSTATUS dcerpc_srvsvc_NetShareDelStart_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareDelStart *r)
8372 : {
8373 0 : NTSTATUS status;
8374 :
8375 0 : status = dcerpc_binding_handle_call(h,
8376 : NULL, &ndr_table_srvsvc,
8377 : NDR_SRVSVC_NETSHAREDELSTART, mem_ctx, r);
8378 :
8379 0 : return status;
8380 : }
8381 :
8382 : struct dcerpc_srvsvc_NetShareDelStart_state {
8383 : struct srvsvc_NetShareDelStart orig;
8384 : struct srvsvc_NetShareDelStart tmp;
8385 : TALLOC_CTX *out_mem_ctx;
8386 : };
8387 :
8388 : static void dcerpc_srvsvc_NetShareDelStart_done(struct tevent_req *subreq);
8389 :
8390 0 : struct tevent_req *dcerpc_srvsvc_NetShareDelStart_send(TALLOC_CTX *mem_ctx,
8391 : struct tevent_context *ev,
8392 : struct dcerpc_binding_handle *h,
8393 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
8394 : const char *_share /* [in] [charset(UTF16)] */,
8395 : uint32_t _reserved /* [in] */,
8396 : struct policy_handle *_hnd /* [out] [unique] */)
8397 : {
8398 0 : struct tevent_req *req;
8399 0 : struct dcerpc_srvsvc_NetShareDelStart_state *state;
8400 0 : struct tevent_req *subreq;
8401 :
8402 0 : req = tevent_req_create(mem_ctx, &state,
8403 : struct dcerpc_srvsvc_NetShareDelStart_state);
8404 0 : if (req == NULL) {
8405 0 : return NULL;
8406 : }
8407 0 : state->out_mem_ctx = NULL;
8408 :
8409 : /* In parameters */
8410 0 : state->orig.in.server_unc = _server_unc;
8411 0 : state->orig.in.share = _share;
8412 0 : state->orig.in.reserved = _reserved;
8413 :
8414 : /* Out parameters */
8415 0 : state->orig.out.hnd = _hnd;
8416 :
8417 : /* Result */
8418 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8419 :
8420 0 : state->out_mem_ctx = talloc_named_const(state, 0,
8421 : "dcerpc_srvsvc_NetShareDelStart_out_memory");
8422 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8423 0 : return tevent_req_post(req, ev);
8424 : }
8425 :
8426 : /* make a temporary copy, that we pass to the dispatch function */
8427 0 : state->tmp = state->orig;
8428 :
8429 0 : subreq = dcerpc_srvsvc_NetShareDelStart_r_send(state, ev, h, &state->tmp);
8430 0 : if (tevent_req_nomem(subreq, req)) {
8431 0 : return tevent_req_post(req, ev);
8432 : }
8433 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareDelStart_done, req);
8434 0 : return req;
8435 : }
8436 :
8437 0 : static void dcerpc_srvsvc_NetShareDelStart_done(struct tevent_req *subreq)
8438 : {
8439 0 : struct tevent_req *req = tevent_req_callback_data(
8440 : subreq, struct tevent_req);
8441 0 : struct dcerpc_srvsvc_NetShareDelStart_state *state = tevent_req_data(
8442 : req, struct dcerpc_srvsvc_NetShareDelStart_state);
8443 0 : NTSTATUS status;
8444 0 : TALLOC_CTX *mem_ctx;
8445 :
8446 0 : if (state->out_mem_ctx) {
8447 0 : mem_ctx = state->out_mem_ctx;
8448 : } else {
8449 0 : mem_ctx = state;
8450 : }
8451 :
8452 0 : status = dcerpc_srvsvc_NetShareDelStart_r_recv(subreq, mem_ctx);
8453 0 : TALLOC_FREE(subreq);
8454 0 : if (tevent_req_nterror(req, status)) {
8455 0 : return;
8456 : }
8457 :
8458 : /* Copy out parameters */
8459 0 : if (state->orig.out.hnd && state->tmp.out.hnd) {
8460 0 : *state->orig.out.hnd = *state->tmp.out.hnd;
8461 : }
8462 :
8463 : /* Copy result */
8464 0 : state->orig.out.result = state->tmp.out.result;
8465 :
8466 : /* Reset temporary structure */
8467 0 : NDR_ZERO_STRUCT(state->tmp);
8468 :
8469 0 : tevent_req_done(req);
8470 : }
8471 :
8472 0 : NTSTATUS dcerpc_srvsvc_NetShareDelStart_recv(struct tevent_req *req,
8473 : TALLOC_CTX *mem_ctx,
8474 : WERROR *result)
8475 : {
8476 0 : struct dcerpc_srvsvc_NetShareDelStart_state *state = tevent_req_data(
8477 : req, struct dcerpc_srvsvc_NetShareDelStart_state);
8478 0 : NTSTATUS status;
8479 :
8480 0 : if (tevent_req_is_nterror(req, &status)) {
8481 0 : tevent_req_received(req);
8482 0 : return status;
8483 : }
8484 :
8485 : /* Steal possible out parameters to the callers context */
8486 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8487 :
8488 : /* Return result */
8489 0 : *result = state->orig.out.result;
8490 :
8491 0 : tevent_req_received(req);
8492 0 : return NT_STATUS_OK;
8493 : }
8494 :
8495 0 : NTSTATUS dcerpc_srvsvc_NetShareDelStart(struct dcerpc_binding_handle *h,
8496 : TALLOC_CTX *mem_ctx,
8497 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
8498 : const char *_share /* [in] [charset(UTF16)] */,
8499 : uint32_t _reserved /* [in] */,
8500 : struct policy_handle *_hnd /* [out] [unique] */,
8501 : WERROR *result)
8502 : {
8503 0 : struct srvsvc_NetShareDelStart r;
8504 0 : NTSTATUS status;
8505 :
8506 : /* In parameters */
8507 0 : r.in.server_unc = _server_unc;
8508 0 : r.in.share = _share;
8509 0 : r.in.reserved = _reserved;
8510 :
8511 : /* Out parameters */
8512 0 : r.out.hnd = _hnd;
8513 :
8514 : /* Result */
8515 0 : NDR_ZERO_STRUCT(r.out.result);
8516 :
8517 0 : status = dcerpc_srvsvc_NetShareDelStart_r(h, mem_ctx, &r);
8518 0 : if (!NT_STATUS_IS_OK(status)) {
8519 0 : return status;
8520 : }
8521 :
8522 : /* Return variables */
8523 0 : if (_hnd && r.out.hnd) {
8524 0 : *_hnd = *r.out.hnd;
8525 : }
8526 :
8527 : /* Return result */
8528 0 : *result = r.out.result;
8529 :
8530 0 : return NT_STATUS_OK;
8531 : }
8532 :
8533 : struct dcerpc_srvsvc_NetShareDelCommit_r_state {
8534 : TALLOC_CTX *out_mem_ctx;
8535 : };
8536 :
8537 : static void dcerpc_srvsvc_NetShareDelCommit_r_done(struct tevent_req *subreq);
8538 :
8539 0 : struct tevent_req *dcerpc_srvsvc_NetShareDelCommit_r_send(TALLOC_CTX *mem_ctx,
8540 : struct tevent_context *ev,
8541 : struct dcerpc_binding_handle *h,
8542 : struct srvsvc_NetShareDelCommit *r)
8543 : {
8544 0 : struct tevent_req *req;
8545 0 : struct dcerpc_srvsvc_NetShareDelCommit_r_state *state;
8546 0 : struct tevent_req *subreq;
8547 :
8548 0 : req = tevent_req_create(mem_ctx, &state,
8549 : struct dcerpc_srvsvc_NetShareDelCommit_r_state);
8550 0 : if (req == NULL) {
8551 0 : return NULL;
8552 : }
8553 :
8554 0 : state->out_mem_ctx = talloc_new(state);
8555 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8556 0 : return tevent_req_post(req, ev);
8557 : }
8558 :
8559 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
8560 : NULL, &ndr_table_srvsvc,
8561 0 : NDR_SRVSVC_NETSHAREDELCOMMIT, state->out_mem_ctx, r);
8562 0 : if (tevent_req_nomem(subreq, req)) {
8563 0 : return tevent_req_post(req, ev);
8564 : }
8565 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareDelCommit_r_done, req);
8566 :
8567 0 : return req;
8568 : }
8569 :
8570 0 : static void dcerpc_srvsvc_NetShareDelCommit_r_done(struct tevent_req *subreq)
8571 : {
8572 0 : struct tevent_req *req =
8573 0 : tevent_req_callback_data(subreq,
8574 : struct tevent_req);
8575 0 : NTSTATUS status;
8576 :
8577 0 : status = dcerpc_binding_handle_call_recv(subreq);
8578 0 : TALLOC_FREE(subreq);
8579 0 : if (tevent_req_nterror(req, status)) {
8580 0 : return;
8581 : }
8582 :
8583 0 : tevent_req_done(req);
8584 : }
8585 :
8586 0 : NTSTATUS dcerpc_srvsvc_NetShareDelCommit_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
8587 : {
8588 0 : struct dcerpc_srvsvc_NetShareDelCommit_r_state *state =
8589 0 : tevent_req_data(req,
8590 : struct dcerpc_srvsvc_NetShareDelCommit_r_state);
8591 0 : NTSTATUS status;
8592 :
8593 0 : if (tevent_req_is_nterror(req, &status)) {
8594 0 : tevent_req_received(req);
8595 0 : return status;
8596 : }
8597 :
8598 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8599 :
8600 0 : tevent_req_received(req);
8601 0 : return NT_STATUS_OK;
8602 : }
8603 :
8604 0 : NTSTATUS dcerpc_srvsvc_NetShareDelCommit_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetShareDelCommit *r)
8605 : {
8606 0 : NTSTATUS status;
8607 :
8608 0 : status = dcerpc_binding_handle_call(h,
8609 : NULL, &ndr_table_srvsvc,
8610 : NDR_SRVSVC_NETSHAREDELCOMMIT, mem_ctx, r);
8611 :
8612 0 : return status;
8613 : }
8614 :
8615 : struct dcerpc_srvsvc_NetShareDelCommit_state {
8616 : struct srvsvc_NetShareDelCommit orig;
8617 : struct srvsvc_NetShareDelCommit tmp;
8618 : TALLOC_CTX *out_mem_ctx;
8619 : };
8620 :
8621 : static void dcerpc_srvsvc_NetShareDelCommit_done(struct tevent_req *subreq);
8622 :
8623 0 : struct tevent_req *dcerpc_srvsvc_NetShareDelCommit_send(TALLOC_CTX *mem_ctx,
8624 : struct tevent_context *ev,
8625 : struct dcerpc_binding_handle *h,
8626 : struct policy_handle *_hnd /* [in,out] [unique] */)
8627 : {
8628 0 : struct tevent_req *req;
8629 0 : struct dcerpc_srvsvc_NetShareDelCommit_state *state;
8630 0 : struct tevent_req *subreq;
8631 :
8632 0 : req = tevent_req_create(mem_ctx, &state,
8633 : struct dcerpc_srvsvc_NetShareDelCommit_state);
8634 0 : if (req == NULL) {
8635 0 : return NULL;
8636 : }
8637 0 : state->out_mem_ctx = NULL;
8638 :
8639 : /* In parameters */
8640 0 : state->orig.in.hnd = _hnd;
8641 :
8642 : /* Out parameters */
8643 0 : state->orig.out.hnd = _hnd;
8644 :
8645 : /* Result */
8646 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8647 :
8648 0 : state->out_mem_ctx = talloc_named_const(state, 0,
8649 : "dcerpc_srvsvc_NetShareDelCommit_out_memory");
8650 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8651 0 : return tevent_req_post(req, ev);
8652 : }
8653 :
8654 : /* make a temporary copy, that we pass to the dispatch function */
8655 0 : state->tmp = state->orig;
8656 :
8657 0 : subreq = dcerpc_srvsvc_NetShareDelCommit_r_send(state, ev, h, &state->tmp);
8658 0 : if (tevent_req_nomem(subreq, req)) {
8659 0 : return tevent_req_post(req, ev);
8660 : }
8661 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetShareDelCommit_done, req);
8662 0 : return req;
8663 : }
8664 :
8665 0 : static void dcerpc_srvsvc_NetShareDelCommit_done(struct tevent_req *subreq)
8666 : {
8667 0 : struct tevent_req *req = tevent_req_callback_data(
8668 : subreq, struct tevent_req);
8669 0 : struct dcerpc_srvsvc_NetShareDelCommit_state *state = tevent_req_data(
8670 : req, struct dcerpc_srvsvc_NetShareDelCommit_state);
8671 0 : NTSTATUS status;
8672 0 : TALLOC_CTX *mem_ctx;
8673 :
8674 0 : if (state->out_mem_ctx) {
8675 0 : mem_ctx = state->out_mem_ctx;
8676 : } else {
8677 0 : mem_ctx = state;
8678 : }
8679 :
8680 0 : status = dcerpc_srvsvc_NetShareDelCommit_r_recv(subreq, mem_ctx);
8681 0 : TALLOC_FREE(subreq);
8682 0 : if (tevent_req_nterror(req, status)) {
8683 0 : return;
8684 : }
8685 :
8686 : /* Copy out parameters */
8687 0 : if (state->orig.out.hnd && state->tmp.out.hnd) {
8688 0 : *state->orig.out.hnd = *state->tmp.out.hnd;
8689 : }
8690 :
8691 : /* Copy result */
8692 0 : state->orig.out.result = state->tmp.out.result;
8693 :
8694 : /* Reset temporary structure */
8695 0 : NDR_ZERO_STRUCT(state->tmp);
8696 :
8697 0 : tevent_req_done(req);
8698 : }
8699 :
8700 0 : NTSTATUS dcerpc_srvsvc_NetShareDelCommit_recv(struct tevent_req *req,
8701 : TALLOC_CTX *mem_ctx,
8702 : WERROR *result)
8703 : {
8704 0 : struct dcerpc_srvsvc_NetShareDelCommit_state *state = tevent_req_data(
8705 : req, struct dcerpc_srvsvc_NetShareDelCommit_state);
8706 0 : NTSTATUS status;
8707 :
8708 0 : if (tevent_req_is_nterror(req, &status)) {
8709 0 : tevent_req_received(req);
8710 0 : return status;
8711 : }
8712 :
8713 : /* Steal possible out parameters to the callers context */
8714 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8715 :
8716 : /* Return result */
8717 0 : *result = state->orig.out.result;
8718 :
8719 0 : tevent_req_received(req);
8720 0 : return NT_STATUS_OK;
8721 : }
8722 :
8723 0 : NTSTATUS dcerpc_srvsvc_NetShareDelCommit(struct dcerpc_binding_handle *h,
8724 : TALLOC_CTX *mem_ctx,
8725 : struct policy_handle *_hnd /* [in,out] [unique] */,
8726 : WERROR *result)
8727 : {
8728 0 : struct srvsvc_NetShareDelCommit r;
8729 0 : NTSTATUS status;
8730 :
8731 : /* In parameters */
8732 0 : r.in.hnd = _hnd;
8733 :
8734 : /* Out parameters */
8735 0 : r.out.hnd = _hnd;
8736 :
8737 : /* Result */
8738 0 : NDR_ZERO_STRUCT(r.out.result);
8739 :
8740 0 : status = dcerpc_srvsvc_NetShareDelCommit_r(h, mem_ctx, &r);
8741 0 : if (!NT_STATUS_IS_OK(status)) {
8742 0 : return status;
8743 : }
8744 :
8745 : /* Return variables */
8746 0 : if (_hnd && r.out.hnd) {
8747 0 : *_hnd = *r.out.hnd;
8748 : }
8749 :
8750 : /* Return result */
8751 0 : *result = r.out.result;
8752 :
8753 0 : return NT_STATUS_OK;
8754 : }
8755 :
8756 : struct dcerpc_srvsvc_NetGetFileSecurity_r_state {
8757 : TALLOC_CTX *out_mem_ctx;
8758 : };
8759 :
8760 : static void dcerpc_srvsvc_NetGetFileSecurity_r_done(struct tevent_req *subreq);
8761 :
8762 0 : struct tevent_req *dcerpc_srvsvc_NetGetFileSecurity_r_send(TALLOC_CTX *mem_ctx,
8763 : struct tevent_context *ev,
8764 : struct dcerpc_binding_handle *h,
8765 : struct srvsvc_NetGetFileSecurity *r)
8766 : {
8767 0 : struct tevent_req *req;
8768 0 : struct dcerpc_srvsvc_NetGetFileSecurity_r_state *state;
8769 0 : struct tevent_req *subreq;
8770 :
8771 0 : req = tevent_req_create(mem_ctx, &state,
8772 : struct dcerpc_srvsvc_NetGetFileSecurity_r_state);
8773 0 : if (req == NULL) {
8774 0 : return NULL;
8775 : }
8776 :
8777 0 : state->out_mem_ctx = talloc_new(state);
8778 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8779 0 : return tevent_req_post(req, ev);
8780 : }
8781 :
8782 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
8783 : NULL, &ndr_table_srvsvc,
8784 0 : NDR_SRVSVC_NETGETFILESECURITY, state->out_mem_ctx, r);
8785 0 : if (tevent_req_nomem(subreq, req)) {
8786 0 : return tevent_req_post(req, ev);
8787 : }
8788 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetGetFileSecurity_r_done, req);
8789 :
8790 0 : return req;
8791 : }
8792 :
8793 0 : static void dcerpc_srvsvc_NetGetFileSecurity_r_done(struct tevent_req *subreq)
8794 : {
8795 0 : struct tevent_req *req =
8796 0 : tevent_req_callback_data(subreq,
8797 : struct tevent_req);
8798 0 : NTSTATUS status;
8799 :
8800 0 : status = dcerpc_binding_handle_call_recv(subreq);
8801 0 : TALLOC_FREE(subreq);
8802 0 : if (tevent_req_nterror(req, status)) {
8803 0 : return;
8804 : }
8805 :
8806 0 : tevent_req_done(req);
8807 : }
8808 :
8809 0 : NTSTATUS dcerpc_srvsvc_NetGetFileSecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
8810 : {
8811 0 : struct dcerpc_srvsvc_NetGetFileSecurity_r_state *state =
8812 0 : tevent_req_data(req,
8813 : struct dcerpc_srvsvc_NetGetFileSecurity_r_state);
8814 0 : NTSTATUS status;
8815 :
8816 0 : if (tevent_req_is_nterror(req, &status)) {
8817 0 : tevent_req_received(req);
8818 0 : return status;
8819 : }
8820 :
8821 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8822 :
8823 0 : tevent_req_received(req);
8824 0 : return NT_STATUS_OK;
8825 : }
8826 :
8827 0 : NTSTATUS dcerpc_srvsvc_NetGetFileSecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetGetFileSecurity *r)
8828 : {
8829 0 : NTSTATUS status;
8830 :
8831 0 : status = dcerpc_binding_handle_call(h,
8832 : NULL, &ndr_table_srvsvc,
8833 : NDR_SRVSVC_NETGETFILESECURITY, mem_ctx, r);
8834 :
8835 0 : return status;
8836 : }
8837 :
8838 : struct dcerpc_srvsvc_NetGetFileSecurity_state {
8839 : struct srvsvc_NetGetFileSecurity orig;
8840 : struct srvsvc_NetGetFileSecurity tmp;
8841 : TALLOC_CTX *out_mem_ctx;
8842 : };
8843 :
8844 : static void dcerpc_srvsvc_NetGetFileSecurity_done(struct tevent_req *subreq);
8845 :
8846 0 : struct tevent_req *dcerpc_srvsvc_NetGetFileSecurity_send(TALLOC_CTX *mem_ctx,
8847 : struct tevent_context *ev,
8848 : struct dcerpc_binding_handle *h,
8849 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
8850 : const char *_share /* [in] [charset(UTF16),unique] */,
8851 : const char *_file /* [in] [charset(UTF16)] */,
8852 : uint32_t _securityinformation /* [in] */,
8853 : struct sec_desc_buf **_sd_buf /* [out] [ref] */)
8854 : {
8855 0 : struct tevent_req *req;
8856 0 : struct dcerpc_srvsvc_NetGetFileSecurity_state *state;
8857 0 : struct tevent_req *subreq;
8858 :
8859 0 : req = tevent_req_create(mem_ctx, &state,
8860 : struct dcerpc_srvsvc_NetGetFileSecurity_state);
8861 0 : if (req == NULL) {
8862 0 : return NULL;
8863 : }
8864 0 : state->out_mem_ctx = NULL;
8865 :
8866 : /* In parameters */
8867 0 : state->orig.in.server_unc = _server_unc;
8868 0 : state->orig.in.share = _share;
8869 0 : state->orig.in.file = _file;
8870 0 : state->orig.in.securityinformation = _securityinformation;
8871 :
8872 : /* Out parameters */
8873 0 : state->orig.out.sd_buf = _sd_buf;
8874 :
8875 : /* Result */
8876 0 : NDR_ZERO_STRUCT(state->orig.out.result);
8877 :
8878 0 : state->out_mem_ctx = talloc_named_const(state, 0,
8879 : "dcerpc_srvsvc_NetGetFileSecurity_out_memory");
8880 0 : if (tevent_req_nomem(state->out_mem_ctx, req)) {
8881 0 : return tevent_req_post(req, ev);
8882 : }
8883 :
8884 : /* make a temporary copy, that we pass to the dispatch function */
8885 0 : state->tmp = state->orig;
8886 :
8887 0 : subreq = dcerpc_srvsvc_NetGetFileSecurity_r_send(state, ev, h, &state->tmp);
8888 0 : if (tevent_req_nomem(subreq, req)) {
8889 0 : return tevent_req_post(req, ev);
8890 : }
8891 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetGetFileSecurity_done, req);
8892 0 : return req;
8893 : }
8894 :
8895 0 : static void dcerpc_srvsvc_NetGetFileSecurity_done(struct tevent_req *subreq)
8896 : {
8897 0 : struct tevent_req *req = tevent_req_callback_data(
8898 : subreq, struct tevent_req);
8899 0 : struct dcerpc_srvsvc_NetGetFileSecurity_state *state = tevent_req_data(
8900 : req, struct dcerpc_srvsvc_NetGetFileSecurity_state);
8901 0 : NTSTATUS status;
8902 0 : TALLOC_CTX *mem_ctx;
8903 :
8904 0 : if (state->out_mem_ctx) {
8905 0 : mem_ctx = state->out_mem_ctx;
8906 : } else {
8907 0 : mem_ctx = state;
8908 : }
8909 :
8910 0 : status = dcerpc_srvsvc_NetGetFileSecurity_r_recv(subreq, mem_ctx);
8911 0 : TALLOC_FREE(subreq);
8912 0 : if (tevent_req_nterror(req, status)) {
8913 0 : return;
8914 : }
8915 :
8916 : /* Copy out parameters */
8917 0 : *state->orig.out.sd_buf = *state->tmp.out.sd_buf;
8918 :
8919 : /* Copy result */
8920 0 : state->orig.out.result = state->tmp.out.result;
8921 :
8922 : /* Reset temporary structure */
8923 0 : NDR_ZERO_STRUCT(state->tmp);
8924 :
8925 0 : tevent_req_done(req);
8926 : }
8927 :
8928 0 : NTSTATUS dcerpc_srvsvc_NetGetFileSecurity_recv(struct tevent_req *req,
8929 : TALLOC_CTX *mem_ctx,
8930 : WERROR *result)
8931 : {
8932 0 : struct dcerpc_srvsvc_NetGetFileSecurity_state *state = tevent_req_data(
8933 : req, struct dcerpc_srvsvc_NetGetFileSecurity_state);
8934 0 : NTSTATUS status;
8935 :
8936 0 : if (tevent_req_is_nterror(req, &status)) {
8937 0 : tevent_req_received(req);
8938 0 : return status;
8939 : }
8940 :
8941 : /* Steal possible out parameters to the callers context */
8942 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
8943 :
8944 : /* Return result */
8945 0 : *result = state->orig.out.result;
8946 :
8947 0 : tevent_req_received(req);
8948 0 : return NT_STATUS_OK;
8949 : }
8950 :
8951 0 : NTSTATUS dcerpc_srvsvc_NetGetFileSecurity(struct dcerpc_binding_handle *h,
8952 : TALLOC_CTX *mem_ctx,
8953 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
8954 : const char *_share /* [in] [charset(UTF16),unique] */,
8955 : const char *_file /* [in] [charset(UTF16)] */,
8956 : uint32_t _securityinformation /* [in] */,
8957 : struct sec_desc_buf **_sd_buf /* [out] [ref] */,
8958 : WERROR *result)
8959 : {
8960 0 : struct srvsvc_NetGetFileSecurity r;
8961 0 : NTSTATUS status;
8962 :
8963 : /* In parameters */
8964 0 : r.in.server_unc = _server_unc;
8965 0 : r.in.share = _share;
8966 0 : r.in.file = _file;
8967 0 : r.in.securityinformation = _securityinformation;
8968 :
8969 : /* Out parameters */
8970 0 : r.out.sd_buf = _sd_buf;
8971 :
8972 : /* Result */
8973 0 : NDR_ZERO_STRUCT(r.out.result);
8974 :
8975 0 : status = dcerpc_srvsvc_NetGetFileSecurity_r(h, mem_ctx, &r);
8976 0 : if (!NT_STATUS_IS_OK(status)) {
8977 0 : return status;
8978 : }
8979 :
8980 : /* Return variables */
8981 0 : *_sd_buf = *r.out.sd_buf;
8982 :
8983 : /* Return result */
8984 0 : *result = r.out.result;
8985 :
8986 0 : return NT_STATUS_OK;
8987 : }
8988 :
8989 : struct dcerpc_srvsvc_NetSetFileSecurity_r_state {
8990 : TALLOC_CTX *out_mem_ctx;
8991 : };
8992 :
8993 : static void dcerpc_srvsvc_NetSetFileSecurity_r_done(struct tevent_req *subreq);
8994 :
8995 0 : struct tevent_req *dcerpc_srvsvc_NetSetFileSecurity_r_send(TALLOC_CTX *mem_ctx,
8996 : struct tevent_context *ev,
8997 : struct dcerpc_binding_handle *h,
8998 : struct srvsvc_NetSetFileSecurity *r)
8999 : {
9000 0 : struct tevent_req *req;
9001 0 : struct dcerpc_srvsvc_NetSetFileSecurity_r_state *state;
9002 0 : struct tevent_req *subreq;
9003 :
9004 0 : req = tevent_req_create(mem_ctx, &state,
9005 : struct dcerpc_srvsvc_NetSetFileSecurity_r_state);
9006 0 : if (req == NULL) {
9007 0 : return NULL;
9008 : }
9009 :
9010 0 : state->out_mem_ctx = NULL;
9011 :
9012 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
9013 : NULL, &ndr_table_srvsvc,
9014 : NDR_SRVSVC_NETSETFILESECURITY, state, r);
9015 0 : if (tevent_req_nomem(subreq, req)) {
9016 0 : return tevent_req_post(req, ev);
9017 : }
9018 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSetFileSecurity_r_done, req);
9019 :
9020 0 : return req;
9021 : }
9022 :
9023 0 : static void dcerpc_srvsvc_NetSetFileSecurity_r_done(struct tevent_req *subreq)
9024 : {
9025 0 : struct tevent_req *req =
9026 0 : tevent_req_callback_data(subreq,
9027 : struct tevent_req);
9028 0 : NTSTATUS status;
9029 :
9030 0 : status = dcerpc_binding_handle_call_recv(subreq);
9031 0 : TALLOC_FREE(subreq);
9032 0 : if (tevent_req_nterror(req, status)) {
9033 0 : return;
9034 : }
9035 :
9036 0 : tevent_req_done(req);
9037 : }
9038 :
9039 0 : NTSTATUS dcerpc_srvsvc_NetSetFileSecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
9040 : {
9041 0 : struct dcerpc_srvsvc_NetSetFileSecurity_r_state *state =
9042 0 : tevent_req_data(req,
9043 : struct dcerpc_srvsvc_NetSetFileSecurity_r_state);
9044 0 : NTSTATUS status;
9045 :
9046 0 : if (tevent_req_is_nterror(req, &status)) {
9047 0 : tevent_req_received(req);
9048 0 : return status;
9049 : }
9050 :
9051 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9052 :
9053 0 : tevent_req_received(req);
9054 0 : return NT_STATUS_OK;
9055 : }
9056 :
9057 0 : NTSTATUS dcerpc_srvsvc_NetSetFileSecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetSetFileSecurity *r)
9058 : {
9059 0 : NTSTATUS status;
9060 :
9061 0 : status = dcerpc_binding_handle_call(h,
9062 : NULL, &ndr_table_srvsvc,
9063 : NDR_SRVSVC_NETSETFILESECURITY, mem_ctx, r);
9064 :
9065 0 : return status;
9066 : }
9067 :
9068 : struct dcerpc_srvsvc_NetSetFileSecurity_state {
9069 : struct srvsvc_NetSetFileSecurity orig;
9070 : struct srvsvc_NetSetFileSecurity tmp;
9071 : TALLOC_CTX *out_mem_ctx;
9072 : };
9073 :
9074 : static void dcerpc_srvsvc_NetSetFileSecurity_done(struct tevent_req *subreq);
9075 :
9076 0 : struct tevent_req *dcerpc_srvsvc_NetSetFileSecurity_send(TALLOC_CTX *mem_ctx,
9077 : struct tevent_context *ev,
9078 : struct dcerpc_binding_handle *h,
9079 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
9080 : const char *_share /* [in] [charset(UTF16),unique] */,
9081 : const char *_file /* [in] [charset(UTF16)] */,
9082 : uint32_t _securityinformation /* [in] */,
9083 : struct sec_desc_buf *_sd_buf /* [in] [ref] */)
9084 : {
9085 0 : struct tevent_req *req;
9086 0 : struct dcerpc_srvsvc_NetSetFileSecurity_state *state;
9087 0 : struct tevent_req *subreq;
9088 :
9089 0 : req = tevent_req_create(mem_ctx, &state,
9090 : struct dcerpc_srvsvc_NetSetFileSecurity_state);
9091 0 : if (req == NULL) {
9092 0 : return NULL;
9093 : }
9094 0 : state->out_mem_ctx = NULL;
9095 :
9096 : /* In parameters */
9097 0 : state->orig.in.server_unc = _server_unc;
9098 0 : state->orig.in.share = _share;
9099 0 : state->orig.in.file = _file;
9100 0 : state->orig.in.securityinformation = _securityinformation;
9101 0 : state->orig.in.sd_buf = _sd_buf;
9102 :
9103 : /* Out parameters */
9104 :
9105 : /* Result */
9106 0 : NDR_ZERO_STRUCT(state->orig.out.result);
9107 :
9108 : /* make a temporary copy, that we pass to the dispatch function */
9109 0 : state->tmp = state->orig;
9110 :
9111 0 : subreq = dcerpc_srvsvc_NetSetFileSecurity_r_send(state, ev, h, &state->tmp);
9112 0 : if (tevent_req_nomem(subreq, req)) {
9113 0 : return tevent_req_post(req, ev);
9114 : }
9115 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetSetFileSecurity_done, req);
9116 0 : return req;
9117 : }
9118 :
9119 0 : static void dcerpc_srvsvc_NetSetFileSecurity_done(struct tevent_req *subreq)
9120 : {
9121 0 : struct tevent_req *req = tevent_req_callback_data(
9122 : subreq, struct tevent_req);
9123 0 : struct dcerpc_srvsvc_NetSetFileSecurity_state *state = tevent_req_data(
9124 : req, struct dcerpc_srvsvc_NetSetFileSecurity_state);
9125 0 : NTSTATUS status;
9126 0 : TALLOC_CTX *mem_ctx;
9127 :
9128 0 : if (state->out_mem_ctx) {
9129 0 : mem_ctx = state->out_mem_ctx;
9130 : } else {
9131 0 : mem_ctx = state;
9132 : }
9133 :
9134 0 : status = dcerpc_srvsvc_NetSetFileSecurity_r_recv(subreq, mem_ctx);
9135 0 : TALLOC_FREE(subreq);
9136 0 : if (tevent_req_nterror(req, status)) {
9137 0 : return;
9138 : }
9139 :
9140 : /* Copy out parameters */
9141 :
9142 : /* Copy result */
9143 0 : state->orig.out.result = state->tmp.out.result;
9144 :
9145 : /* Reset temporary structure */
9146 0 : NDR_ZERO_STRUCT(state->tmp);
9147 :
9148 0 : tevent_req_done(req);
9149 : }
9150 :
9151 0 : NTSTATUS dcerpc_srvsvc_NetSetFileSecurity_recv(struct tevent_req *req,
9152 : TALLOC_CTX *mem_ctx,
9153 : WERROR *result)
9154 : {
9155 0 : struct dcerpc_srvsvc_NetSetFileSecurity_state *state = tevent_req_data(
9156 : req, struct dcerpc_srvsvc_NetSetFileSecurity_state);
9157 0 : NTSTATUS status;
9158 :
9159 0 : if (tevent_req_is_nterror(req, &status)) {
9160 0 : tevent_req_received(req);
9161 0 : return status;
9162 : }
9163 :
9164 : /* Steal possible out parameters to the callers context */
9165 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9166 :
9167 : /* Return result */
9168 0 : *result = state->orig.out.result;
9169 :
9170 0 : tevent_req_received(req);
9171 0 : return NT_STATUS_OK;
9172 : }
9173 :
9174 0 : NTSTATUS dcerpc_srvsvc_NetSetFileSecurity(struct dcerpc_binding_handle *h,
9175 : TALLOC_CTX *mem_ctx,
9176 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
9177 : const char *_share /* [in] [charset(UTF16),unique] */,
9178 : const char *_file /* [in] [charset(UTF16)] */,
9179 : uint32_t _securityinformation /* [in] */,
9180 : struct sec_desc_buf *_sd_buf /* [in] [ref] */,
9181 : WERROR *result)
9182 : {
9183 0 : struct srvsvc_NetSetFileSecurity r;
9184 0 : NTSTATUS status;
9185 :
9186 : /* In parameters */
9187 0 : r.in.server_unc = _server_unc;
9188 0 : r.in.share = _share;
9189 0 : r.in.file = _file;
9190 0 : r.in.securityinformation = _securityinformation;
9191 0 : r.in.sd_buf = _sd_buf;
9192 :
9193 : /* Out parameters */
9194 :
9195 : /* Result */
9196 0 : NDR_ZERO_STRUCT(r.out.result);
9197 :
9198 0 : status = dcerpc_srvsvc_NetSetFileSecurity_r(h, mem_ctx, &r);
9199 0 : if (!NT_STATUS_IS_OK(status)) {
9200 0 : return status;
9201 : }
9202 :
9203 : /* Return variables */
9204 :
9205 : /* Return result */
9206 0 : *result = r.out.result;
9207 :
9208 0 : return NT_STATUS_OK;
9209 : }
9210 :
9211 : struct dcerpc_srvsvc_NetServerTransportAddEx_r_state {
9212 : TALLOC_CTX *out_mem_ctx;
9213 : };
9214 :
9215 : static void dcerpc_srvsvc_NetServerTransportAddEx_r_done(struct tevent_req *subreq);
9216 :
9217 0 : struct tevent_req *dcerpc_srvsvc_NetServerTransportAddEx_r_send(TALLOC_CTX *mem_ctx,
9218 : struct tevent_context *ev,
9219 : struct dcerpc_binding_handle *h,
9220 : struct srvsvc_NetServerTransportAddEx *r)
9221 : {
9222 0 : struct tevent_req *req;
9223 0 : struct dcerpc_srvsvc_NetServerTransportAddEx_r_state *state;
9224 0 : struct tevent_req *subreq;
9225 :
9226 0 : req = tevent_req_create(mem_ctx, &state,
9227 : struct dcerpc_srvsvc_NetServerTransportAddEx_r_state);
9228 0 : if (req == NULL) {
9229 0 : return NULL;
9230 : }
9231 :
9232 0 : state->out_mem_ctx = NULL;
9233 :
9234 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
9235 : NULL, &ndr_table_srvsvc,
9236 : NDR_SRVSVC_NETSERVERTRANSPORTADDEX, state, r);
9237 0 : if (tevent_req_nomem(subreq, req)) {
9238 0 : return tevent_req_post(req, ev);
9239 : }
9240 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetServerTransportAddEx_r_done, req);
9241 :
9242 0 : return req;
9243 : }
9244 :
9245 0 : static void dcerpc_srvsvc_NetServerTransportAddEx_r_done(struct tevent_req *subreq)
9246 : {
9247 0 : struct tevent_req *req =
9248 0 : tevent_req_callback_data(subreq,
9249 : struct tevent_req);
9250 0 : NTSTATUS status;
9251 :
9252 0 : status = dcerpc_binding_handle_call_recv(subreq);
9253 0 : TALLOC_FREE(subreq);
9254 0 : if (tevent_req_nterror(req, status)) {
9255 0 : return;
9256 : }
9257 :
9258 0 : tevent_req_done(req);
9259 : }
9260 :
9261 0 : NTSTATUS dcerpc_srvsvc_NetServerTransportAddEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
9262 : {
9263 0 : struct dcerpc_srvsvc_NetServerTransportAddEx_r_state *state =
9264 0 : tevent_req_data(req,
9265 : struct dcerpc_srvsvc_NetServerTransportAddEx_r_state);
9266 0 : NTSTATUS status;
9267 :
9268 0 : if (tevent_req_is_nterror(req, &status)) {
9269 0 : tevent_req_received(req);
9270 0 : return status;
9271 : }
9272 :
9273 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9274 :
9275 0 : tevent_req_received(req);
9276 0 : return NT_STATUS_OK;
9277 : }
9278 :
9279 0 : NTSTATUS dcerpc_srvsvc_NetServerTransportAddEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetServerTransportAddEx *r)
9280 : {
9281 0 : NTSTATUS status;
9282 :
9283 0 : status = dcerpc_binding_handle_call(h,
9284 : NULL, &ndr_table_srvsvc,
9285 : NDR_SRVSVC_NETSERVERTRANSPORTADDEX, mem_ctx, r);
9286 :
9287 0 : return status;
9288 : }
9289 :
9290 : struct dcerpc_srvsvc_NetServerTransportAddEx_state {
9291 : struct srvsvc_NetServerTransportAddEx orig;
9292 : struct srvsvc_NetServerTransportAddEx tmp;
9293 : TALLOC_CTX *out_mem_ctx;
9294 : };
9295 :
9296 : static void dcerpc_srvsvc_NetServerTransportAddEx_done(struct tevent_req *subreq);
9297 :
9298 0 : struct tevent_req *dcerpc_srvsvc_NetServerTransportAddEx_send(TALLOC_CTX *mem_ctx,
9299 : struct tevent_context *ev,
9300 : struct dcerpc_binding_handle *h,
9301 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
9302 : uint32_t _level /* [in] */,
9303 : union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */)
9304 : {
9305 0 : struct tevent_req *req;
9306 0 : struct dcerpc_srvsvc_NetServerTransportAddEx_state *state;
9307 0 : struct tevent_req *subreq;
9308 :
9309 0 : req = tevent_req_create(mem_ctx, &state,
9310 : struct dcerpc_srvsvc_NetServerTransportAddEx_state);
9311 0 : if (req == NULL) {
9312 0 : return NULL;
9313 : }
9314 0 : state->out_mem_ctx = NULL;
9315 :
9316 : /* In parameters */
9317 0 : state->orig.in.server_unc = _server_unc;
9318 0 : state->orig.in.level = _level;
9319 0 : state->orig.in.info = _info;
9320 :
9321 : /* Out parameters */
9322 :
9323 : /* Result */
9324 0 : NDR_ZERO_STRUCT(state->orig.out.result);
9325 :
9326 : /* make a temporary copy, that we pass to the dispatch function */
9327 0 : state->tmp = state->orig;
9328 :
9329 0 : subreq = dcerpc_srvsvc_NetServerTransportAddEx_r_send(state, ev, h, &state->tmp);
9330 0 : if (tevent_req_nomem(subreq, req)) {
9331 0 : return tevent_req_post(req, ev);
9332 : }
9333 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetServerTransportAddEx_done, req);
9334 0 : return req;
9335 : }
9336 :
9337 0 : static void dcerpc_srvsvc_NetServerTransportAddEx_done(struct tevent_req *subreq)
9338 : {
9339 0 : struct tevent_req *req = tevent_req_callback_data(
9340 : subreq, struct tevent_req);
9341 0 : struct dcerpc_srvsvc_NetServerTransportAddEx_state *state = tevent_req_data(
9342 : req, struct dcerpc_srvsvc_NetServerTransportAddEx_state);
9343 0 : NTSTATUS status;
9344 0 : TALLOC_CTX *mem_ctx;
9345 :
9346 0 : if (state->out_mem_ctx) {
9347 0 : mem_ctx = state->out_mem_ctx;
9348 : } else {
9349 0 : mem_ctx = state;
9350 : }
9351 :
9352 0 : status = dcerpc_srvsvc_NetServerTransportAddEx_r_recv(subreq, mem_ctx);
9353 0 : TALLOC_FREE(subreq);
9354 0 : if (tevent_req_nterror(req, status)) {
9355 0 : return;
9356 : }
9357 :
9358 : /* Copy out parameters */
9359 :
9360 : /* Copy result */
9361 0 : state->orig.out.result = state->tmp.out.result;
9362 :
9363 : /* Reset temporary structure */
9364 0 : NDR_ZERO_STRUCT(state->tmp);
9365 :
9366 0 : tevent_req_done(req);
9367 : }
9368 :
9369 0 : NTSTATUS dcerpc_srvsvc_NetServerTransportAddEx_recv(struct tevent_req *req,
9370 : TALLOC_CTX *mem_ctx,
9371 : WERROR *result)
9372 : {
9373 0 : struct dcerpc_srvsvc_NetServerTransportAddEx_state *state = tevent_req_data(
9374 : req, struct dcerpc_srvsvc_NetServerTransportAddEx_state);
9375 0 : NTSTATUS status;
9376 :
9377 0 : if (tevent_req_is_nterror(req, &status)) {
9378 0 : tevent_req_received(req);
9379 0 : return status;
9380 : }
9381 :
9382 : /* Steal possible out parameters to the callers context */
9383 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9384 :
9385 : /* Return result */
9386 0 : *result = state->orig.out.result;
9387 :
9388 0 : tevent_req_received(req);
9389 0 : return NT_STATUS_OK;
9390 : }
9391 :
9392 0 : NTSTATUS dcerpc_srvsvc_NetServerTransportAddEx(struct dcerpc_binding_handle *h,
9393 : TALLOC_CTX *mem_ctx,
9394 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
9395 : uint32_t _level /* [in] */,
9396 : union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */,
9397 : WERROR *result)
9398 : {
9399 0 : struct srvsvc_NetServerTransportAddEx r;
9400 0 : NTSTATUS status;
9401 :
9402 : /* In parameters */
9403 0 : r.in.server_unc = _server_unc;
9404 0 : r.in.level = _level;
9405 0 : r.in.info = _info;
9406 :
9407 : /* Out parameters */
9408 :
9409 : /* Result */
9410 0 : NDR_ZERO_STRUCT(r.out.result);
9411 :
9412 0 : status = dcerpc_srvsvc_NetServerTransportAddEx_r(h, mem_ctx, &r);
9413 0 : if (!NT_STATUS_IS_OK(status)) {
9414 0 : return status;
9415 : }
9416 :
9417 : /* Return variables */
9418 :
9419 : /* Return result */
9420 0 : *result = r.out.result;
9421 :
9422 0 : return NT_STATUS_OK;
9423 : }
9424 :
9425 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_r_state {
9426 : TALLOC_CTX *out_mem_ctx;
9427 : };
9428 :
9429 : static void dcerpc_srvsvc_NetServerSetServiceBitsEx_r_done(struct tevent_req *subreq);
9430 :
9431 0 : struct tevent_req *dcerpc_srvsvc_NetServerSetServiceBitsEx_r_send(TALLOC_CTX *mem_ctx,
9432 : struct tevent_context *ev,
9433 : struct dcerpc_binding_handle *h,
9434 : struct srvsvc_NetServerSetServiceBitsEx *r)
9435 : {
9436 0 : struct tevent_req *req;
9437 0 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_r_state *state;
9438 0 : struct tevent_req *subreq;
9439 :
9440 0 : req = tevent_req_create(mem_ctx, &state,
9441 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_r_state);
9442 0 : if (req == NULL) {
9443 0 : return NULL;
9444 : }
9445 :
9446 0 : state->out_mem_ctx = NULL;
9447 :
9448 0 : subreq = dcerpc_binding_handle_call_send(state, ev, h,
9449 : NULL, &ndr_table_srvsvc,
9450 : NDR_SRVSVC_NETSERVERSETSERVICEBITSEX, state, r);
9451 0 : if (tevent_req_nomem(subreq, req)) {
9452 0 : return tevent_req_post(req, ev);
9453 : }
9454 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetServerSetServiceBitsEx_r_done, req);
9455 :
9456 0 : return req;
9457 : }
9458 :
9459 0 : static void dcerpc_srvsvc_NetServerSetServiceBitsEx_r_done(struct tevent_req *subreq)
9460 : {
9461 0 : struct tevent_req *req =
9462 0 : tevent_req_callback_data(subreq,
9463 : struct tevent_req);
9464 0 : NTSTATUS status;
9465 :
9466 0 : status = dcerpc_binding_handle_call_recv(subreq);
9467 0 : TALLOC_FREE(subreq);
9468 0 : if (tevent_req_nterror(req, status)) {
9469 0 : return;
9470 : }
9471 :
9472 0 : tevent_req_done(req);
9473 : }
9474 :
9475 0 : NTSTATUS dcerpc_srvsvc_NetServerSetServiceBitsEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
9476 : {
9477 0 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_r_state *state =
9478 0 : tevent_req_data(req,
9479 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_r_state);
9480 0 : NTSTATUS status;
9481 :
9482 0 : if (tevent_req_is_nterror(req, &status)) {
9483 0 : tevent_req_received(req);
9484 0 : return status;
9485 : }
9486 :
9487 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9488 :
9489 0 : tevent_req_received(req);
9490 0 : return NT_STATUS_OK;
9491 : }
9492 :
9493 0 : NTSTATUS dcerpc_srvsvc_NetServerSetServiceBitsEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct srvsvc_NetServerSetServiceBitsEx *r)
9494 : {
9495 0 : NTSTATUS status;
9496 :
9497 0 : status = dcerpc_binding_handle_call(h,
9498 : NULL, &ndr_table_srvsvc,
9499 : NDR_SRVSVC_NETSERVERSETSERVICEBITSEX, mem_ctx, r);
9500 :
9501 0 : return status;
9502 : }
9503 :
9504 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_state {
9505 : struct srvsvc_NetServerSetServiceBitsEx orig;
9506 : struct srvsvc_NetServerSetServiceBitsEx tmp;
9507 : TALLOC_CTX *out_mem_ctx;
9508 : };
9509 :
9510 : static void dcerpc_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req *subreq);
9511 :
9512 0 : struct tevent_req *dcerpc_srvsvc_NetServerSetServiceBitsEx_send(TALLOC_CTX *mem_ctx,
9513 : struct tevent_context *ev,
9514 : struct dcerpc_binding_handle *h,
9515 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
9516 : const char *_emulated_server_unc /* [in] [charset(UTF16),unique] */,
9517 : const char *_transport /* [in] [charset(UTF16),unique] */,
9518 : uint32_t _servicebitsofinterest /* [in] */,
9519 : uint32_t _servicebits /* [in] */,
9520 : uint32_t _updateimmediately /* [in] */)
9521 : {
9522 0 : struct tevent_req *req;
9523 0 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_state *state;
9524 0 : struct tevent_req *subreq;
9525 :
9526 0 : req = tevent_req_create(mem_ctx, &state,
9527 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_state);
9528 0 : if (req == NULL) {
9529 0 : return NULL;
9530 : }
9531 0 : state->out_mem_ctx = NULL;
9532 :
9533 : /* In parameters */
9534 0 : state->orig.in.server_unc = _server_unc;
9535 0 : state->orig.in.emulated_server_unc = _emulated_server_unc;
9536 0 : state->orig.in.transport = _transport;
9537 0 : state->orig.in.servicebitsofinterest = _servicebitsofinterest;
9538 0 : state->orig.in.servicebits = _servicebits;
9539 0 : state->orig.in.updateimmediately = _updateimmediately;
9540 :
9541 : /* Out parameters */
9542 :
9543 : /* Result */
9544 0 : NDR_ZERO_STRUCT(state->orig.out.result);
9545 :
9546 : /* make a temporary copy, that we pass to the dispatch function */
9547 0 : state->tmp = state->orig;
9548 :
9549 0 : subreq = dcerpc_srvsvc_NetServerSetServiceBitsEx_r_send(state, ev, h, &state->tmp);
9550 0 : if (tevent_req_nomem(subreq, req)) {
9551 0 : return tevent_req_post(req, ev);
9552 : }
9553 0 : tevent_req_set_callback(subreq, dcerpc_srvsvc_NetServerSetServiceBitsEx_done, req);
9554 0 : return req;
9555 : }
9556 :
9557 0 : static void dcerpc_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req *subreq)
9558 : {
9559 0 : struct tevent_req *req = tevent_req_callback_data(
9560 : subreq, struct tevent_req);
9561 0 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_state *state = tevent_req_data(
9562 : req, struct dcerpc_srvsvc_NetServerSetServiceBitsEx_state);
9563 0 : NTSTATUS status;
9564 0 : TALLOC_CTX *mem_ctx;
9565 :
9566 0 : if (state->out_mem_ctx) {
9567 0 : mem_ctx = state->out_mem_ctx;
9568 : } else {
9569 0 : mem_ctx = state;
9570 : }
9571 :
9572 0 : status = dcerpc_srvsvc_NetServerSetServiceBitsEx_r_recv(subreq, mem_ctx);
9573 0 : TALLOC_FREE(subreq);
9574 0 : if (tevent_req_nterror(req, status)) {
9575 0 : return;
9576 : }
9577 :
9578 : /* Copy out parameters */
9579 :
9580 : /* Copy result */
9581 0 : state->orig.out.result = state->tmp.out.result;
9582 :
9583 : /* Reset temporary structure */
9584 0 : NDR_ZERO_STRUCT(state->tmp);
9585 :
9586 0 : tevent_req_done(req);
9587 : }
9588 :
9589 0 : NTSTATUS dcerpc_srvsvc_NetServerSetServiceBitsEx_recv(struct tevent_req *req,
9590 : TALLOC_CTX *mem_ctx,
9591 : WERROR *result)
9592 : {
9593 0 : struct dcerpc_srvsvc_NetServerSetServiceBitsEx_state *state = tevent_req_data(
9594 : req, struct dcerpc_srvsvc_NetServerSetServiceBitsEx_state);
9595 0 : NTSTATUS status;
9596 :
9597 0 : if (tevent_req_is_nterror(req, &status)) {
9598 0 : tevent_req_received(req);
9599 0 : return status;
9600 : }
9601 :
9602 : /* Steal possible out parameters to the callers context */
9603 0 : talloc_steal(mem_ctx, state->out_mem_ctx);
9604 :
9605 : /* Return result */
9606 0 : *result = state->orig.out.result;
9607 :
9608 0 : tevent_req_received(req);
9609 0 : return NT_STATUS_OK;
9610 : }
9611 :
9612 0 : NTSTATUS dcerpc_srvsvc_NetServerSetServiceBitsEx(struct dcerpc_binding_handle *h,
9613 : TALLOC_CTX *mem_ctx,
9614 : const char *_server_unc /* [in] [charset(UTF16),unique] */,
9615 : const char *_emulated_server_unc /* [in] [charset(UTF16),unique] */,
9616 : const char *_transport /* [in] [charset(UTF16),unique] */,
9617 : uint32_t _servicebitsofinterest /* [in] */,
9618 : uint32_t _servicebits /* [in] */,
9619 : uint32_t _updateimmediately /* [in] */,
9620 : WERROR *result)
9621 : {
9622 0 : struct srvsvc_NetServerSetServiceBitsEx r;
9623 0 : NTSTATUS status;
9624 :
9625 : /* In parameters */
9626 0 : r.in.server_unc = _server_unc;
9627 0 : r.in.emulated_server_unc = _emulated_server_unc;
9628 0 : r.in.transport = _transport;
9629 0 : r.in.servicebitsofinterest = _servicebitsofinterest;
9630 0 : r.in.servicebits = _servicebits;
9631 0 : r.in.updateimmediately = _updateimmediately;
9632 :
9633 : /* Out parameters */
9634 :
9635 : /* Result */
9636 0 : NDR_ZERO_STRUCT(r.out.result);
9637 :
9638 0 : status = dcerpc_srvsvc_NetServerSetServiceBitsEx_r(h, mem_ctx, &r);
9639 0 : if (!NT_STATUS_IS_OK(status)) {
9640 0 : return status;
9641 : }
9642 :
9643 : /* Return variables */
9644 :
9645 : /* Return result */
9646 0 : *result = r.out.result;
9647 :
9648 0 : return NT_STATUS_OK;
9649 : }
9650 :
|