1
/* client functions auto-generated by pidl */
5
#include "lib/util/tevent_ntstatus.h"
6
#include "librpc/gen_ndr/ndr_dfs.h"
7
#include "librpc/gen_ndr/ndr_dfs_c.h"
9
/* netdfs - client functions generated by pidl */
11
struct dcerpc_dfs_GetManagerVersion_r_state {
12
TALLOC_CTX *out_mem_ctx;
15
static void dcerpc_dfs_GetManagerVersion_r_done(struct tevent_req *subreq);
17
struct tevent_req *dcerpc_dfs_GetManagerVersion_r_send(TALLOC_CTX *mem_ctx,
18
struct tevent_context *ev,
19
struct dcerpc_binding_handle *h,
20
struct dfs_GetManagerVersion *r)
22
struct tevent_req *req;
23
struct dcerpc_dfs_GetManagerVersion_r_state *state;
24
struct tevent_req *subreq;
26
req = tevent_req_create(mem_ctx, &state,
27
struct dcerpc_dfs_GetManagerVersion_r_state);
32
state->out_mem_ctx = talloc_new(state);
33
if (tevent_req_nomem(state->out_mem_ctx, req)) {
34
return tevent_req_post(req, ev);
37
subreq = dcerpc_binding_handle_call_send(state, ev, h,
38
NULL, &ndr_table_netdfs,
39
NDR_DFS_GETMANAGERVERSION, state->out_mem_ctx, r);
40
if (tevent_req_nomem(subreq, req)) {
41
return tevent_req_post(req, ev);
43
tevent_req_set_callback(subreq, dcerpc_dfs_GetManagerVersion_r_done, req);
48
static void dcerpc_dfs_GetManagerVersion_r_done(struct tevent_req *subreq)
50
struct tevent_req *req =
51
tevent_req_callback_data(subreq,
55
status = dcerpc_binding_handle_call_recv(subreq);
56
if (!NT_STATUS_IS_OK(status)) {
57
tevent_req_nterror(req, status);
64
NTSTATUS dcerpc_dfs_GetManagerVersion_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
66
struct dcerpc_dfs_GetManagerVersion_r_state *state =
68
struct dcerpc_dfs_GetManagerVersion_r_state);
71
if (tevent_req_is_nterror(req, &status)) {
72
tevent_req_received(req);
76
talloc_steal(mem_ctx, state->out_mem_ctx);
78
tevent_req_received(req);
82
NTSTATUS dcerpc_dfs_GetManagerVersion_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_GetManagerVersion *r)
86
status = dcerpc_binding_handle_call(h,
87
NULL, &ndr_table_netdfs,
88
NDR_DFS_GETMANAGERVERSION, mem_ctx, r);
93
struct dcerpc_dfs_GetManagerVersion_state {
94
struct dfs_GetManagerVersion orig;
95
struct dfs_GetManagerVersion tmp;
96
TALLOC_CTX *out_mem_ctx;
99
static void dcerpc_dfs_GetManagerVersion_done(struct tevent_req *subreq);
101
struct tevent_req *dcerpc_dfs_GetManagerVersion_send(TALLOC_CTX *mem_ctx,
102
struct tevent_context *ev,
103
struct dcerpc_binding_handle *h,
104
enum dfs_ManagerVersion *_version /* [out] [ref] */)
106
struct tevent_req *req;
107
struct dcerpc_dfs_GetManagerVersion_state *state;
108
struct tevent_req *subreq;
110
req = tevent_req_create(mem_ctx, &state,
111
struct dcerpc_dfs_GetManagerVersion_state);
115
state->out_mem_ctx = NULL;
120
state->orig.out.version = _version;
122
state->out_mem_ctx = talloc_named_const(state, 0,
123
"dcerpc_dfs_GetManagerVersion_out_memory");
124
if (tevent_req_nomem(state->out_mem_ctx, req)) {
125
return tevent_req_post(req, ev);
128
/* make a temporary copy, that we pass to the dispatch function */
129
state->tmp = state->orig;
131
subreq = dcerpc_dfs_GetManagerVersion_r_send(state, ev, h, &state->tmp);
132
if (tevent_req_nomem(subreq, req)) {
133
return tevent_req_post(req, ev);
135
tevent_req_set_callback(subreq, dcerpc_dfs_GetManagerVersion_done, req);
139
static void dcerpc_dfs_GetManagerVersion_done(struct tevent_req *subreq)
141
struct tevent_req *req = tevent_req_callback_data(
142
subreq, struct tevent_req);
143
struct dcerpc_dfs_GetManagerVersion_state *state = tevent_req_data(
144
req, struct dcerpc_dfs_GetManagerVersion_state);
148
if (state->out_mem_ctx) {
149
mem_ctx = state->out_mem_ctx;
154
status = dcerpc_dfs_GetManagerVersion_r_recv(subreq, mem_ctx);
156
if (!NT_STATUS_IS_OK(status)) {
157
tevent_req_nterror(req, status);
161
/* Copy out parameters */
162
*state->orig.out.version = *state->tmp.out.version;
164
/* Reset temporary structure */
165
ZERO_STRUCT(state->tmp);
167
tevent_req_done(req);
170
NTSTATUS dcerpc_dfs_GetManagerVersion_recv(struct tevent_req *req,
173
struct dcerpc_dfs_GetManagerVersion_state *state = tevent_req_data(
174
req, struct dcerpc_dfs_GetManagerVersion_state);
177
if (tevent_req_is_nterror(req, &status)) {
178
tevent_req_received(req);
182
/* Steal possible out parameters to the callers context */
183
talloc_steal(mem_ctx, state->out_mem_ctx);
185
tevent_req_received(req);
189
NTSTATUS dcerpc_dfs_GetManagerVersion(struct dcerpc_binding_handle *h,
191
enum dfs_ManagerVersion *_version /* [out] [ref] */)
193
struct dfs_GetManagerVersion r;
198
status = dcerpc_dfs_GetManagerVersion_r(h, mem_ctx, &r);
199
if (!NT_STATUS_IS_OK(status)) {
203
/* Return variables */
204
*_version = *r.out.version;
211
struct dcerpc_dfs_Add_r_state {
212
TALLOC_CTX *out_mem_ctx;
215
static void dcerpc_dfs_Add_r_done(struct tevent_req *subreq);
217
struct tevent_req *dcerpc_dfs_Add_r_send(TALLOC_CTX *mem_ctx,
218
struct tevent_context *ev,
219
struct dcerpc_binding_handle *h,
222
struct tevent_req *req;
223
struct dcerpc_dfs_Add_r_state *state;
224
struct tevent_req *subreq;
226
req = tevent_req_create(mem_ctx, &state,
227
struct dcerpc_dfs_Add_r_state);
232
state->out_mem_ctx = NULL;
234
subreq = dcerpc_binding_handle_call_send(state, ev, h,
235
NULL, &ndr_table_netdfs,
236
NDR_DFS_ADD, state, r);
237
if (tevent_req_nomem(subreq, req)) {
238
return tevent_req_post(req, ev);
240
tevent_req_set_callback(subreq, dcerpc_dfs_Add_r_done, req);
245
static void dcerpc_dfs_Add_r_done(struct tevent_req *subreq)
247
struct tevent_req *req =
248
tevent_req_callback_data(subreq,
252
status = dcerpc_binding_handle_call_recv(subreq);
253
if (!NT_STATUS_IS_OK(status)) {
254
tevent_req_nterror(req, status);
258
tevent_req_done(req);
261
NTSTATUS dcerpc_dfs_Add_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
263
struct dcerpc_dfs_Add_r_state *state =
265
struct dcerpc_dfs_Add_r_state);
268
if (tevent_req_is_nterror(req, &status)) {
269
tevent_req_received(req);
273
talloc_steal(mem_ctx, state->out_mem_ctx);
275
tevent_req_received(req);
279
NTSTATUS dcerpc_dfs_Add_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_Add *r)
283
status = dcerpc_binding_handle_call(h,
284
NULL, &ndr_table_netdfs,
285
NDR_DFS_ADD, mem_ctx, r);
290
struct dcerpc_dfs_Add_state {
293
TALLOC_CTX *out_mem_ctx;
296
static void dcerpc_dfs_Add_done(struct tevent_req *subreq);
298
struct tevent_req *dcerpc_dfs_Add_send(TALLOC_CTX *mem_ctx,
299
struct tevent_context *ev,
300
struct dcerpc_binding_handle *h,
301
const char *_path /* [in] [ref,charset(UTF16)] */,
302
const char *_server /* [in] [ref,charset(UTF16)] */,
303
const char *_share /* [in] [unique,charset(UTF16)] */,
304
const char *_comment /* [in] [unique,charset(UTF16)] */,
305
uint32_t _flags /* [in] */)
307
struct tevent_req *req;
308
struct dcerpc_dfs_Add_state *state;
309
struct tevent_req *subreq;
311
req = tevent_req_create(mem_ctx, &state,
312
struct dcerpc_dfs_Add_state);
316
state->out_mem_ctx = NULL;
319
state->orig.in.path = _path;
320
state->orig.in.server = _server;
321
state->orig.in.share = _share;
322
state->orig.in.comment = _comment;
323
state->orig.in.flags = _flags;
328
ZERO_STRUCT(state->orig.out.result);
330
/* make a temporary copy, that we pass to the dispatch function */
331
state->tmp = state->orig;
333
subreq = dcerpc_dfs_Add_r_send(state, ev, h, &state->tmp);
334
if (tevent_req_nomem(subreq, req)) {
335
return tevent_req_post(req, ev);
337
tevent_req_set_callback(subreq, dcerpc_dfs_Add_done, req);
341
static void dcerpc_dfs_Add_done(struct tevent_req *subreq)
343
struct tevent_req *req = tevent_req_callback_data(
344
subreq, struct tevent_req);
345
struct dcerpc_dfs_Add_state *state = tevent_req_data(
346
req, struct dcerpc_dfs_Add_state);
350
if (state->out_mem_ctx) {
351
mem_ctx = state->out_mem_ctx;
356
status = dcerpc_dfs_Add_r_recv(subreq, mem_ctx);
358
if (!NT_STATUS_IS_OK(status)) {
359
tevent_req_nterror(req, status);
363
/* Copy out parameters */
366
state->orig.out.result = state->tmp.out.result;
368
/* Reset temporary structure */
369
ZERO_STRUCT(state->tmp);
371
tevent_req_done(req);
374
NTSTATUS dcerpc_dfs_Add_recv(struct tevent_req *req,
378
struct dcerpc_dfs_Add_state *state = tevent_req_data(
379
req, struct dcerpc_dfs_Add_state);
382
if (tevent_req_is_nterror(req, &status)) {
383
tevent_req_received(req);
387
/* Steal possible out parameters to the callers context */
388
talloc_steal(mem_ctx, state->out_mem_ctx);
391
*result = state->orig.out.result;
393
tevent_req_received(req);
397
NTSTATUS dcerpc_dfs_Add(struct dcerpc_binding_handle *h,
399
const char *_path /* [in] [ref,charset(UTF16)] */,
400
const char *_server /* [in] [ref,charset(UTF16)] */,
401
const char *_share /* [in] [unique,charset(UTF16)] */,
402
const char *_comment /* [in] [unique,charset(UTF16)] */,
403
uint32_t _flags /* [in] */,
411
r.in.server = _server;
413
r.in.comment = _comment;
416
status = dcerpc_dfs_Add_r(h, mem_ctx, &r);
417
if (!NT_STATUS_IS_OK(status)) {
421
/* Return variables */
424
*result = r.out.result;
429
struct dcerpc_dfs_Remove_r_state {
430
TALLOC_CTX *out_mem_ctx;
433
static void dcerpc_dfs_Remove_r_done(struct tevent_req *subreq);
435
struct tevent_req *dcerpc_dfs_Remove_r_send(TALLOC_CTX *mem_ctx,
436
struct tevent_context *ev,
437
struct dcerpc_binding_handle *h,
438
struct dfs_Remove *r)
440
struct tevent_req *req;
441
struct dcerpc_dfs_Remove_r_state *state;
442
struct tevent_req *subreq;
444
req = tevent_req_create(mem_ctx, &state,
445
struct dcerpc_dfs_Remove_r_state);
450
state->out_mem_ctx = NULL;
452
subreq = dcerpc_binding_handle_call_send(state, ev, h,
453
NULL, &ndr_table_netdfs,
454
NDR_DFS_REMOVE, state, r);
455
if (tevent_req_nomem(subreq, req)) {
456
return tevent_req_post(req, ev);
458
tevent_req_set_callback(subreq, dcerpc_dfs_Remove_r_done, req);
463
static void dcerpc_dfs_Remove_r_done(struct tevent_req *subreq)
465
struct tevent_req *req =
466
tevent_req_callback_data(subreq,
470
status = dcerpc_binding_handle_call_recv(subreq);
471
if (!NT_STATUS_IS_OK(status)) {
472
tevent_req_nterror(req, status);
476
tevent_req_done(req);
479
NTSTATUS dcerpc_dfs_Remove_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
481
struct dcerpc_dfs_Remove_r_state *state =
483
struct dcerpc_dfs_Remove_r_state);
486
if (tevent_req_is_nterror(req, &status)) {
487
tevent_req_received(req);
491
talloc_steal(mem_ctx, state->out_mem_ctx);
493
tevent_req_received(req);
497
NTSTATUS dcerpc_dfs_Remove_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_Remove *r)
501
status = dcerpc_binding_handle_call(h,
502
NULL, &ndr_table_netdfs,
503
NDR_DFS_REMOVE, mem_ctx, r);
508
struct dcerpc_dfs_Remove_state {
509
struct dfs_Remove orig;
510
struct dfs_Remove tmp;
511
TALLOC_CTX *out_mem_ctx;
514
static void dcerpc_dfs_Remove_done(struct tevent_req *subreq);
516
struct tevent_req *dcerpc_dfs_Remove_send(TALLOC_CTX *mem_ctx,
517
struct tevent_context *ev,
518
struct dcerpc_binding_handle *h,
519
const char *_dfs_entry_path /* [in] [ref,charset(UTF16)] */,
520
const char *_servername /* [in] [unique,charset(UTF16)] */,
521
const char *_sharename /* [in] [unique,charset(UTF16)] */)
523
struct tevent_req *req;
524
struct dcerpc_dfs_Remove_state *state;
525
struct tevent_req *subreq;
527
req = tevent_req_create(mem_ctx, &state,
528
struct dcerpc_dfs_Remove_state);
532
state->out_mem_ctx = NULL;
535
state->orig.in.dfs_entry_path = _dfs_entry_path;
536
state->orig.in.servername = _servername;
537
state->orig.in.sharename = _sharename;
542
ZERO_STRUCT(state->orig.out.result);
544
/* make a temporary copy, that we pass to the dispatch function */
545
state->tmp = state->orig;
547
subreq = dcerpc_dfs_Remove_r_send(state, ev, h, &state->tmp);
548
if (tevent_req_nomem(subreq, req)) {
549
return tevent_req_post(req, ev);
551
tevent_req_set_callback(subreq, dcerpc_dfs_Remove_done, req);
555
static void dcerpc_dfs_Remove_done(struct tevent_req *subreq)
557
struct tevent_req *req = tevent_req_callback_data(
558
subreq, struct tevent_req);
559
struct dcerpc_dfs_Remove_state *state = tevent_req_data(
560
req, struct dcerpc_dfs_Remove_state);
564
if (state->out_mem_ctx) {
565
mem_ctx = state->out_mem_ctx;
570
status = dcerpc_dfs_Remove_r_recv(subreq, mem_ctx);
572
if (!NT_STATUS_IS_OK(status)) {
573
tevent_req_nterror(req, status);
577
/* Copy out parameters */
580
state->orig.out.result = state->tmp.out.result;
582
/* Reset temporary structure */
583
ZERO_STRUCT(state->tmp);
585
tevent_req_done(req);
588
NTSTATUS dcerpc_dfs_Remove_recv(struct tevent_req *req,
592
struct dcerpc_dfs_Remove_state *state = tevent_req_data(
593
req, struct dcerpc_dfs_Remove_state);
596
if (tevent_req_is_nterror(req, &status)) {
597
tevent_req_received(req);
601
/* Steal possible out parameters to the callers context */
602
talloc_steal(mem_ctx, state->out_mem_ctx);
605
*result = state->orig.out.result;
607
tevent_req_received(req);
611
NTSTATUS dcerpc_dfs_Remove(struct dcerpc_binding_handle *h,
613
const char *_dfs_entry_path /* [in] [ref,charset(UTF16)] */,
614
const char *_servername /* [in] [unique,charset(UTF16)] */,
615
const char *_sharename /* [in] [unique,charset(UTF16)] */,
622
r.in.dfs_entry_path = _dfs_entry_path;
623
r.in.servername = _servername;
624
r.in.sharename = _sharename;
626
status = dcerpc_dfs_Remove_r(h, mem_ctx, &r);
627
if (!NT_STATUS_IS_OK(status)) {
631
/* Return variables */
634
*result = r.out.result;
639
struct dcerpc_dfs_SetInfo_r_state {
640
TALLOC_CTX *out_mem_ctx;
643
static void dcerpc_dfs_SetInfo_r_done(struct tevent_req *subreq);
645
struct tevent_req *dcerpc_dfs_SetInfo_r_send(TALLOC_CTX *mem_ctx,
646
struct tevent_context *ev,
647
struct dcerpc_binding_handle *h,
648
struct dfs_SetInfo *r)
650
struct tevent_req *req;
651
struct dcerpc_dfs_SetInfo_r_state *state;
652
struct tevent_req *subreq;
654
req = tevent_req_create(mem_ctx, &state,
655
struct dcerpc_dfs_SetInfo_r_state);
660
state->out_mem_ctx = NULL;
662
subreq = dcerpc_binding_handle_call_send(state, ev, h,
663
NULL, &ndr_table_netdfs,
664
NDR_DFS_SETINFO, state, r);
665
if (tevent_req_nomem(subreq, req)) {
666
return tevent_req_post(req, ev);
668
tevent_req_set_callback(subreq, dcerpc_dfs_SetInfo_r_done, req);
673
static void dcerpc_dfs_SetInfo_r_done(struct tevent_req *subreq)
675
struct tevent_req *req =
676
tevent_req_callback_data(subreq,
680
status = dcerpc_binding_handle_call_recv(subreq);
681
if (!NT_STATUS_IS_OK(status)) {
682
tevent_req_nterror(req, status);
686
tevent_req_done(req);
689
NTSTATUS dcerpc_dfs_SetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
691
struct dcerpc_dfs_SetInfo_r_state *state =
693
struct dcerpc_dfs_SetInfo_r_state);
696
if (tevent_req_is_nterror(req, &status)) {
697
tevent_req_received(req);
701
talloc_steal(mem_ctx, state->out_mem_ctx);
703
tevent_req_received(req);
707
NTSTATUS dcerpc_dfs_SetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_SetInfo *r)
711
status = dcerpc_binding_handle_call(h,
712
NULL, &ndr_table_netdfs,
713
NDR_DFS_SETINFO, mem_ctx, r);
718
struct dcerpc_dfs_SetInfo_state {
719
struct dfs_SetInfo orig;
720
struct dfs_SetInfo tmp;
721
TALLOC_CTX *out_mem_ctx;
724
static void dcerpc_dfs_SetInfo_done(struct tevent_req *subreq);
726
struct tevent_req *dcerpc_dfs_SetInfo_send(TALLOC_CTX *mem_ctx,
727
struct tevent_context *ev,
728
struct dcerpc_binding_handle *h,
729
const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
730
const char *_servername /* [in] [unique,charset(UTF16)] */,
731
const char *_sharename /* [in] [unique,charset(UTF16)] */,
732
uint32_t _level /* [in] */,
733
union dfs_Info *_info /* [in] [ref,switch_is(level)] */)
735
struct tevent_req *req;
736
struct dcerpc_dfs_SetInfo_state *state;
737
struct tevent_req *subreq;
739
req = tevent_req_create(mem_ctx, &state,
740
struct dcerpc_dfs_SetInfo_state);
744
state->out_mem_ctx = NULL;
747
state->orig.in.dfs_entry_path = _dfs_entry_path;
748
state->orig.in.servername = _servername;
749
state->orig.in.sharename = _sharename;
750
state->orig.in.level = _level;
751
state->orig.in.info = _info;
756
ZERO_STRUCT(state->orig.out.result);
758
/* make a temporary copy, that we pass to the dispatch function */
759
state->tmp = state->orig;
761
subreq = dcerpc_dfs_SetInfo_r_send(state, ev, h, &state->tmp);
762
if (tevent_req_nomem(subreq, req)) {
763
return tevent_req_post(req, ev);
765
tevent_req_set_callback(subreq, dcerpc_dfs_SetInfo_done, req);
769
static void dcerpc_dfs_SetInfo_done(struct tevent_req *subreq)
771
struct tevent_req *req = tevent_req_callback_data(
772
subreq, struct tevent_req);
773
struct dcerpc_dfs_SetInfo_state *state = tevent_req_data(
774
req, struct dcerpc_dfs_SetInfo_state);
778
if (state->out_mem_ctx) {
779
mem_ctx = state->out_mem_ctx;
784
status = dcerpc_dfs_SetInfo_r_recv(subreq, mem_ctx);
786
if (!NT_STATUS_IS_OK(status)) {
787
tevent_req_nterror(req, status);
791
/* Copy out parameters */
794
state->orig.out.result = state->tmp.out.result;
796
/* Reset temporary structure */
797
ZERO_STRUCT(state->tmp);
799
tevent_req_done(req);
802
NTSTATUS dcerpc_dfs_SetInfo_recv(struct tevent_req *req,
806
struct dcerpc_dfs_SetInfo_state *state = tevent_req_data(
807
req, struct dcerpc_dfs_SetInfo_state);
810
if (tevent_req_is_nterror(req, &status)) {
811
tevent_req_received(req);
815
/* Steal possible out parameters to the callers context */
816
talloc_steal(mem_ctx, state->out_mem_ctx);
819
*result = state->orig.out.result;
821
tevent_req_received(req);
825
NTSTATUS dcerpc_dfs_SetInfo(struct dcerpc_binding_handle *h,
827
const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
828
const char *_servername /* [in] [unique,charset(UTF16)] */,
829
const char *_sharename /* [in] [unique,charset(UTF16)] */,
830
uint32_t _level /* [in] */,
831
union dfs_Info *_info /* [in] [ref,switch_is(level)] */,
834
struct dfs_SetInfo r;
838
r.in.dfs_entry_path = _dfs_entry_path;
839
r.in.servername = _servername;
840
r.in.sharename = _sharename;
844
status = dcerpc_dfs_SetInfo_r(h, mem_ctx, &r);
845
if (!NT_STATUS_IS_OK(status)) {
849
/* Return variables */
852
*result = r.out.result;
857
struct dcerpc_dfs_GetInfo_r_state {
858
TALLOC_CTX *out_mem_ctx;
861
static void dcerpc_dfs_GetInfo_r_done(struct tevent_req *subreq);
863
struct tevent_req *dcerpc_dfs_GetInfo_r_send(TALLOC_CTX *mem_ctx,
864
struct tevent_context *ev,
865
struct dcerpc_binding_handle *h,
866
struct dfs_GetInfo *r)
868
struct tevent_req *req;
869
struct dcerpc_dfs_GetInfo_r_state *state;
870
struct tevent_req *subreq;
872
req = tevent_req_create(mem_ctx, &state,
873
struct dcerpc_dfs_GetInfo_r_state);
878
state->out_mem_ctx = talloc_new(state);
879
if (tevent_req_nomem(state->out_mem_ctx, req)) {
880
return tevent_req_post(req, ev);
883
subreq = dcerpc_binding_handle_call_send(state, ev, h,
884
NULL, &ndr_table_netdfs,
885
NDR_DFS_GETINFO, state->out_mem_ctx, r);
886
if (tevent_req_nomem(subreq, req)) {
887
return tevent_req_post(req, ev);
889
tevent_req_set_callback(subreq, dcerpc_dfs_GetInfo_r_done, req);
894
static void dcerpc_dfs_GetInfo_r_done(struct tevent_req *subreq)
896
struct tevent_req *req =
897
tevent_req_callback_data(subreq,
901
status = dcerpc_binding_handle_call_recv(subreq);
902
if (!NT_STATUS_IS_OK(status)) {
903
tevent_req_nterror(req, status);
907
tevent_req_done(req);
910
NTSTATUS dcerpc_dfs_GetInfo_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
912
struct dcerpc_dfs_GetInfo_r_state *state =
914
struct dcerpc_dfs_GetInfo_r_state);
917
if (tevent_req_is_nterror(req, &status)) {
918
tevent_req_received(req);
922
talloc_steal(mem_ctx, state->out_mem_ctx);
924
tevent_req_received(req);
928
NTSTATUS dcerpc_dfs_GetInfo_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_GetInfo *r)
932
status = dcerpc_binding_handle_call(h,
933
NULL, &ndr_table_netdfs,
934
NDR_DFS_GETINFO, mem_ctx, r);
939
struct dcerpc_dfs_GetInfo_state {
940
struct dfs_GetInfo orig;
941
struct dfs_GetInfo tmp;
942
TALLOC_CTX *out_mem_ctx;
945
static void dcerpc_dfs_GetInfo_done(struct tevent_req *subreq);
947
struct tevent_req *dcerpc_dfs_GetInfo_send(TALLOC_CTX *mem_ctx,
948
struct tevent_context *ev,
949
struct dcerpc_binding_handle *h,
950
const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
951
const char *_servername /* [in] [unique,charset(UTF16)] */,
952
const char *_sharename /* [in] [unique,charset(UTF16)] */,
953
uint32_t _level /* [in] */,
954
union dfs_Info *_info /* [out] [ref,switch_is(level)] */)
956
struct tevent_req *req;
957
struct dcerpc_dfs_GetInfo_state *state;
958
struct tevent_req *subreq;
960
req = tevent_req_create(mem_ctx, &state,
961
struct dcerpc_dfs_GetInfo_state);
965
state->out_mem_ctx = NULL;
968
state->orig.in.dfs_entry_path = _dfs_entry_path;
969
state->orig.in.servername = _servername;
970
state->orig.in.sharename = _sharename;
971
state->orig.in.level = _level;
974
state->orig.out.info = _info;
977
ZERO_STRUCT(state->orig.out.result);
979
state->out_mem_ctx = talloc_named_const(state, 0,
980
"dcerpc_dfs_GetInfo_out_memory");
981
if (tevent_req_nomem(state->out_mem_ctx, req)) {
982
return tevent_req_post(req, ev);
985
/* make a temporary copy, that we pass to the dispatch function */
986
state->tmp = state->orig;
988
subreq = dcerpc_dfs_GetInfo_r_send(state, ev, h, &state->tmp);
989
if (tevent_req_nomem(subreq, req)) {
990
return tevent_req_post(req, ev);
992
tevent_req_set_callback(subreq, dcerpc_dfs_GetInfo_done, req);
996
static void dcerpc_dfs_GetInfo_done(struct tevent_req *subreq)
998
struct tevent_req *req = tevent_req_callback_data(
999
subreq, struct tevent_req);
1000
struct dcerpc_dfs_GetInfo_state *state = tevent_req_data(
1001
req, struct dcerpc_dfs_GetInfo_state);
1003
TALLOC_CTX *mem_ctx;
1005
if (state->out_mem_ctx) {
1006
mem_ctx = state->out_mem_ctx;
1011
status = dcerpc_dfs_GetInfo_r_recv(subreq, mem_ctx);
1012
TALLOC_FREE(subreq);
1013
if (!NT_STATUS_IS_OK(status)) {
1014
tevent_req_nterror(req, status);
1018
/* Copy out parameters */
1019
*state->orig.out.info = *state->tmp.out.info;
1022
state->orig.out.result = state->tmp.out.result;
1024
/* Reset temporary structure */
1025
ZERO_STRUCT(state->tmp);
1027
tevent_req_done(req);
1030
NTSTATUS dcerpc_dfs_GetInfo_recv(struct tevent_req *req,
1031
TALLOC_CTX *mem_ctx,
1034
struct dcerpc_dfs_GetInfo_state *state = tevent_req_data(
1035
req, struct dcerpc_dfs_GetInfo_state);
1038
if (tevent_req_is_nterror(req, &status)) {
1039
tevent_req_received(req);
1043
/* Steal possible out parameters to the callers context */
1044
talloc_steal(mem_ctx, state->out_mem_ctx);
1047
*result = state->orig.out.result;
1049
tevent_req_received(req);
1050
return NT_STATUS_OK;
1053
NTSTATUS dcerpc_dfs_GetInfo(struct dcerpc_binding_handle *h,
1054
TALLOC_CTX *mem_ctx,
1055
const char *_dfs_entry_path /* [in] [charset(UTF16)] */,
1056
const char *_servername /* [in] [unique,charset(UTF16)] */,
1057
const char *_sharename /* [in] [unique,charset(UTF16)] */,
1058
uint32_t _level /* [in] */,
1059
union dfs_Info *_info /* [out] [ref,switch_is(level)] */,
1062
struct dfs_GetInfo r;
1066
r.in.dfs_entry_path = _dfs_entry_path;
1067
r.in.servername = _servername;
1068
r.in.sharename = _sharename;
1069
r.in.level = _level;
1071
status = dcerpc_dfs_GetInfo_r(h, mem_ctx, &r);
1072
if (!NT_STATUS_IS_OK(status)) {
1076
/* Return variables */
1077
*_info = *r.out.info;
1080
*result = r.out.result;
1082
return NT_STATUS_OK;
1085
struct dcerpc_dfs_Enum_r_state {
1086
TALLOC_CTX *out_mem_ctx;
1089
static void dcerpc_dfs_Enum_r_done(struct tevent_req *subreq);
1091
struct tevent_req *dcerpc_dfs_Enum_r_send(TALLOC_CTX *mem_ctx,
1092
struct tevent_context *ev,
1093
struct dcerpc_binding_handle *h,
1096
struct tevent_req *req;
1097
struct dcerpc_dfs_Enum_r_state *state;
1098
struct tevent_req *subreq;
1100
req = tevent_req_create(mem_ctx, &state,
1101
struct dcerpc_dfs_Enum_r_state);
1106
state->out_mem_ctx = talloc_new(state);
1107
if (tevent_req_nomem(state->out_mem_ctx, req)) {
1108
return tevent_req_post(req, ev);
1111
subreq = dcerpc_binding_handle_call_send(state, ev, h,
1112
NULL, &ndr_table_netdfs,
1113
NDR_DFS_ENUM, state->out_mem_ctx, r);
1114
if (tevent_req_nomem(subreq, req)) {
1115
return tevent_req_post(req, ev);
1117
tevent_req_set_callback(subreq, dcerpc_dfs_Enum_r_done, req);
1122
static void dcerpc_dfs_Enum_r_done(struct tevent_req *subreq)
1124
struct tevent_req *req =
1125
tevent_req_callback_data(subreq,
1129
status = dcerpc_binding_handle_call_recv(subreq);
1130
if (!NT_STATUS_IS_OK(status)) {
1131
tevent_req_nterror(req, status);
1135
tevent_req_done(req);
1138
NTSTATUS dcerpc_dfs_Enum_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1140
struct dcerpc_dfs_Enum_r_state *state =
1141
tevent_req_data(req,
1142
struct dcerpc_dfs_Enum_r_state);
1145
if (tevent_req_is_nterror(req, &status)) {
1146
tevent_req_received(req);
1150
talloc_steal(mem_ctx, state->out_mem_ctx);
1152
tevent_req_received(req);
1153
return NT_STATUS_OK;
1156
NTSTATUS dcerpc_dfs_Enum_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_Enum *r)
1160
status = dcerpc_binding_handle_call(h,
1161
NULL, &ndr_table_netdfs,
1162
NDR_DFS_ENUM, mem_ctx, r);
1167
struct dcerpc_dfs_Enum_state {
1168
struct dfs_Enum orig;
1169
struct dfs_Enum tmp;
1170
TALLOC_CTX *out_mem_ctx;
1173
static void dcerpc_dfs_Enum_done(struct tevent_req *subreq);
1175
struct tevent_req *dcerpc_dfs_Enum_send(TALLOC_CTX *mem_ctx,
1176
struct tevent_context *ev,
1177
struct dcerpc_binding_handle *h,
1178
uint32_t _level /* [in] */,
1179
uint32_t _bufsize /* [in] */,
1180
struct dfs_EnumStruct *_info /* [in,out] [unique] */,
1181
uint32_t *_total /* [in,out] [unique] */)
1183
struct tevent_req *req;
1184
struct dcerpc_dfs_Enum_state *state;
1185
struct tevent_req *subreq;
1187
req = tevent_req_create(mem_ctx, &state,
1188
struct dcerpc_dfs_Enum_state);
1192
state->out_mem_ctx = NULL;
1195
state->orig.in.level = _level;
1196
state->orig.in.bufsize = _bufsize;
1197
state->orig.in.info = _info;
1198
state->orig.in.total = _total;
1200
/* Out parameters */
1201
state->orig.out.info = _info;
1202
state->orig.out.total = _total;
1205
ZERO_STRUCT(state->orig.out.result);
1207
state->out_mem_ctx = talloc_named_const(state, 0,
1208
"dcerpc_dfs_Enum_out_memory");
1209
if (tevent_req_nomem(state->out_mem_ctx, req)) {
1210
return tevent_req_post(req, ev);
1213
/* make a temporary copy, that we pass to the dispatch function */
1214
state->tmp = state->orig;
1216
subreq = dcerpc_dfs_Enum_r_send(state, ev, h, &state->tmp);
1217
if (tevent_req_nomem(subreq, req)) {
1218
return tevent_req_post(req, ev);
1220
tevent_req_set_callback(subreq, dcerpc_dfs_Enum_done, req);
1224
static void dcerpc_dfs_Enum_done(struct tevent_req *subreq)
1226
struct tevent_req *req = tevent_req_callback_data(
1227
subreq, struct tevent_req);
1228
struct dcerpc_dfs_Enum_state *state = tevent_req_data(
1229
req, struct dcerpc_dfs_Enum_state);
1231
TALLOC_CTX *mem_ctx;
1233
if (state->out_mem_ctx) {
1234
mem_ctx = state->out_mem_ctx;
1239
status = dcerpc_dfs_Enum_r_recv(subreq, mem_ctx);
1240
TALLOC_FREE(subreq);
1241
if (!NT_STATUS_IS_OK(status)) {
1242
tevent_req_nterror(req, status);
1246
/* Copy out parameters */
1247
if (state->orig.out.info && state->tmp.out.info) {
1248
*state->orig.out.info = *state->tmp.out.info;
1250
if (state->orig.out.total && state->tmp.out.total) {
1251
*state->orig.out.total = *state->tmp.out.total;
1255
state->orig.out.result = state->tmp.out.result;
1257
/* Reset temporary structure */
1258
ZERO_STRUCT(state->tmp);
1260
tevent_req_done(req);
1263
NTSTATUS dcerpc_dfs_Enum_recv(struct tevent_req *req,
1264
TALLOC_CTX *mem_ctx,
1267
struct dcerpc_dfs_Enum_state *state = tevent_req_data(
1268
req, struct dcerpc_dfs_Enum_state);
1271
if (tevent_req_is_nterror(req, &status)) {
1272
tevent_req_received(req);
1276
/* Steal possible out parameters to the callers context */
1277
talloc_steal(mem_ctx, state->out_mem_ctx);
1280
*result = state->orig.out.result;
1282
tevent_req_received(req);
1283
return NT_STATUS_OK;
1286
NTSTATUS dcerpc_dfs_Enum(struct dcerpc_binding_handle *h,
1287
TALLOC_CTX *mem_ctx,
1288
uint32_t _level /* [in] */,
1289
uint32_t _bufsize /* [in] */,
1290
struct dfs_EnumStruct *_info /* [in,out] [unique] */,
1291
uint32_t *_total /* [in,out] [unique] */,
1298
r.in.level = _level;
1299
r.in.bufsize = _bufsize;
1301
r.in.total = _total;
1303
status = dcerpc_dfs_Enum_r(h, mem_ctx, &r);
1304
if (!NT_STATUS_IS_OK(status)) {
1308
/* Return variables */
1309
if (_info && r.out.info) {
1310
*_info = *r.out.info;
1312
if (_total && r.out.total) {
1313
*_total = *r.out.total;
1317
*result = r.out.result;
1319
return NT_STATUS_OK;
1322
struct dcerpc_dfs_AddFtRoot_r_state {
1323
TALLOC_CTX *out_mem_ctx;
1326
static void dcerpc_dfs_AddFtRoot_r_done(struct tevent_req *subreq);
1328
struct tevent_req *dcerpc_dfs_AddFtRoot_r_send(TALLOC_CTX *mem_ctx,
1329
struct tevent_context *ev,
1330
struct dcerpc_binding_handle *h,
1331
struct dfs_AddFtRoot *r)
1333
struct tevent_req *req;
1334
struct dcerpc_dfs_AddFtRoot_r_state *state;
1335
struct tevent_req *subreq;
1337
req = tevent_req_create(mem_ctx, &state,
1338
struct dcerpc_dfs_AddFtRoot_r_state);
1343
state->out_mem_ctx = talloc_new(state);
1344
if (tevent_req_nomem(state->out_mem_ctx, req)) {
1345
return tevent_req_post(req, ev);
1348
subreq = dcerpc_binding_handle_call_send(state, ev, h,
1349
NULL, &ndr_table_netdfs,
1350
NDR_DFS_ADDFTROOT, state->out_mem_ctx, r);
1351
if (tevent_req_nomem(subreq, req)) {
1352
return tevent_req_post(req, ev);
1354
tevent_req_set_callback(subreq, dcerpc_dfs_AddFtRoot_r_done, req);
1359
static void dcerpc_dfs_AddFtRoot_r_done(struct tevent_req *subreq)
1361
struct tevent_req *req =
1362
tevent_req_callback_data(subreq,
1366
status = dcerpc_binding_handle_call_recv(subreq);
1367
if (!NT_STATUS_IS_OK(status)) {
1368
tevent_req_nterror(req, status);
1372
tevent_req_done(req);
1375
NTSTATUS dcerpc_dfs_AddFtRoot_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1377
struct dcerpc_dfs_AddFtRoot_r_state *state =
1378
tevent_req_data(req,
1379
struct dcerpc_dfs_AddFtRoot_r_state);
1382
if (tevent_req_is_nterror(req, &status)) {
1383
tevent_req_received(req);
1387
talloc_steal(mem_ctx, state->out_mem_ctx);
1389
tevent_req_received(req);
1390
return NT_STATUS_OK;
1393
NTSTATUS dcerpc_dfs_AddFtRoot_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_AddFtRoot *r)
1397
status = dcerpc_binding_handle_call(h,
1398
NULL, &ndr_table_netdfs,
1399
NDR_DFS_ADDFTROOT, mem_ctx, r);
1404
struct dcerpc_dfs_AddFtRoot_state {
1405
struct dfs_AddFtRoot orig;
1406
struct dfs_AddFtRoot tmp;
1407
TALLOC_CTX *out_mem_ctx;
1410
static void dcerpc_dfs_AddFtRoot_done(struct tevent_req *subreq);
1412
struct tevent_req *dcerpc_dfs_AddFtRoot_send(TALLOC_CTX *mem_ctx,
1413
struct tevent_context *ev,
1414
struct dcerpc_binding_handle *h,
1415
const char *_servername /* [in] [charset(UTF16)] */,
1416
const char *_dns_servername /* [in] [charset(UTF16)] */,
1417
const char *_dfsname /* [in] [charset(UTF16)] */,
1418
const char *_rootshare /* [in] [charset(UTF16)] */,
1419
const char *_comment /* [in] [charset(UTF16)] */,
1420
const char *_dfs_config_dn /* [in] [charset(UTF16)] */,
1421
uint8_t _unknown1 /* [in] */,
1422
uint32_t _flags /* [in] */,
1423
struct dfs_UnknownStruct **_unknown2 /* [in,out] [unique] */)
1425
struct tevent_req *req;
1426
struct dcerpc_dfs_AddFtRoot_state *state;
1427
struct tevent_req *subreq;
1429
req = tevent_req_create(mem_ctx, &state,
1430
struct dcerpc_dfs_AddFtRoot_state);
1434
state->out_mem_ctx = NULL;
1437
state->orig.in.servername = _servername;
1438
state->orig.in.dns_servername = _dns_servername;
1439
state->orig.in.dfsname = _dfsname;
1440
state->orig.in.rootshare = _rootshare;
1441
state->orig.in.comment = _comment;
1442
state->orig.in.dfs_config_dn = _dfs_config_dn;
1443
state->orig.in.unknown1 = _unknown1;
1444
state->orig.in.flags = _flags;
1445
state->orig.in.unknown2 = _unknown2;
1447
/* Out parameters */
1448
state->orig.out.unknown2 = _unknown2;
1451
ZERO_STRUCT(state->orig.out.result);
1453
state->out_mem_ctx = talloc_named_const(state, 0,
1454
"dcerpc_dfs_AddFtRoot_out_memory");
1455
if (tevent_req_nomem(state->out_mem_ctx, req)) {
1456
return tevent_req_post(req, ev);
1459
/* make a temporary copy, that we pass to the dispatch function */
1460
state->tmp = state->orig;
1462
subreq = dcerpc_dfs_AddFtRoot_r_send(state, ev, h, &state->tmp);
1463
if (tevent_req_nomem(subreq, req)) {
1464
return tevent_req_post(req, ev);
1466
tevent_req_set_callback(subreq, dcerpc_dfs_AddFtRoot_done, req);
1470
static void dcerpc_dfs_AddFtRoot_done(struct tevent_req *subreq)
1472
struct tevent_req *req = tevent_req_callback_data(
1473
subreq, struct tevent_req);
1474
struct dcerpc_dfs_AddFtRoot_state *state = tevent_req_data(
1475
req, struct dcerpc_dfs_AddFtRoot_state);
1477
TALLOC_CTX *mem_ctx;
1479
if (state->out_mem_ctx) {
1480
mem_ctx = state->out_mem_ctx;
1485
status = dcerpc_dfs_AddFtRoot_r_recv(subreq, mem_ctx);
1486
TALLOC_FREE(subreq);
1487
if (!NT_STATUS_IS_OK(status)) {
1488
tevent_req_nterror(req, status);
1492
/* Copy out parameters */
1493
if (state->orig.out.unknown2 && state->tmp.out.unknown2) {
1494
*state->orig.out.unknown2 = *state->tmp.out.unknown2;
1498
state->orig.out.result = state->tmp.out.result;
1500
/* Reset temporary structure */
1501
ZERO_STRUCT(state->tmp);
1503
tevent_req_done(req);
1506
NTSTATUS dcerpc_dfs_AddFtRoot_recv(struct tevent_req *req,
1507
TALLOC_CTX *mem_ctx,
1510
struct dcerpc_dfs_AddFtRoot_state *state = tevent_req_data(
1511
req, struct dcerpc_dfs_AddFtRoot_state);
1514
if (tevent_req_is_nterror(req, &status)) {
1515
tevent_req_received(req);
1519
/* Steal possible out parameters to the callers context */
1520
talloc_steal(mem_ctx, state->out_mem_ctx);
1523
*result = state->orig.out.result;
1525
tevent_req_received(req);
1526
return NT_STATUS_OK;
1529
NTSTATUS dcerpc_dfs_AddFtRoot(struct dcerpc_binding_handle *h,
1530
TALLOC_CTX *mem_ctx,
1531
const char *_servername /* [in] [charset(UTF16)] */,
1532
const char *_dns_servername /* [in] [charset(UTF16)] */,
1533
const char *_dfsname /* [in] [charset(UTF16)] */,
1534
const char *_rootshare /* [in] [charset(UTF16)] */,
1535
const char *_comment /* [in] [charset(UTF16)] */,
1536
const char *_dfs_config_dn /* [in] [charset(UTF16)] */,
1537
uint8_t _unknown1 /* [in] */,
1538
uint32_t _flags /* [in] */,
1539
struct dfs_UnknownStruct **_unknown2 /* [in,out] [unique] */,
1542
struct dfs_AddFtRoot r;
1546
r.in.servername = _servername;
1547
r.in.dns_servername = _dns_servername;
1548
r.in.dfsname = _dfsname;
1549
r.in.rootshare = _rootshare;
1550
r.in.comment = _comment;
1551
r.in.dfs_config_dn = _dfs_config_dn;
1552
r.in.unknown1 = _unknown1;
1553
r.in.flags = _flags;
1554
r.in.unknown2 = _unknown2;
1556
status = dcerpc_dfs_AddFtRoot_r(h, mem_ctx, &r);
1557
if (!NT_STATUS_IS_OK(status)) {
1561
/* Return variables */
1562
if (_unknown2 && r.out.unknown2) {
1563
*_unknown2 = *r.out.unknown2;
1567
*result = r.out.result;
1569
return NT_STATUS_OK;
1572
struct dcerpc_dfs_RemoveFtRoot_r_state {
1573
TALLOC_CTX *out_mem_ctx;
1576
static void dcerpc_dfs_RemoveFtRoot_r_done(struct tevent_req *subreq);
1578
struct tevent_req *dcerpc_dfs_RemoveFtRoot_r_send(TALLOC_CTX *mem_ctx,
1579
struct tevent_context *ev,
1580
struct dcerpc_binding_handle *h,
1581
struct dfs_RemoveFtRoot *r)
1583
struct tevent_req *req;
1584
struct dcerpc_dfs_RemoveFtRoot_r_state *state;
1585
struct tevent_req *subreq;
1587
req = tevent_req_create(mem_ctx, &state,
1588
struct dcerpc_dfs_RemoveFtRoot_r_state);
1593
state->out_mem_ctx = talloc_new(state);
1594
if (tevent_req_nomem(state->out_mem_ctx, req)) {
1595
return tevent_req_post(req, ev);
1598
subreq = dcerpc_binding_handle_call_send(state, ev, h,
1599
NULL, &ndr_table_netdfs,
1600
NDR_DFS_REMOVEFTROOT, state->out_mem_ctx, r);
1601
if (tevent_req_nomem(subreq, req)) {
1602
return tevent_req_post(req, ev);
1604
tevent_req_set_callback(subreq, dcerpc_dfs_RemoveFtRoot_r_done, req);
1609
static void dcerpc_dfs_RemoveFtRoot_r_done(struct tevent_req *subreq)
1611
struct tevent_req *req =
1612
tevent_req_callback_data(subreq,
1616
status = dcerpc_binding_handle_call_recv(subreq);
1617
if (!NT_STATUS_IS_OK(status)) {
1618
tevent_req_nterror(req, status);
1622
tevent_req_done(req);
1625
NTSTATUS dcerpc_dfs_RemoveFtRoot_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1627
struct dcerpc_dfs_RemoveFtRoot_r_state *state =
1628
tevent_req_data(req,
1629
struct dcerpc_dfs_RemoveFtRoot_r_state);
1632
if (tevent_req_is_nterror(req, &status)) {
1633
tevent_req_received(req);
1637
talloc_steal(mem_ctx, state->out_mem_ctx);
1639
tevent_req_received(req);
1640
return NT_STATUS_OK;
1643
NTSTATUS dcerpc_dfs_RemoveFtRoot_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_RemoveFtRoot *r)
1647
status = dcerpc_binding_handle_call(h,
1648
NULL, &ndr_table_netdfs,
1649
NDR_DFS_REMOVEFTROOT, mem_ctx, r);
1654
struct dcerpc_dfs_RemoveFtRoot_state {
1655
struct dfs_RemoveFtRoot orig;
1656
struct dfs_RemoveFtRoot tmp;
1657
TALLOC_CTX *out_mem_ctx;
1660
static void dcerpc_dfs_RemoveFtRoot_done(struct tevent_req *subreq);
1662
struct tevent_req *dcerpc_dfs_RemoveFtRoot_send(TALLOC_CTX *mem_ctx,
1663
struct tevent_context *ev,
1664
struct dcerpc_binding_handle *h,
1665
const char *_servername /* [in] [charset(UTF16)] */,
1666
const char *_dns_servername /* [in] [charset(UTF16)] */,
1667
const char *_dfsname /* [in] [charset(UTF16)] */,
1668
const char *_rootshare /* [in] [charset(UTF16)] */,
1669
uint32_t _flags /* [in] */,
1670
struct dfs_UnknownStruct **_unknown /* [in,out] [unique] */)
1672
struct tevent_req *req;
1673
struct dcerpc_dfs_RemoveFtRoot_state *state;
1674
struct tevent_req *subreq;
1676
req = tevent_req_create(mem_ctx, &state,
1677
struct dcerpc_dfs_RemoveFtRoot_state);
1681
state->out_mem_ctx = NULL;
1684
state->orig.in.servername = _servername;
1685
state->orig.in.dns_servername = _dns_servername;
1686
state->orig.in.dfsname = _dfsname;
1687
state->orig.in.rootshare = _rootshare;
1688
state->orig.in.flags = _flags;
1689
state->orig.in.unknown = _unknown;
1691
/* Out parameters */
1692
state->orig.out.unknown = _unknown;
1695
ZERO_STRUCT(state->orig.out.result);
1697
state->out_mem_ctx = talloc_named_const(state, 0,
1698
"dcerpc_dfs_RemoveFtRoot_out_memory");
1699
if (tevent_req_nomem(state->out_mem_ctx, req)) {
1700
return tevent_req_post(req, ev);
1703
/* make a temporary copy, that we pass to the dispatch function */
1704
state->tmp = state->orig;
1706
subreq = dcerpc_dfs_RemoveFtRoot_r_send(state, ev, h, &state->tmp);
1707
if (tevent_req_nomem(subreq, req)) {
1708
return tevent_req_post(req, ev);
1710
tevent_req_set_callback(subreq, dcerpc_dfs_RemoveFtRoot_done, req);
1714
static void dcerpc_dfs_RemoveFtRoot_done(struct tevent_req *subreq)
1716
struct tevent_req *req = tevent_req_callback_data(
1717
subreq, struct tevent_req);
1718
struct dcerpc_dfs_RemoveFtRoot_state *state = tevent_req_data(
1719
req, struct dcerpc_dfs_RemoveFtRoot_state);
1721
TALLOC_CTX *mem_ctx;
1723
if (state->out_mem_ctx) {
1724
mem_ctx = state->out_mem_ctx;
1729
status = dcerpc_dfs_RemoveFtRoot_r_recv(subreq, mem_ctx);
1730
TALLOC_FREE(subreq);
1731
if (!NT_STATUS_IS_OK(status)) {
1732
tevent_req_nterror(req, status);
1736
/* Copy out parameters */
1737
if (state->orig.out.unknown && state->tmp.out.unknown) {
1738
*state->orig.out.unknown = *state->tmp.out.unknown;
1742
state->orig.out.result = state->tmp.out.result;
1744
/* Reset temporary structure */
1745
ZERO_STRUCT(state->tmp);
1747
tevent_req_done(req);
1750
NTSTATUS dcerpc_dfs_RemoveFtRoot_recv(struct tevent_req *req,
1751
TALLOC_CTX *mem_ctx,
1754
struct dcerpc_dfs_RemoveFtRoot_state *state = tevent_req_data(
1755
req, struct dcerpc_dfs_RemoveFtRoot_state);
1758
if (tevent_req_is_nterror(req, &status)) {
1759
tevent_req_received(req);
1763
/* Steal possible out parameters to the callers context */
1764
talloc_steal(mem_ctx, state->out_mem_ctx);
1767
*result = state->orig.out.result;
1769
tevent_req_received(req);
1770
return NT_STATUS_OK;
1773
NTSTATUS dcerpc_dfs_RemoveFtRoot(struct dcerpc_binding_handle *h,
1774
TALLOC_CTX *mem_ctx,
1775
const char *_servername /* [in] [charset(UTF16)] */,
1776
const char *_dns_servername /* [in] [charset(UTF16)] */,
1777
const char *_dfsname /* [in] [charset(UTF16)] */,
1778
const char *_rootshare /* [in] [charset(UTF16)] */,
1779
uint32_t _flags /* [in] */,
1780
struct dfs_UnknownStruct **_unknown /* [in,out] [unique] */,
1783
struct dfs_RemoveFtRoot r;
1787
r.in.servername = _servername;
1788
r.in.dns_servername = _dns_servername;
1789
r.in.dfsname = _dfsname;
1790
r.in.rootshare = _rootshare;
1791
r.in.flags = _flags;
1792
r.in.unknown = _unknown;
1794
status = dcerpc_dfs_RemoveFtRoot_r(h, mem_ctx, &r);
1795
if (!NT_STATUS_IS_OK(status)) {
1799
/* Return variables */
1800
if (_unknown && r.out.unknown) {
1801
*_unknown = *r.out.unknown;
1805
*result = r.out.result;
1807
return NT_STATUS_OK;
1810
struct dcerpc_dfs_AddStdRoot_r_state {
1811
TALLOC_CTX *out_mem_ctx;
1814
static void dcerpc_dfs_AddStdRoot_r_done(struct tevent_req *subreq);
1816
struct tevent_req *dcerpc_dfs_AddStdRoot_r_send(TALLOC_CTX *mem_ctx,
1817
struct tevent_context *ev,
1818
struct dcerpc_binding_handle *h,
1819
struct dfs_AddStdRoot *r)
1821
struct tevent_req *req;
1822
struct dcerpc_dfs_AddStdRoot_r_state *state;
1823
struct tevent_req *subreq;
1825
req = tevent_req_create(mem_ctx, &state,
1826
struct dcerpc_dfs_AddStdRoot_r_state);
1831
state->out_mem_ctx = NULL;
1833
subreq = dcerpc_binding_handle_call_send(state, ev, h,
1834
NULL, &ndr_table_netdfs,
1835
NDR_DFS_ADDSTDROOT, state, r);
1836
if (tevent_req_nomem(subreq, req)) {
1837
return tevent_req_post(req, ev);
1839
tevent_req_set_callback(subreq, dcerpc_dfs_AddStdRoot_r_done, req);
1844
static void dcerpc_dfs_AddStdRoot_r_done(struct tevent_req *subreq)
1846
struct tevent_req *req =
1847
tevent_req_callback_data(subreq,
1851
status = dcerpc_binding_handle_call_recv(subreq);
1852
if (!NT_STATUS_IS_OK(status)) {
1853
tevent_req_nterror(req, status);
1857
tevent_req_done(req);
1860
NTSTATUS dcerpc_dfs_AddStdRoot_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
1862
struct dcerpc_dfs_AddStdRoot_r_state *state =
1863
tevent_req_data(req,
1864
struct dcerpc_dfs_AddStdRoot_r_state);
1867
if (tevent_req_is_nterror(req, &status)) {
1868
tevent_req_received(req);
1872
talloc_steal(mem_ctx, state->out_mem_ctx);
1874
tevent_req_received(req);
1875
return NT_STATUS_OK;
1878
NTSTATUS dcerpc_dfs_AddStdRoot_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_AddStdRoot *r)
1882
status = dcerpc_binding_handle_call(h,
1883
NULL, &ndr_table_netdfs,
1884
NDR_DFS_ADDSTDROOT, mem_ctx, r);
1889
struct dcerpc_dfs_AddStdRoot_state {
1890
struct dfs_AddStdRoot orig;
1891
struct dfs_AddStdRoot tmp;
1892
TALLOC_CTX *out_mem_ctx;
1895
static void dcerpc_dfs_AddStdRoot_done(struct tevent_req *subreq);
1897
struct tevent_req *dcerpc_dfs_AddStdRoot_send(TALLOC_CTX *mem_ctx,
1898
struct tevent_context *ev,
1899
struct dcerpc_binding_handle *h,
1900
const char *_servername /* [in] [charset(UTF16)] */,
1901
const char *_rootshare /* [in] [charset(UTF16)] */,
1902
const char *_comment /* [in] [charset(UTF16)] */,
1903
uint32_t _flags /* [in] */)
1905
struct tevent_req *req;
1906
struct dcerpc_dfs_AddStdRoot_state *state;
1907
struct tevent_req *subreq;
1909
req = tevent_req_create(mem_ctx, &state,
1910
struct dcerpc_dfs_AddStdRoot_state);
1914
state->out_mem_ctx = NULL;
1917
state->orig.in.servername = _servername;
1918
state->orig.in.rootshare = _rootshare;
1919
state->orig.in.comment = _comment;
1920
state->orig.in.flags = _flags;
1922
/* Out parameters */
1925
ZERO_STRUCT(state->orig.out.result);
1927
/* make a temporary copy, that we pass to the dispatch function */
1928
state->tmp = state->orig;
1930
subreq = dcerpc_dfs_AddStdRoot_r_send(state, ev, h, &state->tmp);
1931
if (tevent_req_nomem(subreq, req)) {
1932
return tevent_req_post(req, ev);
1934
tevent_req_set_callback(subreq, dcerpc_dfs_AddStdRoot_done, req);
1938
static void dcerpc_dfs_AddStdRoot_done(struct tevent_req *subreq)
1940
struct tevent_req *req = tevent_req_callback_data(
1941
subreq, struct tevent_req);
1942
struct dcerpc_dfs_AddStdRoot_state *state = tevent_req_data(
1943
req, struct dcerpc_dfs_AddStdRoot_state);
1945
TALLOC_CTX *mem_ctx;
1947
if (state->out_mem_ctx) {
1948
mem_ctx = state->out_mem_ctx;
1953
status = dcerpc_dfs_AddStdRoot_r_recv(subreq, mem_ctx);
1954
TALLOC_FREE(subreq);
1955
if (!NT_STATUS_IS_OK(status)) {
1956
tevent_req_nterror(req, status);
1960
/* Copy out parameters */
1963
state->orig.out.result = state->tmp.out.result;
1965
/* Reset temporary structure */
1966
ZERO_STRUCT(state->tmp);
1968
tevent_req_done(req);
1971
NTSTATUS dcerpc_dfs_AddStdRoot_recv(struct tevent_req *req,
1972
TALLOC_CTX *mem_ctx,
1975
struct dcerpc_dfs_AddStdRoot_state *state = tevent_req_data(
1976
req, struct dcerpc_dfs_AddStdRoot_state);
1979
if (tevent_req_is_nterror(req, &status)) {
1980
tevent_req_received(req);
1984
/* Steal possible out parameters to the callers context */
1985
talloc_steal(mem_ctx, state->out_mem_ctx);
1988
*result = state->orig.out.result;
1990
tevent_req_received(req);
1991
return NT_STATUS_OK;
1994
NTSTATUS dcerpc_dfs_AddStdRoot(struct dcerpc_binding_handle *h,
1995
TALLOC_CTX *mem_ctx,
1996
const char *_servername /* [in] [charset(UTF16)] */,
1997
const char *_rootshare /* [in] [charset(UTF16)] */,
1998
const char *_comment /* [in] [charset(UTF16)] */,
1999
uint32_t _flags /* [in] */,
2002
struct dfs_AddStdRoot r;
2006
r.in.servername = _servername;
2007
r.in.rootshare = _rootshare;
2008
r.in.comment = _comment;
2009
r.in.flags = _flags;
2011
status = dcerpc_dfs_AddStdRoot_r(h, mem_ctx, &r);
2012
if (!NT_STATUS_IS_OK(status)) {
2016
/* Return variables */
2019
*result = r.out.result;
2021
return NT_STATUS_OK;
2024
struct dcerpc_dfs_RemoveStdRoot_r_state {
2025
TALLOC_CTX *out_mem_ctx;
2028
static void dcerpc_dfs_RemoveStdRoot_r_done(struct tevent_req *subreq);
2030
struct tevent_req *dcerpc_dfs_RemoveStdRoot_r_send(TALLOC_CTX *mem_ctx,
2031
struct tevent_context *ev,
2032
struct dcerpc_binding_handle *h,
2033
struct dfs_RemoveStdRoot *r)
2035
struct tevent_req *req;
2036
struct dcerpc_dfs_RemoveStdRoot_r_state *state;
2037
struct tevent_req *subreq;
2039
req = tevent_req_create(mem_ctx, &state,
2040
struct dcerpc_dfs_RemoveStdRoot_r_state);
2045
state->out_mem_ctx = NULL;
2047
subreq = dcerpc_binding_handle_call_send(state, ev, h,
2048
NULL, &ndr_table_netdfs,
2049
NDR_DFS_REMOVESTDROOT, state, r);
2050
if (tevent_req_nomem(subreq, req)) {
2051
return tevent_req_post(req, ev);
2053
tevent_req_set_callback(subreq, dcerpc_dfs_RemoveStdRoot_r_done, req);
2058
static void dcerpc_dfs_RemoveStdRoot_r_done(struct tevent_req *subreq)
2060
struct tevent_req *req =
2061
tevent_req_callback_data(subreq,
2065
status = dcerpc_binding_handle_call_recv(subreq);
2066
if (!NT_STATUS_IS_OK(status)) {
2067
tevent_req_nterror(req, status);
2071
tevent_req_done(req);
2074
NTSTATUS dcerpc_dfs_RemoveStdRoot_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2076
struct dcerpc_dfs_RemoveStdRoot_r_state *state =
2077
tevent_req_data(req,
2078
struct dcerpc_dfs_RemoveStdRoot_r_state);
2081
if (tevent_req_is_nterror(req, &status)) {
2082
tevent_req_received(req);
2086
talloc_steal(mem_ctx, state->out_mem_ctx);
2088
tevent_req_received(req);
2089
return NT_STATUS_OK;
2092
NTSTATUS dcerpc_dfs_RemoveStdRoot_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_RemoveStdRoot *r)
2096
status = dcerpc_binding_handle_call(h,
2097
NULL, &ndr_table_netdfs,
2098
NDR_DFS_REMOVESTDROOT, mem_ctx, r);
2103
struct dcerpc_dfs_RemoveStdRoot_state {
2104
struct dfs_RemoveStdRoot orig;
2105
struct dfs_RemoveStdRoot tmp;
2106
TALLOC_CTX *out_mem_ctx;
2109
static void dcerpc_dfs_RemoveStdRoot_done(struct tevent_req *subreq);
2111
struct tevent_req *dcerpc_dfs_RemoveStdRoot_send(TALLOC_CTX *mem_ctx,
2112
struct tevent_context *ev,
2113
struct dcerpc_binding_handle *h,
2114
const char *_servername /* [in] [charset(UTF16)] */,
2115
const char *_rootshare /* [in] [charset(UTF16)] */,
2116
uint32_t _flags /* [in] */)
2118
struct tevent_req *req;
2119
struct dcerpc_dfs_RemoveStdRoot_state *state;
2120
struct tevent_req *subreq;
2122
req = tevent_req_create(mem_ctx, &state,
2123
struct dcerpc_dfs_RemoveStdRoot_state);
2127
state->out_mem_ctx = NULL;
2130
state->orig.in.servername = _servername;
2131
state->orig.in.rootshare = _rootshare;
2132
state->orig.in.flags = _flags;
2134
/* Out parameters */
2137
ZERO_STRUCT(state->orig.out.result);
2139
/* make a temporary copy, that we pass to the dispatch function */
2140
state->tmp = state->orig;
2142
subreq = dcerpc_dfs_RemoveStdRoot_r_send(state, ev, h, &state->tmp);
2143
if (tevent_req_nomem(subreq, req)) {
2144
return tevent_req_post(req, ev);
2146
tevent_req_set_callback(subreq, dcerpc_dfs_RemoveStdRoot_done, req);
2150
static void dcerpc_dfs_RemoveStdRoot_done(struct tevent_req *subreq)
2152
struct tevent_req *req = tevent_req_callback_data(
2153
subreq, struct tevent_req);
2154
struct dcerpc_dfs_RemoveStdRoot_state *state = tevent_req_data(
2155
req, struct dcerpc_dfs_RemoveStdRoot_state);
2157
TALLOC_CTX *mem_ctx;
2159
if (state->out_mem_ctx) {
2160
mem_ctx = state->out_mem_ctx;
2165
status = dcerpc_dfs_RemoveStdRoot_r_recv(subreq, mem_ctx);
2166
TALLOC_FREE(subreq);
2167
if (!NT_STATUS_IS_OK(status)) {
2168
tevent_req_nterror(req, status);
2172
/* Copy out parameters */
2175
state->orig.out.result = state->tmp.out.result;
2177
/* Reset temporary structure */
2178
ZERO_STRUCT(state->tmp);
2180
tevent_req_done(req);
2183
NTSTATUS dcerpc_dfs_RemoveStdRoot_recv(struct tevent_req *req,
2184
TALLOC_CTX *mem_ctx,
2187
struct dcerpc_dfs_RemoveStdRoot_state *state = tevent_req_data(
2188
req, struct dcerpc_dfs_RemoveStdRoot_state);
2191
if (tevent_req_is_nterror(req, &status)) {
2192
tevent_req_received(req);
2196
/* Steal possible out parameters to the callers context */
2197
talloc_steal(mem_ctx, state->out_mem_ctx);
2200
*result = state->orig.out.result;
2202
tevent_req_received(req);
2203
return NT_STATUS_OK;
2206
NTSTATUS dcerpc_dfs_RemoveStdRoot(struct dcerpc_binding_handle *h,
2207
TALLOC_CTX *mem_ctx,
2208
const char *_servername /* [in] [charset(UTF16)] */,
2209
const char *_rootshare /* [in] [charset(UTF16)] */,
2210
uint32_t _flags /* [in] */,
2213
struct dfs_RemoveStdRoot r;
2217
r.in.servername = _servername;
2218
r.in.rootshare = _rootshare;
2219
r.in.flags = _flags;
2221
status = dcerpc_dfs_RemoveStdRoot_r(h, mem_ctx, &r);
2222
if (!NT_STATUS_IS_OK(status)) {
2226
/* Return variables */
2229
*result = r.out.result;
2231
return NT_STATUS_OK;
2234
struct dcerpc_dfs_ManagerInitialize_r_state {
2235
TALLOC_CTX *out_mem_ctx;
2238
static void dcerpc_dfs_ManagerInitialize_r_done(struct tevent_req *subreq);
2240
struct tevent_req *dcerpc_dfs_ManagerInitialize_r_send(TALLOC_CTX *mem_ctx,
2241
struct tevent_context *ev,
2242
struct dcerpc_binding_handle *h,
2243
struct dfs_ManagerInitialize *r)
2245
struct tevent_req *req;
2246
struct dcerpc_dfs_ManagerInitialize_r_state *state;
2247
struct tevent_req *subreq;
2249
req = tevent_req_create(mem_ctx, &state,
2250
struct dcerpc_dfs_ManagerInitialize_r_state);
2255
state->out_mem_ctx = NULL;
2257
subreq = dcerpc_binding_handle_call_send(state, ev, h,
2258
NULL, &ndr_table_netdfs,
2259
NDR_DFS_MANAGERINITIALIZE, state, r);
2260
if (tevent_req_nomem(subreq, req)) {
2261
return tevent_req_post(req, ev);
2263
tevent_req_set_callback(subreq, dcerpc_dfs_ManagerInitialize_r_done, req);
2268
static void dcerpc_dfs_ManagerInitialize_r_done(struct tevent_req *subreq)
2270
struct tevent_req *req =
2271
tevent_req_callback_data(subreq,
2275
status = dcerpc_binding_handle_call_recv(subreq);
2276
if (!NT_STATUS_IS_OK(status)) {
2277
tevent_req_nterror(req, status);
2281
tevent_req_done(req);
2284
NTSTATUS dcerpc_dfs_ManagerInitialize_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2286
struct dcerpc_dfs_ManagerInitialize_r_state *state =
2287
tevent_req_data(req,
2288
struct dcerpc_dfs_ManagerInitialize_r_state);
2291
if (tevent_req_is_nterror(req, &status)) {
2292
tevent_req_received(req);
2296
talloc_steal(mem_ctx, state->out_mem_ctx);
2298
tevent_req_received(req);
2299
return NT_STATUS_OK;
2302
NTSTATUS dcerpc_dfs_ManagerInitialize_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_ManagerInitialize *r)
2306
status = dcerpc_binding_handle_call(h,
2307
NULL, &ndr_table_netdfs,
2308
NDR_DFS_MANAGERINITIALIZE, mem_ctx, r);
2313
struct dcerpc_dfs_ManagerInitialize_state {
2314
struct dfs_ManagerInitialize orig;
2315
struct dfs_ManagerInitialize tmp;
2316
TALLOC_CTX *out_mem_ctx;
2319
static void dcerpc_dfs_ManagerInitialize_done(struct tevent_req *subreq);
2321
struct tevent_req *dcerpc_dfs_ManagerInitialize_send(TALLOC_CTX *mem_ctx,
2322
struct tevent_context *ev,
2323
struct dcerpc_binding_handle *h,
2324
const char *_servername /* [in] [ref,charset(UTF16)] */,
2325
uint32_t _flags /* [in] */)
2327
struct tevent_req *req;
2328
struct dcerpc_dfs_ManagerInitialize_state *state;
2329
struct tevent_req *subreq;
2331
req = tevent_req_create(mem_ctx, &state,
2332
struct dcerpc_dfs_ManagerInitialize_state);
2336
state->out_mem_ctx = NULL;
2339
state->orig.in.servername = _servername;
2340
state->orig.in.flags = _flags;
2342
/* Out parameters */
2345
ZERO_STRUCT(state->orig.out.result);
2347
/* make a temporary copy, that we pass to the dispatch function */
2348
state->tmp = state->orig;
2350
subreq = dcerpc_dfs_ManagerInitialize_r_send(state, ev, h, &state->tmp);
2351
if (tevent_req_nomem(subreq, req)) {
2352
return tevent_req_post(req, ev);
2354
tevent_req_set_callback(subreq, dcerpc_dfs_ManagerInitialize_done, req);
2358
static void dcerpc_dfs_ManagerInitialize_done(struct tevent_req *subreq)
2360
struct tevent_req *req = tevent_req_callback_data(
2361
subreq, struct tevent_req);
2362
struct dcerpc_dfs_ManagerInitialize_state *state = tevent_req_data(
2363
req, struct dcerpc_dfs_ManagerInitialize_state);
2365
TALLOC_CTX *mem_ctx;
2367
if (state->out_mem_ctx) {
2368
mem_ctx = state->out_mem_ctx;
2373
status = dcerpc_dfs_ManagerInitialize_r_recv(subreq, mem_ctx);
2374
TALLOC_FREE(subreq);
2375
if (!NT_STATUS_IS_OK(status)) {
2376
tevent_req_nterror(req, status);
2380
/* Copy out parameters */
2383
state->orig.out.result = state->tmp.out.result;
2385
/* Reset temporary structure */
2386
ZERO_STRUCT(state->tmp);
2388
tevent_req_done(req);
2391
NTSTATUS dcerpc_dfs_ManagerInitialize_recv(struct tevent_req *req,
2392
TALLOC_CTX *mem_ctx,
2395
struct dcerpc_dfs_ManagerInitialize_state *state = tevent_req_data(
2396
req, struct dcerpc_dfs_ManagerInitialize_state);
2399
if (tevent_req_is_nterror(req, &status)) {
2400
tevent_req_received(req);
2404
/* Steal possible out parameters to the callers context */
2405
talloc_steal(mem_ctx, state->out_mem_ctx);
2408
*result = state->orig.out.result;
2410
tevent_req_received(req);
2411
return NT_STATUS_OK;
2414
NTSTATUS dcerpc_dfs_ManagerInitialize(struct dcerpc_binding_handle *h,
2415
TALLOC_CTX *mem_ctx,
2416
const char *_servername /* [in] [ref,charset(UTF16)] */,
2417
uint32_t _flags /* [in] */,
2420
struct dfs_ManagerInitialize r;
2424
r.in.servername = _servername;
2425
r.in.flags = _flags;
2427
status = dcerpc_dfs_ManagerInitialize_r(h, mem_ctx, &r);
2428
if (!NT_STATUS_IS_OK(status)) {
2432
/* Return variables */
2435
*result = r.out.result;
2437
return NT_STATUS_OK;
2440
struct dcerpc_dfs_AddStdRootForced_r_state {
2441
TALLOC_CTX *out_mem_ctx;
2444
static void dcerpc_dfs_AddStdRootForced_r_done(struct tevent_req *subreq);
2446
struct tevent_req *dcerpc_dfs_AddStdRootForced_r_send(TALLOC_CTX *mem_ctx,
2447
struct tevent_context *ev,
2448
struct dcerpc_binding_handle *h,
2449
struct dfs_AddStdRootForced *r)
2451
struct tevent_req *req;
2452
struct dcerpc_dfs_AddStdRootForced_r_state *state;
2453
struct tevent_req *subreq;
2455
req = tevent_req_create(mem_ctx, &state,
2456
struct dcerpc_dfs_AddStdRootForced_r_state);
2461
state->out_mem_ctx = NULL;
2463
subreq = dcerpc_binding_handle_call_send(state, ev, h,
2464
NULL, &ndr_table_netdfs,
2465
NDR_DFS_ADDSTDROOTFORCED, state, r);
2466
if (tevent_req_nomem(subreq, req)) {
2467
return tevent_req_post(req, ev);
2469
tevent_req_set_callback(subreq, dcerpc_dfs_AddStdRootForced_r_done, req);
2474
static void dcerpc_dfs_AddStdRootForced_r_done(struct tevent_req *subreq)
2476
struct tevent_req *req =
2477
tevent_req_callback_data(subreq,
2481
status = dcerpc_binding_handle_call_recv(subreq);
2482
if (!NT_STATUS_IS_OK(status)) {
2483
tevent_req_nterror(req, status);
2487
tevent_req_done(req);
2490
NTSTATUS dcerpc_dfs_AddStdRootForced_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2492
struct dcerpc_dfs_AddStdRootForced_r_state *state =
2493
tevent_req_data(req,
2494
struct dcerpc_dfs_AddStdRootForced_r_state);
2497
if (tevent_req_is_nterror(req, &status)) {
2498
tevent_req_received(req);
2502
talloc_steal(mem_ctx, state->out_mem_ctx);
2504
tevent_req_received(req);
2505
return NT_STATUS_OK;
2508
NTSTATUS dcerpc_dfs_AddStdRootForced_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_AddStdRootForced *r)
2512
status = dcerpc_binding_handle_call(h,
2513
NULL, &ndr_table_netdfs,
2514
NDR_DFS_ADDSTDROOTFORCED, mem_ctx, r);
2519
struct dcerpc_dfs_AddStdRootForced_state {
2520
struct dfs_AddStdRootForced orig;
2521
struct dfs_AddStdRootForced tmp;
2522
TALLOC_CTX *out_mem_ctx;
2525
static void dcerpc_dfs_AddStdRootForced_done(struct tevent_req *subreq);
2527
struct tevent_req *dcerpc_dfs_AddStdRootForced_send(TALLOC_CTX *mem_ctx,
2528
struct tevent_context *ev,
2529
struct dcerpc_binding_handle *h,
2530
const char *_servername /* [in] [charset(UTF16)] */,
2531
const char *_rootshare /* [in] [charset(UTF16)] */,
2532
const char *_comment /* [in] [charset(UTF16)] */,
2533
const char *_store /* [in] [charset(UTF16)] */)
2535
struct tevent_req *req;
2536
struct dcerpc_dfs_AddStdRootForced_state *state;
2537
struct tevent_req *subreq;
2539
req = tevent_req_create(mem_ctx, &state,
2540
struct dcerpc_dfs_AddStdRootForced_state);
2544
state->out_mem_ctx = NULL;
2547
state->orig.in.servername = _servername;
2548
state->orig.in.rootshare = _rootshare;
2549
state->orig.in.comment = _comment;
2550
state->orig.in.store = _store;
2552
/* Out parameters */
2555
ZERO_STRUCT(state->orig.out.result);
2557
/* make a temporary copy, that we pass to the dispatch function */
2558
state->tmp = state->orig;
2560
subreq = dcerpc_dfs_AddStdRootForced_r_send(state, ev, h, &state->tmp);
2561
if (tevent_req_nomem(subreq, req)) {
2562
return tevent_req_post(req, ev);
2564
tevent_req_set_callback(subreq, dcerpc_dfs_AddStdRootForced_done, req);
2568
static void dcerpc_dfs_AddStdRootForced_done(struct tevent_req *subreq)
2570
struct tevent_req *req = tevent_req_callback_data(
2571
subreq, struct tevent_req);
2572
struct dcerpc_dfs_AddStdRootForced_state *state = tevent_req_data(
2573
req, struct dcerpc_dfs_AddStdRootForced_state);
2575
TALLOC_CTX *mem_ctx;
2577
if (state->out_mem_ctx) {
2578
mem_ctx = state->out_mem_ctx;
2583
status = dcerpc_dfs_AddStdRootForced_r_recv(subreq, mem_ctx);
2584
TALLOC_FREE(subreq);
2585
if (!NT_STATUS_IS_OK(status)) {
2586
tevent_req_nterror(req, status);
2590
/* Copy out parameters */
2593
state->orig.out.result = state->tmp.out.result;
2595
/* Reset temporary structure */
2596
ZERO_STRUCT(state->tmp);
2598
tevent_req_done(req);
2601
NTSTATUS dcerpc_dfs_AddStdRootForced_recv(struct tevent_req *req,
2602
TALLOC_CTX *mem_ctx,
2605
struct dcerpc_dfs_AddStdRootForced_state *state = tevent_req_data(
2606
req, struct dcerpc_dfs_AddStdRootForced_state);
2609
if (tevent_req_is_nterror(req, &status)) {
2610
tevent_req_received(req);
2614
/* Steal possible out parameters to the callers context */
2615
talloc_steal(mem_ctx, state->out_mem_ctx);
2618
*result = state->orig.out.result;
2620
tevent_req_received(req);
2621
return NT_STATUS_OK;
2624
NTSTATUS dcerpc_dfs_AddStdRootForced(struct dcerpc_binding_handle *h,
2625
TALLOC_CTX *mem_ctx,
2626
const char *_servername /* [in] [charset(UTF16)] */,
2627
const char *_rootshare /* [in] [charset(UTF16)] */,
2628
const char *_comment /* [in] [charset(UTF16)] */,
2629
const char *_store /* [in] [charset(UTF16)] */,
2632
struct dfs_AddStdRootForced r;
2636
r.in.servername = _servername;
2637
r.in.rootshare = _rootshare;
2638
r.in.comment = _comment;
2639
r.in.store = _store;
2641
status = dcerpc_dfs_AddStdRootForced_r(h, mem_ctx, &r);
2642
if (!NT_STATUS_IS_OK(status)) {
2646
/* Return variables */
2649
*result = r.out.result;
2651
return NT_STATUS_OK;
2654
struct dcerpc_dfs_GetDcAddress_r_state {
2655
TALLOC_CTX *out_mem_ctx;
2658
static void dcerpc_dfs_GetDcAddress_r_done(struct tevent_req *subreq);
2660
struct tevent_req *dcerpc_dfs_GetDcAddress_r_send(TALLOC_CTX *mem_ctx,
2661
struct tevent_context *ev,
2662
struct dcerpc_binding_handle *h,
2663
struct dfs_GetDcAddress *r)
2665
struct tevent_req *req;
2666
struct dcerpc_dfs_GetDcAddress_r_state *state;
2667
struct tevent_req *subreq;
2669
req = tevent_req_create(mem_ctx, &state,
2670
struct dcerpc_dfs_GetDcAddress_r_state);
2675
state->out_mem_ctx = talloc_new(state);
2676
if (tevent_req_nomem(state->out_mem_ctx, req)) {
2677
return tevent_req_post(req, ev);
2680
subreq = dcerpc_binding_handle_call_send(state, ev, h,
2681
NULL, &ndr_table_netdfs,
2682
NDR_DFS_GETDCADDRESS, state->out_mem_ctx, r);
2683
if (tevent_req_nomem(subreq, req)) {
2684
return tevent_req_post(req, ev);
2686
tevent_req_set_callback(subreq, dcerpc_dfs_GetDcAddress_r_done, req);
2691
static void dcerpc_dfs_GetDcAddress_r_done(struct tevent_req *subreq)
2693
struct tevent_req *req =
2694
tevent_req_callback_data(subreq,
2698
status = dcerpc_binding_handle_call_recv(subreq);
2699
if (!NT_STATUS_IS_OK(status)) {
2700
tevent_req_nterror(req, status);
2704
tevent_req_done(req);
2707
NTSTATUS dcerpc_dfs_GetDcAddress_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2709
struct dcerpc_dfs_GetDcAddress_r_state *state =
2710
tevent_req_data(req,
2711
struct dcerpc_dfs_GetDcAddress_r_state);
2714
if (tevent_req_is_nterror(req, &status)) {
2715
tevent_req_received(req);
2719
talloc_steal(mem_ctx, state->out_mem_ctx);
2721
tevent_req_received(req);
2722
return NT_STATUS_OK;
2725
NTSTATUS dcerpc_dfs_GetDcAddress_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_GetDcAddress *r)
2729
status = dcerpc_binding_handle_call(h,
2730
NULL, &ndr_table_netdfs,
2731
NDR_DFS_GETDCADDRESS, mem_ctx, r);
2736
struct dcerpc_dfs_GetDcAddress_state {
2737
struct dfs_GetDcAddress orig;
2738
struct dfs_GetDcAddress tmp;
2739
TALLOC_CTX *out_mem_ctx;
2742
static void dcerpc_dfs_GetDcAddress_done(struct tevent_req *subreq);
2744
struct tevent_req *dcerpc_dfs_GetDcAddress_send(TALLOC_CTX *mem_ctx,
2745
struct tevent_context *ev,
2746
struct dcerpc_binding_handle *h,
2747
const char *_servername /* [in] [charset(UTF16)] */,
2748
const char **_server_fullname /* [in,out] [ref,charset(UTF16)] */,
2749
uint8_t *_is_root /* [in,out] [ref] */,
2750
uint32_t *_ttl /* [in,out] [ref] */)
2752
struct tevent_req *req;
2753
struct dcerpc_dfs_GetDcAddress_state *state;
2754
struct tevent_req *subreq;
2756
req = tevent_req_create(mem_ctx, &state,
2757
struct dcerpc_dfs_GetDcAddress_state);
2761
state->out_mem_ctx = NULL;
2764
state->orig.in.servername = _servername;
2765
state->orig.in.server_fullname = _server_fullname;
2766
state->orig.in.is_root = _is_root;
2767
state->orig.in.ttl = _ttl;
2769
/* Out parameters */
2770
state->orig.out.server_fullname = _server_fullname;
2771
state->orig.out.is_root = _is_root;
2772
state->orig.out.ttl = _ttl;
2775
ZERO_STRUCT(state->orig.out.result);
2777
state->out_mem_ctx = talloc_named_const(state, 0,
2778
"dcerpc_dfs_GetDcAddress_out_memory");
2779
if (tevent_req_nomem(state->out_mem_ctx, req)) {
2780
return tevent_req_post(req, ev);
2783
/* make a temporary copy, that we pass to the dispatch function */
2784
state->tmp = state->orig;
2786
subreq = dcerpc_dfs_GetDcAddress_r_send(state, ev, h, &state->tmp);
2787
if (tevent_req_nomem(subreq, req)) {
2788
return tevent_req_post(req, ev);
2790
tevent_req_set_callback(subreq, dcerpc_dfs_GetDcAddress_done, req);
2794
static void dcerpc_dfs_GetDcAddress_done(struct tevent_req *subreq)
2796
struct tevent_req *req = tevent_req_callback_data(
2797
subreq, struct tevent_req);
2798
struct dcerpc_dfs_GetDcAddress_state *state = tevent_req_data(
2799
req, struct dcerpc_dfs_GetDcAddress_state);
2801
TALLOC_CTX *mem_ctx;
2803
if (state->out_mem_ctx) {
2804
mem_ctx = state->out_mem_ctx;
2809
status = dcerpc_dfs_GetDcAddress_r_recv(subreq, mem_ctx);
2810
TALLOC_FREE(subreq);
2811
if (!NT_STATUS_IS_OK(status)) {
2812
tevent_req_nterror(req, status);
2816
/* Copy out parameters */
2817
*state->orig.out.server_fullname = *state->tmp.out.server_fullname;
2818
*state->orig.out.is_root = *state->tmp.out.is_root;
2819
*state->orig.out.ttl = *state->tmp.out.ttl;
2822
state->orig.out.result = state->tmp.out.result;
2824
/* Reset temporary structure */
2825
ZERO_STRUCT(state->tmp);
2827
tevent_req_done(req);
2830
NTSTATUS dcerpc_dfs_GetDcAddress_recv(struct tevent_req *req,
2831
TALLOC_CTX *mem_ctx,
2834
struct dcerpc_dfs_GetDcAddress_state *state = tevent_req_data(
2835
req, struct dcerpc_dfs_GetDcAddress_state);
2838
if (tevent_req_is_nterror(req, &status)) {
2839
tevent_req_received(req);
2843
/* Steal possible out parameters to the callers context */
2844
talloc_steal(mem_ctx, state->out_mem_ctx);
2847
*result = state->orig.out.result;
2849
tevent_req_received(req);
2850
return NT_STATUS_OK;
2853
NTSTATUS dcerpc_dfs_GetDcAddress(struct dcerpc_binding_handle *h,
2854
TALLOC_CTX *mem_ctx,
2855
const char *_servername /* [in] [charset(UTF16)] */,
2856
const char **_server_fullname /* [in,out] [ref,charset(UTF16)] */,
2857
uint8_t *_is_root /* [in,out] [ref] */,
2858
uint32_t *_ttl /* [in,out] [ref] */,
2861
struct dfs_GetDcAddress r;
2865
r.in.servername = _servername;
2866
r.in.server_fullname = _server_fullname;
2867
r.in.is_root = _is_root;
2870
status = dcerpc_dfs_GetDcAddress_r(h, mem_ctx, &r);
2871
if (!NT_STATUS_IS_OK(status)) {
2875
/* Return variables */
2876
*_server_fullname = *r.out.server_fullname;
2877
*_is_root = *r.out.is_root;
2881
*result = r.out.result;
2883
return NT_STATUS_OK;
2886
struct dcerpc_dfs_SetDcAddress_r_state {
2887
TALLOC_CTX *out_mem_ctx;
2890
static void dcerpc_dfs_SetDcAddress_r_done(struct tevent_req *subreq);
2892
struct tevent_req *dcerpc_dfs_SetDcAddress_r_send(TALLOC_CTX *mem_ctx,
2893
struct tevent_context *ev,
2894
struct dcerpc_binding_handle *h,
2895
struct dfs_SetDcAddress *r)
2897
struct tevent_req *req;
2898
struct dcerpc_dfs_SetDcAddress_r_state *state;
2899
struct tevent_req *subreq;
2901
req = tevent_req_create(mem_ctx, &state,
2902
struct dcerpc_dfs_SetDcAddress_r_state);
2907
state->out_mem_ctx = NULL;
2909
subreq = dcerpc_binding_handle_call_send(state, ev, h,
2910
NULL, &ndr_table_netdfs,
2911
NDR_DFS_SETDCADDRESS, state, r);
2912
if (tevent_req_nomem(subreq, req)) {
2913
return tevent_req_post(req, ev);
2915
tevent_req_set_callback(subreq, dcerpc_dfs_SetDcAddress_r_done, req);
2920
static void dcerpc_dfs_SetDcAddress_r_done(struct tevent_req *subreq)
2922
struct tevent_req *req =
2923
tevent_req_callback_data(subreq,
2927
status = dcerpc_binding_handle_call_recv(subreq);
2928
if (!NT_STATUS_IS_OK(status)) {
2929
tevent_req_nterror(req, status);
2933
tevent_req_done(req);
2936
NTSTATUS dcerpc_dfs_SetDcAddress_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
2938
struct dcerpc_dfs_SetDcAddress_r_state *state =
2939
tevent_req_data(req,
2940
struct dcerpc_dfs_SetDcAddress_r_state);
2943
if (tevent_req_is_nterror(req, &status)) {
2944
tevent_req_received(req);
2948
talloc_steal(mem_ctx, state->out_mem_ctx);
2950
tevent_req_received(req);
2951
return NT_STATUS_OK;
2954
NTSTATUS dcerpc_dfs_SetDcAddress_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_SetDcAddress *r)
2958
status = dcerpc_binding_handle_call(h,
2959
NULL, &ndr_table_netdfs,
2960
NDR_DFS_SETDCADDRESS, mem_ctx, r);
2965
struct dcerpc_dfs_SetDcAddress_state {
2966
struct dfs_SetDcAddress orig;
2967
struct dfs_SetDcAddress tmp;
2968
TALLOC_CTX *out_mem_ctx;
2971
static void dcerpc_dfs_SetDcAddress_done(struct tevent_req *subreq);
2973
struct tevent_req *dcerpc_dfs_SetDcAddress_send(TALLOC_CTX *mem_ctx,
2974
struct tevent_context *ev,
2975
struct dcerpc_binding_handle *h,
2976
const char *_servername /* [in] [charset(UTF16)] */,
2977
const char *_server_fullname /* [in] [charset(UTF16)] */,
2978
uint32_t _flags /* [in] */,
2979
uint32_t _ttl /* [in] */)
2981
struct tevent_req *req;
2982
struct dcerpc_dfs_SetDcAddress_state *state;
2983
struct tevent_req *subreq;
2985
req = tevent_req_create(mem_ctx, &state,
2986
struct dcerpc_dfs_SetDcAddress_state);
2990
state->out_mem_ctx = NULL;
2993
state->orig.in.servername = _servername;
2994
state->orig.in.server_fullname = _server_fullname;
2995
state->orig.in.flags = _flags;
2996
state->orig.in.ttl = _ttl;
2998
/* Out parameters */
3001
ZERO_STRUCT(state->orig.out.result);
3003
/* make a temporary copy, that we pass to the dispatch function */
3004
state->tmp = state->orig;
3006
subreq = dcerpc_dfs_SetDcAddress_r_send(state, ev, h, &state->tmp);
3007
if (tevent_req_nomem(subreq, req)) {
3008
return tevent_req_post(req, ev);
3010
tevent_req_set_callback(subreq, dcerpc_dfs_SetDcAddress_done, req);
3014
static void dcerpc_dfs_SetDcAddress_done(struct tevent_req *subreq)
3016
struct tevent_req *req = tevent_req_callback_data(
3017
subreq, struct tevent_req);
3018
struct dcerpc_dfs_SetDcAddress_state *state = tevent_req_data(
3019
req, struct dcerpc_dfs_SetDcAddress_state);
3021
TALLOC_CTX *mem_ctx;
3023
if (state->out_mem_ctx) {
3024
mem_ctx = state->out_mem_ctx;
3029
status = dcerpc_dfs_SetDcAddress_r_recv(subreq, mem_ctx);
3030
TALLOC_FREE(subreq);
3031
if (!NT_STATUS_IS_OK(status)) {
3032
tevent_req_nterror(req, status);
3036
/* Copy out parameters */
3039
state->orig.out.result = state->tmp.out.result;
3041
/* Reset temporary structure */
3042
ZERO_STRUCT(state->tmp);
3044
tevent_req_done(req);
3047
NTSTATUS dcerpc_dfs_SetDcAddress_recv(struct tevent_req *req,
3048
TALLOC_CTX *mem_ctx,
3051
struct dcerpc_dfs_SetDcAddress_state *state = tevent_req_data(
3052
req, struct dcerpc_dfs_SetDcAddress_state);
3055
if (tevent_req_is_nterror(req, &status)) {
3056
tevent_req_received(req);
3060
/* Steal possible out parameters to the callers context */
3061
talloc_steal(mem_ctx, state->out_mem_ctx);
3064
*result = state->orig.out.result;
3066
tevent_req_received(req);
3067
return NT_STATUS_OK;
3070
NTSTATUS dcerpc_dfs_SetDcAddress(struct dcerpc_binding_handle *h,
3071
TALLOC_CTX *mem_ctx,
3072
const char *_servername /* [in] [charset(UTF16)] */,
3073
const char *_server_fullname /* [in] [charset(UTF16)] */,
3074
uint32_t _flags /* [in] */,
3075
uint32_t _ttl /* [in] */,
3078
struct dfs_SetDcAddress r;
3082
r.in.servername = _servername;
3083
r.in.server_fullname = _server_fullname;
3084
r.in.flags = _flags;
3087
status = dcerpc_dfs_SetDcAddress_r(h, mem_ctx, &r);
3088
if (!NT_STATUS_IS_OK(status)) {
3092
/* Return variables */
3095
*result = r.out.result;
3097
return NT_STATUS_OK;
3100
struct dcerpc_dfs_FlushFtTable_r_state {
3101
TALLOC_CTX *out_mem_ctx;
3104
static void dcerpc_dfs_FlushFtTable_r_done(struct tevent_req *subreq);
3106
struct tevent_req *dcerpc_dfs_FlushFtTable_r_send(TALLOC_CTX *mem_ctx,
3107
struct tevent_context *ev,
3108
struct dcerpc_binding_handle *h,
3109
struct dfs_FlushFtTable *r)
3111
struct tevent_req *req;
3112
struct dcerpc_dfs_FlushFtTable_r_state *state;
3113
struct tevent_req *subreq;
3115
req = tevent_req_create(mem_ctx, &state,
3116
struct dcerpc_dfs_FlushFtTable_r_state);
3121
state->out_mem_ctx = NULL;
3123
subreq = dcerpc_binding_handle_call_send(state, ev, h,
3124
NULL, &ndr_table_netdfs,
3125
NDR_DFS_FLUSHFTTABLE, state, r);
3126
if (tevent_req_nomem(subreq, req)) {
3127
return tevent_req_post(req, ev);
3129
tevent_req_set_callback(subreq, dcerpc_dfs_FlushFtTable_r_done, req);
3134
static void dcerpc_dfs_FlushFtTable_r_done(struct tevent_req *subreq)
3136
struct tevent_req *req =
3137
tevent_req_callback_data(subreq,
3141
status = dcerpc_binding_handle_call_recv(subreq);
3142
if (!NT_STATUS_IS_OK(status)) {
3143
tevent_req_nterror(req, status);
3147
tevent_req_done(req);
3150
NTSTATUS dcerpc_dfs_FlushFtTable_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3152
struct dcerpc_dfs_FlushFtTable_r_state *state =
3153
tevent_req_data(req,
3154
struct dcerpc_dfs_FlushFtTable_r_state);
3157
if (tevent_req_is_nterror(req, &status)) {
3158
tevent_req_received(req);
3162
talloc_steal(mem_ctx, state->out_mem_ctx);
3164
tevent_req_received(req);
3165
return NT_STATUS_OK;
3168
NTSTATUS dcerpc_dfs_FlushFtTable_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_FlushFtTable *r)
3172
status = dcerpc_binding_handle_call(h,
3173
NULL, &ndr_table_netdfs,
3174
NDR_DFS_FLUSHFTTABLE, mem_ctx, r);
3179
struct dcerpc_dfs_FlushFtTable_state {
3180
struct dfs_FlushFtTable orig;
3181
struct dfs_FlushFtTable tmp;
3182
TALLOC_CTX *out_mem_ctx;
3185
static void dcerpc_dfs_FlushFtTable_done(struct tevent_req *subreq);
3187
struct tevent_req *dcerpc_dfs_FlushFtTable_send(TALLOC_CTX *mem_ctx,
3188
struct tevent_context *ev,
3189
struct dcerpc_binding_handle *h,
3190
const char *_servername /* [in] [charset(UTF16)] */,
3191
const char *_rootshare /* [in] [charset(UTF16)] */)
3193
struct tevent_req *req;
3194
struct dcerpc_dfs_FlushFtTable_state *state;
3195
struct tevent_req *subreq;
3197
req = tevent_req_create(mem_ctx, &state,
3198
struct dcerpc_dfs_FlushFtTable_state);
3202
state->out_mem_ctx = NULL;
3205
state->orig.in.servername = _servername;
3206
state->orig.in.rootshare = _rootshare;
3208
/* Out parameters */
3211
ZERO_STRUCT(state->orig.out.result);
3213
/* make a temporary copy, that we pass to the dispatch function */
3214
state->tmp = state->orig;
3216
subreq = dcerpc_dfs_FlushFtTable_r_send(state, ev, h, &state->tmp);
3217
if (tevent_req_nomem(subreq, req)) {
3218
return tevent_req_post(req, ev);
3220
tevent_req_set_callback(subreq, dcerpc_dfs_FlushFtTable_done, req);
3224
static void dcerpc_dfs_FlushFtTable_done(struct tevent_req *subreq)
3226
struct tevent_req *req = tevent_req_callback_data(
3227
subreq, struct tevent_req);
3228
struct dcerpc_dfs_FlushFtTable_state *state = tevent_req_data(
3229
req, struct dcerpc_dfs_FlushFtTable_state);
3231
TALLOC_CTX *mem_ctx;
3233
if (state->out_mem_ctx) {
3234
mem_ctx = state->out_mem_ctx;
3239
status = dcerpc_dfs_FlushFtTable_r_recv(subreq, mem_ctx);
3240
TALLOC_FREE(subreq);
3241
if (!NT_STATUS_IS_OK(status)) {
3242
tevent_req_nterror(req, status);
3246
/* Copy out parameters */
3249
state->orig.out.result = state->tmp.out.result;
3251
/* Reset temporary structure */
3252
ZERO_STRUCT(state->tmp);
3254
tevent_req_done(req);
3257
NTSTATUS dcerpc_dfs_FlushFtTable_recv(struct tevent_req *req,
3258
TALLOC_CTX *mem_ctx,
3261
struct dcerpc_dfs_FlushFtTable_state *state = tevent_req_data(
3262
req, struct dcerpc_dfs_FlushFtTable_state);
3265
if (tevent_req_is_nterror(req, &status)) {
3266
tevent_req_received(req);
3270
/* Steal possible out parameters to the callers context */
3271
talloc_steal(mem_ctx, state->out_mem_ctx);
3274
*result = state->orig.out.result;
3276
tevent_req_received(req);
3277
return NT_STATUS_OK;
3280
NTSTATUS dcerpc_dfs_FlushFtTable(struct dcerpc_binding_handle *h,
3281
TALLOC_CTX *mem_ctx,
3282
const char *_servername /* [in] [charset(UTF16)] */,
3283
const char *_rootshare /* [in] [charset(UTF16)] */,
3286
struct dfs_FlushFtTable r;
3290
r.in.servername = _servername;
3291
r.in.rootshare = _rootshare;
3293
status = dcerpc_dfs_FlushFtTable_r(h, mem_ctx, &r);
3294
if (!NT_STATUS_IS_OK(status)) {
3298
/* Return variables */
3301
*result = r.out.result;
3303
return NT_STATUS_OK;
3306
struct dcerpc_dfs_EnumEx_r_state {
3307
TALLOC_CTX *out_mem_ctx;
3310
static void dcerpc_dfs_EnumEx_r_done(struct tevent_req *subreq);
3312
struct tevent_req *dcerpc_dfs_EnumEx_r_send(TALLOC_CTX *mem_ctx,
3313
struct tevent_context *ev,
3314
struct dcerpc_binding_handle *h,
3315
struct dfs_EnumEx *r)
3317
struct tevent_req *req;
3318
struct dcerpc_dfs_EnumEx_r_state *state;
3319
struct tevent_req *subreq;
3321
req = tevent_req_create(mem_ctx, &state,
3322
struct dcerpc_dfs_EnumEx_r_state);
3327
state->out_mem_ctx = talloc_new(state);
3328
if (tevent_req_nomem(state->out_mem_ctx, req)) {
3329
return tevent_req_post(req, ev);
3332
subreq = dcerpc_binding_handle_call_send(state, ev, h,
3333
NULL, &ndr_table_netdfs,
3334
NDR_DFS_ENUMEX, state->out_mem_ctx, r);
3335
if (tevent_req_nomem(subreq, req)) {
3336
return tevent_req_post(req, ev);
3338
tevent_req_set_callback(subreq, dcerpc_dfs_EnumEx_r_done, req);
3343
static void dcerpc_dfs_EnumEx_r_done(struct tevent_req *subreq)
3345
struct tevent_req *req =
3346
tevent_req_callback_data(subreq,
3350
status = dcerpc_binding_handle_call_recv(subreq);
3351
if (!NT_STATUS_IS_OK(status)) {
3352
tevent_req_nterror(req, status);
3356
tevent_req_done(req);
3359
NTSTATUS dcerpc_dfs_EnumEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
3361
struct dcerpc_dfs_EnumEx_r_state *state =
3362
tevent_req_data(req,
3363
struct dcerpc_dfs_EnumEx_r_state);
3366
if (tevent_req_is_nterror(req, &status)) {
3367
tevent_req_received(req);
3371
talloc_steal(mem_ctx, state->out_mem_ctx);
3373
tevent_req_received(req);
3374
return NT_STATUS_OK;
3377
NTSTATUS dcerpc_dfs_EnumEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct dfs_EnumEx *r)
3381
status = dcerpc_binding_handle_call(h,
3382
NULL, &ndr_table_netdfs,
3383
NDR_DFS_ENUMEX, mem_ctx, r);
3388
struct dcerpc_dfs_EnumEx_state {
3389
struct dfs_EnumEx orig;
3390
struct dfs_EnumEx tmp;
3391
TALLOC_CTX *out_mem_ctx;
3394
static void dcerpc_dfs_EnumEx_done(struct tevent_req *subreq);
3396
struct tevent_req *dcerpc_dfs_EnumEx_send(TALLOC_CTX *mem_ctx,
3397
struct tevent_context *ev,
3398
struct dcerpc_binding_handle *h,
3399
const char *_dfs_name /* [in] [charset(UTF16)] */,
3400
uint32_t _level /* [in] */,
3401
uint32_t _bufsize /* [in] */,
3402
struct dfs_EnumStruct *_info /* [in,out] [unique] */,
3403
uint32_t *_total /* [in,out] [unique] */)
3405
struct tevent_req *req;
3406
struct dcerpc_dfs_EnumEx_state *state;
3407
struct tevent_req *subreq;
3409
req = tevent_req_create(mem_ctx, &state,
3410
struct dcerpc_dfs_EnumEx_state);
3414
state->out_mem_ctx = NULL;
3417
state->orig.in.dfs_name = _dfs_name;
3418
state->orig.in.level = _level;
3419
state->orig.in.bufsize = _bufsize;
3420
state->orig.in.info = _info;
3421
state->orig.in.total = _total;
3423
/* Out parameters */
3424
state->orig.out.info = _info;
3425
state->orig.out.total = _total;
3428
ZERO_STRUCT(state->orig.out.result);
3430
state->out_mem_ctx = talloc_named_const(state, 0,
3431
"dcerpc_dfs_EnumEx_out_memory");
3432
if (tevent_req_nomem(state->out_mem_ctx, req)) {
3433
return tevent_req_post(req, ev);
3436
/* make a temporary copy, that we pass to the dispatch function */
3437
state->tmp = state->orig;
3439
subreq = dcerpc_dfs_EnumEx_r_send(state, ev, h, &state->tmp);
3440
if (tevent_req_nomem(subreq, req)) {
3441
return tevent_req_post(req, ev);
3443
tevent_req_set_callback(subreq, dcerpc_dfs_EnumEx_done, req);
3447
static void dcerpc_dfs_EnumEx_done(struct tevent_req *subreq)
3449
struct tevent_req *req = tevent_req_callback_data(
3450
subreq, struct tevent_req);
3451
struct dcerpc_dfs_EnumEx_state *state = tevent_req_data(
3452
req, struct dcerpc_dfs_EnumEx_state);
3454
TALLOC_CTX *mem_ctx;
3456
if (state->out_mem_ctx) {
3457
mem_ctx = state->out_mem_ctx;
3462
status = dcerpc_dfs_EnumEx_r_recv(subreq, mem_ctx);
3463
TALLOC_FREE(subreq);
3464
if (!NT_STATUS_IS_OK(status)) {
3465
tevent_req_nterror(req, status);
3469
/* Copy out parameters */
3470
if (state->orig.out.info && state->tmp.out.info) {
3471
*state->orig.out.info = *state->tmp.out.info;
3473
if (state->orig.out.total && state->tmp.out.total) {
3474
*state->orig.out.total = *state->tmp.out.total;
3478
state->orig.out.result = state->tmp.out.result;
3480
/* Reset temporary structure */
3481
ZERO_STRUCT(state->tmp);
3483
tevent_req_done(req);
3486
NTSTATUS dcerpc_dfs_EnumEx_recv(struct tevent_req *req,
3487
TALLOC_CTX *mem_ctx,
3490
struct dcerpc_dfs_EnumEx_state *state = tevent_req_data(
3491
req, struct dcerpc_dfs_EnumEx_state);
3494
if (tevent_req_is_nterror(req, &status)) {
3495
tevent_req_received(req);
3499
/* Steal possible out parameters to the callers context */
3500
talloc_steal(mem_ctx, state->out_mem_ctx);
3503
*result = state->orig.out.result;
3505
tevent_req_received(req);
3506
return NT_STATUS_OK;
3509
NTSTATUS dcerpc_dfs_EnumEx(struct dcerpc_binding_handle *h,
3510
TALLOC_CTX *mem_ctx,
3511
const char *_dfs_name /* [in] [charset(UTF16)] */,
3512
uint32_t _level /* [in] */,
3513
uint32_t _bufsize /* [in] */,
3514
struct dfs_EnumStruct *_info /* [in,out] [unique] */,
3515
uint32_t *_total /* [in,out] [unique] */,
3518
struct dfs_EnumEx r;
3522
r.in.dfs_name = _dfs_name;
3523
r.in.level = _level;
3524
r.in.bufsize = _bufsize;
3526
r.in.total = _total;
3528
status = dcerpc_dfs_EnumEx_r(h, mem_ctx, &r);
3529
if (!NT_STATUS_IS_OK(status)) {
3533
/* Return variables */
3534
if (_info && r.out.info) {
3535
*_info = *r.out.info;
3537
if (_total && r.out.total) {
3538
*_total = *r.out.total;
3542
*result = r.out.result;
3544
return NT_STATUS_OK;