Make 3.0.x in sync with 3.2 here.
[Samba.git] / source / rpc_client / cli_dfs.c
blobf93ce29dbfaa48746d1b82bc00766b26a08932b4
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
8 NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32 *exist_flag)
10 prs_struct qbuf, rbuf;
11 NETDFS_Q_DFS_GETMANAGERVERSION q;
12 NETDFS_R_DFS_GETMANAGERVERSION r;
14 ZERO_STRUCT(q);
15 ZERO_STRUCT(r);
17 /* Marshall data and send request */
19 if (!init_netdfs_q_dfs_GetManagerVersion(&q))
20 return NT_STATUS_INVALID_PARAMETER;
22 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_GETMANAGERVERSION,
23 q, r,
24 qbuf, rbuf,
25 netdfs_io_q_dfs_GetManagerVersion,
26 netdfs_io_r_dfs_GetManagerVersion,
27 NT_STATUS_UNSUCCESSFUL);
29 /* Return variables */
30 *exist_flag = r.exist_flag;
32 /* Return result */
33 return NT_STATUS_OK;
36 NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path, const char *server, const char *share, const char *comment, uint32 flags)
38 prs_struct qbuf, rbuf;
39 NETDFS_Q_DFS_ADD q;
40 NETDFS_R_DFS_ADD r;
42 ZERO_STRUCT(q);
43 ZERO_STRUCT(r);
45 /* Marshall data and send request */
47 if (!init_netdfs_q_dfs_Add(&q, path, server, share, comment, flags))
48 return NT_STATUS_INVALID_PARAMETER;
50 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ADD,
51 q, r,
52 qbuf, rbuf,
53 netdfs_io_q_dfs_Add,
54 netdfs_io_r_dfs_Add,
55 NT_STATUS_UNSUCCESSFUL);
57 /* Return variables */
59 /* Return result */
60 return werror_to_ntstatus(r.status);
63 NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path, const char *server, const char *share)
65 prs_struct qbuf, rbuf;
66 NETDFS_Q_DFS_REMOVE q;
67 NETDFS_R_DFS_REMOVE r;
69 ZERO_STRUCT(q);
70 ZERO_STRUCT(r);
72 /* Marshall data and send request */
74 if (!init_netdfs_q_dfs_Remove(&q, path, server, share))
75 return NT_STATUS_INVALID_PARAMETER;
77 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_REMOVE,
78 q, r,
79 qbuf, rbuf,
80 netdfs_io_q_dfs_Remove,
81 netdfs_io_r_dfs_Remove,
82 NT_STATUS_UNSUCCESSFUL);
84 /* Return variables */
86 /* Return result */
87 return werror_to_ntstatus(r.status);
90 NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
92 prs_struct qbuf, rbuf;
93 NETDFS_Q_DFS_SETINFO q;
94 NETDFS_R_DFS_SETINFO r;
96 ZERO_STRUCT(q);
97 ZERO_STRUCT(r);
99 /* Marshall data and send request */
101 if (!init_netdfs_q_dfs_SetInfo(&q))
102 return NT_STATUS_INVALID_PARAMETER;
104 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_SETINFO,
105 q, r,
106 qbuf, rbuf,
107 netdfs_io_q_dfs_SetInfo,
108 netdfs_io_r_dfs_SetInfo,
109 NT_STATUS_UNSUCCESSFUL);
111 /* Return variables */
113 /* Return result */
114 return werror_to_ntstatus(r.status);
117 NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path, const char *server, const char *share, uint32 level, NETDFS_DFS_INFO_CTR *info)
119 prs_struct qbuf, rbuf;
120 NETDFS_Q_DFS_GETINFO q;
121 NETDFS_R_DFS_GETINFO r;
123 ZERO_STRUCT(q);
124 ZERO_STRUCT(r);
126 /* Marshall data and send request */
128 if (!init_netdfs_q_dfs_GetInfo(&q, path, server, share, level))
129 return NT_STATUS_INVALID_PARAMETER;
131 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_GETINFO,
132 q, r,
133 qbuf, rbuf,
134 netdfs_io_q_dfs_GetInfo,
135 netdfs_io_r_dfs_GetInfo,
136 NT_STATUS_UNSUCCESSFUL);
138 /* Return variables */
139 *info = r.info;
141 /* Return result */
142 return werror_to_ntstatus(r.status);
145 NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32 level, uint32 bufsize, NETDFS_DFS_ENUMSTRUCT *info, uint32 *total)
147 prs_struct qbuf, rbuf;
148 NETDFS_Q_DFS_ENUM q;
149 NETDFS_R_DFS_ENUM r;
151 ZERO_STRUCT(q);
152 ZERO_STRUCT(r);
154 /* Marshall data and send request */
156 if (!init_netdfs_q_dfs_Enum(&q, level, bufsize, info, total))
157 return NT_STATUS_INVALID_PARAMETER;
159 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ENUM,
160 q, r,
161 qbuf, rbuf,
162 netdfs_io_q_dfs_Enum,
163 netdfs_io_r_dfs_Enum,
164 NT_STATUS_UNSUCCESSFUL);
166 /* Return variables */
167 *info = r.info;
168 *total = r.total;
170 /* Return result */
171 return werror_to_ntstatus(r.status);
174 NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
176 prs_struct qbuf, rbuf;
177 NETDFS_Q_DFS_RENAME q;
178 NETDFS_R_DFS_RENAME r;
180 ZERO_STRUCT(q);
181 ZERO_STRUCT(r);
183 /* Marshall data and send request */
185 if (!init_netdfs_q_dfs_Rename(&q))
186 return NT_STATUS_INVALID_PARAMETER;
188 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_RENAME,
189 q, r,
190 qbuf, rbuf,
191 netdfs_io_q_dfs_Rename,
192 netdfs_io_r_dfs_Rename,
193 NT_STATUS_UNSUCCESSFUL);
195 /* Return variables */
197 /* Return result */
198 return werror_to_ntstatus(r.status);
201 NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
203 prs_struct qbuf, rbuf;
204 NETDFS_Q_DFS_MOVE q;
205 NETDFS_R_DFS_MOVE r;
207 ZERO_STRUCT(q);
208 ZERO_STRUCT(r);
210 /* Marshall data and send request */
212 if (!init_netdfs_q_dfs_Move(&q))
213 return NT_STATUS_INVALID_PARAMETER;
215 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_MOVE,
216 q, r,
217 qbuf, rbuf,
218 netdfs_io_q_dfs_Move,
219 netdfs_io_r_dfs_Move,
220 NT_STATUS_UNSUCCESSFUL);
222 /* Return variables */
224 /* Return result */
225 return werror_to_ntstatus(r.status);
228 NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
230 prs_struct qbuf, rbuf;
231 NETDFS_Q_DFS_MANAGERGETCONFIGINFO q;
232 NETDFS_R_DFS_MANAGERGETCONFIGINFO r;
234 ZERO_STRUCT(q);
235 ZERO_STRUCT(r);
237 /* Marshall data and send request */
239 if (!init_netdfs_q_dfs_ManagerGetConfigInfo(&q))
240 return NT_STATUS_INVALID_PARAMETER;
242 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_MANAGERGETCONFIGINFO,
243 q, r,
244 qbuf, rbuf,
245 netdfs_io_q_dfs_ManagerGetConfigInfo,
246 netdfs_io_r_dfs_ManagerGetConfigInfo,
247 NT_STATUS_UNSUCCESSFUL);
249 /* Return variables */
251 /* Return result */
252 return werror_to_ntstatus(r.status);
255 NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
257 prs_struct qbuf, rbuf;
258 NETDFS_Q_DFS_MANAGERSENDSITEINFO q;
259 NETDFS_R_DFS_MANAGERSENDSITEINFO r;
261 ZERO_STRUCT(q);
262 ZERO_STRUCT(r);
264 /* Marshall data and send request */
266 if (!init_netdfs_q_dfs_ManagerSendSiteInfo(&q))
267 return NT_STATUS_INVALID_PARAMETER;
269 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_MANAGERSENDSITEINFO,
270 q, r,
271 qbuf, rbuf,
272 netdfs_io_q_dfs_ManagerSendSiteInfo,
273 netdfs_io_r_dfs_ManagerSendSiteInfo,
274 NT_STATUS_UNSUCCESSFUL);
276 /* Return variables */
278 /* Return result */
279 return werror_to_ntstatus(r.status);
282 NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
284 prs_struct qbuf, rbuf;
285 NETDFS_Q_DFS_ADDFTROOT q;
286 NETDFS_R_DFS_ADDFTROOT r;
288 ZERO_STRUCT(q);
289 ZERO_STRUCT(r);
291 /* Marshall data and send request */
293 if (!init_netdfs_q_dfs_AddFtRoot(&q))
294 return NT_STATUS_INVALID_PARAMETER;
296 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ADDFTROOT,
297 q, r,
298 qbuf, rbuf,
299 netdfs_io_q_dfs_AddFtRoot,
300 netdfs_io_r_dfs_AddFtRoot,
301 NT_STATUS_UNSUCCESSFUL);
303 /* Return variables */
305 /* Return result */
306 return werror_to_ntstatus(r.status);
309 NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
311 prs_struct qbuf, rbuf;
312 NETDFS_Q_DFS_REMOVEFTROOT q;
313 NETDFS_R_DFS_REMOVEFTROOT r;
315 ZERO_STRUCT(q);
316 ZERO_STRUCT(r);
318 /* Marshall data and send request */
320 if (!init_netdfs_q_dfs_RemoveFtRoot(&q))
321 return NT_STATUS_INVALID_PARAMETER;
323 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_REMOVEFTROOT,
324 q, r,
325 qbuf, rbuf,
326 netdfs_io_q_dfs_RemoveFtRoot,
327 netdfs_io_r_dfs_RemoveFtRoot,
328 NT_STATUS_UNSUCCESSFUL);
330 /* Return variables */
332 /* Return result */
333 return werror_to_ntstatus(r.status);
336 NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
338 prs_struct qbuf, rbuf;
339 NETDFS_Q_DFS_ADDSTDROOT q;
340 NETDFS_R_DFS_ADDSTDROOT r;
342 ZERO_STRUCT(q);
343 ZERO_STRUCT(r);
345 /* Marshall data and send request */
347 if (!init_netdfs_q_dfs_AddStdRoot(&q))
348 return NT_STATUS_INVALID_PARAMETER;
350 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ADDSTDROOT,
351 q, r,
352 qbuf, rbuf,
353 netdfs_io_q_dfs_AddStdRoot,
354 netdfs_io_r_dfs_AddStdRoot,
355 NT_STATUS_UNSUCCESSFUL);
357 /* Return variables */
359 /* Return result */
360 return werror_to_ntstatus(r.status);
363 NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
365 prs_struct qbuf, rbuf;
366 NETDFS_Q_DFS_REMOVESTDROOT q;
367 NETDFS_R_DFS_REMOVESTDROOT r;
369 ZERO_STRUCT(q);
370 ZERO_STRUCT(r);
372 /* Marshall data and send request */
374 if (!init_netdfs_q_dfs_RemoveStdRoot(&q))
375 return NT_STATUS_INVALID_PARAMETER;
377 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_REMOVESTDROOT,
378 q, r,
379 qbuf, rbuf,
380 netdfs_io_q_dfs_RemoveStdRoot,
381 netdfs_io_r_dfs_RemoveStdRoot,
382 NT_STATUS_UNSUCCESSFUL);
384 /* Return variables */
386 /* Return result */
387 return werror_to_ntstatus(r.status);
390 NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
392 prs_struct qbuf, rbuf;
393 NETDFS_Q_DFS_MANAGERINITIALIZE q;
394 NETDFS_R_DFS_MANAGERINITIALIZE r;
396 ZERO_STRUCT(q);
397 ZERO_STRUCT(r);
399 /* Marshall data and send request */
401 if (!init_netdfs_q_dfs_ManagerInitialize(&q))
402 return NT_STATUS_INVALID_PARAMETER;
404 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_MANAGERINITIALIZE,
405 q, r,
406 qbuf, rbuf,
407 netdfs_io_q_dfs_ManagerInitialize,
408 netdfs_io_r_dfs_ManagerInitialize,
409 NT_STATUS_UNSUCCESSFUL);
411 /* Return variables */
413 /* Return result */
414 return werror_to_ntstatus(r.status);
417 NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
419 prs_struct qbuf, rbuf;
420 NETDFS_Q_DFS_ADDSTDROOTFORCED q;
421 NETDFS_R_DFS_ADDSTDROOTFORCED r;
423 ZERO_STRUCT(q);
424 ZERO_STRUCT(r);
426 /* Marshall data and send request */
428 if (!init_netdfs_q_dfs_AddStdRootForced(&q))
429 return NT_STATUS_INVALID_PARAMETER;
431 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ADDSTDROOTFORCED,
432 q, r,
433 qbuf, rbuf,
434 netdfs_io_q_dfs_AddStdRootForced,
435 netdfs_io_r_dfs_AddStdRootForced,
436 NT_STATUS_UNSUCCESSFUL);
438 /* Return variables */
440 /* Return result */
441 return werror_to_ntstatus(r.status);
444 NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
446 prs_struct qbuf, rbuf;
447 NETDFS_Q_DFS_GETDCADDRESS q;
448 NETDFS_R_DFS_GETDCADDRESS r;
450 ZERO_STRUCT(q);
451 ZERO_STRUCT(r);
453 /* Marshall data and send request */
455 if (!init_netdfs_q_dfs_GetDcAddress(&q))
456 return NT_STATUS_INVALID_PARAMETER;
458 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_GETDCADDRESS,
459 q, r,
460 qbuf, rbuf,
461 netdfs_io_q_dfs_GetDcAddress,
462 netdfs_io_r_dfs_GetDcAddress,
463 NT_STATUS_UNSUCCESSFUL);
465 /* Return variables */
467 /* Return result */
468 return werror_to_ntstatus(r.status);
471 NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
473 prs_struct qbuf, rbuf;
474 NETDFS_Q_DFS_SETDCADDRESS q;
475 NETDFS_R_DFS_SETDCADDRESS r;
477 ZERO_STRUCT(q);
478 ZERO_STRUCT(r);
480 /* Marshall data and send request */
482 if (!init_netdfs_q_dfs_SetDcAddress(&q))
483 return NT_STATUS_INVALID_PARAMETER;
485 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_SETDCADDRESS,
486 q, r,
487 qbuf, rbuf,
488 netdfs_io_q_dfs_SetDcAddress,
489 netdfs_io_r_dfs_SetDcAddress,
490 NT_STATUS_UNSUCCESSFUL);
492 /* Return variables */
494 /* Return result */
495 return werror_to_ntstatus(r.status);
498 NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
500 prs_struct qbuf, rbuf;
501 NETDFS_Q_DFS_FLUSHFTTABLE q;
502 NETDFS_R_DFS_FLUSHFTTABLE r;
504 ZERO_STRUCT(q);
505 ZERO_STRUCT(r);
507 /* Marshall data and send request */
509 if (!init_netdfs_q_dfs_FlushFtTable(&q))
510 return NT_STATUS_INVALID_PARAMETER;
512 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_FLUSHFTTABLE,
513 q, r,
514 qbuf, rbuf,
515 netdfs_io_q_dfs_FlushFtTable,
516 netdfs_io_r_dfs_FlushFtTable,
517 NT_STATUS_UNSUCCESSFUL);
519 /* Return variables */
521 /* Return result */
522 return werror_to_ntstatus(r.status);
525 NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
527 prs_struct qbuf, rbuf;
528 NETDFS_Q_DFS_ADD2 q;
529 NETDFS_R_DFS_ADD2 r;
531 ZERO_STRUCT(q);
532 ZERO_STRUCT(r);
534 /* Marshall data and send request */
536 if (!init_netdfs_q_dfs_Add2(&q))
537 return NT_STATUS_INVALID_PARAMETER;
539 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ADD2,
540 q, r,
541 qbuf, rbuf,
542 netdfs_io_q_dfs_Add2,
543 netdfs_io_r_dfs_Add2,
544 NT_STATUS_UNSUCCESSFUL);
546 /* Return variables */
548 /* Return result */
549 return werror_to_ntstatus(r.status);
552 NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
554 prs_struct qbuf, rbuf;
555 NETDFS_Q_DFS_REMOVE2 q;
556 NETDFS_R_DFS_REMOVE2 r;
558 ZERO_STRUCT(q);
559 ZERO_STRUCT(r);
561 /* Marshall data and send request */
563 if (!init_netdfs_q_dfs_Remove2(&q))
564 return NT_STATUS_INVALID_PARAMETER;
566 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_REMOVE2,
567 q, r,
568 qbuf, rbuf,
569 netdfs_io_q_dfs_Remove2,
570 netdfs_io_r_dfs_Remove2,
571 NT_STATUS_UNSUCCESSFUL);
573 /* Return variables */
575 /* Return result */
576 return werror_to_ntstatus(r.status);
579 NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
581 prs_struct qbuf, rbuf;
582 NETDFS_Q_DFS_ENUMEX q;
583 NETDFS_R_DFS_ENUMEX r;
585 ZERO_STRUCT(q);
586 ZERO_STRUCT(r);
588 /* Marshall data and send request */
590 if (!init_netdfs_q_dfs_EnumEx(&q))
591 return NT_STATUS_INVALID_PARAMETER;
593 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_ENUMEX,
594 q, r,
595 qbuf, rbuf,
596 netdfs_io_q_dfs_EnumEx,
597 netdfs_io_r_dfs_EnumEx,
598 NT_STATUS_UNSUCCESSFUL);
600 /* Return variables */
602 /* Return result */
603 return werror_to_ntstatus(r.status);
606 NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
608 prs_struct qbuf, rbuf;
609 NETDFS_Q_DFS_SETINFO2 q;
610 NETDFS_R_DFS_SETINFO2 r;
612 ZERO_STRUCT(q);
613 ZERO_STRUCT(r);
615 /* Marshall data and send request */
617 if (!init_netdfs_q_dfs_SetInfo2(&q))
618 return NT_STATUS_INVALID_PARAMETER;
620 CLI_DO_RPC(cli, mem_ctx, PI_NETDFS, DFS_SETINFO2,
621 q, r,
622 qbuf, rbuf,
623 netdfs_io_q_dfs_SetInfo2,
624 netdfs_io_r_dfs_SetInfo2,
625 NT_STATUS_UNSUCCESSFUL);
627 /* Return variables */
629 /* Return result */
630 return werror_to_ntstatus(r.status);