root/librpc/gen_ndr/cli_drsuapi.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. rpccli_drsuapi_DsBind
  2. rpccli_drsuapi_DsUnbind
  3. rpccli_drsuapi_DsReplicaSync
  4. rpccli_drsuapi_DsGetNCChanges
  5. rpccli_drsuapi_DsReplicaUpdateRefs
  6. rpccli_DRSUAPI_REPLICA_ADD
  7. rpccli_DRSUAPI_REPLICA_DEL
  8. rpccli_DRSUAPI_REPLICA_MODIFY
  9. rpccli_DRSUAPI_VERIFY_NAMES
  10. rpccli_drsuapi_DsGetMemberships
  11. rpccli_DRSUAPI_INTER_DOMAIN_MOVE
  12. rpccli_drsuapi_DsGetNT4ChangeLog
  13. rpccli_drsuapi_DsCrackNames
  14. rpccli_drsuapi_DsWriteAccountSpn
  15. rpccli_drsuapi_DsRemoveDSServer
  16. rpccli_DRSUAPI_REMOVE_DS_DOMAIN
  17. rpccli_drsuapi_DsGetDomainControllerInfo
  18. rpccli_drsuapi_DsAddEntry
  19. rpccli_DRSUAPI_EXECUTE_KCC
  20. rpccli_drsuapi_DsReplicaGetInfo
  21. rpccli_DRSUAPI_ADD_SID_HISTORY
  22. rpccli_drsuapi_DsGetMemberships2
  23. rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS
  24. rpccli_DRSUAPI_GET_OBJECT_EXISTENCE
  25. rpccli_drsuapi_QuerySitesByCost

   1 /*
   2  * Unix SMB/CIFS implementation.
   3  * client auto-generated by pidl. DO NOT MODIFY!
   4  */
   5 
   6 #include "includes.h"
   7 #include "../librpc/gen_ndr/cli_drsuapi.h"
   8 
   9 NTSTATUS rpccli_drsuapi_DsBind(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
  10                                TALLOC_CTX *mem_ctx,
  11                                struct GUID *bind_guid /* [in] [unique] */,
  12                                struct drsuapi_DsBindInfoCtr *bind_info /* [in,out] [unique] */,
  13                                struct policy_handle *bind_handle /* [out] [ref] */,
  14                                WERROR *werror)
  15 {
  16         struct drsuapi_DsBind r;
  17         NTSTATUS status;
  18 
  19         /* In parameters */
  20         r.in.bind_guid = bind_guid;
  21         r.in.bind_info = bind_info;
  22 
  23         if (DEBUGLEVEL >= 10) {
  24                 NDR_PRINT_IN_DEBUG(drsuapi_DsBind, &r);
  25         }
  26 
  27         status = cli->dispatch(cli,
  28                                 mem_ctx,
  29                                 &ndr_table_drsuapi,
  30                                 NDR_DRSUAPI_DSBIND,
  31                                 &r);
  32 
  33         if (!NT_STATUS_IS_OK(status)) {
  34                 return status;
  35         }
  36 
  37         if (DEBUGLEVEL >= 10) {
  38                 NDR_PRINT_OUT_DEBUG(drsuapi_DsBind, &r);
  39         }
  40 
  41         if (NT_STATUS_IS_ERR(status)) {
  42                 return status;
  43         }
  44 
  45         /* Return variables */
  46         if (bind_info && r.out.bind_info) {
  47                 *bind_info = *r.out.bind_info;
  48         }
  49         *bind_handle = *r.out.bind_handle;
  50 
  51         /* Return result */
  52         if (werror) {
  53                 *werror = r.out.result;
  54         }
  55 
  56         return werror_to_ntstatus(r.out.result);
  57 }
  58 
  59 NTSTATUS rpccli_drsuapi_DsUnbind(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
  60                                  TALLOC_CTX *mem_ctx,
  61                                  struct policy_handle *bind_handle /* [in,out] [ref] */,
  62                                  WERROR *werror)
  63 {
  64         struct drsuapi_DsUnbind r;
  65         NTSTATUS status;
  66 
  67         /* In parameters */
  68         r.in.bind_handle = bind_handle;
  69 
  70         if (DEBUGLEVEL >= 10) {
  71                 NDR_PRINT_IN_DEBUG(drsuapi_DsUnbind, &r);
  72         }
  73 
  74         status = cli->dispatch(cli,
  75                                 mem_ctx,
  76                                 &ndr_table_drsuapi,
  77                                 NDR_DRSUAPI_DSUNBIND,
  78                                 &r);
  79 
  80         if (!NT_STATUS_IS_OK(status)) {
  81                 return status;
  82         }
  83 
  84         if (DEBUGLEVEL >= 10) {
  85                 NDR_PRINT_OUT_DEBUG(drsuapi_DsUnbind, &r);
  86         }
  87 
  88         if (NT_STATUS_IS_ERR(status)) {
  89                 return status;
  90         }
  91 
  92         /* Return variables */
  93         *bind_handle = *r.out.bind_handle;
  94 
  95         /* Return result */
  96         if (werror) {
  97                 *werror = r.out.result;
  98         }
  99 
 100         return werror_to_ntstatus(r.out.result);
 101 }
 102 
 103 NTSTATUS rpccli_drsuapi_DsReplicaSync(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 104                                       TALLOC_CTX *mem_ctx,
 105                                       struct policy_handle *bind_handle /* [in] [ref] */,
 106                                       int32_t level /* [in]  */,
 107                                       union drsuapi_DsReplicaSyncRequest req /* [in] [switch_is(level)] */,
 108                                       WERROR *werror)
 109 {
 110         struct drsuapi_DsReplicaSync r;
 111         NTSTATUS status;
 112 
 113         /* In parameters */
 114         r.in.bind_handle = bind_handle;
 115         r.in.level = level;
 116         r.in.req = req;
 117 
 118         if (DEBUGLEVEL >= 10) {
 119                 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaSync, &r);
 120         }
 121 
 122         status = cli->dispatch(cli,
 123                                 mem_ctx,
 124                                 &ndr_table_drsuapi,
 125                                 NDR_DRSUAPI_DSREPLICASYNC,
 126                                 &r);
 127 
 128         if (!NT_STATUS_IS_OK(status)) {
 129                 return status;
 130         }
 131 
 132         if (DEBUGLEVEL >= 10) {
 133                 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaSync, &r);
 134         }
 135 
 136         if (NT_STATUS_IS_ERR(status)) {
 137                 return status;
 138         }
 139 
 140         /* Return variables */
 141 
 142         /* Return result */
 143         if (werror) {
 144                 *werror = r.out.result;
 145         }
 146 
 147         return werror_to_ntstatus(r.out.result);
 148 }
 149 
 150 NTSTATUS rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 151                                        TALLOC_CTX *mem_ctx,
 152                                        struct policy_handle *bind_handle /* [in] [ref] */,
 153                                        int32_t level /* [in]  */,
 154                                        union drsuapi_DsGetNCChangesRequest *req /* [in] [ref,switch_is(level)] */,
 155                                        int32_t *level_out /* [out] [ref] */,
 156                                        union drsuapi_DsGetNCChangesCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
 157                                        WERROR *werror)
 158 {
 159         struct drsuapi_DsGetNCChanges r;
 160         NTSTATUS status;
 161 
 162         /* In parameters */
 163         r.in.bind_handle = bind_handle;
 164         r.in.level = level;
 165         r.in.req = req;
 166 
 167         if (DEBUGLEVEL >= 10) {
 168                 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNCChanges, &r);
 169         }
 170 
 171         status = cli->dispatch(cli,
 172                                 mem_ctx,
 173                                 &ndr_table_drsuapi,
 174                                 NDR_DRSUAPI_DSGETNCCHANGES,
 175                                 &r);
 176 
 177         if (!NT_STATUS_IS_OK(status)) {
 178                 return status;
 179         }
 180 
 181         if (DEBUGLEVEL >= 10) {
 182                 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, &r);
 183         }
 184 
 185         if (NT_STATUS_IS_ERR(status)) {
 186                 return status;
 187         }
 188 
 189         /* Return variables */
 190         *level_out = *r.out.level_out;
 191         *ctr = *r.out.ctr;
 192 
 193         /* Return result */
 194         if (werror) {
 195                 *werror = r.out.result;
 196         }
 197 
 198         return werror_to_ntstatus(r.out.result);
 199 }
 200 
 201 NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 202                                             TALLOC_CTX *mem_ctx,
 203                                             struct policy_handle *bind_handle /* [in] [ref] */,
 204                                             int32_t level /* [in]  */,
 205                                             union drsuapi_DsReplicaUpdateRefsRequest req /* [in] [switch_is(level)] */,
 206                                             WERROR *werror)
 207 {
 208         struct drsuapi_DsReplicaUpdateRefs r;
 209         NTSTATUS status;
 210 
 211         /* In parameters */
 212         r.in.bind_handle = bind_handle;
 213         r.in.level = level;
 214         r.in.req = req;
 215 
 216         if (DEBUGLEVEL >= 10) {
 217                 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaUpdateRefs, &r);
 218         }
 219 
 220         status = cli->dispatch(cli,
 221                                 mem_ctx,
 222                                 &ndr_table_drsuapi,
 223                                 NDR_DRSUAPI_DSREPLICAUPDATEREFS,
 224                                 &r);
 225 
 226         if (!NT_STATUS_IS_OK(status)) {
 227                 return status;
 228         }
 229 
 230         if (DEBUGLEVEL >= 10) {
 231                 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaUpdateRefs, &r);
 232         }
 233 
 234         if (NT_STATUS_IS_ERR(status)) {
 235                 return status;
 236         }
 237 
 238         /* Return variables */
 239 
 240         /* Return result */
 241         if (werror) {
 242                 *werror = r.out.result;
 243         }
 244 
 245         return werror_to_ntstatus(r.out.result);
 246 }
 247 
 248 NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 249                                     TALLOC_CTX *mem_ctx,
 250                                     WERROR *werror)
 251 {
 252         struct DRSUAPI_REPLICA_ADD r;
 253         NTSTATUS status;
 254 
 255         /* In parameters */
 256 
 257         if (DEBUGLEVEL >= 10) {
 258                 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_ADD, &r);
 259         }
 260 
 261         status = cli->dispatch(cli,
 262                                 mem_ctx,
 263                                 &ndr_table_drsuapi,
 264                                 NDR_DRSUAPI_REPLICA_ADD,
 265                                 &r);
 266 
 267         if (!NT_STATUS_IS_OK(status)) {
 268                 return status;
 269         }
 270 
 271         if (DEBUGLEVEL >= 10) {
 272                 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_ADD, &r);
 273         }
 274 
 275         if (NT_STATUS_IS_ERR(status)) {
 276                 return status;
 277         }
 278 
 279         /* Return variables */
 280 
 281         /* Return result */
 282         if (werror) {
 283                 *werror = r.out.result;
 284         }
 285 
 286         return werror_to_ntstatus(r.out.result);
 287 }
 288 
 289 NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 290                                     TALLOC_CTX *mem_ctx,
 291                                     WERROR *werror)
 292 {
 293         struct DRSUAPI_REPLICA_DEL r;
 294         NTSTATUS status;
 295 
 296         /* In parameters */
 297 
 298         if (DEBUGLEVEL >= 10) {
 299                 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_DEL, &r);
 300         }
 301 
 302         status = cli->dispatch(cli,
 303                                 mem_ctx,
 304                                 &ndr_table_drsuapi,
 305                                 NDR_DRSUAPI_REPLICA_DEL,
 306                                 &r);
 307 
 308         if (!NT_STATUS_IS_OK(status)) {
 309                 return status;
 310         }
 311 
 312         if (DEBUGLEVEL >= 10) {
 313                 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_DEL, &r);
 314         }
 315 
 316         if (NT_STATUS_IS_ERR(status)) {
 317                 return status;
 318         }
 319 
 320         /* Return variables */
 321 
 322         /* Return result */
 323         if (werror) {
 324                 *werror = r.out.result;
 325         }
 326 
 327         return werror_to_ntstatus(r.out.result);
 328 }
 329 
 330 NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 331                                        TALLOC_CTX *mem_ctx,
 332                                        WERROR *werror)
 333 {
 334         struct DRSUAPI_REPLICA_MODIFY r;
 335         NTSTATUS status;
 336 
 337         /* In parameters */
 338 
 339         if (DEBUGLEVEL >= 10) {
 340                 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_MODIFY, &r);
 341         }
 342 
 343         status = cli->dispatch(cli,
 344                                 mem_ctx,
 345                                 &ndr_table_drsuapi,
 346                                 NDR_DRSUAPI_REPLICA_MODIFY,
 347                                 &r);
 348 
 349         if (!NT_STATUS_IS_OK(status)) {
 350                 return status;
 351         }
 352 
 353         if (DEBUGLEVEL >= 10) {
 354                 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_MODIFY, &r);
 355         }
 356 
 357         if (NT_STATUS_IS_ERR(status)) {
 358                 return status;
 359         }
 360 
 361         /* Return variables */
 362 
 363         /* Return result */
 364         if (werror) {
 365                 *werror = r.out.result;
 366         }
 367 
 368         return werror_to_ntstatus(r.out.result);
 369 }
 370 
 371 NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 372                                      TALLOC_CTX *mem_ctx,
 373                                      WERROR *werror)
 374 {
 375         struct DRSUAPI_VERIFY_NAMES r;
 376         NTSTATUS status;
 377 
 378         /* In parameters */
 379 
 380         if (DEBUGLEVEL >= 10) {
 381                 NDR_PRINT_IN_DEBUG(DRSUAPI_VERIFY_NAMES, &r);
 382         }
 383 
 384         status = cli->dispatch(cli,
 385                                 mem_ctx,
 386                                 &ndr_table_drsuapi,
 387                                 NDR_DRSUAPI_VERIFY_NAMES,
 388                                 &r);
 389 
 390         if (!NT_STATUS_IS_OK(status)) {
 391                 return status;
 392         }
 393 
 394         if (DEBUGLEVEL >= 10) {
 395                 NDR_PRINT_OUT_DEBUG(DRSUAPI_VERIFY_NAMES, &r);
 396         }
 397 
 398         if (NT_STATUS_IS_ERR(status)) {
 399                 return status;
 400         }
 401 
 402         /* Return variables */
 403 
 404         /* Return result */
 405         if (werror) {
 406                 *werror = r.out.result;
 407         }
 408 
 409         return werror_to_ntstatus(r.out.result);
 410 }
 411 
 412 NTSTATUS rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 413                                          TALLOC_CTX *mem_ctx,
 414                                          struct policy_handle *bind_handle /* [in] [ref] */,
 415                                          int32_t level /* [in]  */,
 416                                          union drsuapi_DsGetMembershipsRequest *req /* [in] [ref,switch_is(level)] */,
 417                                          int32_t *level_out /* [out] [ref] */,
 418                                          union drsuapi_DsGetMembershipsCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
 419                                          WERROR *werror)
 420 {
 421         struct drsuapi_DsGetMemberships r;
 422         NTSTATUS status;
 423 
 424         /* In parameters */
 425         r.in.bind_handle = bind_handle;
 426         r.in.level = level;
 427         r.in.req = req;
 428 
 429         if (DEBUGLEVEL >= 10) {
 430                 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships, &r);
 431         }
 432 
 433         status = cli->dispatch(cli,
 434                                 mem_ctx,
 435                                 &ndr_table_drsuapi,
 436                                 NDR_DRSUAPI_DSGETMEMBERSHIPS,
 437                                 &r);
 438 
 439         if (!NT_STATUS_IS_OK(status)) {
 440                 return status;
 441         }
 442 
 443         if (DEBUGLEVEL >= 10) {
 444                 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships, &r);
 445         }
 446 
 447         if (NT_STATUS_IS_ERR(status)) {
 448                 return status;
 449         }
 450 
 451         /* Return variables */
 452         *level_out = *r.out.level_out;
 453         *ctr = *r.out.ctr;
 454 
 455         /* Return result */
 456         if (werror) {
 457                 *werror = r.out.result;
 458         }
 459 
 460         return werror_to_ntstatus(r.out.result);
 461 }
 462 
 463 NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 464                                           TALLOC_CTX *mem_ctx,
 465                                           WERROR *werror)
 466 {
 467         struct DRSUAPI_INTER_DOMAIN_MOVE r;
 468         NTSTATUS status;
 469 
 470         /* In parameters */
 471 
 472         if (DEBUGLEVEL >= 10) {
 473                 NDR_PRINT_IN_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE, &r);
 474         }
 475 
 476         status = cli->dispatch(cli,
 477                                 mem_ctx,
 478                                 &ndr_table_drsuapi,
 479                                 NDR_DRSUAPI_INTER_DOMAIN_MOVE,
 480                                 &r);
 481 
 482         if (!NT_STATUS_IS_OK(status)) {
 483                 return status;
 484         }
 485 
 486         if (DEBUGLEVEL >= 10) {
 487                 NDR_PRINT_OUT_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE, &r);
 488         }
 489 
 490         if (NT_STATUS_IS_ERR(status)) {
 491                 return status;
 492         }
 493 
 494         /* Return variables */
 495 
 496         /* Return result */
 497         if (werror) {
 498                 *werror = r.out.result;
 499         }
 500 
 501         return werror_to_ntstatus(r.out.result);
 502 }
 503 
 504 NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 505                                           TALLOC_CTX *mem_ctx,
 506                                           struct policy_handle *bind_handle /* [in] [ref] */,
 507                                           uint32_t level /* [in]  */,
 508                                           union drsuapi_DsGetNT4ChangeLogRequest *req /* [in] [ref,switch_is(level)] */,
 509                                           uint32_t *level_out /* [out] [ref] */,
 510                                           union drsuapi_DsGetNT4ChangeLogInfo *info /* [out] [ref,switch_is(*level_out)] */,
 511                                           WERROR *werror)
 512 {
 513         struct drsuapi_DsGetNT4ChangeLog r;
 514         NTSTATUS status;
 515 
 516         /* In parameters */
 517         r.in.bind_handle = bind_handle;
 518         r.in.level = level;
 519         r.in.req = req;
 520 
 521         if (DEBUGLEVEL >= 10) {
 522                 NDR_PRINT_IN_DEBUG(drsuapi_DsGetNT4ChangeLog, &r);
 523         }
 524 
 525         status = cli->dispatch(cli,
 526                                 mem_ctx,
 527                                 &ndr_table_drsuapi,
 528                                 NDR_DRSUAPI_DSGETNT4CHANGELOG,
 529                                 &r);
 530 
 531         if (!NT_STATUS_IS_OK(status)) {
 532                 return status;
 533         }
 534 
 535         if (DEBUGLEVEL >= 10) {
 536                 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNT4ChangeLog, &r);
 537         }
 538 
 539         if (NT_STATUS_IS_ERR(status)) {
 540                 return status;
 541         }
 542 
 543         /* Return variables */
 544         *level_out = *r.out.level_out;
 545         *info = *r.out.info;
 546 
 547         /* Return result */
 548         if (werror) {
 549                 *werror = r.out.result;
 550         }
 551 
 552         return werror_to_ntstatus(r.out.result);
 553 }
 554 
 555 NTSTATUS rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 556                                      TALLOC_CTX *mem_ctx,
 557                                      struct policy_handle *bind_handle /* [in] [ref] */,
 558                                      int32_t level /* [in]  */,
 559                                      union drsuapi_DsNameRequest *req /* [in] [ref,switch_is(level)] */,
 560                                      int32_t *level_out /* [out] [ref] */,
 561                                      union drsuapi_DsNameCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
 562                                      WERROR *werror)
 563 {
 564         struct drsuapi_DsCrackNames r;
 565         NTSTATUS status;
 566 
 567         /* In parameters */
 568         r.in.bind_handle = bind_handle;
 569         r.in.level = level;
 570         r.in.req = req;
 571 
 572         if (DEBUGLEVEL >= 10) {
 573                 NDR_PRINT_IN_DEBUG(drsuapi_DsCrackNames, &r);
 574         }
 575 
 576         status = cli->dispatch(cli,
 577                                 mem_ctx,
 578                                 &ndr_table_drsuapi,
 579                                 NDR_DRSUAPI_DSCRACKNAMES,
 580                                 &r);
 581 
 582         if (!NT_STATUS_IS_OK(status)) {
 583                 return status;
 584         }
 585 
 586         if (DEBUGLEVEL >= 10) {
 587                 NDR_PRINT_OUT_DEBUG(drsuapi_DsCrackNames, &r);
 588         }
 589 
 590         if (NT_STATUS_IS_ERR(status)) {
 591                 return status;
 592         }
 593 
 594         /* Return variables */
 595         *level_out = *r.out.level_out;
 596         *ctr = *r.out.ctr;
 597 
 598         /* Return result */
 599         if (werror) {
 600                 *werror = r.out.result;
 601         }
 602 
 603         return werror_to_ntstatus(r.out.result);
 604 }
 605 
 606 NTSTATUS rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 607                                           TALLOC_CTX *mem_ctx,
 608                                           struct policy_handle *bind_handle /* [in] [ref] */,
 609                                           int32_t level /* [in]  */,
 610                                           union drsuapi_DsWriteAccountSpnRequest *req /* [in] [ref,switch_is(level)] */,
 611                                           int32_t *level_out /* [out] [ref] */,
 612                                           union drsuapi_DsWriteAccountSpnResult *res /* [out] [ref,switch_is(*level_out)] */,
 613                                           WERROR *werror)
 614 {
 615         struct drsuapi_DsWriteAccountSpn r;
 616         NTSTATUS status;
 617 
 618         /* In parameters */
 619         r.in.bind_handle = bind_handle;
 620         r.in.level = level;
 621         r.in.req = req;
 622 
 623         if (DEBUGLEVEL >= 10) {
 624                 NDR_PRINT_IN_DEBUG(drsuapi_DsWriteAccountSpn, &r);
 625         }
 626 
 627         status = cli->dispatch(cli,
 628                                 mem_ctx,
 629                                 &ndr_table_drsuapi,
 630                                 NDR_DRSUAPI_DSWRITEACCOUNTSPN,
 631                                 &r);
 632 
 633         if (!NT_STATUS_IS_OK(status)) {
 634                 return status;
 635         }
 636 
 637         if (DEBUGLEVEL >= 10) {
 638                 NDR_PRINT_OUT_DEBUG(drsuapi_DsWriteAccountSpn, &r);
 639         }
 640 
 641         if (NT_STATUS_IS_ERR(status)) {
 642                 return status;
 643         }
 644 
 645         /* Return variables */
 646         *level_out = *r.out.level_out;
 647         *res = *r.out.res;
 648 
 649         /* Return result */
 650         if (werror) {
 651                 *werror = r.out.result;
 652         }
 653 
 654         return werror_to_ntstatus(r.out.result);
 655 }
 656 
 657 NTSTATUS rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 658                                          TALLOC_CTX *mem_ctx,
 659                                          struct policy_handle *bind_handle /* [in] [ref] */,
 660                                          int32_t level /* [in]  */,
 661                                          union drsuapi_DsRemoveDSServerRequest *req /* [in] [ref,switch_is(level)] */,
 662                                          int32_t *level_out /* [out] [ref] */,
 663                                          union drsuapi_DsRemoveDSServerResult *res /* [out] [ref,switch_is(*level_out)] */,
 664                                          WERROR *werror)
 665 {
 666         struct drsuapi_DsRemoveDSServer r;
 667         NTSTATUS status;
 668 
 669         /* In parameters */
 670         r.in.bind_handle = bind_handle;
 671         r.in.level = level;
 672         r.in.req = req;
 673 
 674         if (DEBUGLEVEL >= 10) {
 675                 NDR_PRINT_IN_DEBUG(drsuapi_DsRemoveDSServer, &r);
 676         }
 677 
 678         status = cli->dispatch(cli,
 679                                 mem_ctx,
 680                                 &ndr_table_drsuapi,
 681                                 NDR_DRSUAPI_DSREMOVEDSSERVER,
 682                                 &r);
 683 
 684         if (!NT_STATUS_IS_OK(status)) {
 685                 return status;
 686         }
 687 
 688         if (DEBUGLEVEL >= 10) {
 689                 NDR_PRINT_OUT_DEBUG(drsuapi_DsRemoveDSServer, &r);
 690         }
 691 
 692         if (NT_STATUS_IS_ERR(status)) {
 693                 return status;
 694         }
 695 
 696         /* Return variables */
 697         *level_out = *r.out.level_out;
 698         *res = *r.out.res;
 699 
 700         /* Return result */
 701         if (werror) {
 702                 *werror = r.out.result;
 703         }
 704 
 705         return werror_to_ntstatus(r.out.result);
 706 }
 707 
 708 NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 709                                          TALLOC_CTX *mem_ctx,
 710                                          WERROR *werror)
 711 {
 712         struct DRSUAPI_REMOVE_DS_DOMAIN r;
 713         NTSTATUS status;
 714 
 715         /* In parameters */
 716 
 717         if (DEBUGLEVEL >= 10) {
 718                 NDR_PRINT_IN_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN, &r);
 719         }
 720 
 721         status = cli->dispatch(cli,
 722                                 mem_ctx,
 723                                 &ndr_table_drsuapi,
 724                                 NDR_DRSUAPI_REMOVE_DS_DOMAIN,
 725                                 &r);
 726 
 727         if (!NT_STATUS_IS_OK(status)) {
 728                 return status;
 729         }
 730 
 731         if (DEBUGLEVEL >= 10) {
 732                 NDR_PRINT_OUT_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN, &r);
 733         }
 734 
 735         if (NT_STATUS_IS_ERR(status)) {
 736                 return status;
 737         }
 738 
 739         /* Return variables */
 740 
 741         /* Return result */
 742         if (werror) {
 743                 *werror = r.out.result;
 744         }
 745 
 746         return werror_to_ntstatus(r.out.result);
 747 }
 748 
 749 NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 750                                                   TALLOC_CTX *mem_ctx,
 751                                                   struct policy_handle *bind_handle /* [in] [ref] */,
 752                                                   int32_t level /* [in]  */,
 753                                                   union drsuapi_DsGetDCInfoRequest *req /* [in] [ref,switch_is(level)] */,
 754                                                   int32_t *level_out /* [out] [ref] */,
 755                                                   union drsuapi_DsGetDCInfoCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
 756                                                   WERROR *werror)
 757 {
 758         struct drsuapi_DsGetDomainControllerInfo r;
 759         NTSTATUS status;
 760 
 761         /* In parameters */
 762         r.in.bind_handle = bind_handle;
 763         r.in.level = level;
 764         r.in.req = req;
 765 
 766         if (DEBUGLEVEL >= 10) {
 767                 NDR_PRINT_IN_DEBUG(drsuapi_DsGetDomainControllerInfo, &r);
 768         }
 769 
 770         status = cli->dispatch(cli,
 771                                 mem_ctx,
 772                                 &ndr_table_drsuapi,
 773                                 NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO,
 774                                 &r);
 775 
 776         if (!NT_STATUS_IS_OK(status)) {
 777                 return status;
 778         }
 779 
 780         if (DEBUGLEVEL >= 10) {
 781                 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetDomainControllerInfo, &r);
 782         }
 783 
 784         if (NT_STATUS_IS_ERR(status)) {
 785                 return status;
 786         }
 787 
 788         /* Return variables */
 789         *level_out = *r.out.level_out;
 790         *ctr = *r.out.ctr;
 791 
 792         /* Return result */
 793         if (werror) {
 794                 *werror = r.out.result;
 795         }
 796 
 797         return werror_to_ntstatus(r.out.result);
 798 }
 799 
 800 NTSTATUS rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 801                                    TALLOC_CTX *mem_ctx,
 802                                    struct policy_handle *bind_handle /* [in] [ref] */,
 803                                    int32_t level /* [in]  */,
 804                                    union drsuapi_DsAddEntryRequest *req /* [in] [ref,switch_is(level)] */,
 805                                    int32_t *level_out /* [out] [ref] */,
 806                                    union drsuapi_DsAddEntryCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
 807                                    WERROR *werror)
 808 {
 809         struct drsuapi_DsAddEntry r;
 810         NTSTATUS status;
 811 
 812         /* In parameters */
 813         r.in.bind_handle = bind_handle;
 814         r.in.level = level;
 815         r.in.req = req;
 816 
 817         if (DEBUGLEVEL >= 10) {
 818                 NDR_PRINT_IN_DEBUG(drsuapi_DsAddEntry, &r);
 819         }
 820 
 821         status = cli->dispatch(cli,
 822                                 mem_ctx,
 823                                 &ndr_table_drsuapi,
 824                                 NDR_DRSUAPI_DSADDENTRY,
 825                                 &r);
 826 
 827         if (!NT_STATUS_IS_OK(status)) {
 828                 return status;
 829         }
 830 
 831         if (DEBUGLEVEL >= 10) {
 832                 NDR_PRINT_OUT_DEBUG(drsuapi_DsAddEntry, &r);
 833         }
 834 
 835         if (NT_STATUS_IS_ERR(status)) {
 836                 return status;
 837         }
 838 
 839         /* Return variables */
 840         *level_out = *r.out.level_out;
 841         *ctr = *r.out.ctr;
 842 
 843         /* Return result */
 844         if (werror) {
 845                 *werror = r.out.result;
 846         }
 847 
 848         return werror_to_ntstatus(r.out.result);
 849 }
 850 
 851 NTSTATUS rpccli_DRSUAPI_EXECUTE_KCC(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 852                                     TALLOC_CTX *mem_ctx,
 853                                     WERROR *werror)
 854 {
 855         struct DRSUAPI_EXECUTE_KCC r;
 856         NTSTATUS status;
 857 
 858         /* In parameters */
 859 
 860         if (DEBUGLEVEL >= 10) {
 861                 NDR_PRINT_IN_DEBUG(DRSUAPI_EXECUTE_KCC, &r);
 862         }
 863 
 864         status = cli->dispatch(cli,
 865                                 mem_ctx,
 866                                 &ndr_table_drsuapi,
 867                                 NDR_DRSUAPI_EXECUTE_KCC,
 868                                 &r);
 869 
 870         if (!NT_STATUS_IS_OK(status)) {
 871                 return status;
 872         }
 873 
 874         if (DEBUGLEVEL >= 10) {
 875                 NDR_PRINT_OUT_DEBUG(DRSUAPI_EXECUTE_KCC, &r);
 876         }
 877 
 878         if (NT_STATUS_IS_ERR(status)) {
 879                 return status;
 880         }
 881 
 882         /* Return variables */
 883 
 884         /* Return result */
 885         if (werror) {
 886                 *werror = r.out.result;
 887         }
 888 
 889         return werror_to_ntstatus(r.out.result);
 890 }
 891 
 892 NTSTATUS rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 893                                          TALLOC_CTX *mem_ctx,
 894                                          struct policy_handle *bind_handle /* [in] [ref] */,
 895                                          enum drsuapi_DsReplicaGetInfoLevel level /* [in]  */,
 896                                          union drsuapi_DsReplicaGetInfoRequest *req /* [in] [ref,switch_is(level)] */,
 897                                          enum drsuapi_DsReplicaInfoType *info_type /* [out] [ref] */,
 898                                          union drsuapi_DsReplicaInfo *info /* [out] [ref,switch_is(*info_type)] */,
 899                                          WERROR *werror)
 900 {
 901         struct drsuapi_DsReplicaGetInfo r;
 902         NTSTATUS status;
 903 
 904         /* In parameters */
 905         r.in.bind_handle = bind_handle;
 906         r.in.level = level;
 907         r.in.req = req;
 908 
 909         if (DEBUGLEVEL >= 10) {
 910                 NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaGetInfo, &r);
 911         }
 912 
 913         status = cli->dispatch(cli,
 914                                 mem_ctx,
 915                                 &ndr_table_drsuapi,
 916                                 NDR_DRSUAPI_DSREPLICAGETINFO,
 917                                 &r);
 918 
 919         if (!NT_STATUS_IS_OK(status)) {
 920                 return status;
 921         }
 922 
 923         if (DEBUGLEVEL >= 10) {
 924                 NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaGetInfo, &r);
 925         }
 926 
 927         if (NT_STATUS_IS_ERR(status)) {
 928                 return status;
 929         }
 930 
 931         /* Return variables */
 932         *info_type = *r.out.info_type;
 933         *info = *r.out.info;
 934 
 935         /* Return result */
 936         if (werror) {
 937                 *werror = r.out.result;
 938         }
 939 
 940         return werror_to_ntstatus(r.out.result);
 941 }
 942 
 943 NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 944                                         TALLOC_CTX *mem_ctx,
 945                                         WERROR *werror)
 946 {
 947         struct DRSUAPI_ADD_SID_HISTORY r;
 948         NTSTATUS status;
 949 
 950         /* In parameters */
 951 
 952         if (DEBUGLEVEL >= 10) {
 953                 NDR_PRINT_IN_DEBUG(DRSUAPI_ADD_SID_HISTORY, &r);
 954         }
 955 
 956         status = cli->dispatch(cli,
 957                                 mem_ctx,
 958                                 &ndr_table_drsuapi,
 959                                 NDR_DRSUAPI_ADD_SID_HISTORY,
 960                                 &r);
 961 
 962         if (!NT_STATUS_IS_OK(status)) {
 963                 return status;
 964         }
 965 
 966         if (DEBUGLEVEL >= 10) {
 967                 NDR_PRINT_OUT_DEBUG(DRSUAPI_ADD_SID_HISTORY, &r);
 968         }
 969 
 970         if (NT_STATUS_IS_ERR(status)) {
 971                 return status;
 972         }
 973 
 974         /* Return variables */
 975 
 976         /* Return result */
 977         if (werror) {
 978                 *werror = r.out.result;
 979         }
 980 
 981         return werror_to_ntstatus(r.out.result);
 982 }
 983 
 984 NTSTATUS rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 985                                           TALLOC_CTX *mem_ctx,
 986                                           struct policy_handle *bind_handle /* [in] [ref] */,
 987                                           int32_t level /* [in]  */,
 988                                           union drsuapi_DsGetMemberships2Request *req /* [in] [ref,switch_is(level)] */,
 989                                           int32_t *level_out /* [out] [ref] */,
 990                                           union drsuapi_DsGetMemberships2Ctr *ctr /* [out] [ref,switch_is(*level_out)] */,
 991                                           WERROR *werror)
 992 {
 993         struct drsuapi_DsGetMemberships2 r;
 994         NTSTATUS status;
 995 
 996         /* In parameters */
 997         r.in.bind_handle = bind_handle;
 998         r.in.level = level;
 999         r.in.req = req;
1000 
1001         if (DEBUGLEVEL >= 10) {
1002                 NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships2, &r);
1003         }
1004 
1005         status = cli->dispatch(cli,
1006                                 mem_ctx,
1007                                 &ndr_table_drsuapi,
1008                                 NDR_DRSUAPI_DSGETMEMBERSHIPS2,
1009                                 &r);
1010 
1011         if (!NT_STATUS_IS_OK(status)) {
1012                 return status;
1013         }
1014 
1015         if (DEBUGLEVEL >= 10) {
1016                 NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships2, &r);
1017         }
1018 
1019         if (NT_STATUS_IS_ERR(status)) {
1020                 return status;
1021         }
1022 
1023         /* Return variables */
1024         *level_out = *r.out.level_out;
1025         *ctr = *r.out.ctr;
1026 
1027         /* Return result */
1028         if (werror) {
1029                 *werror = r.out.result;
1030         }
1031 
1032         return werror_to_ntstatus(r.out.result);
1033 }
1034 
1035 NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1036                                                TALLOC_CTX *mem_ctx,
1037                                                WERROR *werror)
1038 {
1039         struct DRSUAPI_REPLICA_VERIFY_OBJECTS r;
1040         NTSTATUS status;
1041 
1042         /* In parameters */
1043 
1044         if (DEBUGLEVEL >= 10) {
1045                 NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS, &r);
1046         }
1047 
1048         status = cli->dispatch(cli,
1049                                 mem_ctx,
1050                                 &ndr_table_drsuapi,
1051                                 NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS,
1052                                 &r);
1053 
1054         if (!NT_STATUS_IS_OK(status)) {
1055                 return status;
1056         }
1057 
1058         if (DEBUGLEVEL >= 10) {
1059                 NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS, &r);
1060         }
1061 
1062         if (NT_STATUS_IS_ERR(status)) {
1063                 return status;
1064         }
1065 
1066         /* Return variables */
1067 
1068         /* Return result */
1069         if (werror) {
1070                 *werror = r.out.result;
1071         }
1072 
1073         return werror_to_ntstatus(r.out.result);
1074 }
1075 
1076 NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1077                                              TALLOC_CTX *mem_ctx,
1078                                              WERROR *werror)
1079 {
1080         struct DRSUAPI_GET_OBJECT_EXISTENCE r;
1081         NTSTATUS status;
1082 
1083         /* In parameters */
1084 
1085         if (DEBUGLEVEL >= 10) {
1086                 NDR_PRINT_IN_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE, &r);
1087         }
1088 
1089         status = cli->dispatch(cli,
1090                                 mem_ctx,
1091                                 &ndr_table_drsuapi,
1092                                 NDR_DRSUAPI_GET_OBJECT_EXISTENCE,
1093                                 &r);
1094 
1095         if (!NT_STATUS_IS_OK(status)) {
1096                 return status;
1097         }
1098 
1099         if (DEBUGLEVEL >= 10) {
1100                 NDR_PRINT_OUT_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE, &r);
1101         }
1102 
1103         if (NT_STATUS_IS_ERR(status)) {
1104                 return status;
1105         }
1106 
1107         /* Return variables */
1108 
1109         /* Return result */
1110         if (werror) {
1111                 *werror = r.out.result;
1112         }
1113 
1114         return werror_to_ntstatus(r.out.result);
1115 }
1116 
1117 NTSTATUS rpccli_drsuapi_QuerySitesByCost(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1118                                          TALLOC_CTX *mem_ctx,
1119                                          struct policy_handle *bind_handle /* [in] [ref] */,
1120                                          int32_t level /* [in]  */,
1121                                          union drsuapi_QuerySitesByCostRequest *req /* [in] [ref,switch_is(level)] */,
1122                                          int32_t *level_out /* [out] [ref] */,
1123                                          union drsuapi_QuerySitesByCostCtr *ctr /* [out] [ref,switch_is(*level_out)] */,
1124                                          WERROR *werror)
1125 {
1126         struct drsuapi_QuerySitesByCost r;
1127         NTSTATUS status;
1128 
1129         /* In parameters */
1130         r.in.bind_handle = bind_handle;
1131         r.in.level = level;
1132         r.in.req = req;
1133 
1134         if (DEBUGLEVEL >= 10) {
1135                 NDR_PRINT_IN_DEBUG(drsuapi_QuerySitesByCost, &r);
1136         }
1137 
1138         status = cli->dispatch(cli,
1139                                 mem_ctx,
1140                                 &ndr_table_drsuapi,
1141                                 NDR_DRSUAPI_QUERYSITESBYCOST,
1142                                 &r);
1143 
1144         if (!NT_STATUS_IS_OK(status)) {
1145                 return status;
1146         }
1147 
1148         if (DEBUGLEVEL >= 10) {
1149                 NDR_PRINT_OUT_DEBUG(drsuapi_QuerySitesByCost, &r);
1150         }
1151 
1152         if (NT_STATUS_IS_ERR(status)) {
1153                 return status;
1154         }
1155 
1156         /* Return variables */
1157         *level_out = *r.out.level_out;
1158         *ctr = *r.out.ctr;
1159 
1160         /* Return result */
1161         if (werror) {
1162                 *werror = r.out.result;
1163         }
1164 
1165         return werror_to_ntstatus(r.out.result);
1166 }
1167 

/* [<][>][^][v][top][bottom][index][help] */