LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_drsuapi.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 5080 12969 39.2 %
Date: 2024-04-21 15:09:00 Functions: 262 610 43.0 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_drsuapi.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_security.h"
       7             : #include "librpc/gen_ndr/ndr_misc.h"
       8             : #include "librpc/gen_ndr/ndr_lsa.h"
       9             : #include "librpc/gen_ndr/ndr_samr.h"
      10             : #include "librpc/ndr/ndr_compression.h"
      11       68978 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsOptions(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
      12             : {
      13       68978 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      14       68878 :         return NDR_ERR_SUCCESS;
      15             : }
      16             : 
      17       81402 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsOptions(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
      18             : {
      19          25 :         uint32_t v;
      20       81402 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      21       81402 :         *r = v;
      22       81402 :         return NDR_ERR_SUCCESS;
      23             : }
      24             : 
      25           0 : _PUBLIC_ void ndr_print_drsuapi_DrsOptions(struct ndr_print *ndr, const char *name, uint32_t r)
      26             : {
      27           0 :         ndr_print_uint32(ndr, name, r);
      28           0 :         ndr->depth++;
      29           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_OP", DRSUAPI_DRS_ASYNC_OP, r);
      30           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GETCHG_CHECK", DRSUAPI_DRS_GETCHG_CHECK, r);
      31           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_NOTIFICATION", DRSUAPI_DRS_UPDATE_NOTIFICATION, r);
      32           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ADD_REF", DRSUAPI_DRS_ADD_REF, r);
      33           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_ALL", DRSUAPI_DRS_SYNC_ALL, r);
      34           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DEL_REF", DRSUAPI_DRS_DEL_REF, r);
      35           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_WRIT_REP", DRSUAPI_DRS_WRIT_REP, r);
      36           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_INIT_SYNC", DRSUAPI_DRS_INIT_SYNC, r);
      37           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_PER_SYNC", DRSUAPI_DRS_PER_SYNC, r);
      38           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_MAIL_REP", DRSUAPI_DRS_MAIL_REP, r);
      39           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_REP", DRSUAPI_DRS_ASYNC_REP, r);
      40           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_IGNORE_ERROR", DRSUAPI_DRS_IGNORE_ERROR, r);
      41           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_TWOWAY_SYNC", DRSUAPI_DRS_TWOWAY_SYNC, r);
      42           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_CRITICAL_ONLY", DRSUAPI_DRS_CRITICAL_ONLY, r);
      43           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ANC", DRSUAPI_DRS_GET_ANC, r);
      44           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_NC_SIZE", DRSUAPI_DRS_GET_NC_SIZE, r);
      45           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_LOCAL_ONLY", DRSUAPI_DRS_LOCAL_ONLY, r);
      46           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NONGC_RO_REP", DRSUAPI_DRS_NONGC_RO_REP, r);
      47           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_BYNAME", DRSUAPI_DRS_SYNC_BYNAME, r);
      48           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_OK", DRSUAPI_DRS_REF_OK, r);
      49           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_NOW", DRSUAPI_DRS_FULL_SYNC_NOW, r);
      50           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NO_SOURCE", DRSUAPI_DRS_NO_SOURCE, r);
      51           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS", DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS, r);
      52           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_PACKET", DRSUAPI_DRS_FULL_SYNC_PACKET, r);
      53           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_REQUEUE", DRSUAPI_DRS_SYNC_REQUEUE, r);
      54           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_URGENT", DRSUAPI_DRS_SYNC_URGENT, r);
      55           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_GCSPN", DRSUAPI_DRS_REF_GCSPN, r);
      56           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NO_DISCARD", DRSUAPI_DRS_NO_DISCARD, r);
      57           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NEVER_SYNCED", DRSUAPI_DRS_NEVER_SYNCED, r);
      58           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING", DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING, r);
      59           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_INIT_SYNC_NOW", DRSUAPI_DRS_INIT_SYNC_NOW, r);
      60           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_PREEMPTED", DRSUAPI_DRS_PREEMPTED, r);
      61           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_FORCED", DRSUAPI_DRS_SYNC_FORCED, r);
      62           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_AUTO_SYNC", DRSUAPI_DRS_DISABLE_AUTO_SYNC, r);
      63           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_PERIODIC_SYNC", DRSUAPI_DRS_DISABLE_PERIODIC_SYNC, r);
      64           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_USE_COMPRESSION", DRSUAPI_DRS_USE_COMPRESSION, r);
      65           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NEVER_NOTIFY", DRSUAPI_DRS_NEVER_NOTIFY, r);
      66           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_PAS", DRSUAPI_DRS_SYNC_PAS, r);
      67           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP", DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP, r);
      68           0 :         ndr->depth--;
      69           0 : }
      70             : 
      71        6638 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsMoreOptions(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
      72             : {
      73        6638 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      74        6638 :         return NDR_ERR_SUCCESS;
      75             : }
      76             : 
      77        6638 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsMoreOptions(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
      78             : {
      79           0 :         uint32_t v;
      80        6638 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      81        6638 :         *r = v;
      82        6638 :         return NDR_ERR_SUCCESS;
      83             : }
      84             : 
      85           0 : _PUBLIC_ void ndr_print_drsuapi_DrsMoreOptions(struct ndr_print *ndr, const char *name, uint32_t r)
      86             : {
      87           0 :         ndr_print_uint32(ndr, name, r);
      88           0 :         ndr->depth++;
      89           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_TGT", DRSUAPI_DRS_GET_TGT, r);
      90           0 :         ndr->depth--;
      91           0 : }
      92             : 
      93           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsUpdate(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
      94             : {
      95           0 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      96           0 :         return NDR_ERR_SUCCESS;
      97             : }
      98             : 
      99           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsUpdate(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
     100             : {
     101           0 :         uint32_t v;
     102           0 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     103           0 :         *r = v;
     104           0 :         return NDR_ERR_SUCCESS;
     105             : }
     106             : 
     107           0 : _PUBLIC_ void ndr_print_drsuapi_DrsUpdate(struct ndr_print *ndr, const char *name, uint32_t r)
     108             : {
     109           0 :         ndr_print_uint32(ndr, name, r);
     110           0 :         ndr->depth++;
     111           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_FLAGS", DRSUAPI_DRS_UPDATE_FLAGS, r);
     112           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_ADDRESS", DRSUAPI_DRS_UPDATE_ADDRESS, r);
     113           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_SCHEDULE", DRSUAPI_DRS_UPDATE_SCHEDULE, r);
     114           0 :         ndr->depth--;
     115           0 : }
     116             : 
     117        4135 : static enum ndr_err_code ndr_push_drsuapi_SupportedExtensions(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
     118             : {
     119        4135 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     120        4026 :         return NDR_ERR_SUCCESS;
     121             : }
     122             : 
     123        4009 : static enum ndr_err_code ndr_pull_drsuapi_SupportedExtensions(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
     124             : {
     125          95 :         uint32_t v;
     126        4009 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     127        4009 :         *r = v;
     128        4009 :         return NDR_ERR_SUCCESS;
     129             : }
     130             : 
     131         256 : _PUBLIC_ void ndr_print_drsuapi_SupportedExtensions(struct ndr_print *ndr, const char *name, uint32_t r)
     132             : {
     133         256 :         ndr_print_uint32(ndr, name, r);
     134         256 :         ndr->depth++;
     135         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_BASE", DRSUAPI_SUPPORTED_EXTENSION_BASE, r);
     136         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION", DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION, r);
     137         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI", DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI, r);
     138         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2", DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2, r);
     139         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS", DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS, r);
     140         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1, r);
     141         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION", DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION, r);
     142         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY, r);
     143         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE", DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE, r);
     144         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2, r);
     145         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION", DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION, r);
     146         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2, r);
     147         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD", DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD, r);
     148         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND", DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND, r);
     149         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO", DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO, r);
     150         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION", DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION, r);
     151         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01, r);
     152         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP", DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP, r);
     153         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY", DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY, r);
     154         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3", DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3, r);
     155         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5, r);
     156         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2", DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2, r);
     157         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6, r);
     158         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS", DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS, r);
     159         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8, r);
     160         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5, r);
     161         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6, r);
     162         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3, r);
     163         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7, r);
     164         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT", DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT, r);
     165         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS", DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS, r);
     166         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10, r);
     167         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2", DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2, r);
     168         256 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3", DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3, r);
     169         256 :         ndr->depth--;
     170         256 : }
     171             : 
     172           9 : static enum ndr_err_code ndr_push_drsuapi_SupportedExtensionsExt(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
     173             : {
     174           9 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     175           9 :         return NDR_ERR_SUCCESS;
     176             : }
     177             : 
     178           7 : static enum ndr_err_code ndr_pull_drsuapi_SupportedExtensionsExt(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
     179             : {
     180           0 :         uint32_t v;
     181           7 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     182           7 :         *r = v;
     183           7 :         return NDR_ERR_SUCCESS;
     184             : }
     185             : 
     186           0 : _PUBLIC_ void ndr_print_drsuapi_SupportedExtensionsExt(struct ndr_print *ndr, const char *name, uint32_t r)
     187             : {
     188           0 :         ndr_print_uint32(ndr, name, r);
     189           0 :         ndr->depth++;
     190           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADAM", DRSUAPI_SUPPORTED_EXTENSION_ADAM, r);
     191           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2", DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2, r);
     192           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN", DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN, r);
     193           0 :         ndr->depth--;
     194           0 : }
     195             : 
     196           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo24(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo24 *r)
     197             : {
     198           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     199           0 :         if (ndr_flags & NDR_SCALARS) {
     200           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     201           0 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
     202           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
     203           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
     204           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     205             :         }
     206           0 :         if (ndr_flags & NDR_BUFFERS) {
     207           0 :         }
     208           0 :         return NDR_ERR_SUCCESS;
     209             : }
     210             : 
     211           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo24(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo24 *r)
     212             : {
     213           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     214           0 :         if (ndr_flags & NDR_SCALARS) {
     215           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     216           0 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
     217           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
     218           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
     219           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     220             :         }
     221           0 :         if (ndr_flags & NDR_BUFFERS) {
     222           0 :         }
     223           0 :         return NDR_ERR_SUCCESS;
     224             : }
     225             : 
     226           0 : static void ndr_print_flags_drsuapi_DsBindInfo24(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo24 *r)
     227             : {
     228           0 :         ndr_print_drsuapi_DsBindInfo24(ndr, name, r);
     229           0 : }
     230             : 
     231           0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo24(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo24 *r)
     232             : {
     233           0 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfo24");
     234           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     235           0 :         ndr->depth++;
     236           0 :         ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
     237           0 :         ndr_print_GUID(ndr, "site_guid", &r->site_guid);
     238           0 :         ndr_print_uint32(ndr, "pid", r->pid);
     239           0 :         ndr->depth--;
     240             : }
     241             : 
     242        4126 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo28(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo28 *r)
     243             : {
     244        4126 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     245        4126 :         if (ndr_flags & NDR_SCALARS) {
     246        4126 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     247        4235 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
     248        4126 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
     249        4126 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
     250        4126 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
     251        4126 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     252             :         }
     253        4126 :         if (ndr_flags & NDR_BUFFERS) {
     254         109 :         }
     255        4126 :         return NDR_ERR_SUCCESS;
     256             : }
     257             : 
     258        4002 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo28(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo28 *r)
     259             : {
     260        4002 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     261        4002 :         if (ndr_flags & NDR_SCALARS) {
     262        4002 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     263        4097 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
     264        4002 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
     265        4002 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
     266        4002 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
     267        4002 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     268             :         }
     269        4002 :         if (ndr_flags & NDR_BUFFERS) {
     270          95 :         }
     271        4002 :         return NDR_ERR_SUCCESS;
     272             : }
     273             : 
     274           0 : static void ndr_print_flags_drsuapi_DsBindInfo28(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo28 *r)
     275             : {
     276           0 :         ndr_print_drsuapi_DsBindInfo28(ndr, name, r);
     277           0 : }
     278             : 
     279         256 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo28(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo28 *r)
     280             : {
     281         256 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfo28");
     282         256 :         if (r == NULL) { ndr_print_null(ndr); return; }
     283         256 :         ndr->depth++;
     284         256 :         ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
     285         256 :         ndr_print_GUID(ndr, "site_guid", &r->site_guid);
     286         256 :         ndr_print_uint32(ndr, "pid", r->pid);
     287         256 :         ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
     288         256 :         ndr->depth--;
     289             : }
     290             : 
     291           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo32(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo32 *r)
     292             : {
     293           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     294           0 :         if (ndr_flags & NDR_SCALARS) {
     295           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     296           0 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
     297           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
     298           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
     299           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
     300           0 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_extensions_ext));
     301           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     302             :         }
     303           0 :         if (ndr_flags & NDR_BUFFERS) {
     304           0 :         }
     305           0 :         return NDR_ERR_SUCCESS;
     306             : }
     307             : 
     308           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo32(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo32 *r)
     309             : {
     310           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     311           0 :         if (ndr_flags & NDR_SCALARS) {
     312           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     313           0 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
     314           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
     315           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
     316           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
     317           0 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_extensions_ext));
     318           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     319             :         }
     320           0 :         if (ndr_flags & NDR_BUFFERS) {
     321           0 :         }
     322           0 :         return NDR_ERR_SUCCESS;
     323             : }
     324             : 
     325           0 : static void ndr_print_flags_drsuapi_DsBindInfo32(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo32 *r)
     326             : {
     327           0 :         ndr_print_drsuapi_DsBindInfo32(ndr, name, r);
     328           0 : }
     329             : 
     330           0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo32(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo32 *r)
     331             : {
     332           0 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfo32");
     333           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     334           0 :         ndr->depth++;
     335           0 :         ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
     336           0 :         ndr_print_GUID(ndr, "site_guid", &r->site_guid);
     337           0 :         ndr_print_uint32(ndr, "pid", r->pid);
     338           0 :         ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
     339           0 :         ndr_print_drsuapi_SupportedExtensionsExt(ndr, "supported_extensions_ext", r->supported_extensions_ext);
     340           0 :         ndr->depth--;
     341             : }
     342             : 
     343           9 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo48(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo48 *r)
     344             : {
     345           9 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     346           9 :         if (ndr_flags & NDR_SCALARS) {
     347           9 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     348           9 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
     349           9 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
     350           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
     351           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
     352           9 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_extensions_ext));
     353           9 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->config_dn_guid));
     354           9 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     355             :         }
     356           9 :         if (ndr_flags & NDR_BUFFERS) {
     357           0 :         }
     358           9 :         return NDR_ERR_SUCCESS;
     359             : }
     360             : 
     361           7 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo48(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo48 *r)
     362             : {
     363           7 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     364           7 :         if (ndr_flags & NDR_SCALARS) {
     365           7 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     366           7 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
     367           7 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
     368           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
     369           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
     370           7 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_extensions_ext));
     371           7 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->config_dn_guid));
     372           7 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     373             :         }
     374           7 :         if (ndr_flags & NDR_BUFFERS) {
     375           0 :         }
     376           7 :         return NDR_ERR_SUCCESS;
     377             : }
     378             : 
     379           0 : static void ndr_print_flags_drsuapi_DsBindInfo48(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo48 *r)
     380             : {
     381           0 :         ndr_print_drsuapi_DsBindInfo48(ndr, name, r);
     382           0 : }
     383             : 
     384           0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo48(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo48 *r)
     385             : {
     386           0 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfo48");
     387           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     388           0 :         ndr->depth++;
     389           0 :         ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
     390           0 :         ndr_print_GUID(ndr, "site_guid", &r->site_guid);
     391           0 :         ndr_print_uint32(ndr, "pid", r->pid);
     392           0 :         ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
     393           0 :         ndr_print_drsuapi_SupportedExtensionsExt(ndr, "supported_extensions_ext", r->supported_extensions_ext);
     394           0 :         ndr_print_GUID(ndr, "config_dn_guid", &r->config_dn_guid);
     395           0 :         ndr->depth--;
     396             : }
     397             : 
     398           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo52(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfo52 *r)
     399             : {
     400           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     401           0 :         if (ndr_flags & NDR_SCALARS) {
     402           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     403           0 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
     404           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
     405           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
     406           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
     407           0 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_extensions_ext));
     408           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->config_dn_guid));
     409           0 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, r->supported_capabilities_ext));
     410           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     411             :         }
     412           0 :         if (ndr_flags & NDR_BUFFERS) {
     413           0 :         }
     414           0 :         return NDR_ERR_SUCCESS;
     415             : }
     416             : 
     417           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo52(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfo52 *r)
     418             : {
     419           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     420           0 :         if (ndr_flags & NDR_SCALARS) {
     421           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     422           0 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
     423           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
     424           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
     425           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
     426           0 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_extensions_ext));
     427           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->config_dn_guid));
     428           0 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensionsExt(ndr, NDR_SCALARS, &r->supported_capabilities_ext));
     429           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     430             :         }
     431           0 :         if (ndr_flags & NDR_BUFFERS) {
     432           0 :         }
     433           0 :         return NDR_ERR_SUCCESS;
     434             : }
     435             : 
     436           0 : static void ndr_print_flags_drsuapi_DsBindInfo52(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfo52 *r)
     437             : {
     438           0 :         ndr_print_drsuapi_DsBindInfo52(ndr, name, r);
     439           0 : }
     440             : 
     441           0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo52(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo52 *r)
     442             : {
     443           0 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfo52");
     444           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     445           0 :         ndr->depth++;
     446           0 :         ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
     447           0 :         ndr_print_GUID(ndr, "site_guid", &r->site_guid);
     448           0 :         ndr_print_uint32(ndr, "pid", r->pid);
     449           0 :         ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
     450           0 :         ndr_print_drsuapi_SupportedExtensionsExt(ndr, "supported_extensions_ext", r->supported_extensions_ext);
     451           0 :         ndr_print_GUID(ndr, "config_dn_guid", &r->config_dn_guid);
     452           0 :         ndr_print_drsuapi_SupportedExtensionsExt(ndr, "supported_capabilities_ext", r->supported_capabilities_ext);
     453           0 :         ndr->depth--;
     454             : }
     455             : 
     456           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfoFallBack(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfoFallBack *r)
     457             : {
     458           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     459           0 :         if (ndr_flags & NDR_SCALARS) {
     460           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     461             :                 {
     462           0 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     463           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     464           0 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->info));
     465           0 :                         ndr->flags = _flags_save_DATA_BLOB;
     466             :                 }
     467           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     468             :         }
     469           0 :         if (ndr_flags & NDR_BUFFERS) {
     470           0 :         }
     471           0 :         return NDR_ERR_SUCCESS;
     472             : }
     473             : 
     474           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfoFallBack(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfoFallBack *r)
     475             : {
     476           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     477           0 :         if (ndr_flags & NDR_SCALARS) {
     478           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     479             :                 {
     480           0 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     481           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     482           0 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->info));
     483           0 :                         ndr->flags = _flags_save_DATA_BLOB;
     484             :                 }
     485           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     486             :         }
     487           0 :         if (ndr_flags & NDR_BUFFERS) {
     488           0 :         }
     489           0 :         return NDR_ERR_SUCCESS;
     490             : }
     491             : 
     492           0 : static void ndr_print_flags_drsuapi_DsBindInfoFallBack(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsBindInfoFallBack *r)
     493             : {
     494           0 :         ndr_print_drsuapi_DsBindInfoFallBack(ndr, name, r);
     495           0 : }
     496             : 
     497           0 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfoFallBack(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfoFallBack *r)
     498             : {
     499           0 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfoFallBack");
     500           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     501           0 :         ndr->depth++;
     502             :         {
     503           0 :                 libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     504           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     505           0 :                 ndr_print_DATA_BLOB(ndr, "info", r->info);
     506           0 :                 ndr->flags = _flags_save_DATA_BLOB;
     507             :         }
     508           0 :         ndr->depth--;
     509             : }
     510             : 
     511        4135 : static enum ndr_err_code ndr_push_drsuapi_DsBindInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsBindInfoCtr *r)
     512             : {
     513             :         {
     514        4135 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     515        4135 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     516        4135 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     517        4135 :                 if (ndr_flags & NDR_SCALARS) {
     518        4135 :                         NDR_CHECK(ndr_push_align(ndr, 5));
     519        4135 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
     520        4135 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
     521        4135 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->length));
     522        4135 :                         NDR_CHECK(ndr_push_drsuapi_DsBindInfo(ndr, NDR_SCALARS, &r->info));
     523        4135 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     524             :                 }
     525        4135 :                 if (ndr_flags & NDR_BUFFERS) {
     526         109 :                 }
     527        4135 :                 ndr->flags = _flags_save_STRUCT;
     528             :         }
     529        4135 :         return NDR_ERR_SUCCESS;
     530             : }
     531             : 
     532        4009 : static enum ndr_err_code ndr_pull_drsuapi_DsBindInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsBindInfoCtr *r)
     533             : {
     534             :         {
     535        4009 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     536        4009 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     537        4009 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     538        4009 :                 if (ndr_flags & NDR_SCALARS) {
     539        4009 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
     540        4009 :                         NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
     541        4009 :                         if (r->length < 1 || r->length > 10000) {
     542           0 :                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->length), (uint32_t)(1), (uint32_t)(10000));
     543             :                         }
     544        4009 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_length));
     545        4009 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->length));
     546        4009 :                         NDR_CHECK(ndr_pull_drsuapi_DsBindInfo(ndr, NDR_SCALARS, &r->info));
     547        4009 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     548             :                 }
     549        4009 :                 if (ndr_flags & NDR_BUFFERS) {
     550          95 :                 }
     551        4009 :                 ndr->flags = _flags_save_STRUCT;
     552             :         }
     553        4009 :         return NDR_ERR_SUCCESS;
     554             : }
     555             : 
     556         256 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfoCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfoCtr *r)
     557             : {
     558         256 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfoCtr");
     559         256 :         if (r == NULL) { ndr_print_null(ndr); return; }
     560             :         {
     561         256 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
     562         256 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     563         256 :                 ndr->depth++;
     564         256 :                 ndr_print_uint3264(ndr, "length", r->length);
     565         256 :                 ndr_print_uint32(ndr, "__ndr_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->__ndr_length);
     566         256 :                 ndr_print_set_switch_value(ndr, &r->info, r->length);
     567         256 :                 ndr_print_drsuapi_DsBindInfo(ndr, "info", &r->info);
     568         256 :                 ndr->depth--;
     569         256 :                 ndr->flags = _flags_save_STRUCT;
     570             :         }
     571             : }
     572             : 
     573     1860001 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier *r)
     574             : {
     575     1860001 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     576     1860001 :         if (ndr_flags & NDR_SCALARS) {
     577     1860001 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->dn) + 1));
     578     1860001 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     579     1860001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags) - 4));
     580     1860001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
     581     1860001 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
     582     1860001 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
     583     1860001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
     584     1860001 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
     585     1860001 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     586             :         }
     587     1860001 :         if (ndr_flags & NDR_BUFFERS) {
     588     1860001 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
     589             :         }
     590     1859999 :         return NDR_ERR_SUCCESS;
     591             : }
     592             : 
     593      618316 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectIdentifier *r)
     594             : {
     595      618316 :         uint32_t size_dn_0 = 0;
     596      618316 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     597      618316 :         if (ndr_flags & NDR_SCALARS) {
     598      618316 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->dn));
     599      618316 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     600      618316 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
     601      618316 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
     602      618316 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
     603      618316 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
     604      618316 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
     605      618316 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->dn, &size_dn_0));
     606      618316 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
     607      618316 :                 if (r->dn) {
     608      618316 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->dn, r->__ndr_size_dn + 1));
     609             :                 }
     610      618316 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     611             :         }
     612      618316 :         if (ndr_flags & NDR_BUFFERS) {
     613      618316 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
     614             :         }
     615      618311 :         return NDR_ERR_SUCCESS;
     616             : }
     617             : 
     618           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectIdentifier *r)
     619             : {
     620           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, name, r);
     621           0 : }
     622             : 
     623       13968 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier *r)
     624             : {
     625       13968 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier");
     626       13968 :         if (r == NULL) { ndr_print_null(ndr); return; }
     627       13968 :         ndr->depth++;
     628       13968 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags) - 4:r->__ndr_size);
     629       13968 :         ndr_print_uint32(ndr, "__ndr_size_sid", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid28(&r->sid, ndr->flags):r->__ndr_size_sid);
     630       13968 :         ndr_print_GUID(ndr, "guid", &r->guid);
     631       13968 :         ndr_print_dom_sid28(ndr, "sid", &r->sid);
     632       13968 :         ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
     633       13968 :         ndr_print_string(ndr, "dn", r->dn);
     634       13968 :         ndr->depth--;
     635             : }
     636             : 
     637     1860001 : _PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier *r, libndr_flags flags)
     638             : {
     639     1860001 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier);
     640             : }
     641             : 
     642        8408 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaSyncRequest1 *r)
     643             : {
     644        8408 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     645        8408 :         if (ndr_flags & NDR_SCALARS) {
     646        4204 :                 if (r->naming_context == NULL) {
     647           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     648             :                 }
     649        4204 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     650        4204 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
     651        4204 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
     652        4204 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_dns));
     653        4204 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
     654        4204 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     655             :         }
     656        8408 :         if (ndr_flags & NDR_BUFFERS) {
     657        4204 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
     658        4204 :                 if (r->source_dsa_dns) {
     659           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_dns, CH_DOS)));
     660           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     661           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_dns, CH_DOS)));
     662           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_dns, ndr_charset_length(r->source_dsa_dns, CH_DOS), sizeof(uint8_t), CH_DOS));
     663             :                 }
     664             :         }
     665        8408 :         return NDR_ERR_SUCCESS;
     666             : }
     667             : 
     668        8408 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaSyncRequest1 *r)
     669             : {
     670           0 :         uint32_t _ptr_naming_context;
     671        8408 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
     672           0 :         uint32_t _ptr_source_dsa_dns;
     673        8408 :         uint32_t size_source_dsa_dns_1 = 0;
     674        8408 :         uint32_t length_source_dsa_dns_1 = 0;
     675        8408 :         TALLOC_CTX *_mem_save_source_dsa_dns_0 = NULL;
     676        8408 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     677        8408 :         if (ndr_flags & NDR_SCALARS) {
     678        4204 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     679        4204 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
     680        4204 :                 if (_ptr_naming_context) {
     681        4204 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
     682             :                 } else {
     683           0 :                         r->naming_context = NULL;
     684             :                 }
     685        4204 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
     686        4204 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_dns));
     687        4204 :                 if (_ptr_source_dsa_dns) {
     688           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_dns);
     689             :                 } else {
     690        4204 :                         r->source_dsa_dns = NULL;
     691             :                 }
     692        4204 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
     693        4204 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     694             :         }
     695        8408 :         if (ndr_flags & NDR_BUFFERS) {
     696        4204 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
     697        4204 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
     698        4204 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
     699        4204 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
     700        4204 :                 if (r->source_dsa_dns) {
     701           0 :                         _mem_save_source_dsa_dns_0 = NDR_PULL_GET_MEM_CTX(ndr);
     702           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_dns, 0);
     703           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_dns));
     704           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_dns));
     705           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_dns, &size_source_dsa_dns_1));
     706           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_dns, &length_source_dsa_dns_1));
     707           0 :                         if (length_source_dsa_dns_1 > size_source_dsa_dns_1) {
     708           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_dns_1, length_source_dsa_dns_1);
     709             :                         }
     710           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_dns_1, sizeof(uint8_t)));
     711           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_dns, length_source_dsa_dns_1, sizeof(uint8_t), CH_DOS));
     712           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_dns_0, 0);
     713             :                 }
     714             :         }
     715        8408 :         return NDR_ERR_SUCCESS;
     716             : }
     717             : 
     718           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaSyncRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaSyncRequest1 *r)
     719             : {
     720           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaSyncRequest1");
     721           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     722           0 :         ndr->depth++;
     723           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
     724           0 :         ndr->depth++;
     725           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
     726           0 :         ndr->depth--;
     727           0 :         ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
     728           0 :         ndr_print_ptr(ndr, "source_dsa_dns", r->source_dsa_dns);
     729           0 :         ndr->depth++;
     730           0 :         if (r->source_dsa_dns) {
     731           0 :                 ndr_print_string(ndr, "source_dsa_dns", r->source_dsa_dns);
     732             :         }
     733           0 :         ndr->depth--;
     734           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
     735           0 :         ndr->depth--;
     736             : }
     737             : 
     738        4204 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaSyncRequest *r)
     739             : {
     740           0 :         uint32_t level;
     741        4204 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     742        4204 :         if (ndr_flags & NDR_SCALARS) {
     743             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     744        4204 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     745        4204 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     746        4204 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
     747        4204 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     748        4204 :                 switch (level) {
     749        4204 :                         case 1: {
     750        4204 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr, NDR_SCALARS, &r->req1));
     751        4204 :                         break; }
     752             : 
     753           0 :                         default:
     754           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     755             :                 }
     756             :         }
     757        4204 :         if (ndr_flags & NDR_BUFFERS) {
     758        4204 :                 if (!(ndr_flags & NDR_SCALARS)) {
     759             :                         /* We didn't get it above, and the token is not needed after this. */
     760           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     761             :                 }
     762        4204 :                 switch (level) {
     763        4204 :                         case 1:
     764        4204 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr, NDR_BUFFERS, &r->req1));
     765        4204 :                         break;
     766             : 
     767           0 :                         default:
     768           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     769             :                 }
     770             :         }
     771        4204 :         return NDR_ERR_SUCCESS;
     772             : }
     773             : 
     774        4204 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaSyncRequest *r)
     775             : {
     776           0 :         uint32_t level;
     777           0 :         uint32_t _level;
     778        4204 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     779        4204 :         if (ndr_flags & NDR_SCALARS) {
     780             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     781        4204 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     782        4204 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     783        4204 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
     784        4204 :                 if (_level != level) {
     785           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
     786             :                 }
     787        4204 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     788        4204 :                 switch (level) {
     789        4204 :                         case 1: {
     790        4204 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr, NDR_SCALARS, &r->req1));
     791        4204 :                         break; }
     792             : 
     793           0 :                         default:
     794           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     795             :                 }
     796             :         }
     797        4204 :         if (ndr_flags & NDR_BUFFERS) {
     798        4204 :                 if (!(ndr_flags & NDR_SCALARS)) {
     799             :                         /* We didn't get it above, and the token is not needed after this. */
     800           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     801             :                 }
     802        4204 :                 switch (level) {
     803        4204 :                         case 1:
     804        4204 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr, NDR_BUFFERS, &r->req1));
     805        4204 :                         break;
     806             : 
     807           0 :                         default:
     808           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     809             :                 }
     810             :         }
     811        4204 :         return NDR_ERR_SUCCESS;
     812             : }
     813             : 
     814           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaSyncRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaSyncRequest *r)
     815             : {
     816           0 :         uint32_t level;
     817           0 :         level = ndr_print_steal_switch_value(ndr, r);
     818           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaSyncRequest");
     819           0 :         switch (level) {
     820           0 :                 case 1:
     821           0 :                         ndr_print_drsuapi_DsReplicaSyncRequest1(ndr, "req1", &r->req1);
     822           0 :                 break;
     823             : 
     824           0 :                 default:
     825           0 :                         ndr_print_bad_level(ndr, name, level);
     826             :         }
     827           0 : }
     828             : 
     829      104038 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaHighWaterMark(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaHighWaterMark *r)
     830             : {
     831      104038 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     832      104038 :         if (ndr_flags & NDR_SCALARS) {
     833      104038 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     834      104038 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->tmp_highest_usn));
     835      104038 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->reserved_usn));
     836      104038 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
     837      104038 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     838             :         }
     839      104038 :         if (ndr_flags & NDR_BUFFERS) {
     840         100 :         }
     841      104038 :         return NDR_ERR_SUCCESS;
     842             : }
     843             : 
     844       95761 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaHighWaterMark(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaHighWaterMark *r)
     845             : {
     846       95761 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     847       95761 :         if (ndr_flags & NDR_SCALARS) {
     848       95761 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     849       95761 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->tmp_highest_usn));
     850       95761 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->reserved_usn));
     851       95761 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
     852       95761 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     853             :         }
     854       95761 :         if (ndr_flags & NDR_BUFFERS) {
     855          27 :         }
     856       95761 :         return NDR_ERR_SUCCESS;
     857             : }
     858             : 
     859           0 : static void ndr_print_flags_drsuapi_DsReplicaHighWaterMark(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaHighWaterMark *r)
     860             : {
     861           0 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, name, r);
     862           0 : }
     863             : 
     864          82 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaHighWaterMark(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaHighWaterMark *r)
     865             : {
     866          82 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaHighWaterMark");
     867          82 :         if (r == NULL) { ndr_print_null(ndr); return; }
     868          82 :         ndr->depth++;
     869          82 :         ndr_print_hyper(ndr, "tmp_highest_usn", r->tmp_highest_usn);
     870          82 :         ndr_print_hyper(ndr, "reserved_usn", r->reserved_usn);
     871          82 :         ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
     872          82 :         ndr->depth--;
     873             : }
     874             : 
     875       12782 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor *r)
     876             : {
     877       12782 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     878       12782 :         if (ndr_flags & NDR_SCALARS) {
     879       12782 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     880       12782 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
     881       12782 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
     882       12782 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     883             :         }
     884       12782 :         if (ndr_flags & NDR_BUFFERS) {
     885           0 :         }
     886       12782 :         return NDR_ERR_SUCCESS;
     887             : }
     888             : 
     889       10848 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor *r)
     890             : {
     891       10848 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     892       10848 :         if (ndr_flags & NDR_SCALARS) {
     893       10848 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     894       10848 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
     895       10848 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
     896       10848 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     897             :         }
     898       10848 :         if (ndr_flags & NDR_BUFFERS) {
     899           0 :         }
     900       10848 :         return NDR_ERR_SUCCESS;
     901             : }
     902             : 
     903           0 : static void ndr_print_flags_drsuapi_DsReplicaCursor(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaCursor *r)
     904             : {
     905           0 :         ndr_print_drsuapi_DsReplicaCursor(ndr, name, r);
     906           0 : }
     907             : 
     908           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor *r)
     909             : {
     910           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor");
     911           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     912           0 :         ndr->depth++;
     913           0 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
     914           0 :         ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
     915           0 :         ndr->depth--;
     916             : }
     917             : 
     918        4228 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursorCtrEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursorCtrEx *r)
     919             : {
     920           0 :         uint32_t cntr_cursors_0;
     921        4228 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     922        4228 :         if (ndr_flags & NDR_SCALARS) {
     923        4228 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
     924        4228 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     925        4228 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
     926        4228 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
     927        4228 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
     928        4228 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
     929       14934 :                 for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
     930       10706 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
     931             :                 }
     932        4228 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     933             :         }
     934        4228 :         if (ndr_flags & NDR_BUFFERS) {
     935           0 :         }
     936        4228 :         return NDR_ERR_SUCCESS;
     937             : }
     938             : 
     939        4228 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursorCtrEx *r)
     940             : {
     941        4228 :         uint32_t size_cursors_0 = 0;
     942           0 :         uint32_t cntr_cursors_0;
     943        4228 :         TALLOC_CTX *_mem_save_cursors_0 = NULL;
     944        4228 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     945        4228 :         if (ndr_flags & NDR_SCALARS) {
     946        4228 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->cursors));
     947        4228 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     948        4228 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
     949        4228 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
     950        4228 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
     951        4228 :                 if (r->count > 1048576) {
     952           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(1048576));
     953             :                 }
     954        4228 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
     955        4228 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cursors, &size_cursors_0));
     956        4228 :                 NDR_PULL_ALLOC_N(ndr, r->cursors, size_cursors_0);
     957        4228 :                 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
     958        4228 :                 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
     959       14934 :                 for (cntr_cursors_0 = 0; cntr_cursors_0 < (size_cursors_0); cntr_cursors_0++) {
     960       10706 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
     961             :                 }
     962        4228 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
     963        4228 :                 if (r->cursors) {
     964        4228 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cursors, r->count));
     965             :                 }
     966        4228 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     967             :         }
     968        4228 :         if (ndr_flags & NDR_BUFFERS) {
     969           0 :         }
     970        4228 :         return NDR_ERR_SUCCESS;
     971             : }
     972             : 
     973           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursorCtrEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursorCtrEx *r)
     974             : {
     975           0 :         uint32_t cntr_cursors_0;
     976           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursorCtrEx");
     977           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     978           0 :         ndr->depth++;
     979           0 :         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version);
     980           0 :         ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
     981           0 :         ndr_print_uint32(ndr, "count", r->count);
     982           0 :         ndr_print_uint32(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
     983           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "cursors", (uint32_t)(r->count));
     984           0 :         ndr->depth++;
     985           0 :         for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
     986           0 :                 ndr_print_drsuapi_DsReplicaCursor(ndr, "cursors", &r->cursors[cntr_cursors_0]);
     987             :         }
     988           0 :         ndr->depth--;
     989           0 :         ndr->depth--;
     990             : }
     991             : 
     992       10059 : static enum ndr_err_code ndr_push_drsuapi_DsExtendedOperation(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsExtendedOperation r)
     993             : {
     994             :         {
     995       10059 :                 libndr_flags _flags_save_ENUM = ndr->flags;
     996       10059 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     997       10059 :                 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     998       10059 :                 ndr->flags = _flags_save_ENUM;
     999             :         }
    1000       10059 :         return NDR_ERR_SUCCESS;
    1001             : }
    1002             : 
    1003       10091 : static enum ndr_err_code ndr_pull_drsuapi_DsExtendedOperation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsExtendedOperation *r)
    1004             : {
    1005           0 :         uint32_t v;
    1006             :         {
    1007       10091 :                 libndr_flags _flags_save_ENUM = ndr->flags;
    1008       10091 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1009       10091 :                 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1010       10091 :                 *r = v;
    1011       10091 :                 ndr->flags = _flags_save_ENUM;
    1012             :         }
    1013       10091 :         return NDR_ERR_SUCCESS;
    1014             : }
    1015             : 
    1016           0 : _PUBLIC_ void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedOperation r)
    1017             : {
    1018           0 :         const char *val = NULL;
    1019             : 
    1020             :         {
    1021           0 :                 libndr_flags _flags_save_ENUM = ndr->flags;
    1022           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1023           0 :                 switch (r) {
    1024           0 :                         case DRSUAPI_EXOP_NONE: val = "DRSUAPI_EXOP_NONE"; break;
    1025           0 :                         case DRSUAPI_EXOP_FSMO_REQ_ROLE: val = "DRSUAPI_EXOP_FSMO_REQ_ROLE"; break;
    1026           0 :                         case DRSUAPI_EXOP_FSMO_RID_ALLOC: val = "DRSUAPI_EXOP_FSMO_RID_ALLOC"; break;
    1027           0 :                         case DRSUAPI_EXOP_FSMO_RID_REQ_ROLE: val = "DRSUAPI_EXOP_FSMO_RID_REQ_ROLE"; break;
    1028           0 :                         case DRSUAPI_EXOP_FSMO_REQ_PDC: val = "DRSUAPI_EXOP_FSMO_REQ_PDC"; break;
    1029           0 :                         case DRSUAPI_EXOP_FSMO_ABANDON_ROLE: val = "DRSUAPI_EXOP_FSMO_ABANDON_ROLE"; break;
    1030           0 :                         case DRSUAPI_EXOP_REPL_OBJ: val = "DRSUAPI_EXOP_REPL_OBJ"; break;
    1031           0 :                         case DRSUAPI_EXOP_REPL_SECRET: val = "DRSUAPI_EXOP_REPL_SECRET"; break;
    1032             :                 }
    1033           0 :                 ndr_print_enum(ndr, name, "ENUM", val, r);
    1034           0 :                 ndr->flags = _flags_save_ENUM;
    1035             :         }
    1036           0 : }
    1037             : 
    1038       20222 : static enum ndr_err_code ndr_push_drsuapi_DsExtendedError(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsExtendedError r)
    1039             : {
    1040             :         {
    1041       20222 :                 libndr_flags _flags_save_ENUM = ndr->flags;
    1042       20222 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1043       20222 :                 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1044       20222 :                 ndr->flags = _flags_save_ENUM;
    1045             :         }
    1046       20222 :         return NDR_ERR_SUCCESS;
    1047             : }
    1048             : 
    1049       10060 : static enum ndr_err_code ndr_pull_drsuapi_DsExtendedError(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsExtendedError *r)
    1050             : {
    1051           1 :         uint32_t v;
    1052             :         {
    1053       10060 :                 libndr_flags _flags_save_ENUM = ndr->flags;
    1054       10060 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1055       10060 :                 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1056       10060 :                 *r = v;
    1057       10060 :                 ndr->flags = _flags_save_ENUM;
    1058             :         }
    1059       10060 :         return NDR_ERR_SUCCESS;
    1060             : }
    1061             : 
    1062          41 : _PUBLIC_ void ndr_print_drsuapi_DsExtendedError(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedError r)
    1063             : {
    1064          41 :         const char *val = NULL;
    1065             : 
    1066             :         {
    1067          41 :                 libndr_flags _flags_save_ENUM = ndr->flags;
    1068          41 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1069          41 :                 switch (r) {
    1070          40 :                         case DRSUAPI_EXOP_ERR_NONE: val = "DRSUAPI_EXOP_ERR_NONE"; break;
    1071           0 :                         case DRSUAPI_EXOP_ERR_SUCCESS: val = "DRSUAPI_EXOP_ERR_SUCCESS"; break;
    1072           0 :                         case DRSUAPI_EXOP_ERR_UNKNOWN_OP: val = "DRSUAPI_EXOP_ERR_UNKNOWN_OP"; break;
    1073           0 :                         case DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER: val = "DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER"; break;
    1074           0 :                         case DRSUAPI_EXOP_ERR_UPDATE_ERR: val = "DRSUAPI_EXOP_ERR_UPDATE_ERR"; break;
    1075           0 :                         case DRSUAPI_EXOP_ERR_EXCEPTION: val = "DRSUAPI_EXOP_ERR_EXCEPTION"; break;
    1076           0 :                         case DRSUAPI_EXOP_ERR_UNKNOWN_CALLER: val = "DRSUAPI_EXOP_ERR_UNKNOWN_CALLER"; break;
    1077           0 :                         case DRSUAPI_EXOP_ERR_RID_ALLOC: val = "DRSUAPI_EXOP_ERR_RID_ALLOC"; break;
    1078           0 :                         case DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED: val = "DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED"; break;
    1079           0 :                         case DRSUAPI_EXOP_ERR_FMSO_PENDING_OP: val = "DRSUAPI_EXOP_ERR_FMSO_PENDING_OP"; break;
    1080           0 :                         case DRSUAPI_EXOP_ERR_MISMATCH: val = "DRSUAPI_EXOP_ERR_MISMATCH"; break;
    1081           0 :                         case DRSUAPI_EXOP_ERR_COULDNT_CONTACT: val = "DRSUAPI_EXOP_ERR_COULDNT_CONTACT"; break;
    1082           0 :                         case DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES: val = "DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES"; break;
    1083           0 :                         case DRSUAPI_EXOP_ERR_DIR_ERROR: val = "DRSUAPI_EXOP_ERR_DIR_ERROR"; break;
    1084           0 :                         case DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS: val = "DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS"; break;
    1085           0 :                         case DRSUAPI_EXOP_ERR_ACCESS_DENIED: val = "DRSUAPI_EXOP_ERR_ACCESS_DENIED"; break;
    1086           0 :                         case DRSUAPI_EXOP_ERR_PARAM_ERROR: val = "DRSUAPI_EXOP_ERR_PARAM_ERROR"; break;
    1087             :                 }
    1088          41 :                 ndr_print_enum(ndr, name, "ENUM", val, r);
    1089          41 :                 ndr->flags = _flags_save_ENUM;
    1090             :         }
    1091          41 : }
    1092             : 
    1093           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest5(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesRequest5 *r)
    1094             : {
    1095           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1096           0 :         if (ndr_flags & NDR_SCALARS) {
    1097           0 :                 if (r->naming_context == NULL) {
    1098           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1099             :                 }
    1100           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    1101           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1102           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1103           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    1104           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1105           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    1106           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
    1107           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count));
    1108           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size));
    1109           0 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op));
    1110           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info));
    1111           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    1112             :         }
    1113           0 :         if (ndr_flags & NDR_BUFFERS) {
    1114           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1115           0 :                 if (r->uptodateness_vector) {
    1116           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1117             :                 }
    1118             :         }
    1119           0 :         return NDR_ERR_SUCCESS;
    1120             : }
    1121             : 
    1122           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest5(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesRequest5 *r)
    1123             : {
    1124           0 :         uint32_t _ptr_naming_context;
    1125           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    1126           0 :         uint32_t _ptr_uptodateness_vector;
    1127           0 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    1128           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1129           0 :         if (ndr_flags & NDR_SCALARS) {
    1130           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    1131           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1132           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1133           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    1134           0 :                 if (_ptr_naming_context) {
    1135           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    1136             :                 } else {
    1137           0 :                         r->naming_context = NULL;
    1138             :                 }
    1139           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1140           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    1141           0 :                 if (_ptr_uptodateness_vector) {
    1142           0 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    1143             :                 } else {
    1144           0 :                         r->uptodateness_vector = NULL;
    1145             :                 }
    1146           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
    1147           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count));
    1148           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size));
    1149           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op));
    1150           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info));
    1151           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    1152             :         }
    1153           0 :         if (ndr_flags & NDR_BUFFERS) {
    1154           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1155           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    1156           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1157           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    1158           0 :                 if (r->uptodateness_vector) {
    1159           0 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1160           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    1161           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1162           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    1163             :                 }
    1164             :         }
    1165           0 :         return NDR_ERR_SUCCESS;
    1166             : }
    1167             : 
    1168           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest5 *r)
    1169             : {
    1170           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesRequest5");
    1171           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1172           0 :         ndr->depth++;
    1173           0 :         ndr_print_GUID(ndr, "destination_dsa_guid", &r->destination_dsa_guid);
    1174           0 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    1175           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    1176           0 :         ndr->depth++;
    1177           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    1178           0 :         ndr->depth--;
    1179           0 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
    1180           0 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    1181           0 :         ndr->depth++;
    1182           0 :         if (r->uptodateness_vector) {
    1183           0 :                 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    1184             :         }
    1185           0 :         ndr->depth--;
    1186           0 :         ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
    1187           0 :         ndr_print_uint32(ndr, "max_object_count", r->max_object_count);
    1188           0 :         ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size);
    1189           0 :         ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op);
    1190           0 :         ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info);
    1191           0 :         ndr->depth--;
    1192             : }
    1193             : 
    1194     3366374 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOID *r)
    1195             : {
    1196     3366374 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1197     3366374 :         if (ndr_flags & NDR_SCALARS) {
    1198     1683187 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1199     1683187 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
    1200     1683187 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary_oid));
    1201     1683187 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1202             :         }
    1203     3366374 :         if (ndr_flags & NDR_BUFFERS) {
    1204     1683187 :                 if (r->binary_oid) {
    1205     1683187 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    1206     1683187 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length));
    1207             :                 }
    1208             :         }
    1209     3362218 :         return NDR_ERR_SUCCESS;
    1210             : }
    1211             : 
    1212     5239284 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOID *r)
    1213             : {
    1214       29228 :         uint32_t _ptr_binary_oid;
    1215     5239284 :         uint32_t size_binary_oid_1 = 0;
    1216     5239284 :         TALLOC_CTX *_mem_save_binary_oid_0 = NULL;
    1217     5239284 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1218     5239284 :         if (ndr_flags & NDR_SCALARS) {
    1219     2619642 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1220     2619642 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
    1221     2619642 :                 if (r->length > 10000) {
    1222           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->length), (uint32_t)(0), (uint32_t)(10000));
    1223             :                 }
    1224     2619642 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_oid));
    1225     2619642 :                 if (_ptr_binary_oid) {
    1226     2619642 :                         NDR_PULL_ALLOC(ndr, r->binary_oid);
    1227             :                 } else {
    1228           0 :                         r->binary_oid = NULL;
    1229             :                 }
    1230     2619642 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1231             :         }
    1232     5239284 :         if (ndr_flags & NDR_BUFFERS) {
    1233     2619642 :                 if (r->binary_oid) {
    1234     2619642 :                         _mem_save_binary_oid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1235     2619642 :                         NDR_PULL_SET_MEM_CTX(ndr, r->binary_oid, 0);
    1236     2619642 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->binary_oid));
    1237     2619642 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->binary_oid, &size_binary_oid_1));
    1238     2619642 :                         NDR_PULL_ALLOC_N(ndr, r->binary_oid, size_binary_oid_1);
    1239     2619642 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->binary_oid, size_binary_oid_1));
    1240     2619642 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_oid_0, 0);
    1241             :                 }
    1242     2619642 :                 if (r->binary_oid) {
    1243     2619642 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->binary_oid, r->length));
    1244             :                 }
    1245             :         }
    1246     5210056 :         return NDR_ERR_SUCCESS;
    1247             : }
    1248             : 
    1249     3366374 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOIDMapping *r)
    1250             : {
    1251     3364296 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1252     3364296 :         if (ndr_flags & NDR_SCALARS) {
    1253     1683187 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1254     1683187 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->id_prefix));
    1255     1683187 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr, NDR_SCALARS, &r->oid));
    1256     1683187 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1257             :         }
    1258     3364296 :         if (ndr_flags & NDR_BUFFERS) {
    1259     1683187 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr, NDR_BUFFERS, &r->oid));
    1260             :         }
    1261     3362218 :         return NDR_ERR_SUCCESS;
    1262             : }
    1263             : 
    1264     5239284 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOIDMapping *r)
    1265             : {
    1266     5239284 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1267     5239284 :         if (ndr_flags & NDR_SCALARS) {
    1268     2619642 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1269     2619642 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->id_prefix));
    1270     2619642 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr, NDR_SCALARS, &r->oid));
    1271     2619642 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1272             :         }
    1273     5239284 :         if (ndr_flags & NDR_BUFFERS) {
    1274     2619642 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr, NDR_BUFFERS, &r->oid));
    1275             :         }
    1276     5210056 :         return NDR_ERR_SUCCESS;
    1277             : }
    1278             : 
    1279        1740 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOIDMapping(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping *r)
    1280             : {
    1281        1740 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaOIDMapping");
    1282        1740 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1283        1740 :         ndr->depth++;
    1284        1740 :         ndr_print_uint32(ndr, "id_prefix", r->id_prefix);
    1285        1740 :         ndr_print_drsuapi_DsReplicaOID(ndr, "oid", &r->oid);
    1286        1740 :         ndr->depth--;
    1287             : }
    1288             : 
    1289       63264 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
    1290             : {
    1291         114 :         uint32_t cntr_mappings_1;
    1292       63264 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1293       63264 :         if (ndr_flags & NDR_SCALARS) {
    1294       31632 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1295       31632 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_mappings));
    1296       31632 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->mappings));
    1297       31632 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1298             :         }
    1299       63264 :         if (ndr_flags & NDR_BUFFERS) {
    1300       31632 :                 if (r->mappings) {
    1301       19676 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_mappings));
    1302     1702863 :                         for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
    1303     1683187 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr, NDR_SCALARS, &r->mappings[cntr_mappings_1]));
    1304             :                         }
    1305     1702863 :                         for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
    1306     1685265 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr, NDR_BUFFERS, &r->mappings[cntr_mappings_1]));
    1307             :                         }
    1308             :                 }
    1309             :         }
    1310       63150 :         return NDR_ERR_SUCCESS;
    1311             : }
    1312             : 
    1313       98124 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOIDMapping_Ctr *r)
    1314             : {
    1315         738 :         uint32_t _ptr_mappings;
    1316       98124 :         uint32_t size_mappings_1 = 0;
    1317         738 :         uint32_t cntr_mappings_1;
    1318       98124 :         TALLOC_CTX *_mem_save_mappings_0 = NULL;
    1319       98124 :         TALLOC_CTX *_mem_save_mappings_1 = NULL;
    1320       98124 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1321       98124 :         if (ndr_flags & NDR_SCALARS) {
    1322       49062 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1323       49062 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_mappings));
    1324       49062 :                 if (r->num_mappings > 1048576) {
    1325           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_mappings), (uint32_t)(0), (uint32_t)(1048576));
    1326             :                 }
    1327       49062 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mappings));
    1328       49062 :                 if (_ptr_mappings) {
    1329       39226 :                         NDR_PULL_ALLOC(ndr, r->mappings);
    1330             :                 } else {
    1331        9836 :                         r->mappings = NULL;
    1332             :                 }
    1333       49062 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1334             :         }
    1335       98124 :         if (ndr_flags & NDR_BUFFERS) {
    1336       49062 :                 if (r->mappings) {
    1337       39226 :                         _mem_save_mappings_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1338       39226 :                         NDR_PULL_SET_MEM_CTX(ndr, r->mappings, 0);
    1339       39226 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->mappings));
    1340       39226 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->mappings, &size_mappings_1));
    1341       39226 :                         NDR_PULL_ALLOC_N(ndr, r->mappings, size_mappings_1);
    1342       39226 :                         _mem_save_mappings_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1343       39226 :                         NDR_PULL_SET_MEM_CTX(ndr, r->mappings, 0);
    1344     2658868 :                         for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
    1345     2619642 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr, NDR_SCALARS, &r->mappings[cntr_mappings_1]));
    1346             :                         }
    1347     2658868 :                         for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
    1348     2619642 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr, NDR_BUFFERS, &r->mappings[cntr_mappings_1]));
    1349             :                         }
    1350       39226 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mappings_1, 0);
    1351       39226 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mappings_0, 0);
    1352             :                 }
    1353       49062 :                 if (r->mappings) {
    1354       39226 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->mappings, r->num_mappings));
    1355             :                 }
    1356     2668704 :                 for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
    1357       14614 :                 }
    1358             :         }
    1359       97386 :         return NDR_ERR_SUCCESS;
    1360             : }
    1361             : 
    1362           0 : static void ndr_print_flags_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
    1363             : {
    1364           0 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, name, r);
    1365           0 : }
    1366             : 
    1367          41 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
    1368             : {
    1369           1 :         uint32_t cntr_mappings_1;
    1370          41 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaOIDMapping_Ctr");
    1371          41 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1372          41 :         ndr->depth++;
    1373          41 :         ndr_print_uint32(ndr, "num_mappings", r->num_mappings);
    1374          41 :         ndr_print_ptr(ndr, "mappings", r->mappings);
    1375          41 :         ndr->depth++;
    1376          41 :         if (r->mappings) {
    1377          40 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "mappings", (uint32_t)(r->num_mappings));
    1378          40 :                 ndr->depth++;
    1379        1780 :                 for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
    1380        1740 :                         ndr_print_drsuapi_DsReplicaOIDMapping(ndr, "mappings", &r->mappings[cntr_mappings_1]);
    1381             :                 }
    1382          40 :                 ndr->depth--;
    1383             :         }
    1384          41 :         ndr->depth--;
    1385          41 :         ndr->depth--;
    1386             : }
    1387             : 
    1388    39916055 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsAttributeId(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAttributeId r)
    1389             : {
    1390             :         {
    1391    39916055 :                 libndr_flags _flags_save_ENUM = ndr->flags;
    1392    39916055 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1393    39916055 :                 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1394    39916055 :                 ndr->flags = _flags_save_ENUM;
    1395             :         }
    1396    39916055 :         return NDR_ERR_SUCCESS;
    1397             : }
    1398             : 
    1399    74868041 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsAttributeId(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAttributeId *r)
    1400             : {
    1401     3324177 :         uint32_t v;
    1402             :         {
    1403    74868041 :                 libndr_flags _flags_save_ENUM = ndr->flags;
    1404    74868041 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1405    74868041 :                 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1406    74868041 :                 *r = v;
    1407    74868041 :                 ndr->flags = _flags_save_ENUM;
    1408             :         }
    1409    74868041 :         return NDR_ERR_SUCCESS;
    1410             : }
    1411             : 
    1412      213261 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeId(struct ndr_print *ndr, const char *name, enum drsuapi_DsAttributeId r)
    1413             : {
    1414      213261 :         const char *val = NULL;
    1415             : 
    1416             :         {
    1417      213261 :                 libndr_flags _flags_save_ENUM = ndr->flags;
    1418      213261 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1419      213261 :                 switch (r) {
    1420       14048 :                         case DRSUAPI_ATTID_objectClass: val = "DRSUAPI_ATTID_objectClass"; break;
    1421         305 :                         case DRSUAPI_ATTID_cn: val = "DRSUAPI_ATTID_cn"; break;
    1422           0 :                         case DRSUAPI_ATTID_ou: val = "DRSUAPI_ATTID_ou"; break;
    1423         412 :                         case DRSUAPI_ATTID_description: val = "DRSUAPI_ATTID_description"; break;
    1424         104 :                         case DRSUAPI_ATTID_member: val = "DRSUAPI_ATTID_member"; break;
    1425           0 :                         case DRSUAPI_ATTID_distinguishedName: val = "DRSUAPI_ATTID_distinguishedName"; break;
    1426       14042 :                         case DRSUAPI_ATTID_instanceType: val = "DRSUAPI_ATTID_instanceType"; break;
    1427       14042 :                         case DRSUAPI_ATTID_whenCreated: val = "DRSUAPI_ATTID_whenCreated"; break;
    1428         132 :                         case DRSUAPI_ATTID_possSuperiors: val = "DRSUAPI_ATTID_possSuperiors"; break;
    1429         414 :                         case DRSUAPI_ATTID_displayName: val = "DRSUAPI_ATTID_displayName"; break;
    1430          16 :                         case DRSUAPI_ATTID_hasMasterNCs: val = "DRSUAPI_ATTID_hasMasterNCs"; break;
    1431          20 :                         case DRSUAPI_ATTID_nCName: val = "DRSUAPI_ATTID_nCName"; break;
    1432         936 :                         case DRSUAPI_ATTID_subClassOf: val = "DRSUAPI_ATTID_subClassOf"; break;
    1433         936 :                         case DRSUAPI_ATTID_governsID: val = "DRSUAPI_ATTID_governsID"; break;
    1434          68 :                         case DRSUAPI_ATTID_mustContain: val = "DRSUAPI_ATTID_mustContain"; break;
    1435         208 :                         case DRSUAPI_ATTID_mayContain: val = "DRSUAPI_ATTID_mayContain"; break;
    1436         936 :                         case DRSUAPI_ATTID_rDNAttId: val = "DRSUAPI_ATTID_rDNAttId"; break;
    1437        5268 :                         case DRSUAPI_ATTID_attributeID: val = "DRSUAPI_ATTID_attributeID"; break;
    1438        5268 :                         case DRSUAPI_ATTID_attributeSyntax: val = "DRSUAPI_ATTID_attributeSyntax"; break;
    1439        5268 :                         case DRSUAPI_ATTID_isSingleValued: val = "DRSUAPI_ATTID_isSingleValued"; break;
    1440        1120 :                         case DRSUAPI_ATTID_rangeLower: val = "DRSUAPI_ATTID_rangeLower"; break;
    1441        1436 :                         case DRSUAPI_ATTID_rangeUpper: val = "DRSUAPI_ATTID_rangeUpper"; break;
    1442           8 :                         case DRSUAPI_ATTID_dMDLocation: val = "DRSUAPI_ATTID_dMDLocation"; break;
    1443         390 :                         case DRSUAPI_ATTID_isDeleted: val = "DRSUAPI_ATTID_isDeleted"; break;
    1444          12 :                         case DRSUAPI_ATTID_objectVersion: val = "DRSUAPI_ATTID_objectVersion"; break;
    1445           8 :                         case DRSUAPI_ATTID_invocationId: val = "DRSUAPI_ATTID_invocationId"; break;
    1446       13416 :                         case DRSUAPI_ATTID_showInAdvancedViewOnly: val = "DRSUAPI_ATTID_showInAdvancedViewOnly"; break;
    1447        6192 :                         case DRSUAPI_ATTID_adminDisplayName: val = "DRSUAPI_ATTID_adminDisplayName"; break;
    1448        6192 :                         case DRSUAPI_ATTID_adminDescription: val = "DRSUAPI_ATTID_adminDescription"; break;
    1449        5268 :                         case DRSUAPI_ATTID_oMSyntax: val = "DRSUAPI_ATTID_oMSyntax"; break;
    1450       14046 :                         case DRSUAPI_ATTID_ntSecurityDescriptor: val = "DRSUAPI_ATTID_ntSecurityDescriptor"; break;
    1451        5256 :                         case DRSUAPI_ATTID_searchFlags: val = "DRSUAPI_ATTID_searchFlags"; break;
    1452          16 :                         case DRSUAPI_ATTID_auxiliaryClass: val = "DRSUAPI_ATTID_auxiliaryClass"; break;
    1453        6204 :                         case DRSUAPI_ATTID_lDAPDisplayName: val = "DRSUAPI_ATTID_lDAPDisplayName"; break;
    1454       14042 :                         case DRSUAPI_ATTID_name: val = "DRSUAPI_ATTID_name"; break;
    1455           0 :                         case DRSUAPI_ATTID_objectGUID: val = "DRSUAPI_ATTID_objectGUID"; break;
    1456           2 :                         case DRSUAPI_ATTID_replPropertyMetaData: val = "DRSUAPI_ATTID_replPropertyMetaData"; break;
    1457         454 :                         case DRSUAPI_ATTID_userAccountControl: val = "DRSUAPI_ATTID_userAccountControl"; break;
    1458           0 :                         case DRSUAPI_ATTID_badPwdCount: val = "DRSUAPI_ATTID_badPwdCount"; break;
    1459         454 :                         case DRSUAPI_ATTID_codePage: val = "DRSUAPI_ATTID_codePage"; break;
    1460         454 :                         case DRSUAPI_ATTID_countryCode: val = "DRSUAPI_ATTID_countryCode"; break;
    1461           0 :                         case DRSUAPI_ATTID_currentValue: val = "DRSUAPI_ATTID_currentValue"; break;
    1462           0 :                         case DRSUAPI_ATTID_homeDirectory: val = "DRSUAPI_ATTID_homeDirectory"; break;
    1463           0 :                         case DRSUAPI_ATTID_homeDrive: val = "DRSUAPI_ATTID_homeDrive"; break;
    1464           0 :                         case DRSUAPI_ATTID_lastLogoff: val = "DRSUAPI_ATTID_lastLogoff"; break;
    1465           0 :                         case DRSUAPI_ATTID_lastLogon: val = "DRSUAPI_ATTID_lastLogon"; break;
    1466         454 :                         case DRSUAPI_ATTID_dBCSPwd: val = "DRSUAPI_ATTID_dBCSPwd"; break;
    1467           0 :                         case DRSUAPI_ATTID_scriptPath: val = "DRSUAPI_ATTID_scriptPath"; break;
    1468         454 :                         case DRSUAPI_ATTID_logonHours: val = "DRSUAPI_ATTID_logonHours"; break;
    1469           0 :                         case DRSUAPI_ATTID_userWorkstations: val = "DRSUAPI_ATTID_userWorkstations"; break;
    1470         454 :                         case DRSUAPI_ATTID_unicodePwd: val = "DRSUAPI_ATTID_unicodePwd"; break;
    1471         454 :                         case DRSUAPI_ATTID_ntPwdHistory: val = "DRSUAPI_ATTID_ntPwdHistory"; break;
    1472         454 :                         case DRSUAPI_ATTID_pwdLastSet: val = "DRSUAPI_ATTID_pwdLastSet"; break;
    1473         454 :                         case DRSUAPI_ATTID_primaryGroupID: val = "DRSUAPI_ATTID_primaryGroupID"; break;
    1474           0 :                         case DRSUAPI_ATTID_priorValue: val = "DRSUAPI_ATTID_priorValue"; break;
    1475         302 :                         case DRSUAPI_ATTID_supplementalCredentials: val = "DRSUAPI_ATTID_supplementalCredentials"; break;
    1476           0 :                         case DRSUAPI_ATTID_trustAuthIncoming: val = "DRSUAPI_ATTID_trustAuthIncoming"; break;
    1477           0 :                         case DRSUAPI_ATTID_trustDirection: val = "DRSUAPI_ATTID_trustDirection"; break;
    1478           0 :                         case DRSUAPI_ATTID_trustPartner: val = "DRSUAPI_ATTID_trustPartner"; break;
    1479           0 :                         case DRSUAPI_ATTID_trustPosixOffset: val = "DRSUAPI_ATTID_trustPosixOffset"; break;
    1480           0 :                         case DRSUAPI_ATTID_trustAuthOutgoing: val = "DRSUAPI_ATTID_trustAuthOutgoing"; break;
    1481           0 :                         case DRSUAPI_ATTID_trustType: val = "DRSUAPI_ATTID_trustType"; break;
    1482           0 :                         case DRSUAPI_ATTID_userParameters: val = "DRSUAPI_ATTID_userParameters"; break;
    1483           0 :                         case DRSUAPI_ATTID_profilePath: val = "DRSUAPI_ATTID_profilePath"; break;
    1484         105 :                         case DRSUAPI_ATTID_operatorCount: val = "DRSUAPI_ATTID_operatorCount"; break;
    1485         738 :                         case DRSUAPI_ATTID_objectSid: val = "DRSUAPI_ATTID_objectSid"; break;
    1486        6204 :                         case DRSUAPI_ATTID_schemaIDGUID: val = "DRSUAPI_ATTID_schemaIDGUID"; break;
    1487         157 :                         case DRSUAPI_ATTID_adminCount: val = "DRSUAPI_ATTID_adminCount"; break;
    1488         112 :                         case DRSUAPI_ATTID_comment: val = "DRSUAPI_ATTID_comment"; break;
    1489         454 :                         case DRSUAPI_ATTID_accountExpires: val = "DRSUAPI_ATTID_accountExpires"; break;
    1490         454 :                         case DRSUAPI_ATTID_lmPwdHistory: val = "DRSUAPI_ATTID_lmPwdHistory"; break;
    1491           0 :                         case DRSUAPI_ATTID_logonCount: val = "DRSUAPI_ATTID_logonCount"; break;
    1492         736 :                         case DRSUAPI_ATTID_systemPossSuperiors: val = "DRSUAPI_ATTID_systemPossSuperiors"; break;
    1493         608 :                         case DRSUAPI_ATTID_systemMayContain: val = "DRSUAPI_ATTID_systemMayContain"; break;
    1494         328 :                         case DRSUAPI_ATTID_systemMustContain: val = "DRSUAPI_ATTID_systemMustContain"; break;
    1495          28 :                         case DRSUAPI_ATTID_systemAuxiliaryClass: val = "DRSUAPI_ATTID_systemAuxiliaryClass"; break;
    1496         610 :                         case DRSUAPI_ATTID_sAMAccountName: val = "DRSUAPI_ATTID_sAMAccountName"; break;
    1497         610 :                         case DRSUAPI_ATTID_sAMAccountType: val = "DRSUAPI_ATTID_sAMAccountType"; break;
    1498          12 :                         case DRSUAPI_ATTID_options: val = "DRSUAPI_ATTID_options"; break;
    1499          20 :                         case DRSUAPI_ATTID_fSMORoleOwner: val = "DRSUAPI_ATTID_fSMORoleOwner"; break;
    1500        5872 :                         case DRSUAPI_ATTID_systemFlags: val = "DRSUAPI_ATTID_systemFlags"; break;
    1501           0 :                         case DRSUAPI_ATTID_trustAttributes: val = "DRSUAPI_ATTID_trustAttributes"; break;
    1502           0 :                         case DRSUAPI_ATTID_trustParent: val = "DRSUAPI_ATTID_trustParent"; break;
    1503           0 :                         case DRSUAPI_ATTID_flatName: val = "DRSUAPI_ATTID_flatName"; break;
    1504           6 :                         case DRSUAPI_ATTID_serverReference: val = "DRSUAPI_ATTID_serverReference"; break;
    1505           0 :                         case DRSUAPI_ATTID_serverReferenceBL: val = "DRSUAPI_ATTID_serverReferenceBL"; break;
    1506           0 :                         case DRSUAPI_ATTID_nonSecurityMember: val = "DRSUAPI_ATTID_nonSecurityMember"; break;
    1507           0 :                         case DRSUAPI_ATTID_initialAuthIncoming: val = "DRSUAPI_ATTID_initialAuthIncoming"; break;
    1508           0 :                         case DRSUAPI_ATTID_initialAuthOutgoing: val = "DRSUAPI_ATTID_initialAuthOutgoing"; break;
    1509           8 :                         case DRSUAPI_ATTID_wellKnownObjects: val = "DRSUAPI_ATTID_wellKnownObjects"; break;
    1510         120 :                         case DRSUAPI_ATTID_dNSHostName: val = "DRSUAPI_ATTID_dNSHostName"; break;
    1511         720 :                         case DRSUAPI_ATTID_isMemberOfPartialAttributeSet: val = "DRSUAPI_ATTID_isMemberOfPartialAttributeSet"; break;
    1512           0 :                         case DRSUAPI_ATTID_managedBy: val = "DRSUAPI_ATTID_managedBy"; break;
    1513          32 :                         case DRSUAPI_ATTID_userPrincipalName: val = "DRSUAPI_ATTID_userPrincipalName"; break;
    1514         156 :                         case DRSUAPI_ATTID_groupType: val = "DRSUAPI_ATTID_groupType"; break;
    1515         132 :                         case DRSUAPI_ATTID_servicePrincipalName: val = "DRSUAPI_ATTID_servicePrincipalName"; break;
    1516         382 :                         case DRSUAPI_ATTID_lastKnownParent: val = "DRSUAPI_ATTID_lastKnownParent"; break;
    1517       14046 :                         case DRSUAPI_ATTID_objectCategory: val = "DRSUAPI_ATTID_objectCategory"; break;
    1518           8 :                         case DRSUAPI_ATTID_gPLink: val = "DRSUAPI_ATTID_gPLink"; break;
    1519           8 :                         case DRSUAPI_ATTID_transportAddressAttribute: val = "DRSUAPI_ATTID_transportAddressAttribute"; break;
    1520           4 :                         case DRSUAPI_ATTID_schemaInfo: val = "DRSUAPI_ATTID_schemaInfo"; break;
    1521          20 :                         case DRSUAPI_ATTID_msDS_Behavior_Version: val = "DRSUAPI_ATTID_msDS_Behavior_Version"; break;
    1522           0 :                         case DRSUAPI_ATTID_msDS_TrustForestTrustInfo: val = "DRSUAPI_ATTID_msDS_TrustForestTrustInfo"; break;
    1523           0 :                         case DRSUAPI_ATTID_msDS_KeyVersionNumber: val = "DRSUAPI_ATTID_msDS_KeyVersionNumber"; break;
    1524           0 :                         case DRSUAPI_ATTID_msDS_NonMembers: val = "DRSUAPI_ATTID_msDS_NonMembers"; break;
    1525           0 :                         case DRSUAPI_ATTID_msDS_MembersForAzRole: val = "DRSUAPI_ATTID_msDS_MembersForAzRole"; break;
    1526           8 :                         case DRSUAPI_ATTID_msDS_HasDomainNCs: val = "DRSUAPI_ATTID_msDS_HasDomainNCs"; break;
    1527          24 :                         case DRSUAPI_ATTID_msDS_hasMasterNCs: val = "DRSUAPI_ATTID_msDS_hasMasterNCs"; break;
    1528           0 :                         case DRSUAPI_ATTID_msDS_NeverRevealGroup: val = "DRSUAPI_ATTID_msDS_NeverRevealGroup"; break;
    1529           0 :                         case DRSUAPI_ATTID_msDS_RevealOnDemandGroup: val = "DRSUAPI_ATTID_msDS_RevealOnDemandGroup"; break;
    1530         116 :                         case DRSUAPI_ATTID_msDS_SupportedEncryptionTypes: val = "DRSUAPI_ATTID_msDS_SupportedEncryptionTypes"; break;
    1531           0 :                         case DRSUAPI_ATTID_msDS_HostServiceAccount: val = "DRSUAPI_ATTID_msDS_HostServiceAccount"; break;
    1532         382 :                         case DRSUAPI_ATTID_isRecycled: val = "DRSUAPI_ATTID_isRecycled"; break;
    1533           0 :                         case DRSUAPI_ATTID_INVALID: val = "DRSUAPI_ATTID_INVALID"; break;
    1534             :                 }
    1535      213261 :                 ndr_print_enum(ndr, name, "ENUM", val, r);
    1536      213261 :                 ndr->flags = _flags_save_ENUM;
    1537             :         }
    1538      213261 : }
    1539             : 
    1540        5518 : static enum ndr_err_code ndr_push_drsuapi_DsPartialAttributeSet(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsPartialAttributeSet *r)
    1541             : {
    1542           0 :         uint32_t cntr_attids_0;
    1543        5518 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1544        5518 :         if (ndr_flags & NDR_SCALARS) {
    1545        5518 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_attids));
    1546        5518 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1547        5518 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
    1548        5518 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    1549        5518 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attids));
    1550     3036390 :                 for (cntr_attids_0 = 0; cntr_attids_0 < (r->num_attids); cntr_attids_0++) {
    1551     3030872 :                         NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attids[cntr_attids_0]));
    1552             :                 }
    1553        5518 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1554             :         }
    1555        5518 :         if (ndr_flags & NDR_BUFFERS) {
    1556           0 :         }
    1557        5518 :         return NDR_ERR_SUCCESS;
    1558             : }
    1559             : 
    1560        5550 : static enum ndr_err_code ndr_pull_drsuapi_DsPartialAttributeSet(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsPartialAttributeSet *r)
    1561             : {
    1562        5550 :         uint32_t size_attids_0 = 0;
    1563           0 :         uint32_t cntr_attids_0;
    1564        5550 :         TALLOC_CTX *_mem_save_attids_0 = NULL;
    1565        5550 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1566        5550 :         if (ndr_flags & NDR_SCALARS) {
    1567        5550 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->attids));
    1568        5550 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1569        5550 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    1570        5550 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
    1571        5550 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attids));
    1572        5550 :                 if (r->num_attids < 1 || r->num_attids > 1048576) {
    1573           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_attids), (uint32_t)(1), (uint32_t)(1048576));
    1574             :                 }
    1575        5550 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attids, &size_attids_0));
    1576        5550 :                 NDR_PULL_ALLOC_N(ndr, r->attids, size_attids_0);
    1577        5550 :                 _mem_save_attids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1578        5550 :                 NDR_PULL_SET_MEM_CTX(ndr, r->attids, 0);
    1579     3036518 :                 for (cntr_attids_0 = 0; cntr_attids_0 < (size_attids_0); cntr_attids_0++) {
    1580     3030968 :                         NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attids[cntr_attids_0]));
    1581             :                 }
    1582        5550 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attids_0, 0);
    1583        5550 :                 if (r->attids) {
    1584        5550 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->attids, r->num_attids));
    1585             :                 }
    1586        5550 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1587             :         }
    1588        5550 :         if (ndr_flags & NDR_BUFFERS) {
    1589           0 :         }
    1590        5550 :         return NDR_ERR_SUCCESS;
    1591             : }
    1592             : 
    1593           0 : _PUBLIC_ void ndr_print_drsuapi_DsPartialAttributeSet(struct ndr_print *ndr, const char *name, const struct drsuapi_DsPartialAttributeSet *r)
    1594             : {
    1595           0 :         uint32_t cntr_attids_0;
    1596           0 :         ndr_print_struct(ndr, name, "drsuapi_DsPartialAttributeSet");
    1597           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1598           0 :         ndr->depth++;
    1599           0 :         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version);
    1600           0 :         ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
    1601           0 :         ndr_print_uint32(ndr, "num_attids", r->num_attids);
    1602           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "attids", (uint32_t)(r->num_attids));
    1603           0 :         ndr->depth++;
    1604           0 :         for (cntr_attids_0 = 0; cntr_attids_0 < (r->num_attids); cntr_attids_0++) {
    1605           0 :                 ndr_print_drsuapi_DsAttributeId(ndr, "attids", r->attids[cntr_attids_0]);
    1606             :         }
    1607           0 :         ndr->depth--;
    1608           0 :         ndr->depth--;
    1609             : }
    1610             : 
    1611        6842 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesRequest8 *r)
    1612             : {
    1613        6842 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1614        6842 :         if (ndr_flags & NDR_SCALARS) {
    1615        3421 :                 if (r->naming_context == NULL) {
    1616           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1617             :                 }
    1618        3421 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    1619        3421 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1620        3421 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1621        3421 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    1622        3421 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1623        3421 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    1624        3421 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
    1625        3421 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count));
    1626        3421 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size));
    1627        3421 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op));
    1628        3421 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info));
    1629        3421 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set));
    1630        3421 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex));
    1631        3421 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    1632        3421 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    1633             :         }
    1634        6842 :         if (ndr_flags & NDR_BUFFERS) {
    1635        3421 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1636        3421 :                 if (r->uptodateness_vector) {
    1637           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1638             :                 }
    1639        3421 :                 if (r->partial_attribute_set) {
    1640        2981 :                         NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
    1641             :                 }
    1642        3421 :                 if (r->partial_attribute_set_ex) {
    1643           3 :                         NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
    1644             :                 }
    1645        3421 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    1646             :         }
    1647        6842 :         return NDR_ERR_SUCCESS;
    1648             : }
    1649             : 
    1650        6906 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesRequest8 *r)
    1651             : {
    1652           0 :         uint32_t _ptr_naming_context;
    1653        6906 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    1654           0 :         uint32_t _ptr_uptodateness_vector;
    1655        6906 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    1656           0 :         uint32_t _ptr_partial_attribute_set;
    1657        6906 :         TALLOC_CTX *_mem_save_partial_attribute_set_0 = NULL;
    1658           0 :         uint32_t _ptr_partial_attribute_set_ex;
    1659        6906 :         TALLOC_CTX *_mem_save_partial_attribute_set_ex_0 = NULL;
    1660        6906 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1661        6906 :         if (ndr_flags & NDR_SCALARS) {
    1662        3453 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    1663        3453 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1664        3453 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1665        3453 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    1666        3453 :                 if (_ptr_naming_context) {
    1667        3453 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    1668             :                 } else {
    1669           0 :                         r->naming_context = NULL;
    1670             :                 }
    1671        3453 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1672        3453 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    1673        3453 :                 if (_ptr_uptodateness_vector) {
    1674           0 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    1675             :                 } else {
    1676        3453 :                         r->uptodateness_vector = NULL;
    1677             :                 }
    1678        3453 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
    1679        3453 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count));
    1680        3453 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size));
    1681        3453 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op));
    1682        3453 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info));
    1683        3453 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set));
    1684        3453 :                 if (_ptr_partial_attribute_set) {
    1685        3013 :                         NDR_PULL_ALLOC(ndr, r->partial_attribute_set);
    1686             :                 } else {
    1687         440 :                         r->partial_attribute_set = NULL;
    1688             :                 }
    1689        3453 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set_ex));
    1690        3453 :                 if (_ptr_partial_attribute_set_ex) {
    1691           3 :                         NDR_PULL_ALLOC(ndr, r->partial_attribute_set_ex);
    1692             :                 } else {
    1693        3450 :                         r->partial_attribute_set_ex = NULL;
    1694             :                 }
    1695        3453 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    1696        3453 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    1697             :         }
    1698        6906 :         if (ndr_flags & NDR_BUFFERS) {
    1699        3453 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1700        3453 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    1701        3453 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1702        3453 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    1703        3453 :                 if (r->uptodateness_vector) {
    1704           0 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1705           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    1706           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1707           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    1708             :                 }
    1709        3453 :                 if (r->partial_attribute_set) {
    1710        3013 :                         _mem_save_partial_attribute_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1711        3013 :                         NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set, 0);
    1712        3013 :                         NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
    1713        3013 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_0, 0);
    1714             :                 }
    1715        3453 :                 if (r->partial_attribute_set_ex) {
    1716           3 :                         _mem_save_partial_attribute_set_ex_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1717           3 :                         NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set_ex, 0);
    1718           3 :                         NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
    1719           3 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_ex_0, 0);
    1720             :                 }
    1721        3453 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    1722             :         }
    1723        6906 :         return NDR_ERR_SUCCESS;
    1724             : }
    1725             : 
    1726           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesRequest8 *r)
    1727             : {
    1728           0 :         ndr_print_drsuapi_DsGetNCChangesRequest8(ndr, name, r);
    1729           0 : }
    1730             : 
    1731           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest8 *r)
    1732             : {
    1733           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesRequest8");
    1734           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1735           0 :         ndr->depth++;
    1736           0 :         ndr_print_GUID(ndr, "destination_dsa_guid", &r->destination_dsa_guid);
    1737           0 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    1738           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    1739           0 :         ndr->depth++;
    1740           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    1741           0 :         ndr->depth--;
    1742           0 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
    1743           0 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    1744           0 :         ndr->depth++;
    1745           0 :         if (r->uptodateness_vector) {
    1746           0 :                 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    1747             :         }
    1748           0 :         ndr->depth--;
    1749           0 :         ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
    1750           0 :         ndr_print_uint32(ndr, "max_object_count", r->max_object_count);
    1751           0 :         ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size);
    1752           0 :         ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op);
    1753           0 :         ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info);
    1754           0 :         ndr_print_ptr(ndr, "partial_attribute_set", r->partial_attribute_set);
    1755           0 :         ndr->depth++;
    1756           0 :         if (r->partial_attribute_set) {
    1757           0 :                 ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set", r->partial_attribute_set);
    1758             :         }
    1759           0 :         ndr->depth--;
    1760           0 :         ndr_print_ptr(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
    1761           0 :         ndr->depth++;
    1762           0 :         if (r->partial_attribute_set_ex) {
    1763           0 :                 ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
    1764             :         }
    1765           0 :         ndr->depth--;
    1766           0 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
    1767           0 :         ndr->depth--;
    1768             : }
    1769             : 
    1770       13276 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest10(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesRequest10 *r)
    1771             : {
    1772       13276 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1773       13276 :         if (ndr_flags & NDR_SCALARS) {
    1774        6638 :                 if (r->naming_context == NULL) {
    1775           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1776             :                 }
    1777        6638 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    1778        6638 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1779        6638 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1780        6638 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    1781        6638 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1782        6638 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    1783        6638 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
    1784        6638 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count));
    1785        6638 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size));
    1786        6638 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op));
    1787        6638 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info));
    1788        6638 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set));
    1789        6638 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex));
    1790        6638 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    1791        6638 :                 NDR_CHECK(ndr_push_drsuapi_DrsMoreOptions(ndr, NDR_SCALARS, r->more_flags));
    1792        6638 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    1793             :         }
    1794       13276 :         if (ndr_flags & NDR_BUFFERS) {
    1795        6638 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1796        6638 :                 if (r->uptodateness_vector) {
    1797        4228 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1798             :                 }
    1799        6638 :                 if (r->partial_attribute_set) {
    1800        2534 :                         NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
    1801             :                 }
    1802        6638 :                 if (r->partial_attribute_set_ex) {
    1803           0 :                         NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
    1804             :                 }
    1805        6638 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    1806             :         }
    1807       13276 :         return NDR_ERR_SUCCESS;
    1808             : }
    1809             : 
    1810       13276 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest10(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesRequest10 *r)
    1811             : {
    1812           0 :         uint32_t _ptr_naming_context;
    1813       13276 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    1814           0 :         uint32_t _ptr_uptodateness_vector;
    1815       13276 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    1816           0 :         uint32_t _ptr_partial_attribute_set;
    1817       13276 :         TALLOC_CTX *_mem_save_partial_attribute_set_0 = NULL;
    1818           0 :         uint32_t _ptr_partial_attribute_set_ex;
    1819       13276 :         TALLOC_CTX *_mem_save_partial_attribute_set_ex_0 = NULL;
    1820       13276 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1821       13276 :         if (ndr_flags & NDR_SCALARS) {
    1822        6638 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    1823        6638 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1824        6638 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1825        6638 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    1826        6638 :                 if (_ptr_naming_context) {
    1827        6638 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    1828             :                 } else {
    1829           0 :                         r->naming_context = NULL;
    1830             :                 }
    1831        6638 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1832        6638 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    1833        6638 :                 if (_ptr_uptodateness_vector) {
    1834        4228 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    1835             :                 } else {
    1836        2410 :                         r->uptodateness_vector = NULL;
    1837             :                 }
    1838        6638 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
    1839        6638 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count));
    1840        6638 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size));
    1841        6638 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op));
    1842        6638 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info));
    1843        6638 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set));
    1844        6638 :                 if (_ptr_partial_attribute_set) {
    1845        2534 :                         NDR_PULL_ALLOC(ndr, r->partial_attribute_set);
    1846             :                 } else {
    1847        4104 :                         r->partial_attribute_set = NULL;
    1848             :                 }
    1849        6638 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set_ex));
    1850        6638 :                 if (_ptr_partial_attribute_set_ex) {
    1851           0 :                         NDR_PULL_ALLOC(ndr, r->partial_attribute_set_ex);
    1852             :                 } else {
    1853        6638 :                         r->partial_attribute_set_ex = NULL;
    1854             :                 }
    1855        6638 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    1856        6638 :                 NDR_CHECK(ndr_pull_drsuapi_DrsMoreOptions(ndr, NDR_SCALARS, &r->more_flags));
    1857        6638 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    1858             :         }
    1859       13276 :         if (ndr_flags & NDR_BUFFERS) {
    1860        6638 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1861        6638 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    1862        6638 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1863        6638 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    1864        6638 :                 if (r->uptodateness_vector) {
    1865        4228 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1866        4228 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    1867        4228 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1868        4228 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    1869             :                 }
    1870        6638 :                 if (r->partial_attribute_set) {
    1871        2534 :                         _mem_save_partial_attribute_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1872        2534 :                         NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set, 0);
    1873        2534 :                         NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
    1874        2534 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_0, 0);
    1875             :                 }
    1876        6638 :                 if (r->partial_attribute_set_ex) {
    1877           0 :                         _mem_save_partial_attribute_set_ex_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1878           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set_ex, 0);
    1879           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
    1880           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_ex_0, 0);
    1881             :                 }
    1882        6638 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    1883             :         }
    1884       13276 :         return NDR_ERR_SUCCESS;
    1885             : }
    1886             : 
    1887           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesRequest10(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesRequest10 *r)
    1888             : {
    1889           0 :         ndr_print_drsuapi_DsGetNCChangesRequest10(ndr, name, r);
    1890           0 : }
    1891             : 
    1892           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest10(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest10 *r)
    1893             : {
    1894           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesRequest10");
    1895           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1896           0 :         ndr->depth++;
    1897           0 :         ndr_print_GUID(ndr, "destination_dsa_guid", &r->destination_dsa_guid);
    1898           0 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    1899           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    1900           0 :         ndr->depth++;
    1901           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    1902           0 :         ndr->depth--;
    1903           0 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
    1904           0 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    1905           0 :         ndr->depth++;
    1906           0 :         if (r->uptodateness_vector) {
    1907           0 :                 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    1908             :         }
    1909           0 :         ndr->depth--;
    1910           0 :         ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
    1911           0 :         ndr_print_uint32(ndr, "max_object_count", r->max_object_count);
    1912           0 :         ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size);
    1913           0 :         ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op);
    1914           0 :         ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info);
    1915           0 :         ndr_print_ptr(ndr, "partial_attribute_set", r->partial_attribute_set);
    1916           0 :         ndr->depth++;
    1917           0 :         if (r->partial_attribute_set) {
    1918           0 :                 ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set", r->partial_attribute_set);
    1919             :         }
    1920           0 :         ndr->depth--;
    1921           0 :         ndr_print_ptr(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
    1922           0 :         ndr->depth++;
    1923           0 :         if (r->partial_attribute_set_ex) {
    1924           0 :                 ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
    1925             :         }
    1926           0 :         ndr->depth--;
    1927           0 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
    1928           0 :         ndr_print_drsuapi_DrsMoreOptions(ndr, "more_flags", r->more_flags);
    1929           0 :         ndr->depth--;
    1930             : }
    1931             : 
    1932       10059 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNCChangesRequest *r)
    1933             : {
    1934           0 :         uint32_t level;
    1935       10059 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1936       10059 :         if (ndr_flags & NDR_SCALARS) {
    1937             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1938       10059 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1939       10059 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    1940       10059 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    1941       10059 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    1942       10059 :                 switch (level) {
    1943           0 :                         case 5: {
    1944           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr, NDR_SCALARS, &r->req5));
    1945           0 :                         break; }
    1946             : 
    1947        3421 :                         case 8: {
    1948        3421 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr, NDR_SCALARS, &r->req8));
    1949        3421 :                         break; }
    1950             : 
    1951        6638 :                         case 10: {
    1952        6638 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest10(ndr, NDR_SCALARS, &r->req10));
    1953        6638 :                         break; }
    1954             : 
    1955           0 :                         default:
    1956           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    1957             :                 }
    1958             :         }
    1959       10059 :         if (ndr_flags & NDR_BUFFERS) {
    1960       10059 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1961             :                         /* We didn't get it above, and the token is not needed after this. */
    1962           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1963             :                 }
    1964       10059 :                 switch (level) {
    1965           0 :                         case 5:
    1966           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr, NDR_BUFFERS, &r->req5));
    1967           0 :                         break;
    1968             : 
    1969        3421 :                         case 8:
    1970        3421 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr, NDR_BUFFERS, &r->req8));
    1971        3421 :                         break;
    1972             : 
    1973        6638 :                         case 10:
    1974        6638 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest10(ndr, NDR_BUFFERS, &r->req10));
    1975        6638 :                         break;
    1976             : 
    1977           0 :                         default:
    1978           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    1979             :                 }
    1980             :         }
    1981       10059 :         return NDR_ERR_SUCCESS;
    1982             : }
    1983             : 
    1984       10091 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNCChangesRequest *r)
    1985             : {
    1986           0 :         uint32_t level;
    1987           0 :         uint32_t _level;
    1988       10091 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1989       10091 :         if (ndr_flags & NDR_SCALARS) {
    1990             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1991       10091 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1992       10091 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    1993       10091 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    1994       10091 :                 if (_level != level) {
    1995           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    1996             :                 }
    1997       10091 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    1998       10091 :                 switch (level) {
    1999           0 :                         case 5: {
    2000           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr, NDR_SCALARS, &r->req5));
    2001           0 :                         break; }
    2002             : 
    2003        3453 :                         case 8: {
    2004        3453 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr, NDR_SCALARS, &r->req8));
    2005        3453 :                         break; }
    2006             : 
    2007        6638 :                         case 10: {
    2008        6638 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest10(ndr, NDR_SCALARS, &r->req10));
    2009        6638 :                         break; }
    2010             : 
    2011           0 :                         default:
    2012           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    2013             :                 }
    2014             :         }
    2015       10091 :         if (ndr_flags & NDR_BUFFERS) {
    2016       10091 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2017             :                         /* We didn't get it above, and the token is not needed after this. */
    2018           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2019             :                 }
    2020       10091 :                 switch (level) {
    2021           0 :                         case 5:
    2022           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr, NDR_BUFFERS, &r->req5));
    2023           0 :                         break;
    2024             : 
    2025        3453 :                         case 8:
    2026        3453 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr, NDR_BUFFERS, &r->req8));
    2027        3453 :                         break;
    2028             : 
    2029        6638 :                         case 10:
    2030        6638 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest10(ndr, NDR_BUFFERS, &r->req10));
    2031        6638 :                         break;
    2032             : 
    2033           0 :                         default:
    2034           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    2035             :                 }
    2036             :         }
    2037       10091 :         return NDR_ERR_SUCCESS;
    2038             : }
    2039             : 
    2040           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesRequest *r)
    2041             : {
    2042           0 :         uint32_t level;
    2043           0 :         level = ndr_print_steal_switch_value(ndr, r);
    2044           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesRequest");
    2045           0 :         switch (level) {
    2046           0 :                 case 5:
    2047           0 :                         ndr_print_drsuapi_DsGetNCChangesRequest5(ndr, "req5", &r->req5);
    2048           0 :                 break;
    2049             : 
    2050           0 :                 case 8:
    2051           0 :                         ndr_print_drsuapi_DsGetNCChangesRequest8(ndr, "req8", &r->req8);
    2052           0 :                 break;
    2053             : 
    2054           0 :                 case 10:
    2055           0 :                         ndr_print_drsuapi_DsGetNCChangesRequest10(ndr, "req10", &r->req10);
    2056           0 :                 break;
    2057             : 
    2058           0 :                 default:
    2059           0 :                         ndr_print_bad_level(ndr, name, level);
    2060             :         }
    2061           0 : }
    2062             : 
    2063       12585 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor2 *r)
    2064             : {
    2065       12585 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2066       12585 :         if (ndr_flags & NDR_SCALARS) {
    2067       12585 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2068       12585 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    2069       12585 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
    2070       12585 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_sync_success));
    2071       12585 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2072             :         }
    2073       12585 :         if (ndr_flags & NDR_BUFFERS) {
    2074           0 :         }
    2075       12585 :         return NDR_ERR_SUCCESS;
    2076             : }
    2077             : 
    2078       20017 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor2 *r)
    2079             : {
    2080       20017 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2081       20017 :         if (ndr_flags & NDR_SCALARS) {
    2082       20017 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2083       20017 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    2084       20017 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
    2085       20017 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_sync_success));
    2086       20017 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2087             :         }
    2088       20017 :         if (ndr_flags & NDR_BUFFERS) {
    2089           0 :         }
    2090       20017 :         return NDR_ERR_SUCCESS;
    2091             : }
    2092             : 
    2093           0 : static void ndr_print_flags_drsuapi_DsReplicaCursor2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaCursor2 *r)
    2094             : {
    2095           0 :         ndr_print_drsuapi_DsReplicaCursor2(ndr, name, r);
    2096           0 : }
    2097             : 
    2098          12 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2 *r)
    2099             : {
    2100          12 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2");
    2101          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2102          12 :         ndr->depth++;
    2103          12 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    2104          12 :         ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
    2105          12 :         ndr_print_NTTIME(ndr, "last_sync_success", r->last_sync_success);
    2106          12 :         ndr->depth--;
    2107             : }
    2108             : 
    2109        5140 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2CtrEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor2CtrEx *r)
    2110             : {
    2111           0 :         uint32_t cntr_cursors_0;
    2112        5140 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2113        5140 :         if (ndr_flags & NDR_SCALARS) {
    2114        5140 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2115        5140 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2116        5140 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
    2117        5140 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    2118        5140 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2119        5140 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    2120       14186 :                 for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
    2121        9046 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
    2122             :                 }
    2123        5140 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2124             :         }
    2125        5140 :         if (ndr_flags & NDR_BUFFERS) {
    2126           0 :         }
    2127        5140 :         return NDR_ERR_SUCCESS;
    2128             : }
    2129             : 
    2130        2564 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor2CtrEx *r)
    2131             : {
    2132        2564 :         uint32_t size_cursors_0 = 0;
    2133           0 :         uint32_t cntr_cursors_0;
    2134        2564 :         TALLOC_CTX *_mem_save_cursors_0 = NULL;
    2135        2564 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2136        2564 :         if (ndr_flags & NDR_SCALARS) {
    2137        2564 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->cursors));
    2138        2564 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2139        2564 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    2140        2564 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
    2141        2564 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2142        2564 :                 if (r->count > 1048576) {
    2143           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(1048576));
    2144             :                 }
    2145        2564 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
    2146        2564 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cursors, &size_cursors_0));
    2147        2564 :                 NDR_PULL_ALLOC_N(ndr, r->cursors, size_cursors_0);
    2148        2564 :                 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2149        2564 :                 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
    2150        7081 :                 for (cntr_cursors_0 = 0; cntr_cursors_0 < (size_cursors_0); cntr_cursors_0++) {
    2151        4517 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
    2152             :                 }
    2153        2564 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
    2154        2564 :                 if (r->cursors) {
    2155        2564 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cursors, r->count));
    2156             :                 }
    2157        2564 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2158             :         }
    2159        2564 :         if (ndr_flags & NDR_BUFFERS) {
    2160           0 :         }
    2161        2564 :         return NDR_ERR_SUCCESS;
    2162             : }
    2163             : 
    2164          12 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2CtrEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2CtrEx *r)
    2165             : {
    2166           0 :         uint32_t cntr_cursors_0;
    2167          12 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2CtrEx");
    2168          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2169          12 :         ndr->depth++;
    2170          12 :         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->version);
    2171          12 :         ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
    2172          12 :         ndr_print_uint32(ndr, "count", r->count);
    2173          12 :         ndr_print_uint32(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
    2174          12 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "cursors", (uint32_t)(r->count));
    2175          12 :         ndr->depth++;
    2176          24 :         for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
    2177          12 :                 ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
    2178             :         }
    2179          12 :         ndr->depth--;
    2180          12 :         ndr->depth--;
    2181             : }
    2182             : 
    2183    37263394 : static enum ndr_err_code ndr_push_drsuapi_DsAttributeValue(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAttributeValue *r)
    2184             : {
    2185    37263394 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2186    37263394 :         if (ndr_flags & NDR_SCALARS) {
    2187    18631697 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2188    18631697 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_DATA_BLOB(0, r->blob, 0)));
    2189    18631697 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->blob));
    2190    18631697 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2191             :         }
    2192    37263394 :         if (ndr_flags & NDR_BUFFERS) {
    2193    18631697 :                 if (r->blob) {
    2194    18631696 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->blob));
    2195             :                 }
    2196             :         }
    2197    37263362 :         return NDR_ERR_SUCCESS;
    2198             : }
    2199             : 
    2200    18360702 : static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValue(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAttributeValue *r)
    2201             : {
    2202         126 :         uint32_t _ptr_blob;
    2203    18360702 :         TALLOC_CTX *_mem_save_blob_0 = NULL;
    2204    18360702 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2205    18360702 :         if (ndr_flags & NDR_SCALARS) {
    2206     9180351 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2207     9180351 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    2208     9180351 :                 if (r->__ndr_size > 26214400) {
    2209           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->__ndr_size), (uint32_t)(0), (uint32_t)(26214400));
    2210             :                 }
    2211     9180351 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_blob));
    2212     9180351 :                 if (_ptr_blob) {
    2213     9180348 :                         NDR_PULL_ALLOC(ndr, r->blob);
    2214             :                 } else {
    2215           3 :                         r->blob = NULL;
    2216             :                 }
    2217     9180351 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2218             :         }
    2219    18360702 :         if (ndr_flags & NDR_BUFFERS) {
    2220     9180351 :                 if (r->blob) {
    2221     9180348 :                         _mem_save_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2222     9180348 :                         NDR_PULL_SET_MEM_CTX(ndr, r->blob, 0);
    2223     9180348 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
    2224     9180348 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_blob_0, 0);
    2225             :                 }
    2226             :         }
    2227    18360576 :         return NDR_ERR_SUCCESS;
    2228             : }
    2229             : 
    2230      188150 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeValue(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAttributeValue *r)
    2231             : {
    2232      188150 :         ndr_print_struct(ndr, name, "drsuapi_DsAttributeValue");
    2233      188150 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2234      188150 :         ndr->depth++;
    2235      188150 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_DATA_BLOB(0, r->blob, 0):r->__ndr_size);
    2236      188150 :         ndr_print_ptr(ndr, "blob", r->blob);
    2237      188150 :         ndr->depth++;
    2238      188150 :         if (r->blob) {
    2239      188150 :                 ndr_print_DATA_BLOB(ndr, "blob", *r->blob);
    2240             :         }
    2241      188150 :         ndr->depth--;
    2242      188150 :         ndr->depth--;
    2243             : }
    2244             : 
    2245    31852518 : static enum ndr_err_code ndr_push_drsuapi_DsAttributeValueCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAttributeValueCtr *r)
    2246             : {
    2247          24 :         uint32_t cntr_values_1;
    2248    31852518 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2249    31852518 :         if (ndr_flags & NDR_SCALARS) {
    2250    15926259 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2251    15926259 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_values));
    2252    15926259 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->values));
    2253    15926259 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2254             :         }
    2255    31852518 :         if (ndr_flags & NDR_BUFFERS) {
    2256    15926259 :                 if (r->values) {
    2257    14259563 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_values));
    2258    32848710 :                         for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
    2259    18589147 :                                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->values[cntr_values_1]));
    2260             :                         }
    2261    32848710 :                         for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
    2262    18589147 :                                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->values[cntr_values_1]));
    2263             :                         }
    2264             :                 }
    2265             :         }
    2266    31852494 :         return NDR_ERR_SUCCESS;
    2267             : }
    2268             : 
    2269    15721050 : static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValueCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAttributeValueCtr *r)
    2270             : {
    2271          94 :         uint32_t _ptr_values;
    2272    15721050 :         uint32_t size_values_1 = 0;
    2273          94 :         uint32_t cntr_values_1;
    2274    15721050 :         TALLOC_CTX *_mem_save_values_0 = NULL;
    2275    15721050 :         TALLOC_CTX *_mem_save_values_1 = NULL;
    2276    15721050 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2277    15721050 :         if (ndr_flags & NDR_SCALARS) {
    2278     7860525 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2279     7860525 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_values));
    2280     7860525 :                 if (r->num_values > 10485760) {
    2281           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_values), (uint32_t)(0), (uint32_t)(10485760));
    2282             :                 }
    2283     7860525 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
    2284     7860525 :                 if (_ptr_values) {
    2285     7028556 :                         NDR_PULL_ALLOC(ndr, r->values);
    2286             :                 } else {
    2287      831969 :                         r->values = NULL;
    2288             :                 }
    2289     7860525 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2290             :         }
    2291    15721050 :         if (ndr_flags & NDR_BUFFERS) {
    2292     7860525 :                 if (r->values) {
    2293     7028556 :                         _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2294     7028556 :                         NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
    2295     7028556 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->values));
    2296     7028556 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->values, &size_values_1));
    2297     7028556 :                         NDR_PULL_ALLOC_N(ndr, r->values, size_values_1);
    2298     7028556 :                         _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2299     7028556 :                         NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
    2300    16187723 :                         for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
    2301     9159167 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->values[cntr_values_1]));
    2302             :                         }
    2303    16187723 :                         for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
    2304     9159167 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->values[cntr_values_1]));
    2305             :                         }
    2306     7028556 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
    2307     7028556 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, 0);
    2308             :                 }
    2309     7860525 :                 if (r->values) {
    2310     7028556 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->values, r->num_values));
    2311             :                 }
    2312    17019692 :                 for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
    2313          63 :                 }
    2314             :         }
    2315    15720956 :         return NDR_ERR_SUCCESS;
    2316             : }
    2317             : 
    2318           0 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeValueCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAttributeValueCtr *r)
    2319             : {
    2320           0 :         uint32_t cntr_values_1;
    2321           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAttributeValueCtr");
    2322           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2323           0 :         ndr->depth++;
    2324           0 :         ndr_print_uint32(ndr, "num_values", r->num_values);
    2325           0 :         ndr_print_ptr(ndr, "values", r->values);
    2326           0 :         ndr->depth++;
    2327           0 :         if (r->values) {
    2328           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values", (uint32_t)(r->num_values));
    2329           0 :                 ndr->depth++;
    2330           0 :                 for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
    2331           0 :                         ndr_print_drsuapi_DsAttributeValue(ndr, "values", &r->values[cntr_values_1]);
    2332             :                 }
    2333           0 :                 ndr->depth--;
    2334             :         }
    2335           0 :         ndr->depth--;
    2336           0 :         ndr->depth--;
    2337             : }
    2338             : 
    2339     1244796 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
    2340             : {
    2341     1244796 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2342     1244796 :         if (ndr_flags & NDR_SCALARS) {
    2343     1244796 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2344     1244796 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags)));
    2345     1244796 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
    2346     1244796 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
    2347     1244796 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
    2348     1244796 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
    2349     1244796 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
    2350     1244796 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2351             :         }
    2352     1244796 :         if (ndr_flags & NDR_BUFFERS) {
    2353     1244796 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
    2354             :         }
    2355     1244789 :         return NDR_ERR_SUCCESS;
    2356             : }
    2357             : 
    2358      737753 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3 *r)
    2359             : {
    2360      737753 :         uint32_t size_dn_0 = 0;
    2361      737753 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2362      737753 :         if (ndr_flags & NDR_SCALARS) {
    2363      737753 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2364      737753 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    2365      737753 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
    2366      737753 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
    2367      737753 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
    2368      737753 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
    2369      737753 :                 size_dn_0 = r->__ndr_size_dn + 1;
    2370      737753 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
    2371      737753 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2372             :         }
    2373      737753 :         if (ndr_flags & NDR_BUFFERS) {
    2374      737753 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
    2375             :         }
    2376      737751 :         return NDR_ERR_SUCCESS;
    2377             : }
    2378             : 
    2379           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
    2380             : {
    2381           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier3(ndr, name, r);
    2382           0 : }
    2383             : 
    2384           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
    2385             : {
    2386           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier3");
    2387           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2388           0 :         ndr->depth++;
    2389           0 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags):r->__ndr_size);
    2390           0 :         ndr_print_uint32(ndr, "__ndr_size_sid", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid28(&r->sid, ndr->flags):r->__ndr_size_sid);
    2391           0 :         ndr_print_GUID(ndr, "guid", &r->guid);
    2392           0 :         ndr_print_dom_sid28(ndr, "sid", &r->sid);
    2393           0 :         ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
    2394           0 :         ndr_print_string(ndr, "dn", r->dn);
    2395           0 :         ndr->depth--;
    2396             : }
    2397             : 
    2398     1244796 : _PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3 *r, libndr_flags flags)
    2399             : {
    2400     1244796 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
    2401             : }
    2402             : 
    2403       11942 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
    2404             : {
    2405       11942 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2406       11942 :         if (ndr_flags & NDR_SCALARS) {
    2407       11942 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2408       11942 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags)));
    2409       11942 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
    2410       11942 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
    2411       11942 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
    2412       11942 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
    2413       11942 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
    2414       11942 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->binary.length + 4));
    2415             :                 {
    2416       11942 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
    2417       11942 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    2418       11942 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
    2419       11942 :                         ndr->flags = _flags_save_DATA_BLOB;
    2420             :                 }
    2421       11942 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2422             :         }
    2423       11942 :         if (ndr_flags & NDR_BUFFERS) {
    2424       11942 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
    2425             :         }
    2426       11939 :         return NDR_ERR_SUCCESS;
    2427             : }
    2428             : 
    2429       11837 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
    2430             : {
    2431       11837 :         uint32_t size_dn_0 = 0;
    2432       11837 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2433       11837 :         if (ndr_flags & NDR_SCALARS) {
    2434       11837 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2435       11837 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    2436       11837 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
    2437       11837 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
    2438       11837 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
    2439       11837 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
    2440       11837 :                 size_dn_0 = r->__ndr_size_dn + 1;
    2441       11837 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
    2442       11837 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_binary));
    2443             :                 {
    2444       11837 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
    2445       11837 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    2446       11837 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->binary));
    2447       11837 :                         ndr->flags = _flags_save_DATA_BLOB;
    2448             :                 }
    2449       11837 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2450             :         }
    2451       11837 :         if (ndr_flags & NDR_BUFFERS) {
    2452       11837 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
    2453             :         }
    2454       11834 :         return NDR_ERR_SUCCESS;
    2455             : }
    2456             : 
    2457           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
    2458             : {
    2459           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(ndr, name, r);
    2460           0 : }
    2461             : 
    2462           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
    2463             : {
    2464           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier3Binary");
    2465           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2466           0 :         ndr->depth++;
    2467           0 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags):r->__ndr_size);
    2468           0 :         ndr_print_uint32(ndr, "__ndr_size_sid", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid28(&r->sid, ndr->flags):r->__ndr_size_sid);
    2469           0 :         ndr_print_GUID(ndr, "guid", &r->guid);
    2470           0 :         ndr_print_dom_sid28(ndr, "sid", &r->sid);
    2471           0 :         ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
    2472           0 :         ndr_print_string(ndr, "dn", r->dn);
    2473           0 :         ndr_print_uint32(ndr, "__ndr_size_binary", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->binary.length + 4:r->__ndr_size_binary);
    2474             :         {
    2475           0 :                 libndr_flags _flags_save_DATA_BLOB = ndr->flags;
    2476           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    2477           0 :                 ndr_print_DATA_BLOB(ndr, "binary", r->binary);
    2478           0 :                 ndr->flags = _flags_save_DATA_BLOB;
    2479             :         }
    2480           0 :         ndr->depth--;
    2481             : }
    2482             : 
    2483    31852517 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttribute *r)
    2484             : {
    2485    31852517 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2486    31852517 :         if (ndr_flags & NDR_SCALARS) {
    2487    15926259 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2488    15926259 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
    2489    15926259 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr, NDR_SCALARS, &r->value_ctr));
    2490    15926259 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2491             :         }
    2492    31852517 :         if (ndr_flags & NDR_BUFFERS) {
    2493    15926259 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr, NDR_BUFFERS, &r->value_ctr));
    2494             :         }
    2495    31852494 :         return NDR_ERR_SUCCESS;
    2496             : }
    2497             : 
    2498    15721048 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttribute *r)
    2499             : {
    2500    15721048 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2501    15721048 :         if (ndr_flags & NDR_SCALARS) {
    2502     7860525 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2503     7860525 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
    2504     7860525 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr, NDR_SCALARS, &r->value_ctr));
    2505     7860525 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2506             :         }
    2507    15721048 :         if (ndr_flags & NDR_BUFFERS) {
    2508     7860525 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr, NDR_BUFFERS, &r->value_ctr));
    2509             :         }
    2510    15720956 :         return NDR_ERR_SUCCESS;
    2511             : }
    2512             : 
    2513           2 : static void ndr_print_flags_drsuapi_DsReplicaAttribute(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaAttribute *r)
    2514             : {
    2515           2 :         ndr_print_drsuapi_DsReplicaAttribute(ndr, name, r);
    2516           2 : }
    2517             : 
    2518     2320654 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttributeCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttributeCtr *r)
    2519             : {
    2520           2 :         uint32_t cntr_attributes_1;
    2521     2320654 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2522     2320654 :         if (ndr_flags & NDR_SCALARS) {
    2523     1160327 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2524     1160327 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attributes));
    2525     1160327 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attributes));
    2526     1160327 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2527             :         }
    2528     2320654 :         if (ndr_flags & NDR_BUFFERS) {
    2529     1160327 :                 if (r->attributes) {
    2530     1160327 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_attributes));
    2531    17086585 :                         for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
    2532    15926258 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr, NDR_SCALARS, &r->attributes[cntr_attributes_1]));
    2533             :                         }
    2534    17086585 :                         for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
    2535    15926258 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr, NDR_BUFFERS, &r->attributes[cntr_attributes_1]));
    2536             :                         }
    2537             :                 }
    2538             :         }
    2539     2320652 :         return NDR_ERR_SUCCESS;
    2540             : }
    2541             : 
    2542     1146626 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttributeCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttributeCtr *r)
    2543             : {
    2544          12 :         uint32_t _ptr_attributes;
    2545     1146626 :         uint32_t size_attributes_1 = 0;
    2546          12 :         uint32_t cntr_attributes_1;
    2547     1146626 :         TALLOC_CTX *_mem_save_attributes_0 = NULL;
    2548     1146626 :         TALLOC_CTX *_mem_save_attributes_1 = NULL;
    2549     1146626 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2550     1146626 :         if (ndr_flags & NDR_SCALARS) {
    2551      573313 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2552      573313 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attributes));
    2553      573313 :                 if (r->num_attributes > 1048576) {
    2554           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_attributes), (uint32_t)(0), (uint32_t)(1048576));
    2555             :                 }
    2556      573313 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attributes));
    2557      573313 :                 if (_ptr_attributes) {
    2558      573312 :                         NDR_PULL_ALLOC(ndr, r->attributes);
    2559             :                 } else {
    2560           1 :                         r->attributes = NULL;
    2561             :                 }
    2562      573313 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2563             :         }
    2564     1146626 :         if (ndr_flags & NDR_BUFFERS) {
    2565      573313 :                 if (r->attributes) {
    2566      573312 :                         _mem_save_attributes_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2567      573312 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attributes, 0);
    2568      573312 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attributes));
    2569      573312 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attributes, &size_attributes_1));
    2570      573312 :                         NDR_PULL_ALLOC_N(ndr, r->attributes, size_attributes_1);
    2571      573312 :                         _mem_save_attributes_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2572      573312 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attributes, 0);
    2573     8433835 :                         for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
    2574     7860523 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr, NDR_SCALARS, &r->attributes[cntr_attributes_1]));
    2575             :                         }
    2576     8433835 :                         for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
    2577     7860523 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr, NDR_BUFFERS, &r->attributes[cntr_attributes_1]));
    2578             :                         }
    2579      573312 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attributes_1, 0);
    2580      573312 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attributes_0, 0);
    2581             :                 }
    2582      573313 :                 if (r->attributes) {
    2583      573312 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->attributes, r->num_attributes));
    2584             :                 }
    2585     8433836 :                 for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
    2586          45 :                 }
    2587             :         }
    2588     1146614 :         return NDR_ERR_SUCCESS;
    2589             : }
    2590             : 
    2591       13748 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttributeCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttributeCtr *r)
    2592             : {
    2593           6 :         uint32_t cntr_attributes_1;
    2594       13748 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttributeCtr");
    2595       13748 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2596       13748 :         ndr->depth++;
    2597       13748 :         ndr_print_uint32(ndr, "num_attributes", r->num_attributes);
    2598       13748 :         ndr_print_ptr(ndr, "attributes", r->attributes);
    2599       13748 :         ndr->depth++;
    2600       13748 :         if (r->attributes) {
    2601       13747 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "attributes", (uint32_t)(r->num_attributes));
    2602       13747 :                 ndr->depth++;
    2603      219668 :                 for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
    2604      205921 :                         ndr_print_drsuapi_DsReplicaAttribute(ndr, "attributes", &r->attributes[cntr_attributes_1]);
    2605             :                 }
    2606       13747 :                 ndr->depth--;
    2607             :         }
    2608       13748 :         ndr->depth--;
    2609       13748 :         ndr->depth--;
    2610             : }
    2611             : 
    2612     1160327 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    2613             : {
    2614     1160327 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    2615     1160326 :         return NDR_ERR_SUCCESS;
    2616             : }
    2617             : 
    2618      573313 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    2619             : {
    2620           6 :         uint32_t v;
    2621      573313 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    2622      573313 :         *r = v;
    2623      573313 :         return NDR_ERR_SUCCESS;
    2624             : }
    2625             : 
    2626       13748 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    2627             : {
    2628       13748 :         ndr_print_uint32(ndr, name, r);
    2629       13748 :         ndr->depth++;
    2630       13748 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER, r);
    2631       13748 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC, r);
    2632       13748 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY, r);
    2633       13748 :         ndr->depth--;
    2634       13748 : }
    2635             : 
    2636     2320654 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObject(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObject *r)
    2637             : {
    2638     2320654 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2639     2320654 :         if (ndr_flags & NDR_SCALARS) {
    2640     1160327 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2641     1160327 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->identifier));
    2642     1160327 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, r->flags));
    2643     1160327 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr));
    2644     1160327 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2645             :         }
    2646     2320654 :         if (ndr_flags & NDR_BUFFERS) {
    2647     1160327 :                 if (r->identifier) {
    2648     1160327 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
    2649             :                 }
    2650     1160327 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr, NDR_BUFFERS, &r->attribute_ctr));
    2651             :         }
    2652     2320652 :         return NDR_ERR_SUCCESS;
    2653             : }
    2654             : 
    2655     1146626 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObject *r)
    2656             : {
    2657          12 :         uint32_t _ptr_identifier;
    2658     1146626 :         TALLOC_CTX *_mem_save_identifier_0 = NULL;
    2659     1146626 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2660     1146626 :         if (ndr_flags & NDR_SCALARS) {
    2661      573313 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2662      573313 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_identifier));
    2663      573313 :                 if (_ptr_identifier) {
    2664      573311 :                         NDR_PULL_ALLOC(ndr, r->identifier);
    2665             :                 } else {
    2666           2 :                         r->identifier = NULL;
    2667             :                 }
    2668      573313 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, &r->flags));
    2669      573313 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr));
    2670      573313 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2671             :         }
    2672     1146626 :         if (ndr_flags & NDR_BUFFERS) {
    2673      573313 :                 if (r->identifier) {
    2674      573311 :                         _mem_save_identifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2675      573311 :                         NDR_PULL_SET_MEM_CTX(ndr, r->identifier, 0);
    2676      573311 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
    2677      573311 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_identifier_0, 0);
    2678             :                 }
    2679      573313 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr, NDR_BUFFERS, &r->attribute_ctr));
    2680             :         }
    2681     1146614 :         return NDR_ERR_SUCCESS;
    2682             : }
    2683             : 
    2684           0 : static void ndr_print_flags_drsuapi_DsReplicaObject(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObject *r)
    2685             : {
    2686           0 :         ndr_print_drsuapi_DsReplicaObject(ndr, name, r);
    2687           0 : }
    2688             : 
    2689       13748 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObject(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObject *r)
    2690             : {
    2691       13748 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObject");
    2692       13748 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2693       13748 :         ndr->depth++;
    2694       13748 :         ndr_print_ptr(ndr, "identifier", r->identifier);
    2695       13748 :         ndr->depth++;
    2696       13748 :         if (r->identifier) {
    2697       13746 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "identifier", r->identifier);
    2698             :         }
    2699       13748 :         ndr->depth--;
    2700       13748 :         ndr_print_drsuapi_DsReplicaObjectFlags(ndr, "flags", r->flags);
    2701       13748 :         ndr_print_drsuapi_DsReplicaAttributeCtr(ndr, "attribute_ctr", &r->attribute_ctr);
    2702       13748 :         ndr->depth--;
    2703             : }
    2704             : 
    2705    15967892 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaMetaData *r)
    2706             : {
    2707    15967892 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2708    15967892 :         if (ndr_flags & NDR_SCALARS) {
    2709    15967892 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2710    15967892 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
    2711    15967892 :                 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_change_time));
    2712    15967892 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
    2713    15967892 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
    2714    15967892 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2715             :         }
    2716    15967892 :         if (ndr_flags & NDR_BUFFERS) {
    2717           0 :         }
    2718    15967892 :         return NDR_ERR_SUCCESS;
    2719             : }
    2720             : 
    2721     7880757 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaMetaData *r)
    2722             : {
    2723     7880757 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2724     7880757 :         if (ndr_flags & NDR_SCALARS) {
    2725     7880757 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2726     7880757 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    2727     7880757 :                 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time));
    2728     7880757 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
    2729     7880757 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
    2730     7880757 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2731             :         }
    2732     7880757 :         if (ndr_flags & NDR_BUFFERS) {
    2733           0 :         }
    2734     7880757 :         return NDR_ERR_SUCCESS;
    2735             : }
    2736             : 
    2737      206058 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaMetaData *r)
    2738             : {
    2739      206058 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaMetaData");
    2740      206058 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2741      206058 :         ndr->depth++;
    2742      206058 :         ndr_print_uint32(ndr, "version", r->version);
    2743      206058 :         ndr_print_NTTIME_1sec(ndr, "originating_change_time", r->originating_change_time);
    2744      206058 :         ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
    2745      206058 :         ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
    2746      206058 :         ndr->depth--;
    2747             : }
    2748             : 
    2749     1160232 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaDataCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaMetaDataCtr *r)
    2750             : {
    2751           0 :         uint32_t cntr_meta_data_0;
    2752     1160232 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2753     1160232 :         if (ndr_flags & NDR_SCALARS) {
    2754     1160232 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2755     1160232 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2756     1160232 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2757    17085574 :                 for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (r->count); cntr_meta_data_0++) {
    2758    15925342 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data[cntr_meta_data_0]));
    2759             :                 }
    2760     1160232 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2761             :         }
    2762     1160232 :         if (ndr_flags & NDR_BUFFERS) {
    2763           0 :         }
    2764     1160232 :         return NDR_ERR_SUCCESS;
    2765             : }
    2766             : 
    2767      573215 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaMetaDataCtr *r)
    2768             : {
    2769      573215 :         uint32_t size_meta_data_0 = 0;
    2770           2 :         uint32_t cntr_meta_data_0;
    2771      573215 :         TALLOC_CTX *_mem_save_meta_data_0 = NULL;
    2772      573215 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2773      573215 :         if (ndr_flags & NDR_SCALARS) {
    2774      573215 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->meta_data));
    2775      573215 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2776      573215 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2777      573215 :                 if (r->count > 1048576) {
    2778           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(1048576));
    2779             :                 }
    2780      573215 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->meta_data, &size_meta_data_0));
    2781      573215 :                 NDR_PULL_ALLOC_N(ndr, r->meta_data, size_meta_data_0);
    2782      573215 :                 _mem_save_meta_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2783      573215 :                 NDR_PULL_SET_MEM_CTX(ndr, r->meta_data, 0);
    2784     8432788 :                 for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (size_meta_data_0); cntr_meta_data_0++) {
    2785     7859573 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data[cntr_meta_data_0]));
    2786             :                 }
    2787      573215 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_meta_data_0, 0);
    2788      573215 :                 if (r->meta_data) {
    2789      573215 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->meta_data, r->count));
    2790             :                 }
    2791      573215 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2792             :         }
    2793      573215 :         if (ndr_flags & NDR_BUFFERS) {
    2794           2 :         }
    2795      573215 :         return NDR_ERR_SUCCESS;
    2796             : }
    2797             : 
    2798           0 : static void ndr_print_flags_drsuapi_DsReplicaMetaDataCtr(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaMetaDataCtr *r)
    2799             : {
    2800           0 :         ndr_print_drsuapi_DsReplicaMetaDataCtr(ndr, name, r);
    2801           0 : }
    2802             : 
    2803       13744 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaMetaDataCtr *r)
    2804             : {
    2805           2 :         uint32_t cntr_meta_data_0;
    2806       13744 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaMetaDataCtr");
    2807       13744 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2808       13744 :         ndr->depth++;
    2809       13744 :         ndr_print_uint32(ndr, "count", r->count);
    2810       13744 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "meta_data", (uint32_t)(r->count));
    2811       13744 :         ndr->depth++;
    2812      219620 :         for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (r->count); cntr_meta_data_0++) {
    2813      205876 :                 ndr_print_drsuapi_DsReplicaMetaData(ndr, "meta_data", &r->meta_data[cntr_meta_data_0]);
    2814             :         }
    2815       13744 :         ndr->depth--;
    2816       13744 :         ndr->depth--;
    2817             : }
    2818             : 
    2819     1160232 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItemEx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectListItemEx *r)
    2820             : {
    2821     1160232 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2822     1160232 :         if (ndr_flags & NDR_SCALARS) {
    2823     1160232 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2824     1160232 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next_object));
    2825     1160232 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
    2826     1160232 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_nc_prefix));
    2827     1160232 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->parent_object_guid));
    2828     1160232 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->meta_data_ctr));
    2829     1160232 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2830             :         }
    2831     1160232 :         if (ndr_flags & NDR_BUFFERS) {
    2832     1160232 :                 if (r->next_object) {
    2833     1145940 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
    2834             :                 }
    2835     1160232 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
    2836     1160232 :                 if (r->parent_object_guid) {
    2837     1157750 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->parent_object_guid));
    2838             :                 }
    2839     1160232 :                 if (r->meta_data_ctr) {
    2840     1160232 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaDataCtr(ndr, NDR_SCALARS, r->meta_data_ctr));
    2841             :                 }
    2842             :         }
    2843     1160232 :         return NDR_ERR_SUCCESS;
    2844             : }
    2845             : 
    2846      573215 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItemEx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectListItemEx *r)
    2847             : {
    2848           2 :         uint32_t _ptr_next_object;
    2849      573215 :         TALLOC_CTX *_mem_save_next_object_0 = NULL;
    2850           2 :         uint32_t _ptr_parent_object_guid;
    2851      573215 :         TALLOC_CTX *_mem_save_parent_object_guid_0 = NULL;
    2852           2 :         uint32_t _ptr_meta_data_ctr;
    2853      573215 :         TALLOC_CTX *_mem_save_meta_data_ctr_0 = NULL;
    2854      573215 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2855      573215 :         if (ndr_flags & NDR_SCALARS) {
    2856      573215 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2857      573215 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next_object));
    2858      573215 :                 if (_ptr_next_object) {
    2859      566120 :                         NDR_PULL_ALLOC(ndr, r->next_object);
    2860             :                 } else {
    2861        7095 :                         r->next_object = NULL;
    2862             :                 }
    2863      573215 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
    2864      573215 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_nc_prefix));
    2865      573215 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parent_object_guid));
    2866      573215 :                 if (_ptr_parent_object_guid) {
    2867      571979 :                         NDR_PULL_ALLOC(ndr, r->parent_object_guid);
    2868             :                 } else {
    2869        1236 :                         r->parent_object_guid = NULL;
    2870             :                 }
    2871      573215 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_meta_data_ctr));
    2872      573215 :                 if (_ptr_meta_data_ctr) {
    2873      573215 :                         NDR_PULL_ALLOC(ndr, r->meta_data_ctr);
    2874             :                 } else {
    2875           0 :                         r->meta_data_ctr = NULL;
    2876             :                 }
    2877      573215 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2878             :         }
    2879      573215 :         if (ndr_flags & NDR_BUFFERS) {
    2880      573215 :                 if (r->next_object) {
    2881      566120 :                         _mem_save_next_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2882      566120 :                         NDR_PULL_SET_MEM_CTX(ndr, r->next_object, 0);
    2883      566120 :                         NDR_RECURSION_CHECK(ndr, 20000);
    2884      566120 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
    2885      566120 :                         NDR_RECURSION_UNWIND(ndr);
    2886      566120 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_object_0, 0);
    2887             :                 }
    2888      573215 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
    2889      573215 :                 if (r->parent_object_guid) {
    2890      571979 :                         _mem_save_parent_object_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2891      571979 :                         NDR_PULL_SET_MEM_CTX(ndr, r->parent_object_guid, 0);
    2892      571979 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->parent_object_guid));
    2893      571979 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parent_object_guid_0, 0);
    2894             :                 }
    2895      573215 :                 if (r->meta_data_ctr) {
    2896      573215 :                         _mem_save_meta_data_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2897      573215 :                         NDR_PULL_SET_MEM_CTX(ndr, r->meta_data_ctr, 0);
    2898      573215 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaDataCtr(ndr, NDR_SCALARS, r->meta_data_ctr));
    2899      573215 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_meta_data_ctr_0, 0);
    2900             :                 }
    2901             :         }
    2902      573213 :         return NDR_ERR_SUCCESS;
    2903             : }
    2904             : 
    2905           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectListItemEx *r)
    2906             : {
    2907           0 :         ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, name, r);
    2908           0 : }
    2909             : 
    2910           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr1 *r)
    2911             : {
    2912           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2913           0 :         if (ndr_flags & NDR_SCALARS) {
    2914           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2915           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
    2916           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    2917           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->naming_context));
    2918           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
    2919           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
    2920           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    2921           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    2922           0 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret));
    2923           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count));
    2924           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55));
    2925           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object));
    2926           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data));
    2927           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2928             :         }
    2929           0 :         if (ndr_flags & NDR_BUFFERS) {
    2930           0 :                 if (r->naming_context) {
    2931           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    2932             :                 }
    2933           0 :                 if (r->uptodateness_vector) {
    2934           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    2935             :                 }
    2936           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    2937           0 :                 if (r->first_object) {
    2938           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
    2939             :                 }
    2940             :         }
    2941           0 :         return NDR_ERR_SUCCESS;
    2942             : }
    2943             : 
    2944           2 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr1 *r)
    2945             : {
    2946           2 :         uint32_t _ptr_naming_context;
    2947           2 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    2948           2 :         uint32_t _ptr_uptodateness_vector;
    2949           2 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    2950           2 :         uint32_t _ptr_first_object;
    2951           2 :         TALLOC_CTX *_mem_save_first_object_0 = NULL;
    2952           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2953           2 :         if (ndr_flags & NDR_SCALARS) {
    2954           1 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2955           1 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
    2956           1 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    2957           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_naming_context));
    2958           1 :                 if (_ptr_naming_context) {
    2959           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    2960             :                 } else {
    2961           1 :                         r->naming_context = NULL;
    2962             :                 }
    2963           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
    2964           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
    2965           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    2966           1 :                 if (_ptr_uptodateness_vector) {
    2967           0 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    2968             :                 } else {
    2969           1 :                         r->uptodateness_vector = NULL;
    2970             :                 }
    2971           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    2972           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr, NDR_SCALARS, &r->extended_ret));
    2973           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_count));
    2974           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    2975           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_object));
    2976           1 :                 if (_ptr_first_object) {
    2977           1 :                         NDR_PULL_ALLOC(ndr, r->first_object);
    2978             :                 } else {
    2979           0 :                         r->first_object = NULL;
    2980             :                 }
    2981           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data));
    2982           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2983             :         }
    2984           2 :         if (ndr_flags & NDR_BUFFERS) {
    2985           1 :                 if (r->naming_context) {
    2986           0 :                         _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2987           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    2988           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    2989           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    2990             :                 }
    2991           1 :                 if (r->uptodateness_vector) {
    2992           0 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2993           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    2994           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    2995           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    2996             :                 }
    2997           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    2998           1 :                 if (r->first_object) {
    2999           1 :                         _mem_save_first_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3000           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->first_object, 0);
    3001           1 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
    3002           1 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_first_object_0, 0);
    3003             :                 }
    3004             :         }
    3005           0 :         return NDR_ERR_SUCCESS;
    3006             : }
    3007             : 
    3008           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesCtr1 *r)
    3009             : {
    3010           0 :         ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, name, r);
    3011           0 : }
    3012             : 
    3013           1 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1 *r)
    3014             : {
    3015           1 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr1");
    3016           1 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3017           1 :         ndr->depth++;
    3018           1 :         ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
    3019           1 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    3020           1 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    3021           1 :         ndr->depth++;
    3022           1 :         if (r->naming_context) {
    3023           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    3024             :         }
    3025           1 :         ndr->depth--;
    3026           1 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "old_highwatermark", &r->old_highwatermark);
    3027           1 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "new_highwatermark", &r->new_highwatermark);
    3028           1 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    3029           1 :         ndr->depth++;
    3030           1 :         if (r->uptodateness_vector) {
    3031           0 :                 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    3032             :         }
    3033           1 :         ndr->depth--;
    3034           1 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
    3035           1 :         ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret);
    3036           1 :         ndr_print_uint32(ndr, "object_count", r->object_count);
    3037           1 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55:r->__ndr_size);
    3038           1 :         ndr_print_ptr(ndr, "first_object", r->first_object);
    3039           1 :         ndr->depth++;
    3040           1 :         if (r->first_object) {
    3041           1 :                 ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "first_object", r->first_object);
    3042             :         }
    3043           1 :         ndr->depth--;
    3044           1 :         ndr_print_uint32(ndr, "more_data", r->more_data);
    3045           1 :         ndr->depth--;
    3046             : }
    3047             : 
    3048           0 : _PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1 *r, libndr_flags flags)
    3049             : {
    3050           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1);
    3051             : }
    3052             : 
    3053       42550 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsLinkedAttributeFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    3054             : {
    3055       42550 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    3056       42550 :         return NDR_ERR_SUCCESS;
    3057             : }
    3058             : 
    3059       21184 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsLinkedAttributeFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    3060             : {
    3061           0 :         uint32_t v;
    3062       21184 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    3063       21184 :         *r = v;
    3064       21184 :         return NDR_ERR_SUCCESS;
    3065             : }
    3066             : 
    3067         182 : _PUBLIC_ void ndr_print_drsuapi_DsLinkedAttributeFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    3068             : {
    3069         182 :         ndr_print_uint32(ndr, name, r);
    3070         182 :         ndr->depth++;
    3071         182 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE", DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE, r);
    3072         182 :         ndr->depth--;
    3073         182 : }
    3074             : 
    3075       85100 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaLinkedAttribute(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaLinkedAttribute *r)
    3076             : {
    3077       85100 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3078       85100 :         if (ndr_flags & NDR_SCALARS) {
    3079       42550 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    3080       42550 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->identifier));
    3081       42550 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
    3082       42550 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->value));
    3083       42550 :                 NDR_CHECK(ndr_push_drsuapi_DsLinkedAttributeFlags(ndr, NDR_SCALARS, r->flags));
    3084       42550 :                 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_add_time));
    3085       42550 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data));
    3086       42550 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    3087             :         }
    3088       85100 :         if (ndr_flags & NDR_BUFFERS) {
    3089       42550 :                 if (r->identifier) {
    3090       42550 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
    3091             :                 }
    3092       42550 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->value));
    3093             :         }
    3094       85100 :         return NDR_ERR_SUCCESS;
    3095             : }
    3096             : 
    3097       42368 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaLinkedAttribute(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaLinkedAttribute *r)
    3098             : {
    3099           0 :         uint32_t _ptr_identifier;
    3100       42368 :         TALLOC_CTX *_mem_save_identifier_0 = NULL;
    3101       42368 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3102       42368 :         if (ndr_flags & NDR_SCALARS) {
    3103       21184 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    3104       21184 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_identifier));
    3105       21184 :                 if (_ptr_identifier) {
    3106       21184 :                         NDR_PULL_ALLOC(ndr, r->identifier);
    3107             :                 } else {
    3108           0 :                         r->identifier = NULL;
    3109             :                 }
    3110       21184 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
    3111       21184 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->value));
    3112       21184 :                 NDR_CHECK(ndr_pull_drsuapi_DsLinkedAttributeFlags(ndr, NDR_SCALARS, &r->flags));
    3113       21184 :                 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_add_time));
    3114       21184 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data));
    3115       21184 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    3116             :         }
    3117       42368 :         if (ndr_flags & NDR_BUFFERS) {
    3118       21184 :                 if (r->identifier) {
    3119       21184 :                         _mem_save_identifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3120       21184 :                         NDR_PULL_SET_MEM_CTX(ndr, r->identifier, 0);
    3121       21184 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
    3122       21184 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_identifier_0, 0);
    3123             :                 }
    3124       21184 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->value));
    3125             :         }
    3126       42368 :         return NDR_ERR_SUCCESS;
    3127             : }
    3128             : 
    3129           0 : static void ndr_print_flags_drsuapi_DsReplicaLinkedAttribute(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaLinkedAttribute *r)
    3130             : {
    3131           0 :         ndr_print_drsuapi_DsReplicaLinkedAttribute(ndr, name, r);
    3132           0 : }
    3133             : 
    3134         182 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaLinkedAttribute(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaLinkedAttribute *r)
    3135             : {
    3136         182 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaLinkedAttribute");
    3137         182 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3138         182 :         ndr->depth++;
    3139         182 :         ndr_print_ptr(ndr, "identifier", r->identifier);
    3140         182 :         ndr->depth++;
    3141         182 :         if (r->identifier) {
    3142         182 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "identifier", r->identifier);
    3143             :         }
    3144         182 :         ndr->depth--;
    3145         182 :         ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
    3146         182 :         ndr_print_drsuapi_DsAttributeValue(ndr, "value", &r->value);
    3147         182 :         ndr_print_drsuapi_DsLinkedAttributeFlags(ndr, "flags", r->flags);
    3148         182 :         ndr_print_NTTIME_1sec(ndr, "originating_add_time", r->originating_add_time);
    3149         182 :         ndr_print_drsuapi_DsReplicaMetaData(ndr, "meta_data", &r->meta_data);
    3150         182 :         ndr->depth--;
    3151             : }
    3152             : 
    3153       30333 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr6 *r)
    3154             : {
    3155           0 :         uint32_t cntr_linked_attributes_1;
    3156       30333 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3157       30333 :         if (ndr_flags & NDR_SCALARS) {
    3158       20222 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    3159       20222 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
    3160       20222 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    3161       20222 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->naming_context));
    3162       20222 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
    3163       20222 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
    3164       20222 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    3165       20222 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    3166       20222 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret));
    3167       20222 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count));
    3168       20222 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55));
    3169       20222 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object));
    3170       20222 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data));
    3171       20222 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_object_count));
    3172       20222 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_linked_attributes_count));
    3173       20222 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linked_attributes_count));
    3174       20222 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->linked_attributes));
    3175       20222 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->drs_error));
    3176       20222 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    3177             :         }
    3178       30333 :         if (ndr_flags & NDR_BUFFERS) {
    3179       20222 :                 if (r->naming_context) {
    3180       15916 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    3181             :                 }
    3182       20222 :                 if (r->uptodateness_vector) {
    3183        5140 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2CtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    3184             :                 }
    3185       20222 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    3186       20222 :                 if (r->first_object) {
    3187       14292 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
    3188             :                 }
    3189       20222 :                 if (r->linked_attributes) {
    3190       20222 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->linked_attributes_count));
    3191       62772 :                         for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
    3192       42550 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_SCALARS, &r->linked_attributes[cntr_linked_attributes_1]));
    3193             :                         }
    3194       62772 :                         for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
    3195       42550 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_BUFFERS, &r->linked_attributes[cntr_linked_attributes_1]));
    3196             :                         }
    3197             :                 }
    3198             :         }
    3199       30333 :         return NDR_ERR_SUCCESS;
    3200             : }
    3201             : 
    3202       20118 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr6 *r)
    3203             : {
    3204           0 :         uint32_t _ptr_naming_context;
    3205       20118 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    3206           0 :         uint32_t _ptr_uptodateness_vector;
    3207       20118 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    3208           0 :         uint32_t _ptr_first_object;
    3209       20118 :         TALLOC_CTX *_mem_save_first_object_0 = NULL;
    3210           0 :         uint32_t _ptr_linked_attributes;
    3211       20118 :         uint32_t size_linked_attributes_1 = 0;
    3212           0 :         uint32_t cntr_linked_attributes_1;
    3213       20118 :         TALLOC_CTX *_mem_save_linked_attributes_0 = NULL;
    3214       20118 :         TALLOC_CTX *_mem_save_linked_attributes_1 = NULL;
    3215       20118 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3216       20118 :         if (ndr_flags & NDR_SCALARS) {
    3217       10059 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    3218       10059 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
    3219       10059 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    3220       10059 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_naming_context));
    3221       10059 :                 if (_ptr_naming_context) {
    3222        7906 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    3223             :                 } else {
    3224        2153 :                         r->naming_context = NULL;
    3225             :                 }
    3226       10059 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
    3227       10059 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
    3228       10059 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    3229       10059 :                 if (_ptr_uptodateness_vector) {
    3230        2564 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    3231             :                 } else {
    3232        7495 :                         r->uptodateness_vector = NULL;
    3233             :                 }
    3234       10059 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    3235       10059 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr, NDR_SCALARS, &r->extended_ret));
    3236       10059 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_count));
    3237       10059 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    3238       10059 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_object));
    3239       10059 :                 if (_ptr_first_object) {
    3240        7094 :                         NDR_PULL_ALLOC(ndr, r->first_object);
    3241             :                 } else {
    3242        2965 :                         r->first_object = NULL;
    3243             :                 }
    3244       10059 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data));
    3245       10059 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_object_count));
    3246       10059 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_linked_attributes_count));
    3247       10059 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linked_attributes_count));
    3248       10059 :                 if (r->linked_attributes_count > 1048576) {
    3249           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->linked_attributes_count), (uint32_t)(0), (uint32_t)(1048576));
    3250             :                 }
    3251       10059 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_linked_attributes));
    3252       10059 :                 if (_ptr_linked_attributes) {
    3253       10059 :                         NDR_PULL_ALLOC(ndr, r->linked_attributes);
    3254             :                 } else {
    3255           0 :                         r->linked_attributes = NULL;
    3256             :                 }
    3257       10059 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->drs_error));
    3258       10059 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    3259             :         }
    3260       20118 :         if (ndr_flags & NDR_BUFFERS) {
    3261       10059 :                 if (r->naming_context) {
    3262        7906 :                         _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3263        7906 :                         NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    3264        7906 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    3265        7906 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    3266             :                 }
    3267       10059 :                 if (r->uptodateness_vector) {
    3268        2564 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3269        2564 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    3270        2564 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2CtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    3271        2564 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    3272             :                 }
    3273       10059 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    3274       10059 :                 if (r->first_object) {
    3275        7094 :                         _mem_save_first_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3276        7094 :                         NDR_PULL_SET_MEM_CTX(ndr, r->first_object, 0);
    3277        7094 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
    3278        7094 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_first_object_0, 0);
    3279             :                 }
    3280       10059 :                 if (r->linked_attributes) {
    3281       10059 :                         _mem_save_linked_attributes_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3282       10059 :                         NDR_PULL_SET_MEM_CTX(ndr, r->linked_attributes, 0);
    3283       10059 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->linked_attributes));
    3284       10059 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->linked_attributes, &size_linked_attributes_1));
    3285       10059 :                         NDR_PULL_ALLOC_N(ndr, r->linked_attributes, size_linked_attributes_1);
    3286       10059 :                         _mem_save_linked_attributes_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3287       10059 :                         NDR_PULL_SET_MEM_CTX(ndr, r->linked_attributes, 0);
    3288       31243 :                         for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
    3289       21184 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_SCALARS, &r->linked_attributes[cntr_linked_attributes_1]));
    3290             :                         }
    3291       31243 :                         for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
    3292       21184 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_BUFFERS, &r->linked_attributes[cntr_linked_attributes_1]));
    3293             :                         }
    3294       10059 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_linked_attributes_1, 0);
    3295       10059 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_linked_attributes_0, 0);
    3296             :                 }
    3297       10059 :                 if (r->linked_attributes) {
    3298       10059 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->linked_attributes, r->linked_attributes_count));
    3299             :                 }
    3300       31243 :                 for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
    3301           0 :                 }
    3302             :         }
    3303       20118 :         return NDR_ERR_SUCCESS;
    3304             : }
    3305             : 
    3306           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesCtr6 *r)
    3307             : {
    3308           0 :         ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, name, r);
    3309           0 : }
    3310             : 
    3311          40 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6 *r)
    3312             : {
    3313           0 :         uint32_t cntr_linked_attributes_1;
    3314          40 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr6");
    3315          40 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3316          40 :         ndr->depth++;
    3317          40 :         ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
    3318          40 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    3319          40 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    3320          40 :         ndr->depth++;
    3321          40 :         if (r->naming_context) {
    3322          40 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    3323             :         }
    3324          40 :         ndr->depth--;
    3325          40 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "old_highwatermark", &r->old_highwatermark);
    3326          40 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "new_highwatermark", &r->new_highwatermark);
    3327          40 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    3328          40 :         ndr->depth++;
    3329          40 :         if (r->uptodateness_vector) {
    3330          12 :                 ndr_print_drsuapi_DsReplicaCursor2CtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    3331             :         }
    3332          40 :         ndr->depth--;
    3333          40 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
    3334          40 :         ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret);
    3335          40 :         ndr_print_uint32(ndr, "object_count", r->object_count);
    3336          40 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55:r->__ndr_size);
    3337          40 :         ndr_print_ptr(ndr, "first_object", r->first_object);
    3338          40 :         ndr->depth++;
    3339          40 :         if (r->first_object) {
    3340          40 :                 ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "first_object", r->first_object);
    3341             :         }
    3342          40 :         ndr->depth--;
    3343          40 :         ndr_print_uint32(ndr, "more_data", r->more_data);
    3344          40 :         ndr_print_uint32(ndr, "nc_object_count", r->nc_object_count);
    3345          40 :         ndr_print_uint32(ndr, "nc_linked_attributes_count", r->nc_linked_attributes_count);
    3346          40 :         ndr_print_uint32(ndr, "linked_attributes_count", r->linked_attributes_count);
    3347          40 :         ndr_print_ptr(ndr, "linked_attributes", r->linked_attributes);
    3348          40 :         ndr->depth++;
    3349          40 :         if (r->linked_attributes) {
    3350          40 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "linked_attributes", (uint32_t)(r->linked_attributes_count));
    3351          40 :                 ndr->depth++;
    3352         222 :                 for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
    3353         182 :                         ndr_print_drsuapi_DsReplicaLinkedAttribute(ndr, "linked_attributes", &r->linked_attributes[cntr_linked_attributes_1]);
    3354             :                 }
    3355          40 :                 ndr->depth--;
    3356             :         }
    3357          40 :         ndr->depth--;
    3358          40 :         ndr_print_WERROR(ndr, "drs_error", r->drs_error);
    3359          40 :         ndr->depth--;
    3360             : }
    3361             : 
    3362       20222 : _PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, libndr_flags flags)
    3363             : {
    3364       20222 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6);
    3365             : }
    3366             : 
    3367           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r)
    3368             : {
    3369           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3370           0 :         if (ndr_flags & NDR_SCALARS) {
    3371           0 :                 NDR_CHECK(ndr_push_align(ndr, 1));
    3372             :                 {
    3373           0 :                         struct ndr_push *_ndr_ctr1;
    3374           0 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1));
    3375           0 :                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1));
    3376           0 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1));
    3377             :                 }
    3378           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    3379             :         }
    3380           0 :         if (ndr_flags & NDR_BUFFERS) {
    3381           0 :         }
    3382           0 :         return NDR_ERR_SUCCESS;
    3383             : }
    3384             : 
    3385           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r)
    3386             : {
    3387           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3388           0 :         if (ndr_flags & NDR_SCALARS) {
    3389           0 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
    3390             :                 {
    3391           0 :                         struct ndr_pull *_ndr_ctr1;
    3392           0 :                         ssize_t sub_size = -1;
    3393           0 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, sub_size));
    3394           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1));
    3395           0 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, sub_size));
    3396             :                 }
    3397           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    3398             :         }
    3399           0 :         if (ndr_flags & NDR_BUFFERS) {
    3400           0 :         }
    3401           0 :         return NDR_ERR_SUCCESS;
    3402             : }
    3403             : 
    3404           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesCtr1TS *r)
    3405             : {
    3406           0 :         ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, name, r);
    3407           0 : }
    3408             : 
    3409           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r)
    3410             : {
    3411           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr1TS");
    3412           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3413           0 :         ndr->depth++;
    3414           0 :         ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", &r->ctr1);
    3415           0 :         ndr->depth--;
    3416             : }
    3417             : 
    3418           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr6TS *r)
    3419             : {
    3420           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3421           0 :         if (ndr_flags & NDR_SCALARS) {
    3422           0 :                 NDR_CHECK(ndr_push_align(ndr, 1));
    3423             :                 {
    3424           0 :                         struct ndr_push *_ndr_ctr6;
    3425           0 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1));
    3426           0 :                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6));
    3427           0 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1));
    3428             :                 }
    3429           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    3430             :         }
    3431           0 :         if (ndr_flags & NDR_BUFFERS) {
    3432           0 :         }
    3433           0 :         return NDR_ERR_SUCCESS;
    3434             : }
    3435             : 
    3436           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr6TS *r)
    3437             : {
    3438           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3439           0 :         if (ndr_flags & NDR_SCALARS) {
    3440           0 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
    3441             :                 {
    3442           0 :                         struct ndr_pull *_ndr_ctr6;
    3443           0 :                         ssize_t sub_size = -1;
    3444           0 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, sub_size));
    3445           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6));
    3446           0 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, sub_size));
    3447             :                 }
    3448           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    3449             :         }
    3450           0 :         if (ndr_flags & NDR_BUFFERS) {
    3451           0 :         }
    3452           0 :         return NDR_ERR_SUCCESS;
    3453             : }
    3454             : 
    3455           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsGetNCChangesCtr6TS *r)
    3456             : {
    3457           0 :         ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, name, r);
    3458           0 : }
    3459             : 
    3460           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6TS *r)
    3461             : {
    3462           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr6TS");
    3463           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3464           0 :         ndr->depth++;
    3465           0 :         ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", &r->ctr6);
    3466           0 :         ndr->depth--;
    3467             : }
    3468             : 
    3469           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
    3470             : {
    3471           0 :         uint32_t _ptr_ts;
    3472           0 :         TALLOC_CTX *_mem_save_ts_0 = NULL;
    3473           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3474           0 :         if (ndr_flags & NDR_SCALARS) {
    3475           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3476           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
    3477           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
    3478           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
    3479           0 :                 if (_ptr_ts) {
    3480           0 :                         NDR_PULL_ALLOC(ndr, r->ts);
    3481             :                 } else {
    3482           0 :                         r->ts = NULL;
    3483             :                 }
    3484           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3485             :         }
    3486           0 :         if (ndr_flags & NDR_BUFFERS) {
    3487           0 :                 if (r->ts) {
    3488           0 :                         _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3489           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
    3490             :                         {
    3491           0 :                                 struct ndr_pull *_ndr_ts;
    3492           0 :                                 ssize_t sub_size = r->compressed_length;
    3493           0 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, sub_size));
    3494             :                                 {
    3495           0 :                                         struct ndr_pull *_ndr_ts_compressed;
    3496           0 :                                         NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length, r->compressed_length));
    3497           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
    3498           0 :                                         NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
    3499             :                                 }
    3500           0 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, sub_size));
    3501             :                         }
    3502           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
    3503             :                 }
    3504             :         }
    3505           0 :         return NDR_ERR_SUCCESS;
    3506             : }
    3507             : 
    3508           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
    3509             : {
    3510           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr1");
    3511           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3512           0 :         ndr->depth++;
    3513           0 :         ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
    3514           0 :         ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
    3515           0 :         ndr_print_ptr(ndr, "ts", r->ts);
    3516           0 :         ndr->depth++;
    3517           0 :         if (r->ts) {
    3518           0 :                 ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts);
    3519             :         }
    3520           0 :         ndr->depth--;
    3521           0 :         ndr->depth--;
    3522             : }
    3523             : 
    3524           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
    3525             : {
    3526           0 :         uint32_t _ptr_ts;
    3527           0 :         TALLOC_CTX *_mem_save_ts_0 = NULL;
    3528           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3529           0 :         if (ndr_flags & NDR_SCALARS) {
    3530           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3531           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
    3532           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
    3533           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
    3534           0 :                 if (_ptr_ts) {
    3535           0 :                         NDR_PULL_ALLOC(ndr, r->ts);
    3536             :                 } else {
    3537           0 :                         r->ts = NULL;
    3538             :                 }
    3539           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3540             :         }
    3541           0 :         if (ndr_flags & NDR_BUFFERS) {
    3542           0 :                 if (r->ts) {
    3543           0 :                         _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3544           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
    3545             :                         {
    3546           0 :                                 struct ndr_pull *_ndr_ts;
    3547           0 :                                 ssize_t sub_size = r->compressed_length;
    3548           0 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, sub_size));
    3549             :                                 {
    3550           0 :                                         struct ndr_pull *_ndr_ts_compressed;
    3551           0 :                                         NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length, r->compressed_length));
    3552           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
    3553           0 :                                         NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
    3554             :                                 }
    3555           0 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, sub_size));
    3556             :                         }
    3557           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
    3558             :                 }
    3559             :         }
    3560           0 :         return NDR_ERR_SUCCESS;
    3561             : }
    3562             : 
    3563           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
    3564             : {
    3565           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr6");
    3566           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3567           0 :         ndr->depth++;
    3568           0 :         ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
    3569           0 :         ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
    3570           0 :         ndr_print_ptr(ndr, "ts", r->ts);
    3571           0 :         ndr->depth++;
    3572           0 :         if (r->ts) {
    3573           0 :                 ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts);
    3574             :         }
    3575           0 :         ndr->depth--;
    3576           0 :         ndr->depth--;
    3577             : }
    3578             : 
    3579           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *r)
    3580             : {
    3581           0 :         uint32_t _ptr_ts;
    3582           0 :         TALLOC_CTX *_mem_save_ts_0 = NULL;
    3583           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3584           0 :         if (ndr_flags & NDR_SCALARS) {
    3585           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3586           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
    3587           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
    3588           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
    3589           0 :                 if (_ptr_ts) {
    3590           0 :                         NDR_PULL_ALLOC(ndr, r->ts);
    3591             :                 } else {
    3592           0 :                         r->ts = NULL;
    3593             :                 }
    3594           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3595             :         }
    3596           0 :         if (ndr_flags & NDR_BUFFERS) {
    3597           0 :                 if (r->ts) {
    3598           0 :                         _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3599           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
    3600             :                         {
    3601           0 :                                 struct ndr_pull *_ndr_ts;
    3602           0 :                                 ssize_t sub_size = r->compressed_length;
    3603           0 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, sub_size));
    3604             :                                 {
    3605           0 :                                         struct ndr_pull *_ndr_ts_compressed;
    3606           0 :                                         NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_WIN2K3_LZ77_DIRECT2, r->decompressed_length, r->compressed_length));
    3607           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
    3608           0 :                                         NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_WIN2K3_LZ77_DIRECT2, r->decompressed_length));
    3609             :                                 }
    3610           0 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, sub_size));
    3611             :                         }
    3612           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
    3613             :                 }
    3614             :         }
    3615           0 :         return NDR_ERR_SUCCESS;
    3616             : }
    3617             : 
    3618           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *r)
    3619             : {
    3620           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1");
    3621           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3622           0 :         ndr->depth++;
    3623           0 :         ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
    3624           0 :         ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
    3625           0 :         ndr_print_ptr(ndr, "ts", r->ts);
    3626           0 :         ndr->depth++;
    3627           0 :         if (r->ts) {
    3628           0 :                 ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts);
    3629             :         }
    3630           0 :         ndr->depth--;
    3631           0 :         ndr->depth--;
    3632             : }
    3633             : 
    3634           2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *r)
    3635             : {
    3636           2 :         uint32_t _ptr_ts;
    3637           2 :         TALLOC_CTX *_mem_save_ts_0 = NULL;
    3638           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3639           2 :         if (ndr_flags & NDR_SCALARS) {
    3640           1 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3641           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
    3642           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
    3643           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
    3644           1 :                 if (_ptr_ts) {
    3645           1 :                         NDR_PULL_ALLOC(ndr, r->ts);
    3646             :                 } else {
    3647           0 :                         r->ts = NULL;
    3648             :                 }
    3649           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3650             :         }
    3651           2 :         if (ndr_flags & NDR_BUFFERS) {
    3652           1 :                 if (r->ts) {
    3653           1 :                         _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3654           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
    3655             :                         {
    3656           1 :                                 struct ndr_pull *_ndr_ts;
    3657           1 :                                 ssize_t sub_size = r->compressed_length;
    3658           2 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, sub_size));
    3659             :                                 {
    3660           1 :                                         struct ndr_pull *_ndr_ts_compressed;
    3661           1 :                                         NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_WIN2K3_LZ77_DIRECT2, r->decompressed_length, r->compressed_length));
    3662           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
    3663           0 :                                         NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_WIN2K3_LZ77_DIRECT2, r->decompressed_length));
    3664             :                                 }
    3665           0 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, sub_size));
    3666             :                         }
    3667           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
    3668             :                 }
    3669             :         }
    3670           0 :         return NDR_ERR_SUCCESS;
    3671             : }
    3672             : 
    3673           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *r)
    3674             : {
    3675           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6");
    3676           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3677           0 :         ndr->depth++;
    3678           0 :         ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
    3679           0 :         ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
    3680           0 :         ndr_print_ptr(ndr, "ts", r->ts);
    3681           0 :         ndr->depth++;
    3682           0 :         if (r->ts) {
    3683           0 :                 ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts);
    3684             :         }
    3685           0 :         ndr->depth--;
    3686           0 :         ndr->depth--;
    3687             : }
    3688             : 
    3689           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCompressionType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsGetNCChangesCompressionType r)
    3690             : {
    3691           0 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    3692           0 :         return NDR_ERR_SUCCESS;
    3693             : }
    3694             : 
    3695           1 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCompressionType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsGetNCChangesCompressionType *r)
    3696             : {
    3697           1 :         uint16_t v;
    3698           1 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    3699           1 :         *r = v;
    3700           1 :         return NDR_ERR_SUCCESS;
    3701             : }
    3702             : 
    3703           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCompressionType(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetNCChangesCompressionType r)
    3704             : {
    3705           0 :         const char *val = NULL;
    3706             : 
    3707           0 :         switch (r) {
    3708           0 :                 case DRSUAPI_COMPRESSION_TYPE_MSZIP: val = "DRSUAPI_COMPRESSION_TYPE_MSZIP"; break;
    3709           0 :                 case DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2: val = "DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2"; break;
    3710             :         }
    3711           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    3712           0 : }
    3713             : 
    3714           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNCChangesCompressedCtr *r)
    3715             : {
    3716           0 :         uint32_t level;
    3717             :         {
    3718           0 :                 libndr_flags _flags_save_UNION = ndr->flags;
    3719           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    3720           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3721           0 :                 if (ndr_flags & NDR_SCALARS) {
    3722             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3723           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3724           0 :                         NDR_CHECK(ndr_push_union_align(ndr, 5));
    3725           0 :                         switch (level) {
    3726           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
    3727           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
    3728           0 :                                 break; }
    3729             : 
    3730           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
    3731           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_SCALARS, &r->mszip6));
    3732           0 :                                 break; }
    3733             : 
    3734           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16): {
    3735           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, NDR_SCALARS, &r->xpress1));
    3736           0 :                                 break; }
    3737             : 
    3738           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16): {
    3739           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, NDR_SCALARS, &r->xpress6));
    3740           0 :                                 break; }
    3741             : 
    3742           0 :                                 default:
    3743           0 :                                         return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    3744             :                         }
    3745             :                 }
    3746           0 :                 if (ndr_flags & NDR_BUFFERS) {
    3747           0 :                         if (!(ndr_flags & NDR_SCALARS)) {
    3748             :                                 /* We didn't get it above, and the token is not needed after this. */
    3749           0 :                                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3750             :                         }
    3751           0 :                         switch (level) {
    3752           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3753           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
    3754           0 :                                 break;
    3755             : 
    3756           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3757           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_BUFFERS, &r->mszip6));
    3758           0 :                                 break;
    3759             : 
    3760           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
    3761           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, NDR_BUFFERS, &r->xpress1));
    3762           0 :                                 break;
    3763             : 
    3764           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
    3765           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, NDR_BUFFERS, &r->xpress6));
    3766           0 :                                 break;
    3767             : 
    3768           0 :                                 default:
    3769           0 :                                         return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    3770             :                         }
    3771             :                 }
    3772           0 :                 ndr->flags = _flags_save_UNION;
    3773             :         }
    3774           0 :         return NDR_ERR_SUCCESS;
    3775             : }
    3776             : 
    3777           2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNCChangesCompressedCtr *r)
    3778             : {
    3779           2 :         uint32_t level;
    3780             :         {
    3781           2 :                 libndr_flags _flags_save_UNION = ndr->flags;
    3782           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    3783           2 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3784           2 :                 if (ndr_flags & NDR_SCALARS) {
    3785             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3786           1 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3787           1 :                         NDR_CHECK(ndr_pull_union_align(ndr, 5));
    3788           1 :                         switch (level) {
    3789           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
    3790           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
    3791           0 :                                 break; }
    3792             : 
    3793           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
    3794           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_SCALARS, &r->mszip6));
    3795           0 :                                 break; }
    3796             : 
    3797           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16): {
    3798           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, NDR_SCALARS, &r->xpress1));
    3799           0 :                                 break; }
    3800             : 
    3801           1 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16): {
    3802           1 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, NDR_SCALARS, &r->xpress6));
    3803           0 :                                 break; }
    3804             : 
    3805           0 :                                 default:
    3806           0 :                                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    3807             :                         }
    3808             :                 }
    3809           2 :                 if (ndr_flags & NDR_BUFFERS) {
    3810           1 :                         if (!(ndr_flags & NDR_SCALARS)) {
    3811             :                                 /* We didn't get it above, and the token is not needed after this. */
    3812           1 :                                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3813             :                         }
    3814           1 :                         switch (level) {
    3815           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3816           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
    3817           0 :                                 break;
    3818             : 
    3819           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3820           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_BUFFERS, &r->mszip6));
    3821           0 :                                 break;
    3822             : 
    3823           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
    3824           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, NDR_BUFFERS, &r->xpress1));
    3825           0 :                                 break;
    3826             : 
    3827           1 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
    3828           1 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, NDR_BUFFERS, &r->xpress6));
    3829           0 :                                 break;
    3830             : 
    3831           0 :                                 default:
    3832           0 :                                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    3833             :                         }
    3834             :                 }
    3835           1 :                 ndr->flags = _flags_save_UNION;
    3836             :         }
    3837           1 :         return NDR_ERR_SUCCESS;
    3838             : }
    3839             : 
    3840           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCompressedCtr *r)
    3841             : {
    3842           0 :         uint32_t level;
    3843             :         {
    3844           0 :                 libndr_flags _flags_save_UNION = ndr->flags;
    3845           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    3846           0 :                 level = ndr_print_steal_switch_value(ndr, r);
    3847           0 :                 ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesCompressedCtr");
    3848           0 :                 switch (level) {
    3849           0 :                         case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3850           0 :                                 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, "mszip1", &r->mszip1);
    3851           0 :                         break;
    3852             : 
    3853           0 :                         case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3854           0 :                                 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, "mszip6", &r->mszip6);
    3855           0 :                         break;
    3856             : 
    3857           0 :                         case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
    3858           0 :                                 ndr_print_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1(ndr, "xpress1", &r->xpress1);
    3859           0 :                         break;
    3860             : 
    3861           0 :                         case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
    3862           0 :                                 ndr_print_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6(ndr, "xpress6", &r->xpress6);
    3863           0 :                         break;
    3864             : 
    3865           0 :                         default:
    3866           0 :                                 ndr_print_bad_level(ndr, name, level);
    3867             :                 }
    3868           0 :                 ndr->flags = _flags_save_UNION;
    3869             :         }
    3870           0 : }
    3871             : 
    3872           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr2 *r)
    3873             : {
    3874           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3875           0 :         if (ndr_flags & NDR_SCALARS) {
    3876           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3877           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
    3878           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3879             :         }
    3880           0 :         if (ndr_flags & NDR_BUFFERS) {
    3881           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
    3882             :         }
    3883           0 :         return NDR_ERR_SUCCESS;
    3884             : }
    3885             : 
    3886           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr2 *r)
    3887             : {
    3888           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3889           0 :         if (ndr_flags & NDR_SCALARS) {
    3890           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3891           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
    3892           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3893             :         }
    3894           0 :         if (ndr_flags & NDR_BUFFERS) {
    3895           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
    3896             :         }
    3897           0 :         return NDR_ERR_SUCCESS;
    3898             : }
    3899             : 
    3900           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr2 *r)
    3901             : {
    3902           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr2");
    3903           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3904           0 :         ndr->depth++;
    3905           0 :         ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, "mszip1", &r->mszip1);
    3906           0 :         ndr->depth--;
    3907             : }
    3908             : 
    3909           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr7(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNCChangesCtr7 *r)
    3910             : {
    3911           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3912           0 :         if (ndr_flags & NDR_SCALARS) {
    3913           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3914           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
    3915           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressionType(ndr, NDR_SCALARS, r->type));
    3916           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
    3917           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr));
    3918           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3919             :         }
    3920           0 :         if (ndr_flags & NDR_BUFFERS) {
    3921           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
    3922           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr));
    3923             :         }
    3924           0 :         return NDR_ERR_SUCCESS;
    3925             : }
    3926             : 
    3927           2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr7(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNCChangesCtr7 *r)
    3928             : {
    3929           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3930           2 :         if (ndr_flags & NDR_SCALARS) {
    3931           1 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3932           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
    3933           1 :                 if (r->level > 6) {
    3934           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->level), (uint32_t)(0), (uint32_t)(6));
    3935             :                 }
    3936           2 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressionType(ndr, NDR_SCALARS, &r->type));
    3937           1 :                 if (r->type < 2 || r->type > 3) {
    3938           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%d) out of range (%d - %d)", (int)(r->type), (int)(2), (int)(3));
    3939             :                 }
    3940           1 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
    3941           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr));
    3942           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3943             :         }
    3944           2 :         if (ndr_flags & NDR_BUFFERS) {
    3945           1 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
    3946           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr));
    3947             :         }
    3948           0 :         return NDR_ERR_SUCCESS;
    3949             : }
    3950             : 
    3951           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr7(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr7 *r)
    3952             : {
    3953           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr7");
    3954           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3955           0 :         ndr->depth++;
    3956           0 :         ndr_print_uint32(ndr, "level", r->level);
    3957           0 :         ndr_print_drsuapi_DsGetNCChangesCompressionType(ndr, "type", r->type);
    3958           0 :         ndr_print_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16));
    3959           0 :         ndr_print_drsuapi_DsGetNCChangesCompressedCtr(ndr, "ctr", &r->ctr);
    3960           0 :         ndr->depth--;
    3961             : }
    3962             : 
    3963       10111 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNCChangesCtr *r)
    3964             : {
    3965           0 :         uint32_t level;
    3966       10111 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3967       10111 :         if (ndr_flags & NDR_SCALARS) {
    3968             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3969       10111 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3970       10111 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    3971       10111 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    3972       10111 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    3973       10111 :                 switch (level) {
    3974           0 :                         case 1: {
    3975           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr, NDR_SCALARS, &r->ctr1));
    3976           0 :                         break; }
    3977             : 
    3978           0 :                         case 2: {
    3979           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr, NDR_SCALARS, &r->ctr2));
    3980           0 :                         break; }
    3981             : 
    3982       10111 :                         case 6: {
    3983       10111 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr, NDR_SCALARS, &r->ctr6));
    3984       10111 :                         break; }
    3985             : 
    3986           0 :                         case 7: {
    3987           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr, NDR_SCALARS, &r->ctr7));
    3988           0 :                         break; }
    3989             : 
    3990           0 :                         default:
    3991           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    3992             :                 }
    3993             :         }
    3994       10111 :         if (ndr_flags & NDR_BUFFERS) {
    3995       10111 :                 if (!(ndr_flags & NDR_SCALARS)) {
    3996             :                         /* We didn't get it above, and the token is not needed after this. */
    3997           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3998             :                 }
    3999       10111 :                 switch (level) {
    4000           0 :                         case 1:
    4001           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    4002           0 :                         break;
    4003             : 
    4004           0 :                         case 2:
    4005           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr, NDR_BUFFERS, &r->ctr2));
    4006           0 :                         break;
    4007             : 
    4008       10111 :                         case 6:
    4009       10111 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr, NDR_BUFFERS, &r->ctr6));
    4010       10111 :                         break;
    4011             : 
    4012           0 :                         case 7:
    4013           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr, NDR_BUFFERS, &r->ctr7));
    4014           0 :                         break;
    4015             : 
    4016           0 :                         default:
    4017           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4018             :                 }
    4019             :         }
    4020       10111 :         return NDR_ERR_SUCCESS;
    4021             : }
    4022             : 
    4023       10061 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNCChangesCtr *r)
    4024             : {
    4025           2 :         uint32_t level;
    4026           2 :         uint32_t _level;
    4027       10061 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4028       10061 :         if (ndr_flags & NDR_SCALARS) {
    4029             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4030       10061 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4031       10061 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    4032       10061 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4033       10061 :                 if (_level != level) {
    4034           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    4035             :                 }
    4036       10061 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    4037       10061 :                 switch (level) {
    4038           1 :                         case 1: {
    4039           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr, NDR_SCALARS, &r->ctr1));
    4040           0 :                         break; }
    4041             : 
    4042           0 :                         case 2: {
    4043           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr, NDR_SCALARS, &r->ctr2));
    4044           0 :                         break; }
    4045             : 
    4046       10059 :                         case 6: {
    4047       10059 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr, NDR_SCALARS, &r->ctr6));
    4048       10059 :                         break; }
    4049             : 
    4050           1 :                         case 7: {
    4051           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr, NDR_SCALARS, &r->ctr7));
    4052           0 :                         break; }
    4053             : 
    4054           0 :                         default:
    4055           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4056             :                 }
    4057             :         }
    4058       10061 :         if (ndr_flags & NDR_BUFFERS) {
    4059       10061 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4060             :                         /* We didn't get it above, and the token is not needed after this. */
    4061           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4062             :                 }
    4063       10061 :                 switch (level) {
    4064           1 :                         case 1:
    4065           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    4066           0 :                         break;
    4067             : 
    4068           0 :                         case 2:
    4069           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr, NDR_BUFFERS, &r->ctr2));
    4070           0 :                         break;
    4071             : 
    4072       10059 :                         case 6:
    4073       10059 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr, NDR_BUFFERS, &r->ctr6));
    4074       10059 :                         break;
    4075             : 
    4076           1 :                         case 7:
    4077           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr, NDR_BUFFERS, &r->ctr7));
    4078           0 :                         break;
    4079             : 
    4080           0 :                         default:
    4081           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4082             :                 }
    4083             :         }
    4084       10059 :         return NDR_ERR_SUCCESS;
    4085             : }
    4086             : 
    4087          41 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCtr *r)
    4088             : {
    4089           1 :         uint32_t level;
    4090          41 :         level = ndr_print_steal_switch_value(ndr, r);
    4091          41 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesCtr");
    4092          41 :         switch (level) {
    4093           1 :                 case 1:
    4094           1 :                         ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", &r->ctr1);
    4095           1 :                 break;
    4096             : 
    4097           0 :                 case 2:
    4098           0 :                         ndr_print_drsuapi_DsGetNCChangesCtr2(ndr, "ctr2", &r->ctr2);
    4099           0 :                 break;
    4100             : 
    4101          40 :                 case 6:
    4102          40 :                         ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", &r->ctr6);
    4103          40 :                 break;
    4104             : 
    4105           0 :                 case 7:
    4106           0 :                         ndr_print_drsuapi_DsGetNCChangesCtr7(ndr, "ctr7", &r->ctr7);
    4107           0 :                 break;
    4108             : 
    4109           0 :                 default:
    4110           0 :                         ndr_print_bad_level(ndr, name, level);
    4111             :         }
    4112          41 : }
    4113             : 
    4114        3238 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
    4115             : {
    4116        3238 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4117        3238 :         if (ndr_flags & NDR_SCALARS) {
    4118        1619 :                 if (r->naming_context == NULL) {
    4119           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4120             :                 }
    4121        1619 :                 if (r->dest_dsa_dns_name == NULL) {
    4122           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4123             :                 }
    4124        1619 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4125        1619 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4126        1619 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->dest_dsa_dns_name */
    4127        1619 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->dest_dsa_guid));
    4128        1619 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4129        1619 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4130             :         }
    4131        3238 :         if (ndr_flags & NDR_BUFFERS) {
    4132        1619 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4133        1619 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dest_dsa_dns_name, CH_DOS)));
    4134        1619 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4135        1619 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dest_dsa_dns_name, CH_DOS)));
    4136        1619 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dest_dsa_dns_name, ndr_charset_length(r->dest_dsa_dns_name, CH_DOS), sizeof(uint8_t), CH_DOS));
    4137             :         }
    4138        3238 :         return NDR_ERR_SUCCESS;
    4139             : }
    4140             : 
    4141        3238 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
    4142             : {
    4143           0 :         uint32_t _ptr_naming_context;
    4144        3238 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4145           0 :         uint32_t _ptr_dest_dsa_dns_name;
    4146        3238 :         uint32_t size_dest_dsa_dns_name_1 = 0;
    4147        3238 :         uint32_t length_dest_dsa_dns_name_1 = 0;
    4148        3238 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4149        3238 :         if (ndr_flags & NDR_SCALARS) {
    4150        1619 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4151        1619 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4152        1619 :                 if (_ptr_naming_context) {
    4153        1619 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4154             :                 } else {
    4155           0 :                         r->naming_context = NULL;
    4156             :                 }
    4157        1619 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_dest_dsa_dns_name));
    4158        1619 :                 if (_ptr_dest_dsa_dns_name) {
    4159        1619 :                         NDR_PULL_ALLOC(ndr, r->dest_dsa_dns_name);
    4160             :                 } else {
    4161           0 :                         r->dest_dsa_dns_name = NULL;
    4162             :                 }
    4163        1619 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->dest_dsa_guid));
    4164        1619 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4165        1619 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4166             :         }
    4167        3238 :         if (ndr_flags & NDR_BUFFERS) {
    4168        1619 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4169        1619 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4170        1619 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4171        1619 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4172        1619 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->dest_dsa_dns_name));
    4173        1619 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->dest_dsa_dns_name));
    4174        1619 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dest_dsa_dns_name, &size_dest_dsa_dns_name_1));
    4175        1619 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dest_dsa_dns_name, &length_dest_dsa_dns_name_1));
    4176        1619 :                 if (length_dest_dsa_dns_name_1 > size_dest_dsa_dns_name_1) {
    4177           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dest_dsa_dns_name_1, length_dest_dsa_dns_name_1);
    4178             :                 }
    4179        1619 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_dest_dsa_dns_name_1, sizeof(uint8_t)));
    4180        1619 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dest_dsa_dns_name, length_dest_dsa_dns_name_1, sizeof(uint8_t), CH_DOS));
    4181             :         }
    4182        3238 :         return NDR_ERR_SUCCESS;
    4183             : }
    4184             : 
    4185           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
    4186             : {
    4187           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaUpdateRefsRequest1");
    4188           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4189           0 :         ndr->depth++;
    4190           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4191           0 :         ndr->depth++;
    4192           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4193           0 :         ndr->depth--;
    4194           0 :         ndr_print_ptr(ndr, "dest_dsa_dns_name", r->dest_dsa_dns_name);
    4195           0 :         ndr->depth++;
    4196           0 :         ndr_print_string(ndr, "dest_dsa_dns_name", r->dest_dsa_dns_name);
    4197           0 :         ndr->depth--;
    4198           0 :         ndr_print_GUID(ndr, "dest_dsa_guid", &r->dest_dsa_guid);
    4199           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4200           0 :         ndr->depth--;
    4201             : }
    4202             : 
    4203        1619 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaUpdateRefsRequest *r)
    4204             : {
    4205           0 :         uint32_t level;
    4206        1619 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4207        1619 :         if (ndr_flags & NDR_SCALARS) {
    4208             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4209        1619 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4210        1619 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4211        1619 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    4212        1619 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4213        1619 :                 switch (level) {
    4214        1619 :                         case 1: {
    4215        1619 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_SCALARS, &r->req1));
    4216        1619 :                         break; }
    4217             : 
    4218           0 :                         default:
    4219           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4220             :                 }
    4221             :         }
    4222        1619 :         if (ndr_flags & NDR_BUFFERS) {
    4223        1619 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4224             :                         /* We didn't get it above, and the token is not needed after this. */
    4225           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4226             :                 }
    4227        1619 :                 switch (level) {
    4228        1619 :                         case 1:
    4229        1619 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_BUFFERS, &r->req1));
    4230        1619 :                         break;
    4231             : 
    4232           0 :                         default:
    4233           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4234             :                 }
    4235             :         }
    4236        1619 :         return NDR_ERR_SUCCESS;
    4237             : }
    4238             : 
    4239        1619 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaUpdateRefsRequest *r)
    4240             : {
    4241           0 :         uint32_t level;
    4242           0 :         uint32_t _level;
    4243        1619 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4244        1619 :         if (ndr_flags & NDR_SCALARS) {
    4245             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4246        1619 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4247        1619 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4248        1619 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4249        1619 :                 if (_level != level) {
    4250           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    4251             :                 }
    4252        1619 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4253        1619 :                 switch (level) {
    4254        1619 :                         case 1: {
    4255        1619 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_SCALARS, &r->req1));
    4256        1619 :                         break; }
    4257             : 
    4258           0 :                         default:
    4259           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4260             :                 }
    4261             :         }
    4262        1619 :         if (ndr_flags & NDR_BUFFERS) {
    4263        1619 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4264             :                         /* We didn't get it above, and the token is not needed after this. */
    4265           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4266             :                 }
    4267        1619 :                 switch (level) {
    4268        1619 :                         case 1:
    4269        1619 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_BUFFERS, &r->req1));
    4270        1619 :                         break;
    4271             : 
    4272           0 :                         default:
    4273           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4274             :                 }
    4275             :         }
    4276        1619 :         return NDR_ERR_SUCCESS;
    4277             : }
    4278             : 
    4279           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaUpdateRefsRequest *r)
    4280             : {
    4281           0 :         uint32_t level;
    4282           0 :         level = ndr_print_steal_switch_value(ndr, r);
    4283           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaUpdateRefsRequest");
    4284           0 :         switch (level) {
    4285           0 :                 case 1:
    4286           0 :                         ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(ndr, "req1", &r->req1);
    4287           0 :                 break;
    4288             : 
    4289           0 :                 default:
    4290           0 :                         ndr_print_bad_level(ndr, name, level);
    4291             :         }
    4292           0 : }
    4293             : 
    4294           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAddRequest1 *r)
    4295             : {
    4296           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4297           0 :         if (ndr_flags & NDR_SCALARS) {
    4298           0 :                 if (r->naming_context == NULL) {
    4299           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4300             :                 }
    4301           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4302           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4303           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
    4304           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
    4305           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4306           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4307             :         }
    4308           0 :         if (ndr_flags & NDR_BUFFERS) {
    4309           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4310           0 :                 if (r->source_dsa_address) {
    4311           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
    4312           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4313           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
    4314           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_address, ndr_charset_length(r->source_dsa_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4315             :                 }
    4316             :         }
    4317           0 :         return NDR_ERR_SUCCESS;
    4318             : }
    4319             : 
    4320           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAddRequest1 *r)
    4321             : {
    4322           0 :         uint32_t _ptr_naming_context;
    4323           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4324           0 :         uint32_t _ptr_source_dsa_address;
    4325           0 :         uint32_t size_source_dsa_address_1 = 0;
    4326           0 :         uint32_t length_source_dsa_address_1 = 0;
    4327           0 :         TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
    4328           0 :         uint32_t size_schedule_0 = 0;
    4329           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4330           0 :         if (ndr_flags & NDR_SCALARS) {
    4331           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4332           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4333           0 :                 if (_ptr_naming_context) {
    4334           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4335             :                 } else {
    4336           0 :                         r->naming_context = NULL;
    4337             :                 }
    4338           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
    4339           0 :                 if (_ptr_source_dsa_address) {
    4340           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_address);
    4341             :                 } else {
    4342           0 :                         r->source_dsa_address = NULL;
    4343             :                 }
    4344           0 :                 size_schedule_0 = 84;
    4345           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
    4346           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4347           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4348             :         }
    4349           0 :         if (ndr_flags & NDR_BUFFERS) {
    4350           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4351           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4352           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4353           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4354           0 :                 if (r->source_dsa_address) {
    4355           0 :                         _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4356           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
    4357           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
    4358           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
    4359           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
    4360           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
    4361           0 :                         if (length_source_dsa_address_1 > size_source_dsa_address_1) {
    4362           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_address_1, length_source_dsa_address_1);
    4363             :                         }
    4364           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint16_t)));
    4365           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint16_t), CH_UTF16));
    4366           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
    4367             :                 }
    4368             :         }
    4369           0 :         return NDR_ERR_SUCCESS;
    4370             : }
    4371             : 
    4372           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest1 *r)
    4373             : {
    4374           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAddRequest1");
    4375           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4376           0 :         ndr->depth++;
    4377           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4378           0 :         ndr->depth++;
    4379           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4380           0 :         ndr->depth--;
    4381           0 :         ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
    4382           0 :         ndr->depth++;
    4383           0 :         if (r->source_dsa_address) {
    4384           0 :                 ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
    4385             :         }
    4386           0 :         ndr->depth--;
    4387           0 :         ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
    4388           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4389           0 :         ndr->depth--;
    4390             : }
    4391             : 
    4392           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAddRequest2 *r)
    4393             : {
    4394           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4395           0 :         if (ndr_flags & NDR_SCALARS) {
    4396           0 :                 if (r->naming_context == NULL) {
    4397           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4398             :                 }
    4399           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4400           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4401           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_dn));
    4402           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport_dn));
    4403           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
    4404           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
    4405           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4406           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4407             :         }
    4408           0 :         if (ndr_flags & NDR_BUFFERS) {
    4409           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4410           0 :                 if (r->source_dsa_dn) {
    4411           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->source_dsa_dn));
    4412             :                 }
    4413           0 :                 if (r->transport_dn) {
    4414           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->transport_dn));
    4415             :                 }
    4416           0 :                 if (r->source_dsa_address) {
    4417           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
    4418           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4419           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
    4420           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_address, ndr_charset_length(r->source_dsa_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4421             :                 }
    4422             :         }
    4423           0 :         return NDR_ERR_SUCCESS;
    4424             : }
    4425             : 
    4426           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAddRequest2 *r)
    4427             : {
    4428           0 :         uint32_t _ptr_naming_context;
    4429           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4430           0 :         uint32_t _ptr_source_dsa_dn;
    4431           0 :         TALLOC_CTX *_mem_save_source_dsa_dn_0 = NULL;
    4432           0 :         uint32_t _ptr_transport_dn;
    4433           0 :         TALLOC_CTX *_mem_save_transport_dn_0 = NULL;
    4434           0 :         uint32_t _ptr_source_dsa_address;
    4435           0 :         uint32_t size_source_dsa_address_1 = 0;
    4436           0 :         uint32_t length_source_dsa_address_1 = 0;
    4437           0 :         TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
    4438           0 :         uint32_t size_schedule_0 = 0;
    4439           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4440           0 :         if (ndr_flags & NDR_SCALARS) {
    4441           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4442           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4443           0 :                 if (_ptr_naming_context) {
    4444           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4445             :                 } else {
    4446           0 :                         r->naming_context = NULL;
    4447             :                 }
    4448           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_dn));
    4449           0 :                 if (_ptr_source_dsa_dn) {
    4450           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_dn);
    4451             :                 } else {
    4452           0 :                         r->source_dsa_dn = NULL;
    4453             :                 }
    4454           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport_dn));
    4455           0 :                 if (_ptr_transport_dn) {
    4456           0 :                         NDR_PULL_ALLOC(ndr, r->transport_dn);
    4457             :                 } else {
    4458           0 :                         r->transport_dn = NULL;
    4459             :                 }
    4460           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
    4461           0 :                 if (_ptr_source_dsa_address) {
    4462           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_address);
    4463             :                 } else {
    4464           0 :                         r->source_dsa_address = NULL;
    4465             :                 }
    4466           0 :                 size_schedule_0 = 84;
    4467           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
    4468           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4469           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4470             :         }
    4471           0 :         if (ndr_flags & NDR_BUFFERS) {
    4472           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4473           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4474           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4475           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4476           0 :                 if (r->source_dsa_dn) {
    4477           0 :                         _mem_save_source_dsa_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4478           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_dn, 0);
    4479           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->source_dsa_dn));
    4480           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_dn_0, 0);
    4481             :                 }
    4482           0 :                 if (r->transport_dn) {
    4483           0 :                         _mem_save_transport_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4484           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->transport_dn, 0);
    4485           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->transport_dn));
    4486           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_dn_0, 0);
    4487             :                 }
    4488           0 :                 if (r->source_dsa_address) {
    4489           0 :                         _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4490           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
    4491           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
    4492           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
    4493           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
    4494           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
    4495           0 :                         if (length_source_dsa_address_1 > size_source_dsa_address_1) {
    4496           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_address_1, length_source_dsa_address_1);
    4497             :                         }
    4498           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint16_t)));
    4499           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint16_t), CH_UTF16));
    4500           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
    4501             :                 }
    4502             :         }
    4503           0 :         return NDR_ERR_SUCCESS;
    4504             : }
    4505             : 
    4506           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest2 *r)
    4507             : {
    4508           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAddRequest2");
    4509           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4510           0 :         ndr->depth++;
    4511           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4512           0 :         ndr->depth++;
    4513           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4514           0 :         ndr->depth--;
    4515           0 :         ndr_print_ptr(ndr, "source_dsa_dn", r->source_dsa_dn);
    4516           0 :         ndr->depth++;
    4517           0 :         if (r->source_dsa_dn) {
    4518           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "source_dsa_dn", r->source_dsa_dn);
    4519             :         }
    4520           0 :         ndr->depth--;
    4521           0 :         ndr_print_ptr(ndr, "transport_dn", r->transport_dn);
    4522           0 :         ndr->depth++;
    4523           0 :         if (r->transport_dn) {
    4524           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "transport_dn", r->transport_dn);
    4525             :         }
    4526           0 :         ndr->depth--;
    4527           0 :         ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
    4528           0 :         ndr->depth++;
    4529           0 :         if (r->source_dsa_address) {
    4530           0 :                 ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
    4531             :         }
    4532           0 :         ndr->depth--;
    4533           0 :         ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
    4534           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4535           0 :         ndr->depth--;
    4536             : }
    4537             : 
    4538           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaAddRequest *r)
    4539             : {
    4540           0 :         uint32_t level;
    4541           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4542           0 :         if (ndr_flags & NDR_SCALARS) {
    4543             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4544           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4545           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4546           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    4547           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4548           0 :                 switch (level) {
    4549           0 :                         case 1: {
    4550           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1));
    4551           0 :                         break; }
    4552             : 
    4553           0 :                         case 2: {
    4554           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr, NDR_SCALARS, &r->req2));
    4555           0 :                         break; }
    4556             : 
    4557           0 :                         default:
    4558           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4559             :                 }
    4560             :         }
    4561           0 :         if (ndr_flags & NDR_BUFFERS) {
    4562           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4563             :                         /* We didn't get it above, and the token is not needed after this. */
    4564           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4565             :                 }
    4566           0 :                 switch (level) {
    4567           0 :                         case 1:
    4568           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_BUFFERS, &r->req1));
    4569           0 :                         break;
    4570             : 
    4571           0 :                         case 2:
    4572           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr, NDR_BUFFERS, &r->req2));
    4573           0 :                         break;
    4574             : 
    4575           0 :                         default:
    4576           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4577             :                 }
    4578             :         }
    4579           0 :         return NDR_ERR_SUCCESS;
    4580             : }
    4581             : 
    4582           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaAddRequest *r)
    4583             : {
    4584           0 :         uint32_t level;
    4585           0 :         uint32_t _level;
    4586           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4587           0 :         if (ndr_flags & NDR_SCALARS) {
    4588             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4589           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4590           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4591           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4592           0 :                 if (_level != level) {
    4593           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    4594             :                 }
    4595           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4596           0 :                 switch (level) {
    4597           0 :                         case 1: {
    4598           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1));
    4599           0 :                         break; }
    4600             : 
    4601           0 :                         case 2: {
    4602           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr, NDR_SCALARS, &r->req2));
    4603           0 :                         break; }
    4604             : 
    4605           0 :                         default:
    4606           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4607             :                 }
    4608             :         }
    4609           0 :         if (ndr_flags & NDR_BUFFERS) {
    4610           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4611             :                         /* We didn't get it above, and the token is not needed after this. */
    4612           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4613             :                 }
    4614           0 :                 switch (level) {
    4615           0 :                         case 1:
    4616           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_BUFFERS, &r->req1));
    4617           0 :                         break;
    4618             : 
    4619           0 :                         case 2:
    4620           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr, NDR_BUFFERS, &r->req2));
    4621           0 :                         break;
    4622             : 
    4623           0 :                         default:
    4624           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4625             :                 }
    4626             :         }
    4627           0 :         return NDR_ERR_SUCCESS;
    4628             : }
    4629             : 
    4630           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaAddRequest *r)
    4631             : {
    4632           0 :         uint32_t level;
    4633           0 :         level = ndr_print_steal_switch_value(ndr, r);
    4634           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaAddRequest");
    4635           0 :         switch (level) {
    4636           0 :                 case 1:
    4637           0 :                         ndr_print_drsuapi_DsReplicaAddRequest1(ndr, "req1", &r->req1);
    4638           0 :                 break;
    4639             : 
    4640           0 :                 case 2:
    4641           0 :                         ndr_print_drsuapi_DsReplicaAddRequest2(ndr, "req2", &r->req2);
    4642           0 :                 break;
    4643             : 
    4644           0 :                 default:
    4645           0 :                         ndr_print_bad_level(ndr, name, level);
    4646             :         }
    4647           0 : }
    4648             : 
    4649           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaDelRequest1 *r)
    4650             : {
    4651           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4652           0 :         if (ndr_flags & NDR_SCALARS) {
    4653           0 :                 if (r->naming_context == NULL) {
    4654           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4655             :                 }
    4656           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4657           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4658           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
    4659           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4660           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4661             :         }
    4662           0 :         if (ndr_flags & NDR_BUFFERS) {
    4663           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4664           0 :                 if (r->source_dsa_address) {
    4665           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF8)));
    4666           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4667           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF8)));
    4668           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_address, ndr_charset_length(r->source_dsa_address, CH_UTF8), sizeof(uint8_t), CH_UTF8));
    4669             :                 }
    4670             :         }
    4671           0 :         return NDR_ERR_SUCCESS;
    4672             : }
    4673             : 
    4674           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaDelRequest1 *r)
    4675             : {
    4676           0 :         uint32_t _ptr_naming_context;
    4677           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4678           0 :         uint32_t _ptr_source_dsa_address;
    4679           0 :         uint32_t size_source_dsa_address_1 = 0;
    4680           0 :         uint32_t length_source_dsa_address_1 = 0;
    4681           0 :         TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
    4682           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4683           0 :         if (ndr_flags & NDR_SCALARS) {
    4684           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4685           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4686           0 :                 if (_ptr_naming_context) {
    4687           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4688             :                 } else {
    4689           0 :                         r->naming_context = NULL;
    4690             :                 }
    4691           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
    4692           0 :                 if (_ptr_source_dsa_address) {
    4693           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_address);
    4694             :                 } else {
    4695           0 :                         r->source_dsa_address = NULL;
    4696             :                 }
    4697           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4698           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4699             :         }
    4700           0 :         if (ndr_flags & NDR_BUFFERS) {
    4701           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4702           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4703           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4704           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4705           0 :                 if (r->source_dsa_address) {
    4706           0 :                         _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4707           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
    4708           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
    4709           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
    4710           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
    4711           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
    4712           0 :                         if (length_source_dsa_address_1 > size_source_dsa_address_1) {
    4713           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_address_1, length_source_dsa_address_1);
    4714             :                         }
    4715           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint8_t)));
    4716           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint8_t), CH_UTF8));
    4717           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
    4718             :                 }
    4719             :         }
    4720           0 :         return NDR_ERR_SUCCESS;
    4721             : }
    4722             : 
    4723           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaDelRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaDelRequest1 *r)
    4724             : {
    4725           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaDelRequest1");
    4726           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4727           0 :         ndr->depth++;
    4728           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4729           0 :         ndr->depth++;
    4730           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4731           0 :         ndr->depth--;
    4732           0 :         ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
    4733           0 :         ndr->depth++;
    4734           0 :         if (r->source_dsa_address) {
    4735           0 :                 ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
    4736             :         }
    4737           0 :         ndr->depth--;
    4738           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4739           0 :         ndr->depth--;
    4740             : }
    4741             : 
    4742           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaDelRequest *r)
    4743             : {
    4744           0 :         uint32_t level;
    4745           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4746           0 :         if (ndr_flags & NDR_SCALARS) {
    4747             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4748           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4749           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4750           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    4751           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4752           0 :                 switch (level) {
    4753           0 :                         case 1: {
    4754           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1));
    4755           0 :                         break; }
    4756             : 
    4757           0 :                         default:
    4758           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4759             :                 }
    4760             :         }
    4761           0 :         if (ndr_flags & NDR_BUFFERS) {
    4762           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4763             :                         /* We didn't get it above, and the token is not needed after this. */
    4764           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4765             :                 }
    4766           0 :                 switch (level) {
    4767           0 :                         case 1:
    4768           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_BUFFERS, &r->req1));
    4769           0 :                         break;
    4770             : 
    4771           0 :                         default:
    4772           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4773             :                 }
    4774             :         }
    4775           0 :         return NDR_ERR_SUCCESS;
    4776             : }
    4777             : 
    4778           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaDelRequest *r)
    4779             : {
    4780           0 :         uint32_t level;
    4781           0 :         uint32_t _level;
    4782           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4783           0 :         if (ndr_flags & NDR_SCALARS) {
    4784             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4785           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4786           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4787           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4788           0 :                 if (_level != level) {
    4789           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    4790             :                 }
    4791           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4792           0 :                 switch (level) {
    4793           0 :                         case 1: {
    4794           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1));
    4795           0 :                         break; }
    4796             : 
    4797           0 :                         default:
    4798           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4799             :                 }
    4800             :         }
    4801           0 :         if (ndr_flags & NDR_BUFFERS) {
    4802           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4803             :                         /* We didn't get it above, and the token is not needed after this. */
    4804           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4805             :                 }
    4806           0 :                 switch (level) {
    4807           0 :                         case 1:
    4808           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_BUFFERS, &r->req1));
    4809           0 :                         break;
    4810             : 
    4811           0 :                         default:
    4812           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4813             :                 }
    4814             :         }
    4815           0 :         return NDR_ERR_SUCCESS;
    4816             : }
    4817             : 
    4818           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaDelRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaDelRequest *r)
    4819             : {
    4820           0 :         uint32_t level;
    4821           0 :         level = ndr_print_steal_switch_value(ndr, r);
    4822           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaDelRequest");
    4823           0 :         switch (level) {
    4824           0 :                 case 1:
    4825           0 :                         ndr_print_drsuapi_DsReplicaDelRequest1(ndr, "req1", &r->req1);
    4826           0 :                 break;
    4827             : 
    4828           0 :                 default:
    4829           0 :                         ndr_print_bad_level(ndr, name, level);
    4830             :         }
    4831           0 : }
    4832             : 
    4833           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaModRequest1 *r)
    4834             : {
    4835           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4836           0 :         if (ndr_flags & NDR_SCALARS) {
    4837           0 :                 if (r->naming_context == NULL) {
    4838           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4839             :                 }
    4840           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4841           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4842           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dra));
    4843           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dra_address));
    4844           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
    4845           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
    4846           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->modify_fields));
    4847           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4848           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4849             :         }
    4850           0 :         if (ndr_flags & NDR_BUFFERS) {
    4851           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4852           0 :                 if (r->source_dra_address) {
    4853           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dra_address, CH_UTF16)));
    4854           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4855           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dra_address, CH_UTF16)));
    4856           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dra_address, ndr_charset_length(r->source_dra_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4857             :                 }
    4858             :         }
    4859           0 :         return NDR_ERR_SUCCESS;
    4860             : }
    4861             : 
    4862           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaModRequest1 *r)
    4863             : {
    4864           0 :         uint32_t _ptr_naming_context;
    4865           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4866           0 :         uint32_t _ptr_source_dra_address;
    4867           0 :         uint32_t size_source_dra_address_1 = 0;
    4868           0 :         uint32_t length_source_dra_address_1 = 0;
    4869           0 :         TALLOC_CTX *_mem_save_source_dra_address_0 = NULL;
    4870           0 :         uint32_t size_schedule_0 = 0;
    4871           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4872           0 :         if (ndr_flags & NDR_SCALARS) {
    4873           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4874           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4875           0 :                 if (_ptr_naming_context) {
    4876           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4877             :                 } else {
    4878           0 :                         r->naming_context = NULL;
    4879             :                 }
    4880           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dra));
    4881           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dra_address));
    4882           0 :                 if (_ptr_source_dra_address) {
    4883           0 :                         NDR_PULL_ALLOC(ndr, r->source_dra_address);
    4884             :                 } else {
    4885           0 :                         r->source_dra_address = NULL;
    4886             :                 }
    4887           0 :                 size_schedule_0 = 84;
    4888           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
    4889           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
    4890           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->modify_fields));
    4891           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4892           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4893             :         }
    4894           0 :         if (ndr_flags & NDR_BUFFERS) {
    4895           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4896           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4897           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4898           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4899           0 :                 if (r->source_dra_address) {
    4900           0 :                         _mem_save_source_dra_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4901           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dra_address, 0);
    4902           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dra_address));
    4903           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dra_address));
    4904           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dra_address, &size_source_dra_address_1));
    4905           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dra_address, &length_source_dra_address_1));
    4906           0 :                         if (length_source_dra_address_1 > size_source_dra_address_1) {
    4907           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dra_address_1, length_source_dra_address_1);
    4908             :                         }
    4909           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dra_address_1, sizeof(uint16_t)));
    4910           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dra_address, length_source_dra_address_1, sizeof(uint16_t), CH_UTF16));
    4911           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dra_address_0, 0);
    4912             :                 }
    4913             :         }
    4914           0 :         return NDR_ERR_SUCCESS;
    4915             : }
    4916             : 
    4917           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaModRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaModRequest1 *r)
    4918             : {
    4919           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaModRequest1");
    4920           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4921           0 :         ndr->depth++;
    4922           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4923           0 :         ndr->depth++;
    4924           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4925           0 :         ndr->depth--;
    4926           0 :         ndr_print_GUID(ndr, "source_dra", &r->source_dra);
    4927           0 :         ndr_print_ptr(ndr, "source_dra_address", r->source_dra_address);
    4928           0 :         ndr->depth++;
    4929           0 :         if (r->source_dra_address) {
    4930           0 :                 ndr_print_string(ndr, "source_dra_address", r->source_dra_address);
    4931             :         }
    4932           0 :         ndr->depth--;
    4933           0 :         ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
    4934           0 :         ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
    4935           0 :         ndr_print_uint32(ndr, "modify_fields", r->modify_fields);
    4936           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4937           0 :         ndr->depth--;
    4938             : }
    4939             : 
    4940           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaModRequest *r)
    4941             : {
    4942           0 :         uint32_t level;
    4943           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4944           0 :         if (ndr_flags & NDR_SCALARS) {
    4945             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4946           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4947           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4948           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    4949           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4950           0 :                 switch (level) {
    4951           0 :                         case 1: {
    4952           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1));
    4953           0 :                         break; }
    4954             : 
    4955           0 :                         default:
    4956           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4957             :                 }
    4958             :         }
    4959           0 :         if (ndr_flags & NDR_BUFFERS) {
    4960           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4961             :                         /* We didn't get it above, and the token is not needed after this. */
    4962           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4963             :                 }
    4964           0 :                 switch (level) {
    4965           0 :                         case 1:
    4966           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_BUFFERS, &r->req1));
    4967           0 :                         break;
    4968             : 
    4969           0 :                         default:
    4970           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    4971             :                 }
    4972             :         }
    4973           0 :         return NDR_ERR_SUCCESS;
    4974             : }
    4975             : 
    4976           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaModRequest *r)
    4977             : {
    4978           0 :         uint32_t level;
    4979           0 :         uint32_t _level;
    4980           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4981           0 :         if (ndr_flags & NDR_SCALARS) {
    4982             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4983           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4984           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4985           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4986           0 :                 if (_level != level) {
    4987           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    4988             :                 }
    4989           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4990           0 :                 switch (level) {
    4991           0 :                         case 1: {
    4992           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1));
    4993           0 :                         break; }
    4994             : 
    4995           0 :                         default:
    4996           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    4997             :                 }
    4998             :         }
    4999           0 :         if (ndr_flags & NDR_BUFFERS) {
    5000           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5001             :                         /* We didn't get it above, and the token is not needed after this. */
    5002           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5003             :                 }
    5004           0 :                 switch (level) {
    5005           0 :                         case 1:
    5006           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_BUFFERS, &r->req1));
    5007           0 :                         break;
    5008             : 
    5009           0 :                         default:
    5010           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    5011             :                 }
    5012             :         }
    5013           0 :         return NDR_ERR_SUCCESS;
    5014             : }
    5015             : 
    5016           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaModRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaModRequest *r)
    5017             : {
    5018           0 :         uint32_t level;
    5019           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5020           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaModRequest");
    5021           0 :         switch (level) {
    5022           0 :                 case 1:
    5023           0 :                         ndr_print_drsuapi_DsReplicaModRequest1(ndr, "req1", &r->req1);
    5024           0 :                 break;
    5025             : 
    5026           0 :                 default:
    5027           0 :                         ndr_print_bad_level(ndr, name, level);
    5028             :         }
    5029           0 : }
    5030             : 
    5031           0 : static enum ndr_err_code ndr_push_drsuapi_DsMembershipType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsMembershipType r)
    5032             : {
    5033           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    5034           0 :         return NDR_ERR_SUCCESS;
    5035             : }
    5036             : 
    5037           0 : static enum ndr_err_code ndr_pull_drsuapi_DsMembershipType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsMembershipType *r)
    5038             : {
    5039           0 :         uint32_t v;
    5040           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    5041           0 :         *r = v;
    5042           0 :         return NDR_ERR_SUCCESS;
    5043             : }
    5044             : 
    5045           0 : _PUBLIC_ void ndr_print_drsuapi_DsMembershipType(struct ndr_print *ndr, const char *name, enum drsuapi_DsMembershipType r)
    5046             : {
    5047           0 :         const char *val = NULL;
    5048             : 
    5049           0 :         switch (r) {
    5050           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS"; break;
    5051           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS"; break;
    5052           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS"; break;
    5053           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2"; break;
    5054           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS"; break;
    5055           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS"; break;
    5056           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2"; break;
    5057             :         }
    5058           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    5059           0 : }
    5060             : 
    5061           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetMembershipsCtr1 *r)
    5062             : {
    5063           0 :         uint32_t cntr_info_array_1;
    5064           0 :         uint32_t cntr_group_attrs_1;
    5065           0 :         uint32_t cntr_sids_1;
    5066           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5067           0 :         if (ndr_flags & NDR_SCALARS) {
    5068           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5069           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
    5070           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_memberships));
    5071           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
    5072           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array));
    5073           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_attrs));
    5074           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    5075           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5076             :         }
    5077           0 :         if (ndr_flags & NDR_BUFFERS) {
    5078           0 :                 if (r->info_array) {
    5079           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_memberships));
    5080           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
    5081           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array[cntr_info_array_1]));
    5082             :                         }
    5083           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
    5084           0 :                                 if (r->info_array[cntr_info_array_1]) {
    5085           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
    5086             :                                 }
    5087             :                         }
    5088             :                 }
    5089           0 :                 if (r->group_attrs) {
    5090           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_memberships));
    5091           0 :                         for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (r->num_memberships); cntr_group_attrs_1++) {
    5092           0 :                                 NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->group_attrs[cntr_group_attrs_1]));
    5093             :                         }
    5094             :                 }
    5095           0 :                 if (r->sids) {
    5096           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
    5097           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    5098           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids[cntr_sids_1]));
    5099             :                         }
    5100           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    5101           0 :                                 if (r->sids[cntr_sids_1]) {
    5102           0 :                                         NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids[cntr_sids_1]));
    5103             :                                 }
    5104             :                         }
    5105             :                 }
    5106             :         }
    5107           0 :         return NDR_ERR_SUCCESS;
    5108             : }
    5109             : 
    5110           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetMembershipsCtr1 *r)
    5111             : {
    5112           0 :         uint32_t _ptr_info_array;
    5113           0 :         uint32_t size_info_array_1 = 0;
    5114           0 :         uint32_t cntr_info_array_1;
    5115           0 :         TALLOC_CTX *_mem_save_info_array_0 = NULL;
    5116           0 :         TALLOC_CTX *_mem_save_info_array_1 = NULL;
    5117           0 :         TALLOC_CTX *_mem_save_info_array_2 = NULL;
    5118           0 :         uint32_t _ptr_group_attrs;
    5119           0 :         uint32_t size_group_attrs_1 = 0;
    5120           0 :         uint32_t cntr_group_attrs_1;
    5121           0 :         TALLOC_CTX *_mem_save_group_attrs_0 = NULL;
    5122           0 :         TALLOC_CTX *_mem_save_group_attrs_1 = NULL;
    5123           0 :         uint32_t _ptr_sids;
    5124           0 :         uint32_t size_sids_1 = 0;
    5125           0 :         uint32_t cntr_sids_1;
    5126           0 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    5127           0 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    5128           0 :         TALLOC_CTX *_mem_save_sids_2 = NULL;
    5129           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5130           0 :         if (ndr_flags & NDR_SCALARS) {
    5131           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5132           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
    5133           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_memberships));
    5134           0 :                 if (r->num_memberships > 10000) {
    5135           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_memberships), (uint32_t)(0), (uint32_t)(10000));
    5136             :                 }
    5137           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
    5138           0 :                 if (r->num_sids > 10000) {
    5139           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_sids), (uint32_t)(0), (uint32_t)(10000));
    5140             :                 }
    5141           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
    5142           0 :                 if (_ptr_info_array) {
    5143           0 :                         NDR_PULL_ALLOC(ndr, r->info_array);
    5144             :                 } else {
    5145           0 :                         r->info_array = NULL;
    5146             :                 }
    5147           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_attrs));
    5148           0 :                 if (_ptr_group_attrs) {
    5149           0 :                         NDR_PULL_ALLOC(ndr, r->group_attrs);
    5150             :                 } else {
    5151           0 :                         r->group_attrs = NULL;
    5152             :                 }
    5153           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    5154           0 :                 if (_ptr_sids) {
    5155           0 :                         NDR_PULL_ALLOC(ndr, r->sids);
    5156             :                 } else {
    5157           0 :                         r->sids = NULL;
    5158             :                 }
    5159           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5160             :         }
    5161           0 :         if (ndr_flags & NDR_BUFFERS) {
    5162           0 :                 if (r->info_array) {
    5163           0 :                         _mem_save_info_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5164           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
    5165           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->info_array));
    5166           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->info_array, &size_info_array_1));
    5167           0 :                         NDR_PULL_ALLOC_N(ndr, r->info_array, size_info_array_1);
    5168           0 :                         _mem_save_info_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5169           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
    5170           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5171           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
    5172           0 :                                 if (_ptr_info_array) {
    5173           0 :                                         NDR_PULL_ALLOC(ndr, r->info_array[cntr_info_array_1]);
    5174             :                                 } else {
    5175           0 :                                         r->info_array[cntr_info_array_1] = NULL;
    5176             :                                 }
    5177             :                         }
    5178           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5179           0 :                                 if (r->info_array[cntr_info_array_1]) {
    5180           0 :                                         _mem_save_info_array_2 = NDR_PULL_GET_MEM_CTX(ndr);
    5181           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array[cntr_info_array_1], 0);
    5182           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
    5183           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_2, 0);
    5184             :                                 }
    5185             :                         }
    5186           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_1, 0);
    5187           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_0, 0);
    5188             :                 }
    5189           0 :                 if (r->group_attrs) {
    5190           0 :                         _mem_save_group_attrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5191           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->group_attrs, 0);
    5192           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->group_attrs));
    5193           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->group_attrs, &size_group_attrs_1));
    5194           0 :                         NDR_PULL_ALLOC_N(ndr, r->group_attrs, size_group_attrs_1);
    5195           0 :                         _mem_save_group_attrs_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5196           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->group_attrs, 0);
    5197           0 :                         for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (size_group_attrs_1); cntr_group_attrs_1++) {
    5198           0 :                                 NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->group_attrs[cntr_group_attrs_1]));
    5199             :                         }
    5200           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_attrs_1, 0);
    5201           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_attrs_0, 0);
    5202             :                 }
    5203           0 :                 if (r->sids) {
    5204           0 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5205           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    5206           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    5207           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    5208           0 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    5209           0 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5210           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    5211           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5212           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    5213           0 :                                 if (_ptr_sids) {
    5214           0 :                                         NDR_PULL_ALLOC(ndr, r->sids[cntr_sids_1]);
    5215             :                                 } else {
    5216           0 :                                         r->sids[cntr_sids_1] = NULL;
    5217             :                                 }
    5218             :                         }
    5219           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5220           0 :                                 if (r->sids[cntr_sids_1]) {
    5221           0 :                                         _mem_save_sids_2 = NDR_PULL_GET_MEM_CTX(ndr);
    5222           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sids[cntr_sids_1], 0);
    5223           0 :                                         NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids[cntr_sids_1]));
    5224           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_2, 0);
    5225             :                                 }
    5226             :                         }
    5227           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    5228           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    5229             :                 }
    5230           0 :                 if (r->info_array) {
    5231           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->info_array, r->num_memberships));
    5232             :                 }
    5233           0 :                 for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5234           0 :                 }
    5235           0 :                 if (r->group_attrs) {
    5236           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->group_attrs, r->num_memberships));
    5237             :                 }
    5238           0 :                 if (r->sids) {
    5239           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
    5240             :                 }
    5241           0 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5242           0 :                 }
    5243             :         }
    5244           0 :         return NDR_ERR_SUCCESS;
    5245             : }
    5246             : 
    5247           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsCtr1 *r)
    5248             : {
    5249           0 :         uint32_t cntr_info_array_1;
    5250           0 :         uint32_t cntr_group_attrs_1;
    5251           0 :         uint32_t cntr_sids_1;
    5252           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetMembershipsCtr1");
    5253           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5254           0 :         ndr->depth++;
    5255           0 :         ndr_print_NTSTATUS(ndr, "status", r->status);
    5256           0 :         ndr_print_uint32(ndr, "num_memberships", r->num_memberships);
    5257           0 :         ndr_print_uint32(ndr, "num_sids", r->num_sids);
    5258           0 :         ndr_print_ptr(ndr, "info_array", r->info_array);
    5259           0 :         ndr->depth++;
    5260           0 :         if (r->info_array) {
    5261           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info_array", (uint32_t)(r->num_memberships));
    5262           0 :                 ndr->depth++;
    5263           0 :                 for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
    5264           0 :                         ndr_print_ptr(ndr, "info_array", r->info_array[cntr_info_array_1]);
    5265           0 :                         ndr->depth++;
    5266           0 :                         if (r->info_array[cntr_info_array_1]) {
    5267           0 :                                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "info_array", r->info_array[cntr_info_array_1]);
    5268             :                         }
    5269           0 :                         ndr->depth--;
    5270             :                 }
    5271           0 :                 ndr->depth--;
    5272             :         }
    5273           0 :         ndr->depth--;
    5274           0 :         ndr_print_ptr(ndr, "group_attrs", r->group_attrs);
    5275           0 :         ndr->depth++;
    5276           0 :         if (r->group_attrs) {
    5277           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "group_attrs", (uint32_t)(r->num_memberships));
    5278           0 :                 ndr->depth++;
    5279           0 :                 for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (r->num_memberships); cntr_group_attrs_1++) {
    5280           0 :                         ndr_print_security_GroupAttrs(ndr, "group_attrs", r->group_attrs[cntr_group_attrs_1]);
    5281             :                 }
    5282           0 :                 ndr->depth--;
    5283             :         }
    5284           0 :         ndr->depth--;
    5285           0 :         ndr_print_ptr(ndr, "sids", r->sids);
    5286           0 :         ndr->depth++;
    5287           0 :         if (r->sids) {
    5288           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "sids", (uint32_t)(r->num_sids));
    5289           0 :                 ndr->depth++;
    5290           0 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    5291           0 :                         ndr_print_ptr(ndr, "sids", r->sids[cntr_sids_1]);
    5292           0 :                         ndr->depth++;
    5293           0 :                         if (r->sids[cntr_sids_1]) {
    5294           0 :                                 ndr_print_dom_sid28(ndr, "sids", r->sids[cntr_sids_1]);
    5295             :                         }
    5296           0 :                         ndr->depth--;
    5297             :                 }
    5298           0 :                 ndr->depth--;
    5299             :         }
    5300           0 :         ndr->depth--;
    5301           0 :         ndr->depth--;
    5302             : }
    5303             : 
    5304           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetMembershipsCtr *r)
    5305             : {
    5306           0 :         uint32_t level;
    5307           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5308           0 :         if (ndr_flags & NDR_SCALARS) {
    5309             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5310           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5311           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5312           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5313           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5314           0 :                 switch (level) {
    5315           0 :                         case 1: {
    5316           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
    5317           0 :                         break; }
    5318             : 
    5319           0 :                         default:
    5320           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    5321             :                 }
    5322             :         }
    5323           0 :         if (ndr_flags & NDR_BUFFERS) {
    5324           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5325             :                         /* We didn't get it above, and the token is not needed after this. */
    5326           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5327             :                 }
    5328           0 :                 switch (level) {
    5329           0 :                         case 1:
    5330           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    5331           0 :                         break;
    5332             : 
    5333           0 :                         default:
    5334           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    5335             :                 }
    5336             :         }
    5337           0 :         return NDR_ERR_SUCCESS;
    5338             : }
    5339             : 
    5340           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetMembershipsCtr *r)
    5341             : {
    5342           0 :         uint32_t level;
    5343           0 :         uint32_t _level;
    5344           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5345           0 :         if (ndr_flags & NDR_SCALARS) {
    5346             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5347           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5348           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5349           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    5350           0 :                 if (_level != level) {
    5351           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    5352             :                 }
    5353           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5354           0 :                 switch (level) {
    5355           0 :                         case 1: {
    5356           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
    5357           0 :                         break; }
    5358             : 
    5359           0 :                         default:
    5360           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    5361             :                 }
    5362             :         }
    5363           0 :         if (ndr_flags & NDR_BUFFERS) {
    5364           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5365             :                         /* We didn't get it above, and the token is not needed after this. */
    5366           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5367             :                 }
    5368           0 :                 switch (level) {
    5369           0 :                         case 1:
    5370           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    5371           0 :                         break;
    5372             : 
    5373           0 :                         default:
    5374           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    5375             :                 }
    5376             :         }
    5377           0 :         return NDR_ERR_SUCCESS;
    5378             : }
    5379             : 
    5380           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsCtr *r)
    5381             : {
    5382           0 :         uint32_t level;
    5383           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5384           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetMembershipsCtr");
    5385           0 :         switch (level) {
    5386           0 :                 case 1:
    5387           0 :                         ndr_print_drsuapi_DsGetMembershipsCtr1(ndr, "ctr1", &r->ctr1);
    5388           0 :                 break;
    5389             : 
    5390           0 :                 default:
    5391           0 :                         ndr_print_bad_level(ndr, name, level);
    5392             :         }
    5393           0 : }
    5394             : 
    5395           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetMembershipsRequest1 *r)
    5396             : {
    5397           0 :         uint32_t cntr_info_array_1;
    5398           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5399           0 :         if (ndr_flags & NDR_SCALARS) {
    5400           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5401           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5402           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array));
    5403           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
    5404           0 :                 NDR_CHECK(ndr_push_drsuapi_DsMembershipType(ndr, NDR_SCALARS, r->type));
    5405           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    5406           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5407             :         }
    5408           0 :         if (ndr_flags & NDR_BUFFERS) {
    5409           0 :                 if (r->info_array) {
    5410           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5411           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
    5412           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array[cntr_info_array_1]));
    5413             :                         }
    5414           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
    5415           0 :                                 if (r->info_array[cntr_info_array_1]) {
    5416           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
    5417             :                                 }
    5418             :                         }
    5419             :                 }
    5420           0 :                 if (r->domain) {
    5421           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
    5422             :                 }
    5423             :         }
    5424           0 :         return NDR_ERR_SUCCESS;
    5425             : }
    5426             : 
    5427           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetMembershipsRequest1 *r)
    5428             : {
    5429           0 :         uint32_t _ptr_info_array;
    5430           0 :         uint32_t size_info_array_1 = 0;
    5431           0 :         uint32_t cntr_info_array_1;
    5432           0 :         TALLOC_CTX *_mem_save_info_array_0 = NULL;
    5433           0 :         TALLOC_CTX *_mem_save_info_array_1 = NULL;
    5434           0 :         TALLOC_CTX *_mem_save_info_array_2 = NULL;
    5435           0 :         uint32_t _ptr_domain;
    5436           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
    5437           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5438           0 :         if (ndr_flags & NDR_SCALARS) {
    5439           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5440           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5441           0 :                 if (r->count < 1 || r->count > 10000) {
    5442           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(1), (uint32_t)(10000));
    5443             :                 }
    5444           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
    5445           0 :                 if (_ptr_info_array) {
    5446           0 :                         NDR_PULL_ALLOC(ndr, r->info_array);
    5447             :                 } else {
    5448           0 :                         r->info_array = NULL;
    5449             :                 }
    5450           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
    5451           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsMembershipType(ndr, NDR_SCALARS, &r->type));
    5452           0 :                 if (r->type < 1 || r->type > 7) {
    5453           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%d) out of range (%d - %d)", (int)(r->type), (int)(1), (int)(7));
    5454             :                 }
    5455           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    5456           0 :                 if (_ptr_domain) {
    5457           0 :                         NDR_PULL_ALLOC(ndr, r->domain);
    5458             :                 } else {
    5459           0 :                         r->domain = NULL;
    5460             :                 }
    5461           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5462             :         }
    5463           0 :         if (ndr_flags & NDR_BUFFERS) {
    5464           0 :                 if (r->info_array) {
    5465           0 :                         _mem_save_info_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5466           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
    5467           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->info_array));
    5468           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->info_array, &size_info_array_1));
    5469           0 :                         NDR_PULL_ALLOC_N(ndr, r->info_array, size_info_array_1);
    5470           0 :                         _mem_save_info_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5471           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
    5472           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5473           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
    5474           0 :                                 if (_ptr_info_array) {
    5475           0 :                                         NDR_PULL_ALLOC(ndr, r->info_array[cntr_info_array_1]);
    5476             :                                 } else {
    5477           0 :                                         r->info_array[cntr_info_array_1] = NULL;
    5478             :                                 }
    5479             :                         }
    5480           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5481           0 :                                 if (r->info_array[cntr_info_array_1]) {
    5482           0 :                                         _mem_save_info_array_2 = NDR_PULL_GET_MEM_CTX(ndr);
    5483           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array[cntr_info_array_1], 0);
    5484           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
    5485           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_2, 0);
    5486             :                                 }
    5487             :                         }
    5488           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_1, 0);
    5489           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_0, 0);
    5490             :                 }
    5491           0 :                 if (r->domain) {
    5492           0 :                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5493           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    5494           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
    5495           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    5496             :                 }
    5497           0 :                 if (r->info_array) {
    5498           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->info_array, r->count));
    5499             :                 }
    5500           0 :                 for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5501           0 :                 }
    5502             :         }
    5503           0 :         return NDR_ERR_SUCCESS;
    5504             : }
    5505             : 
    5506           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsRequest1 *r)
    5507             : {
    5508           0 :         uint32_t cntr_info_array_1;
    5509           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetMembershipsRequest1");
    5510           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5511           0 :         ndr->depth++;
    5512           0 :         ndr_print_uint32(ndr, "count", r->count);
    5513           0 :         ndr_print_ptr(ndr, "info_array", r->info_array);
    5514           0 :         ndr->depth++;
    5515           0 :         if (r->info_array) {
    5516           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info_array", (uint32_t)(r->count));
    5517           0 :                 ndr->depth++;
    5518           0 :                 for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
    5519           0 :                         ndr_print_ptr(ndr, "info_array", r->info_array[cntr_info_array_1]);
    5520           0 :                         ndr->depth++;
    5521           0 :                         if (r->info_array[cntr_info_array_1]) {
    5522           0 :                                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "info_array", r->info_array[cntr_info_array_1]);
    5523             :                         }
    5524           0 :                         ndr->depth--;
    5525             :                 }
    5526           0 :                 ndr->depth--;
    5527             :         }
    5528           0 :         ndr->depth--;
    5529           0 :         ndr_print_uint32(ndr, "flags", r->flags);
    5530           0 :         ndr_print_drsuapi_DsMembershipType(ndr, "type", r->type);
    5531           0 :         ndr_print_ptr(ndr, "domain", r->domain);
    5532           0 :         ndr->depth++;
    5533           0 :         if (r->domain) {
    5534           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "domain", r->domain);
    5535             :         }
    5536           0 :         ndr->depth--;
    5537           0 :         ndr->depth--;
    5538             : }
    5539             : 
    5540           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetMembershipsRequest *r)
    5541             : {
    5542           0 :         uint32_t level;
    5543           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5544           0 :         if (ndr_flags & NDR_SCALARS) {
    5545             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5546           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5547           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5548           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5549           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5550           0 :                 switch (level) {
    5551           0 :                         case 1: {
    5552           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS, &r->req1));
    5553           0 :                         break; }
    5554             : 
    5555           0 :                         default:
    5556           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    5557             :                 }
    5558             :         }
    5559           0 :         if (ndr_flags & NDR_BUFFERS) {
    5560           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5561             :                         /* We didn't get it above, and the token is not needed after this. */
    5562           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5563             :                 }
    5564           0 :                 switch (level) {
    5565           0 :                         case 1:
    5566           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_BUFFERS, &r->req1));
    5567           0 :                         break;
    5568             : 
    5569           0 :                         default:
    5570           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    5571             :                 }
    5572             :         }
    5573           0 :         return NDR_ERR_SUCCESS;
    5574             : }
    5575             : 
    5576           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetMembershipsRequest *r)
    5577             : {
    5578           0 :         uint32_t level;
    5579           0 :         uint32_t _level;
    5580           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5581           0 :         if (ndr_flags & NDR_SCALARS) {
    5582             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5583           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5584           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5585           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    5586           0 :                 if (_level != level) {
    5587           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    5588             :                 }
    5589           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5590           0 :                 switch (level) {
    5591           0 :                         case 1: {
    5592           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS, &r->req1));
    5593           0 :                         break; }
    5594             : 
    5595           0 :                         default:
    5596           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    5597             :                 }
    5598             :         }
    5599           0 :         if (ndr_flags & NDR_BUFFERS) {
    5600           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5601             :                         /* We didn't get it above, and the token is not needed after this. */
    5602           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5603             :                 }
    5604           0 :                 switch (level) {
    5605           0 :                         case 1:
    5606           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_BUFFERS, &r->req1));
    5607           0 :                         break;
    5608             : 
    5609           0 :                         default:
    5610           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    5611             :                 }
    5612             :         }
    5613           0 :         return NDR_ERR_SUCCESS;
    5614             : }
    5615             : 
    5616           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsRequest *r)
    5617             : {
    5618           0 :         uint32_t level;
    5619           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5620           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetMembershipsRequest");
    5621           0 :         switch (level) {
    5622           0 :                 case 1:
    5623           0 :                         ndr_print_drsuapi_DsGetMembershipsRequest1(ndr, "req1", &r->req1);
    5624           0 :                 break;
    5625             : 
    5626           0 :                 default:
    5627           0 :                         ndr_print_bad_level(ndr, name, level);
    5628             :         }
    5629           0 : }
    5630             : 
    5631           4 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
    5632             : {
    5633           4 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    5634           4 :         return NDR_ERR_SUCCESS;
    5635             : }
    5636             : 
    5637           4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
    5638             : {
    5639           0 :         uint32_t v;
    5640           4 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    5641           4 :         *r = v;
    5642           4 :         return NDR_ERR_SUCCESS;
    5643             : }
    5644             : 
    5645           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    5646             : {
    5647           0 :         ndr_print_uint32(ndr, name, r);
    5648           0 :         ndr->depth++;
    5649           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG", DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG, r);
    5650           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS", DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS, r);
    5651           0 :         ndr->depth--;
    5652           0 : }
    5653             : 
    5654           8 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
    5655             : {
    5656           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5657           8 :         if (ndr_flags & NDR_SCALARS) {
    5658           4 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5659           4 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogFlags(ndr, NDR_SCALARS, r->flags));
    5660           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->preferred_maximum_length));
    5661           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->restart_length));
    5662           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->restart_data));
    5663           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5664             :         }
    5665           8 :         if (ndr_flags & NDR_BUFFERS) {
    5666           4 :                 if (r->restart_data) {
    5667           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->restart_length));
    5668           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->restart_data, r->restart_length));
    5669             :                 }
    5670             :         }
    5671           8 :         return NDR_ERR_SUCCESS;
    5672             : }
    5673             : 
    5674           8 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
    5675             : {
    5676           0 :         uint32_t _ptr_restart_data;
    5677           8 :         uint32_t size_restart_data_1 = 0;
    5678           8 :         TALLOC_CTX *_mem_save_restart_data_0 = NULL;
    5679           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5680           8 :         if (ndr_flags & NDR_SCALARS) {
    5681           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5682           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogFlags(ndr, NDR_SCALARS, &r->flags));
    5683           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->preferred_maximum_length));
    5684           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->restart_length));
    5685           4 :                 if (r->restart_length > 10485760) {
    5686           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->restart_length), (uint32_t)(0), (uint32_t)(10485760));
    5687             :                 }
    5688           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_restart_data));
    5689           4 :                 if (_ptr_restart_data) {
    5690           0 :                         NDR_PULL_ALLOC(ndr, r->restart_data);
    5691             :                 } else {
    5692           4 :                         r->restart_data = NULL;
    5693             :                 }
    5694           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5695             :         }
    5696           8 :         if (ndr_flags & NDR_BUFFERS) {
    5697           4 :                 if (r->restart_data) {
    5698           0 :                         _mem_save_restart_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5699           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->restart_data, 0);
    5700           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->restart_data));
    5701           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->restart_data, &size_restart_data_1));
    5702           0 :                         NDR_PULL_ALLOC_N(ndr, r->restart_data, size_restart_data_1);
    5703           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->restart_data, size_restart_data_1));
    5704           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_restart_data_0, 0);
    5705             :                 }
    5706           4 :                 if (r->restart_data) {
    5707           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->restart_data, r->restart_length));
    5708             :                 }
    5709             :         }
    5710           8 :         return NDR_ERR_SUCCESS;
    5711             : }
    5712             : 
    5713           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
    5714             : {
    5715           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNT4ChangeLogRequest1");
    5716           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5717           0 :         ndr->depth++;
    5718           0 :         ndr_print_drsuapi_DsGetNT4ChangeLogFlags(ndr, "flags", r->flags);
    5719           0 :         ndr_print_uint32(ndr, "preferred_maximum_length", r->preferred_maximum_length);
    5720           0 :         ndr_print_uint32(ndr, "restart_length", r->restart_length);
    5721           0 :         ndr_print_ptr(ndr, "restart_data", r->restart_data);
    5722           0 :         ndr->depth++;
    5723           0 :         if (r->restart_data) {
    5724           0 :                 ndr_print_array_uint8(ndr, "restart_data", r->restart_data, r->restart_length);
    5725             :         }
    5726           0 :         ndr->depth--;
    5727           0 :         ndr->depth--;
    5728             : }
    5729             : 
    5730           4 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNT4ChangeLogRequest *r)
    5731             : {
    5732           0 :         uint32_t level;
    5733           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5734           4 :         if (ndr_flags & NDR_SCALARS) {
    5735             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5736           4 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5737           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5738           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5739           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5740           4 :                 switch (level) {
    5741           4 :                         case 1: {
    5742           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_SCALARS, &r->req1));
    5743           4 :                         break; }
    5744             : 
    5745           0 :                         default:
    5746           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    5747             :                 }
    5748             :         }
    5749           4 :         if (ndr_flags & NDR_BUFFERS) {
    5750           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5751             :                         /* We didn't get it above, and the token is not needed after this. */
    5752           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5753             :                 }
    5754           4 :                 switch (level) {
    5755           4 :                         case 1:
    5756           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_BUFFERS, &r->req1));
    5757           4 :                         break;
    5758             : 
    5759           0 :                         default:
    5760           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    5761             :                 }
    5762             :         }
    5763           4 :         return NDR_ERR_SUCCESS;
    5764             : }
    5765             : 
    5766           4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNT4ChangeLogRequest *r)
    5767             : {
    5768           0 :         uint32_t level;
    5769           0 :         uint32_t _level;
    5770           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5771           4 :         if (ndr_flags & NDR_SCALARS) {
    5772             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5773           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5774           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5775           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    5776           4 :                 if (_level != level) {
    5777           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    5778             :                 }
    5779           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5780           4 :                 switch (level) {
    5781           4 :                         case 1: {
    5782           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_SCALARS, &r->req1));
    5783           4 :                         break; }
    5784             : 
    5785           0 :                         default:
    5786           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    5787             :                 }
    5788             :         }
    5789           4 :         if (ndr_flags & NDR_BUFFERS) {
    5790           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5791             :                         /* We didn't get it above, and the token is not needed after this. */
    5792           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5793             :                 }
    5794           4 :                 switch (level) {
    5795           4 :                         case 1:
    5796           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_BUFFERS, &r->req1));
    5797           4 :                         break;
    5798             : 
    5799           0 :                         default:
    5800           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    5801             :                 }
    5802             :         }
    5803           4 :         return NDR_ERR_SUCCESS;
    5804             : }
    5805             : 
    5806           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNT4ChangeLogRequest *r)
    5807             : {
    5808           0 :         uint32_t level;
    5809           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5810           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetNT4ChangeLogRequest");
    5811           0 :         switch (level) {
    5812           0 :                 case 1:
    5813           0 :                         ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(ndr, "req1", &r->req1);
    5814           0 :                 break;
    5815             : 
    5816           0 :                 default:
    5817           0 :                         ndr_print_bad_level(ndr, name, level);
    5818             :         }
    5819           0 : }
    5820             : 
    5821           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
    5822             : {
    5823           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5824           0 :         if (ndr_flags & NDR_SCALARS) {
    5825           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    5826           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->restart_length));
    5827           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->log_length));
    5828           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sam_serial_number));
    5829           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->sam_creation_time));
    5830           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->builtin_serial_number));
    5831           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->builtin_creation_time));
    5832           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lsa_serial_number));
    5833           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->lsa_creation_time));
    5834           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
    5835           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->restart_data));
    5836           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->log_data));
    5837           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    5838             :         }
    5839           0 :         if (ndr_flags & NDR_BUFFERS) {
    5840           0 :                 if (r->restart_data) {
    5841           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->restart_length));
    5842           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->restart_data, r->restart_length));
    5843             :                 }
    5844           0 :                 if (r->log_data) {
    5845           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->log_length));
    5846           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->log_data, r->log_length));
    5847             :                 }
    5848             :         }
    5849           0 :         return NDR_ERR_SUCCESS;
    5850             : }
    5851             : 
    5852           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
    5853             : {
    5854           0 :         uint32_t _ptr_restart_data;
    5855           0 :         uint32_t size_restart_data_1 = 0;
    5856           0 :         TALLOC_CTX *_mem_save_restart_data_0 = NULL;
    5857           0 :         uint32_t _ptr_log_data;
    5858           0 :         uint32_t size_log_data_1 = 0;
    5859           0 :         TALLOC_CTX *_mem_save_log_data_0 = NULL;
    5860           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5861           0 :         if (ndr_flags & NDR_SCALARS) {
    5862           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    5863           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->restart_length));
    5864           0 :                 if (r->restart_length > 10485760) {
    5865           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->restart_length), (uint32_t)(0), (uint32_t)(10485760));
    5866             :                 }
    5867           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->log_length));
    5868           0 :                 if (r->log_length > 10485760) {
    5869           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->log_length), (uint32_t)(0), (uint32_t)(10485760));
    5870             :                 }
    5871           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sam_serial_number));
    5872           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->sam_creation_time));
    5873           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->builtin_serial_number));
    5874           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->builtin_creation_time));
    5875           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lsa_serial_number));
    5876           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->lsa_creation_time));
    5877           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
    5878           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_restart_data));
    5879           0 :                 if (_ptr_restart_data) {
    5880           0 :                         NDR_PULL_ALLOC(ndr, r->restart_data);
    5881             :                 } else {
    5882           0 :                         r->restart_data = NULL;
    5883             :                 }
    5884           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_log_data));
    5885           0 :                 if (_ptr_log_data) {
    5886           0 :                         NDR_PULL_ALLOC(ndr, r->log_data);
    5887             :                 } else {
    5888           0 :                         r->log_data = NULL;
    5889             :                 }
    5890           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    5891             :         }
    5892           0 :         if (ndr_flags & NDR_BUFFERS) {
    5893           0 :                 if (r->restart_data) {
    5894           0 :                         _mem_save_restart_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5895           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->restart_data, 0);
    5896           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->restart_data));
    5897           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->restart_data, &size_restart_data_1));
    5898           0 :                         NDR_PULL_ALLOC_N(ndr, r->restart_data, size_restart_data_1);
    5899           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->restart_data, size_restart_data_1));
    5900           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_restart_data_0, 0);
    5901             :                 }
    5902           0 :                 if (r->log_data) {
    5903           0 :                         _mem_save_log_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5904           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->log_data, 0);
    5905           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->log_data));
    5906           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->log_data, &size_log_data_1));
    5907           0 :                         NDR_PULL_ALLOC_N(ndr, r->log_data, size_log_data_1);
    5908           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->log_data, size_log_data_1));
    5909           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_log_data_0, 0);
    5910             :                 }
    5911           0 :                 if (r->restart_data) {
    5912           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->restart_data, r->restart_length));
    5913             :                 }
    5914           0 :                 if (r->log_data) {
    5915           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->log_data, r->log_length));
    5916             :                 }
    5917             :         }
    5918           0 :         return NDR_ERR_SUCCESS;
    5919             : }
    5920             : 
    5921           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
    5922             : {
    5923           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNT4ChangeLogInfo1");
    5924           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5925           0 :         ndr->depth++;
    5926           0 :         ndr_print_uint32(ndr, "restart_length", r->restart_length);
    5927           0 :         ndr_print_uint32(ndr, "log_length", r->log_length);
    5928           0 :         ndr_print_hyper(ndr, "sam_serial_number", r->sam_serial_number);
    5929           0 :         ndr_print_NTTIME(ndr, "sam_creation_time", r->sam_creation_time);
    5930           0 :         ndr_print_hyper(ndr, "builtin_serial_number", r->builtin_serial_number);
    5931           0 :         ndr_print_NTTIME(ndr, "builtin_creation_time", r->builtin_creation_time);
    5932           0 :         ndr_print_hyper(ndr, "lsa_serial_number", r->lsa_serial_number);
    5933           0 :         ndr_print_NTTIME(ndr, "lsa_creation_time", r->lsa_creation_time);
    5934           0 :         ndr_print_NTSTATUS(ndr, "status", r->status);
    5935           0 :         ndr_print_ptr(ndr, "restart_data", r->restart_data);
    5936           0 :         ndr->depth++;
    5937           0 :         if (r->restart_data) {
    5938           0 :                 ndr_print_array_uint8(ndr, "restart_data", r->restart_data, r->restart_length);
    5939             :         }
    5940           0 :         ndr->depth--;
    5941           0 :         ndr_print_ptr(ndr, "log_data", r->log_data);
    5942           0 :         ndr->depth++;
    5943           0 :         if (r->log_data) {
    5944           0 :                 ndr_print_array_uint8(ndr, "log_data", r->log_data, r->log_length);
    5945             :         }
    5946           0 :         ndr->depth--;
    5947           0 :         ndr->depth--;
    5948             : }
    5949             : 
    5950           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetNT4ChangeLogInfo *r)
    5951             : {
    5952           0 :         uint32_t level;
    5953           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5954           0 :         if (ndr_flags & NDR_SCALARS) {
    5955             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5956           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5957           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    5958           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5959           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    5960           0 :                 switch (level) {
    5961           0 :                         case 1: {
    5962           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_SCALARS, &r->info1));
    5963           0 :                         break; }
    5964             : 
    5965           0 :                         default:
    5966           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    5967             :                 }
    5968             :         }
    5969           0 :         if (ndr_flags & NDR_BUFFERS) {
    5970           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5971             :                         /* We didn't get it above, and the token is not needed after this. */
    5972           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5973             :                 }
    5974           0 :                 switch (level) {
    5975           0 :                         case 1:
    5976           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_BUFFERS, &r->info1));
    5977           0 :                         break;
    5978             : 
    5979           0 :                         default:
    5980           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    5981             :                 }
    5982             :         }
    5983           0 :         return NDR_ERR_SUCCESS;
    5984             : }
    5985             : 
    5986           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetNT4ChangeLogInfo *r)
    5987             : {
    5988           0 :         uint32_t level;
    5989           0 :         uint32_t _level;
    5990           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5991           0 :         if (ndr_flags & NDR_SCALARS) {
    5992             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5993           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5994           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    5995           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    5996           0 :                 if (_level != level) {
    5997           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    5998             :                 }
    5999           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    6000           0 :                 switch (level) {
    6001           0 :                         case 1: {
    6002           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_SCALARS, &r->info1));
    6003           0 :                         break; }
    6004             : 
    6005           0 :                         default:
    6006           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    6007             :                 }
    6008             :         }
    6009           0 :         if (ndr_flags & NDR_BUFFERS) {
    6010           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6011             :                         /* We didn't get it above, and the token is not needed after this. */
    6012           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6013             :                 }
    6014           0 :                 switch (level) {
    6015           0 :                         case 1:
    6016           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_BUFFERS, &r->info1));
    6017           0 :                         break;
    6018             : 
    6019           0 :                         default:
    6020           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    6021             :                 }
    6022             :         }
    6023           0 :         return NDR_ERR_SUCCESS;
    6024             : }
    6025             : 
    6026           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNT4ChangeLogInfo *r)
    6027             : {
    6028           0 :         uint32_t level;
    6029           0 :         level = ndr_print_steal_switch_value(ndr, r);
    6030           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetNT4ChangeLogInfo");
    6031           0 :         switch (level) {
    6032           0 :                 case 1:
    6033           0 :                         ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(ndr, "info1", &r->info1);
    6034           0 :                 break;
    6035             : 
    6036           0 :                 default:
    6037           0 :                         ndr_print_bad_level(ndr, name, level);
    6038             :         }
    6039           0 : }
    6040             : 
    6041        1883 : static enum ndr_err_code ndr_push_drsuapi_DsNameStatus(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameStatus r)
    6042             : {
    6043        1883 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6044        1667 :         return NDR_ERR_SUCCESS;
    6045             : }
    6046             : 
    6047        1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameStatus(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameStatus *r)
    6048             : {
    6049         180 :         uint32_t v;
    6050        1639 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6051        1639 :         *r = v;
    6052        1639 :         return NDR_ERR_SUCCESS;
    6053             : }
    6054             : 
    6055         488 : _PUBLIC_ void ndr_print_drsuapi_DsNameStatus(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameStatus r)
    6056             : {
    6057         488 :         const char *val = NULL;
    6058             : 
    6059         488 :         switch (r) {
    6060         488 :                 case DRSUAPI_DS_NAME_STATUS_OK: val = "DRSUAPI_DS_NAME_STATUS_OK"; break;
    6061           0 :                 case DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR: val = "DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR"; break;
    6062           0 :                 case DRSUAPI_DS_NAME_STATUS_NOT_FOUND: val = "DRSUAPI_DS_NAME_STATUS_NOT_FOUND"; break;
    6063           0 :                 case DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE: val = "DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE"; break;
    6064           0 :                 case DRSUAPI_DS_NAME_STATUS_NO_MAPPING: val = "DRSUAPI_DS_NAME_STATUS_NO_MAPPING"; break;
    6065           0 :                 case DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY: val = "DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY"; break;
    6066           0 :                 case DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING: val = "DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING"; break;
    6067           0 :                 case DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL: val = "DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL"; break;
    6068             :         }
    6069         488 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6070         488 : }
    6071             : 
    6072        1639 : static enum ndr_err_code ndr_push_drsuapi_DsNameFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameFlags r)
    6073             : {
    6074        1639 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6075        1459 :         return NDR_ERR_SUCCESS;
    6076             : }
    6077             : 
    6078        1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameFlags *r)
    6079             : {
    6080         180 :         uint32_t v;
    6081        1639 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6082        1639 :         *r = v;
    6083        1639 :         return NDR_ERR_SUCCESS;
    6084             : }
    6085             : 
    6086           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameFlags(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameFlags r)
    6087             : {
    6088           0 :         const char *val = NULL;
    6089             : 
    6090           0 :         switch (r) {
    6091           0 :                 case DRSUAPI_DS_NAME_FLAG_NO_FLAGS: val = "DRSUAPI_DS_NAME_FLAG_NO_FLAGS"; break;
    6092           0 :                 case DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY: val = "DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY"; break;
    6093           0 :                 case DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC: val = "DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC"; break;
    6094           0 :                 case DRSUAPI_DS_NAME_FLAG_GCVERIFY: val = "DRSUAPI_DS_NAME_FLAG_GCVERIFY"; break;
    6095           0 :                 case DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL: val = "DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL"; break;
    6096             :         }
    6097           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6098           0 : }
    6099             : 
    6100        3278 : static enum ndr_err_code ndr_push_drsuapi_DsNameFormat(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameFormat r)
    6101             : {
    6102        3278 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6103        2918 :         return NDR_ERR_SUCCESS;
    6104             : }
    6105             : 
    6106        3278 : static enum ndr_err_code ndr_pull_drsuapi_DsNameFormat(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsNameFormat *r)
    6107             : {
    6108         360 :         uint32_t v;
    6109        3278 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6110        3278 :         *r = v;
    6111        3278 :         return NDR_ERR_SUCCESS;
    6112             : }
    6113             : 
    6114           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameFormat(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameFormat r)
    6115             : {
    6116           0 :         const char *val = NULL;
    6117             : 
    6118           0 :         switch (r) {
    6119           0 :                 case DRSUAPI_DS_NAME_FORMAT_UNKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UNKNOWN"; break;
    6120           0 :                 case DRSUAPI_DS_NAME_FORMAT_FQDN_1779: val = "DRSUAPI_DS_NAME_FORMAT_FQDN_1779"; break;
    6121           0 :                 case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT"; break;
    6122           0 :                 case DRSUAPI_DS_NAME_FORMAT_DISPLAY: val = "DRSUAPI_DS_NAME_FORMAT_DISPLAY"; break;
    6123           0 :                 case DRSUAPI_DS_NAME_FORMAT_GUID: val = "DRSUAPI_DS_NAME_FORMAT_GUID"; break;
    6124           0 :                 case DRSUAPI_DS_NAME_FORMAT_CANONICAL: val = "DRSUAPI_DS_NAME_FORMAT_CANONICAL"; break;
    6125           0 :                 case DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL: val = "DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL"; break;
    6126           0 :                 case DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX: val = "DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX"; break;
    6127           0 :                 case DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL: val = "DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL"; break;
    6128           0 :                 case DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY: val = "DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY"; break;
    6129           0 :                 case DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN: val = "DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN"; break;
    6130           0 :                 case DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID: val = "DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID"; break;
    6131           0 :                 case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX"; break;
    6132           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS"; break;
    6133           0 :                 case DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON: val = "DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON"; break;
    6134           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE"; break;
    6135           0 :                 case DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME: val = "DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME"; break;
    6136           0 :                 case DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME: val = "DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME"; break;
    6137           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_NCS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_NCS"; break;
    6138           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS"; break;
    6139           0 :                 case DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID: val = "DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID"; break;
    6140           0 :                 case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN"; break;
    6141           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_ROLES: val = "DRSUAPI_DS_NAME_FORMAT_LIST_ROLES"; break;
    6142           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER: val = "DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER"; break;
    6143           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE"; break;
    6144           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE"; break;
    6145           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE"; break;
    6146           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_SITES: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SITES"; break;
    6147             :         }
    6148           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6149           0 : }
    6150             : 
    6151        3302 : static enum ndr_err_code ndr_push_drsuapi_DsNameString(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsNameString *r)
    6152             : {
    6153        3302 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6154        3302 :         if (ndr_flags & NDR_SCALARS) {
    6155        1651 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6156        1651 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->str));
    6157        1651 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6158             :         }
    6159        3302 :         if (ndr_flags & NDR_BUFFERS) {
    6160        1651 :                 if (r->str) {
    6161        1651 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str, CH_UTF16)));
    6162        1651 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6163        1651 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str, CH_UTF16)));
    6164        1651 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->str, ndr_charset_length(r->str, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6165             :                 }
    6166             :         }
    6167        2942 :         return NDR_ERR_SUCCESS;
    6168             : }
    6169             : 
    6170        3302 : static enum ndr_err_code ndr_pull_drsuapi_DsNameString(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsNameString *r)
    6171             : {
    6172         360 :         uint32_t _ptr_str;
    6173        3302 :         uint32_t size_str_1 = 0;
    6174        3302 :         uint32_t length_str_1 = 0;
    6175        3302 :         TALLOC_CTX *_mem_save_str_0 = NULL;
    6176        3302 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6177        3302 :         if (ndr_flags & NDR_SCALARS) {
    6178        1651 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6179        1651 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_str));
    6180        1651 :                 if (_ptr_str) {
    6181        1651 :                         NDR_PULL_ALLOC(ndr, r->str);
    6182             :                 } else {
    6183           0 :                         r->str = NULL;
    6184             :                 }
    6185        1651 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6186             :         }
    6187        3302 :         if (ndr_flags & NDR_BUFFERS) {
    6188        1651 :                 if (r->str) {
    6189        1651 :                         _mem_save_str_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6190        1651 :                         NDR_PULL_SET_MEM_CTX(ndr, r->str, 0);
    6191        1651 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->str));
    6192        1651 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->str));
    6193        1651 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->str, &size_str_1));
    6194        1651 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->str, &length_str_1));
    6195        1651 :                         if (length_str_1 > size_str_1) {
    6196           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_str_1, length_str_1);
    6197             :                         }
    6198        1651 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_str_1, sizeof(uint16_t)));
    6199        1651 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->str, length_str_1, sizeof(uint16_t), CH_UTF16));
    6200        1651 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_str_0, 0);
    6201             :                 }
    6202             :         }
    6203        2942 :         return NDR_ERR_SUCCESS;
    6204             : }
    6205             : 
    6206           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameString(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameString *r)
    6207             : {
    6208           0 :         ndr_print_struct(ndr, name, "drsuapi_DsNameString");
    6209           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6210           0 :         ndr->depth++;
    6211           0 :         ndr_print_ptr(ndr, "str", r->str);
    6212           0 :         ndr->depth++;
    6213           0 :         if (r->str) {
    6214           0 :                 ndr_print_string(ndr, "str", r->str);
    6215             :         }
    6216           0 :         ndr->depth--;
    6217           0 :         ndr->depth--;
    6218             : }
    6219             : 
    6220        3278 : static enum ndr_err_code ndr_push_drsuapi_DsNameRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsNameRequest1 *r)
    6221             : {
    6222         360 :         uint32_t cntr_names_1;
    6223        3278 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6224        3278 :         if (ndr_flags & NDR_SCALARS) {
    6225        1639 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6226        1639 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->codepage));
    6227        1639 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->language));
    6228        1819 :                 NDR_CHECK(ndr_push_drsuapi_DsNameFlags(ndr, NDR_SCALARS, r->format_flags));
    6229        1819 :                 NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr, NDR_SCALARS, r->format_offered));
    6230        1819 :                 NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr, NDR_SCALARS, r->format_desired));
    6231        1639 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    6232        1639 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
    6233        1639 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6234             :         }
    6235        3278 :         if (ndr_flags & NDR_BUFFERS) {
    6236        1639 :                 if (r->names) {
    6237        1639 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    6238        3278 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    6239        1639 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    6240             :                         }
    6241        3278 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    6242        1639 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    6243             :                         }
    6244             :                 }
    6245             :         }
    6246        2918 :         return NDR_ERR_SUCCESS;
    6247             : }
    6248             : 
    6249        3278 : static enum ndr_err_code ndr_pull_drsuapi_DsNameRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsNameRequest1 *r)
    6250             : {
    6251         360 :         uint32_t _ptr_names;
    6252        3278 :         uint32_t size_names_1 = 0;
    6253         360 :         uint32_t cntr_names_1;
    6254        3278 :         TALLOC_CTX *_mem_save_names_0 = NULL;
    6255        3278 :         TALLOC_CTX *_mem_save_names_1 = NULL;
    6256        3278 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6257        3278 :         if (ndr_flags & NDR_SCALARS) {
    6258        1639 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6259        1639 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->codepage));
    6260        1639 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->language));
    6261        1819 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameFlags(ndr, NDR_SCALARS, &r->format_flags));
    6262        1819 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr, NDR_SCALARS, &r->format_offered));
    6263        1819 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr, NDR_SCALARS, &r->format_desired));
    6264        1639 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    6265        1639 :                 if (r->count < 1 || r->count > 10000) {
    6266           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(1), (uint32_t)(10000));
    6267             :                 }
    6268        1639 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
    6269        1639 :                 if (_ptr_names) {
    6270        1639 :                         NDR_PULL_ALLOC(ndr, r->names);
    6271             :                 } else {
    6272           0 :                         r->names = NULL;
    6273             :                 }
    6274        1639 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6275             :         }
    6276        3278 :         if (ndr_flags & NDR_BUFFERS) {
    6277        1639 :                 if (r->names) {
    6278        1639 :                         _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6279        1639 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    6280        1639 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
    6281        1639 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
    6282        1639 :                         NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
    6283        1639 :                         _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    6284        1639 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    6285        3278 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    6286        1639 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    6287             :                         }
    6288        3278 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    6289        1639 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    6290             :                         }
    6291        1639 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
    6292        1639 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
    6293             :                 }
    6294        1639 :                 if (r->names) {
    6295        1639 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
    6296             :                 }
    6297        3278 :                 for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    6298         180 :                 }
    6299             :         }
    6300        2918 :         return NDR_ERR_SUCCESS;
    6301             : }
    6302             : 
    6303           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameRequest1 *r)
    6304             : {
    6305           0 :         uint32_t cntr_names_1;
    6306           0 :         ndr_print_struct(ndr, name, "drsuapi_DsNameRequest1");
    6307           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6308           0 :         ndr->depth++;
    6309           0 :         ndr_print_uint32(ndr, "codepage", r->codepage);
    6310           0 :         ndr_print_uint32(ndr, "language", r->language);
    6311           0 :         ndr_print_drsuapi_DsNameFlags(ndr, "format_flags", r->format_flags);
    6312           0 :         ndr_print_drsuapi_DsNameFormat(ndr, "format_offered", r->format_offered);
    6313           0 :         ndr_print_drsuapi_DsNameFormat(ndr, "format_desired", r->format_desired);
    6314           0 :         ndr_print_uint32(ndr, "count", r->count);
    6315           0 :         ndr_print_ptr(ndr, "names", r->names);
    6316           0 :         ndr->depth++;
    6317           0 :         if (r->names) {
    6318           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "names", (uint32_t)(r->count));
    6319           0 :                 ndr->depth++;
    6320           0 :                 for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    6321           0 :                         ndr_print_drsuapi_DsNameString(ndr, "names", &r->names[cntr_names_1]);
    6322             :                 }
    6323           0 :                 ndr->depth--;
    6324             :         }
    6325           0 :         ndr->depth--;
    6326           0 :         ndr->depth--;
    6327             : }
    6328             : 
    6329        1639 : static enum ndr_err_code ndr_push_drsuapi_DsNameRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsNameRequest *r)
    6330             : {
    6331         180 :         uint32_t level;
    6332        1639 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6333        1639 :         if (ndr_flags & NDR_SCALARS) {
    6334             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6335        1639 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6336        1639 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6337        1639 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6338        1639 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6339        1639 :                 switch (level) {
    6340        1639 :                         case 1: {
    6341        1639 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr, NDR_SCALARS, &r->req1));
    6342        1459 :                         break; }
    6343             : 
    6344           0 :                         default:
    6345           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    6346             :                 }
    6347             :         }
    6348        1639 :         if (ndr_flags & NDR_BUFFERS) {
    6349        1639 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6350             :                         /* We didn't get it above, and the token is not needed after this. */
    6351           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6352             :                 }
    6353        1639 :                 switch (level) {
    6354        1639 :                         case 1:
    6355        1639 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr, NDR_BUFFERS, &r->req1));
    6356        1459 :                         break;
    6357             : 
    6358           0 :                         default:
    6359           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    6360             :                 }
    6361             :         }
    6362        1459 :         return NDR_ERR_SUCCESS;
    6363             : }
    6364             : 
    6365        1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsNameRequest *r)
    6366             : {
    6367         180 :         uint32_t level;
    6368         180 :         uint32_t _level;
    6369        1639 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6370        1639 :         if (ndr_flags & NDR_SCALARS) {
    6371             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6372        1639 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6373        1639 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6374        1639 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6375        1639 :                 if (_level != level) {
    6376           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    6377             :                 }
    6378        1639 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6379        1639 :                 switch (level) {
    6380        1639 :                         case 1: {
    6381        1639 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr, NDR_SCALARS, &r->req1));
    6382        1459 :                         break; }
    6383             : 
    6384           0 :                         default:
    6385           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    6386             :                 }
    6387             :         }
    6388        1639 :         if (ndr_flags & NDR_BUFFERS) {
    6389        1639 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6390             :                         /* We didn't get it above, and the token is not needed after this. */
    6391           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6392             :                 }
    6393        1639 :                 switch (level) {
    6394        1639 :                         case 1:
    6395        1639 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr, NDR_BUFFERS, &r->req1));
    6396        1459 :                         break;
    6397             : 
    6398           0 :                         default:
    6399           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    6400             :                 }
    6401             :         }
    6402        1459 :         return NDR_ERR_SUCCESS;
    6403             : }
    6404             : 
    6405           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsNameRequest *r)
    6406             : {
    6407           0 :         uint32_t level;
    6408           0 :         level = ndr_print_steal_switch_value(ndr, r);
    6409           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsNameRequest");
    6410           0 :         switch (level) {
    6411           0 :                 case 1:
    6412           0 :                         ndr_print_drsuapi_DsNameRequest1(ndr, "req1", &r->req1);
    6413           0 :                 break;
    6414             : 
    6415           0 :                 default:
    6416           0 :                         ndr_print_bad_level(ndr, name, level);
    6417             :         }
    6418           0 : }
    6419             : 
    6420        3766 : static enum ndr_err_code ndr_push_drsuapi_DsNameInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsNameInfo1 *r)
    6421             : {
    6422        3766 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6423        3766 :         if (ndr_flags & NDR_SCALARS) {
    6424        1883 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6425        2099 :                 NDR_CHECK(ndr_push_drsuapi_DsNameStatus(ndr, NDR_SCALARS, r->status));
    6426        1883 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain_name));
    6427        1883 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->result_name));
    6428        1883 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6429             :         }
    6430        3766 :         if (ndr_flags & NDR_BUFFERS) {
    6431        1883 :                 if (r->dns_domain_name) {
    6432        1800 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_name, CH_UTF16)));
    6433        1800 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6434        1800 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_name, CH_UTF16)));
    6435        1800 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_domain_name, ndr_charset_length(r->dns_domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6436             :                 }
    6437        1883 :                 if (r->result_name) {
    6438        1742 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->result_name, CH_UTF16)));
    6439        1742 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6440        1742 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->result_name, CH_UTF16)));
    6441        1742 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->result_name, ndr_charset_length(r->result_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6442             :                 }
    6443             :         }
    6444        3334 :         return NDR_ERR_SUCCESS;
    6445             : }
    6446             : 
    6447        3278 : static enum ndr_err_code ndr_pull_drsuapi_DsNameInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsNameInfo1 *r)
    6448             : {
    6449         360 :         uint32_t _ptr_dns_domain_name;
    6450        3278 :         uint32_t size_dns_domain_name_1 = 0;
    6451        3278 :         uint32_t length_dns_domain_name_1 = 0;
    6452        3278 :         TALLOC_CTX *_mem_save_dns_domain_name_0 = NULL;
    6453         360 :         uint32_t _ptr_result_name;
    6454        3278 :         uint32_t size_result_name_1 = 0;
    6455        3278 :         uint32_t length_result_name_1 = 0;
    6456        3278 :         TALLOC_CTX *_mem_save_result_name_0 = NULL;
    6457        3278 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6458        3278 :         if (ndr_flags & NDR_SCALARS) {
    6459        1639 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6460        1819 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameStatus(ndr, NDR_SCALARS, &r->status));
    6461        1639 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain_name));
    6462        1639 :                 if (_ptr_dns_domain_name) {
    6463        1556 :                         NDR_PULL_ALLOC(ndr, r->dns_domain_name);
    6464             :                 } else {
    6465          83 :                         r->dns_domain_name = NULL;
    6466             :                 }
    6467        1639 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_result_name));
    6468        1639 :                 if (_ptr_result_name) {
    6469        1498 :                         NDR_PULL_ALLOC(ndr, r->result_name);
    6470             :                 } else {
    6471         141 :                         r->result_name = NULL;
    6472             :                 }
    6473        1639 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6474             :         }
    6475        3278 :         if (ndr_flags & NDR_BUFFERS) {
    6476        1639 :                 if (r->dns_domain_name) {
    6477        1556 :                         _mem_save_dns_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6478        1556 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain_name, 0);
    6479        1556 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain_name));
    6480        1556 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain_name));
    6481        1556 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_domain_name, &size_dns_domain_name_1));
    6482        1556 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_domain_name, &length_dns_domain_name_1));
    6483        1556 :                         if (length_dns_domain_name_1 > size_dns_domain_name_1) {
    6484           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_domain_name_1, length_dns_domain_name_1);
    6485             :                         }
    6486        1556 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_name_1, sizeof(uint16_t)));
    6487        1556 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain_name, length_dns_domain_name_1, sizeof(uint16_t), CH_UTF16));
    6488        1556 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_name_0, 0);
    6489             :                 }
    6490        1639 :                 if (r->result_name) {
    6491        1498 :                         _mem_save_result_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6492        1498 :                         NDR_PULL_SET_MEM_CTX(ndr, r->result_name, 0);
    6493        1498 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->result_name));
    6494        1498 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->result_name));
    6495        1498 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->result_name, &size_result_name_1));
    6496        1498 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->result_name, &length_result_name_1));
    6497        1498 :                         if (length_result_name_1 > size_result_name_1) {
    6498           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_result_name_1, length_result_name_1);
    6499             :                         }
    6500        1498 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_result_name_1, sizeof(uint16_t)));
    6501        1498 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->result_name, length_result_name_1, sizeof(uint16_t), CH_UTF16));
    6502        1498 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_result_name_0, 0);
    6503             :                 }
    6504             :         }
    6505        2918 :         return NDR_ERR_SUCCESS;
    6506             : }
    6507             : 
    6508         488 : _PUBLIC_ void ndr_print_drsuapi_DsNameInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameInfo1 *r)
    6509             : {
    6510         488 :         ndr_print_struct(ndr, name, "drsuapi_DsNameInfo1");
    6511         488 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6512         488 :         ndr->depth++;
    6513         488 :         ndr_print_drsuapi_DsNameStatus(ndr, "status", r->status);
    6514         488 :         ndr_print_ptr(ndr, "dns_domain_name", r->dns_domain_name);
    6515         488 :         ndr->depth++;
    6516         488 :         if (r->dns_domain_name) {
    6517         488 :                 ndr_print_string(ndr, "dns_domain_name", r->dns_domain_name);
    6518             :         }
    6519         488 :         ndr->depth--;
    6520         488 :         ndr_print_ptr(ndr, "result_name", r->result_name);
    6521         488 :         ndr->depth++;
    6522         488 :         if (r->result_name) {
    6523         488 :                 ndr_print_string(ndr, "result_name", r->result_name);
    6524             :         }
    6525         488 :         ndr->depth--;
    6526         488 :         ndr->depth--;
    6527             : }
    6528             : 
    6529        1883 : static enum ndr_err_code ndr_push_drsuapi_DsNameCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsNameCtr1 *r)
    6530             : {
    6531         216 :         uint32_t cntr_array_1;
    6532        1883 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6533        1883 :         if (ndr_flags & NDR_SCALARS) {
    6534        1883 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6535        1883 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    6536        1883 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    6537        1883 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6538             :         }
    6539        1883 :         if (ndr_flags & NDR_BUFFERS) {
    6540        1883 :                 if (r->array) {
    6541        1883 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    6542        3766 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    6543        1883 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    6544             :                         }
    6545        3766 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    6546        1883 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    6547             :                         }
    6548             :                 }
    6549             :         }
    6550        1667 :         return NDR_ERR_SUCCESS;
    6551             : }
    6552             : 
    6553        1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsNameCtr1 *r)
    6554             : {
    6555         180 :         uint32_t _ptr_array;
    6556        1639 :         uint32_t size_array_1 = 0;
    6557         180 :         uint32_t cntr_array_1;
    6558        1639 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    6559        1639 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    6560        1639 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6561        1639 :         if (ndr_flags & NDR_SCALARS) {
    6562        1639 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6563        1639 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    6564        1639 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    6565        1639 :                 if (_ptr_array) {
    6566        1639 :                         NDR_PULL_ALLOC(ndr, r->array);
    6567             :                 } else {
    6568           0 :                         r->array = NULL;
    6569             :                 }
    6570        1639 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6571             :         }
    6572        1639 :         if (ndr_flags & NDR_BUFFERS) {
    6573        1639 :                 if (r->array) {
    6574        1639 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6575        1639 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    6576        1639 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    6577        1639 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    6578        1639 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    6579        1639 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    6580        1639 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    6581        3278 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    6582        1639 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    6583             :                         }
    6584        3278 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    6585        1639 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    6586             :                         }
    6587        1639 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    6588        1639 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    6589             :                 }
    6590        1639 :                 if (r->array) {
    6591        1639 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    6592             :                 }
    6593        3278 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    6594         180 :                 }
    6595             :         }
    6596        1459 :         return NDR_ERR_SUCCESS;
    6597             : }
    6598             : 
    6599         488 : _PUBLIC_ void ndr_print_drsuapi_DsNameCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameCtr1 *r)
    6600             : {
    6601          72 :         uint32_t cntr_array_1;
    6602         488 :         ndr_print_struct(ndr, name, "drsuapi_DsNameCtr1");
    6603         488 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6604         488 :         ndr->depth++;
    6605         488 :         ndr_print_uint32(ndr, "count", r->count);
    6606         488 :         ndr_print_ptr(ndr, "array", r->array);
    6607         488 :         ndr->depth++;
    6608         488 :         if (r->array) {
    6609         488 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
    6610         488 :                 ndr->depth++;
    6611         976 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    6612         488 :                         ndr_print_drsuapi_DsNameInfo1(ndr, "array", &r->array[cntr_array_1]);
    6613             :                 }
    6614         488 :                 ndr->depth--;
    6615             :         }
    6616         488 :         ndr->depth--;
    6617         488 :         ndr->depth--;
    6618             : }
    6619             : 
    6620        1883 : static enum ndr_err_code ndr_push_drsuapi_DsNameCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsNameCtr *r)
    6621             : {
    6622         216 :         uint32_t level;
    6623        1883 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6624        1883 :         if (ndr_flags & NDR_SCALARS) {
    6625             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6626        1883 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6627        1883 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6628        1883 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6629        1883 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6630        1883 :                 switch (level) {
    6631        1883 :                         case 1: {
    6632        1883 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
    6633        1667 :                         break; }
    6634             : 
    6635           0 :                         default:
    6636           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    6637             :                 }
    6638             :         }
    6639        1883 :         if (ndr_flags & NDR_BUFFERS) {
    6640        1883 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6641             :                         /* We didn't get it above, and the token is not needed after this. */
    6642           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6643             :                 }
    6644        1883 :                 switch (level) {
    6645        1883 :                         case 1:
    6646        1883 :                                 if (r->ctr1) {
    6647        1883 :                                         NDR_CHECK(ndr_push_drsuapi_DsNameCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    6648             :                                 }
    6649        1667 :                         break;
    6650             : 
    6651           0 :                         default:
    6652           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    6653             :                 }
    6654             :         }
    6655        1667 :         return NDR_ERR_SUCCESS;
    6656             : }
    6657             : 
    6658        1639 : static enum ndr_err_code ndr_pull_drsuapi_DsNameCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsNameCtr *r)
    6659             : {
    6660         180 :         uint32_t level;
    6661         180 :         uint32_t _level;
    6662        1639 :         TALLOC_CTX *_mem_save_ctr1_0 = NULL;
    6663         180 :         uint32_t _ptr_ctr1;
    6664        1639 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6665        1639 :         if (ndr_flags & NDR_SCALARS) {
    6666             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6667        1639 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6668        1639 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6669        1639 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6670        1639 :                 if (_level != level) {
    6671           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    6672             :                 }
    6673        1639 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6674        1639 :                 switch (level) {
    6675        1639 :                         case 1: {
    6676        1639 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
    6677        1639 :                                 if (_ptr_ctr1) {
    6678        1639 :                                         NDR_PULL_ALLOC(ndr, r->ctr1);
    6679             :                                 } else {
    6680           0 :                                         r->ctr1 = NULL;
    6681             :                                 }
    6682        1459 :                         break; }
    6683             : 
    6684           0 :                         default:
    6685           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    6686             :                 }
    6687             :         }
    6688        1639 :         if (ndr_flags & NDR_BUFFERS) {
    6689        1639 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6690             :                         /* We didn't get it above, and the token is not needed after this. */
    6691           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6692             :                 }
    6693        1639 :                 switch (level) {
    6694        1639 :                         case 1:
    6695        1639 :                                 if (r->ctr1) {
    6696        1639 :                                         _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6697        1639 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
    6698        1639 :                                         NDR_CHECK(ndr_pull_drsuapi_DsNameCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    6699        1639 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
    6700             :                                 }
    6701        1459 :                         break;
    6702             : 
    6703           0 :                         default:
    6704           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    6705             :                 }
    6706             :         }
    6707        1459 :         return NDR_ERR_SUCCESS;
    6708             : }
    6709             : 
    6710         488 : _PUBLIC_ void ndr_print_drsuapi_DsNameCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsNameCtr *r)
    6711             : {
    6712          72 :         uint32_t level;
    6713         488 :         level = ndr_print_steal_switch_value(ndr, r);
    6714         488 :         ndr_print_union(ndr, name, level, "drsuapi_DsNameCtr");
    6715         488 :         switch (level) {
    6716         488 :                 case 1:
    6717         488 :                         ndr_print_ptr(ndr, "ctr1", r->ctr1);
    6718         488 :                         ndr->depth++;
    6719         488 :                         if (r->ctr1) {
    6720         488 :                                 ndr_print_drsuapi_DsNameCtr1(ndr, "ctr1", r->ctr1);
    6721             :                         }
    6722         488 :                         ndr->depth--;
    6723         488 :                 break;
    6724             : 
    6725           0 :                 default:
    6726           0 :                         ndr_print_bad_level(ndr, name, level);
    6727             :         }
    6728         488 : }
    6729             : 
    6730           4 : static enum ndr_err_code ndr_push_drsuapi_DsSpnOperation(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsSpnOperation r)
    6731             : {
    6732           4 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6733           4 :         return NDR_ERR_SUCCESS;
    6734             : }
    6735             : 
    6736           4 : static enum ndr_err_code ndr_pull_drsuapi_DsSpnOperation(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsSpnOperation *r)
    6737             : {
    6738           0 :         uint32_t v;
    6739           4 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6740           4 :         *r = v;
    6741           4 :         return NDR_ERR_SUCCESS;
    6742             : }
    6743             : 
    6744           0 : _PUBLIC_ void ndr_print_drsuapi_DsSpnOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsSpnOperation r)
    6745             : {
    6746           0 :         const char *val = NULL;
    6747             : 
    6748           0 :         switch (r) {
    6749           0 :                 case DRSUAPI_DS_SPN_OPERATION_ADD: val = "DRSUAPI_DS_SPN_OPERATION_ADD"; break;
    6750           0 :                 case DRSUAPI_DS_SPN_OPERATION_REPLACE: val = "DRSUAPI_DS_SPN_OPERATION_REPLACE"; break;
    6751           0 :                 case DRSUAPI_DS_SPN_OPERATION_DELETE: val = "DRSUAPI_DS_SPN_OPERATION_DELETE"; break;
    6752             :         }
    6753           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6754           0 : }
    6755             : 
    6756           8 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsWriteAccountSpnRequest1 *r)
    6757             : {
    6758           0 :         uint32_t cntr_spn_names_1;
    6759           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6760           8 :         if (ndr_flags & NDR_SCALARS) {
    6761           4 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6762           4 :                 NDR_CHECK(ndr_push_drsuapi_DsSpnOperation(ndr, NDR_SCALARS, r->operation));
    6763           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
    6764           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
    6765           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    6766           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->spn_names));
    6767           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6768             :         }
    6769           8 :         if (ndr_flags & NDR_BUFFERS) {
    6770           4 :                 if (r->object_dn) {
    6771           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
    6772           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6773           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
    6774           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6775             :                 }
    6776           4 :                 if (r->spn_names) {
    6777           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    6778          16 :                         for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
    6779          12 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->spn_names[cntr_spn_names_1]));
    6780             :                         }
    6781          16 :                         for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
    6782          12 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->spn_names[cntr_spn_names_1]));
    6783             :                         }
    6784             :                 }
    6785             :         }
    6786           8 :         return NDR_ERR_SUCCESS;
    6787             : }
    6788             : 
    6789           8 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsWriteAccountSpnRequest1 *r)
    6790             : {
    6791           0 :         uint32_t _ptr_object_dn;
    6792           8 :         uint32_t size_object_dn_1 = 0;
    6793           8 :         uint32_t length_object_dn_1 = 0;
    6794           8 :         TALLOC_CTX *_mem_save_object_dn_0 = NULL;
    6795           0 :         uint32_t _ptr_spn_names;
    6796           8 :         uint32_t size_spn_names_1 = 0;
    6797           0 :         uint32_t cntr_spn_names_1;
    6798           8 :         TALLOC_CTX *_mem_save_spn_names_0 = NULL;
    6799           8 :         TALLOC_CTX *_mem_save_spn_names_1 = NULL;
    6800           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6801           8 :         if (ndr_flags & NDR_SCALARS) {
    6802           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6803           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsSpnOperation(ndr, NDR_SCALARS, &r->operation));
    6804           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
    6805           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
    6806           4 :                 if (_ptr_object_dn) {
    6807           4 :                         NDR_PULL_ALLOC(ndr, r->object_dn);
    6808             :                 } else {
    6809           0 :                         r->object_dn = NULL;
    6810             :                 }
    6811           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    6812           4 :                 if (r->count > 10000) {
    6813           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
    6814             :                 }
    6815           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_spn_names));
    6816           4 :                 if (_ptr_spn_names) {
    6817           4 :                         NDR_PULL_ALLOC(ndr, r->spn_names);
    6818             :                 } else {
    6819           0 :                         r->spn_names = NULL;
    6820             :                 }
    6821           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6822             :         }
    6823           8 :         if (ndr_flags & NDR_BUFFERS) {
    6824           4 :                 if (r->object_dn) {
    6825           4 :                         _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6826           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
    6827           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
    6828           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
    6829           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
    6830           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
    6831           4 :                         if (length_object_dn_1 > size_object_dn_1) {
    6832           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
    6833             :                         }
    6834           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
    6835           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
    6836           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
    6837             :                 }
    6838           4 :                 if (r->spn_names) {
    6839           4 :                         _mem_save_spn_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6840           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->spn_names, 0);
    6841           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->spn_names));
    6842           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->spn_names, &size_spn_names_1));
    6843           4 :                         NDR_PULL_ALLOC_N(ndr, r->spn_names, size_spn_names_1);
    6844           4 :                         _mem_save_spn_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    6845           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->spn_names, 0);
    6846          16 :                         for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
    6847          12 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->spn_names[cntr_spn_names_1]));
    6848             :                         }
    6849          16 :                         for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
    6850          12 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->spn_names[cntr_spn_names_1]));
    6851             :                         }
    6852           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_spn_names_1, 0);
    6853           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_spn_names_0, 0);
    6854             :                 }
    6855           4 :                 if (r->spn_names) {
    6856           4 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->spn_names, r->count));
    6857             :                 }
    6858          16 :                 for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
    6859           0 :                 }
    6860             :         }
    6861           8 :         return NDR_ERR_SUCCESS;
    6862             : }
    6863             : 
    6864           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsWriteAccountSpnRequest1 *r)
    6865             : {
    6866           0 :         uint32_t cntr_spn_names_1;
    6867           0 :         ndr_print_struct(ndr, name, "drsuapi_DsWriteAccountSpnRequest1");
    6868           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6869           0 :         ndr->depth++;
    6870           0 :         ndr_print_drsuapi_DsSpnOperation(ndr, "operation", r->operation);
    6871           0 :         ndr_print_uint32(ndr, "unknown1", r->unknown1);
    6872           0 :         ndr_print_ptr(ndr, "object_dn", r->object_dn);
    6873           0 :         ndr->depth++;
    6874           0 :         if (r->object_dn) {
    6875           0 :                 ndr_print_string(ndr, "object_dn", r->object_dn);
    6876             :         }
    6877           0 :         ndr->depth--;
    6878           0 :         ndr_print_uint32(ndr, "count", r->count);
    6879           0 :         ndr_print_ptr(ndr, "spn_names", r->spn_names);
    6880           0 :         ndr->depth++;
    6881           0 :         if (r->spn_names) {
    6882           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "spn_names", (uint32_t)(r->count));
    6883           0 :                 ndr->depth++;
    6884           0 :                 for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
    6885           0 :                         ndr_print_drsuapi_DsNameString(ndr, "spn_names", &r->spn_names[cntr_spn_names_1]);
    6886             :                 }
    6887           0 :                 ndr->depth--;
    6888             :         }
    6889           0 :         ndr->depth--;
    6890           0 :         ndr->depth--;
    6891             : }
    6892             : 
    6893           4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsWriteAccountSpnRequest *r)
    6894             : {
    6895           0 :         uint32_t level;
    6896           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6897           4 :         if (ndr_flags & NDR_SCALARS) {
    6898             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6899           4 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6900           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6901           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6902           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6903           4 :                 switch (level) {
    6904           4 :                         case 1: {
    6905           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_SCALARS, &r->req1));
    6906           4 :                         break; }
    6907             : 
    6908           0 :                         default:
    6909           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    6910             :                 }
    6911             :         }
    6912           4 :         if (ndr_flags & NDR_BUFFERS) {
    6913           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6914             :                         /* We didn't get it above, and the token is not needed after this. */
    6915           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6916             :                 }
    6917           4 :                 switch (level) {
    6918           4 :                         case 1:
    6919           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_BUFFERS, &r->req1));
    6920           4 :                         break;
    6921             : 
    6922           0 :                         default:
    6923           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    6924             :                 }
    6925             :         }
    6926           4 :         return NDR_ERR_SUCCESS;
    6927             : }
    6928             : 
    6929           4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsWriteAccountSpnRequest *r)
    6930             : {
    6931           0 :         uint32_t level;
    6932           0 :         uint32_t _level;
    6933           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6934           4 :         if (ndr_flags & NDR_SCALARS) {
    6935             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6936           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6937           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6938           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6939           4 :                 if (_level != level) {
    6940           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    6941             :                 }
    6942           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6943           4 :                 switch (level) {
    6944           4 :                         case 1: {
    6945           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_SCALARS, &r->req1));
    6946           4 :                         break; }
    6947             : 
    6948           0 :                         default:
    6949           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    6950             :                 }
    6951             :         }
    6952           4 :         if (ndr_flags & NDR_BUFFERS) {
    6953           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6954             :                         /* We didn't get it above, and the token is not needed after this. */
    6955           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6956             :                 }
    6957           4 :                 switch (level) {
    6958           4 :                         case 1:
    6959           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_BUFFERS, &r->req1));
    6960           4 :                         break;
    6961             : 
    6962           0 :                         default:
    6963           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    6964             :                 }
    6965             :         }
    6966           4 :         return NDR_ERR_SUCCESS;
    6967             : }
    6968             : 
    6969           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsWriteAccountSpnRequest *r)
    6970             : {
    6971           0 :         uint32_t level;
    6972           0 :         level = ndr_print_steal_switch_value(ndr, r);
    6973           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsWriteAccountSpnRequest");
    6974           0 :         switch (level) {
    6975           0 :                 case 1:
    6976           0 :                         ndr_print_drsuapi_DsWriteAccountSpnRequest1(ndr, "req1", &r->req1);
    6977           0 :                 break;
    6978             : 
    6979           0 :                 default:
    6980           0 :                         ndr_print_bad_level(ndr, name, level);
    6981             :         }
    6982           0 : }
    6983             : 
    6984           4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnResult1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsWriteAccountSpnResult1 *r)
    6985             : {
    6986           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6987           4 :         if (ndr_flags & NDR_SCALARS) {
    6988           4 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    6989           4 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
    6990           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    6991             :         }
    6992           4 :         if (ndr_flags & NDR_BUFFERS) {
    6993           0 :         }
    6994           4 :         return NDR_ERR_SUCCESS;
    6995             : }
    6996             : 
    6997           4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnResult1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsWriteAccountSpnResult1 *r)
    6998             : {
    6999           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7000           4 :         if (ndr_flags & NDR_SCALARS) {
    7001           4 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7002           4 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
    7003           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    7004             :         }
    7005           4 :         if (ndr_flags & NDR_BUFFERS) {
    7006           0 :         }
    7007           4 :         return NDR_ERR_SUCCESS;
    7008             : }
    7009             : 
    7010           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnResult1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsWriteAccountSpnResult1 *r)
    7011             : {
    7012           0 :         ndr_print_struct(ndr, name, "drsuapi_DsWriteAccountSpnResult1");
    7013           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7014           0 :         ndr->depth++;
    7015           0 :         ndr_print_WERROR(ndr, "status", r->status);
    7016           0 :         ndr->depth--;
    7017             : }
    7018             : 
    7019           4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnResult(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsWriteAccountSpnResult *r)
    7020             : {
    7021           0 :         uint32_t level;
    7022           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7023           4 :         if (ndr_flags & NDR_SCALARS) {
    7024             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7025           4 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7026           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7027           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7028           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7029           4 :                 switch (level) {
    7030           4 :                         case 1: {
    7031           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult1(ndr, NDR_SCALARS, &r->res1));
    7032           4 :                         break; }
    7033             : 
    7034           0 :                         default:
    7035           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7036             :                 }
    7037             :         }
    7038           4 :         if (ndr_flags & NDR_BUFFERS) {
    7039           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7040             :                         /* We didn't get it above, and the token is not needed after this. */
    7041           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7042             :                 }
    7043           0 :                 switch (level) {
    7044           0 :                         case 1:
    7045           0 :                         break;
    7046             : 
    7047           0 :                         default:
    7048           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7049             :                 }
    7050             :         }
    7051           4 :         return NDR_ERR_SUCCESS;
    7052             : }
    7053             : 
    7054           4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnResult(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsWriteAccountSpnResult *r)
    7055             : {
    7056           0 :         uint32_t level;
    7057           0 :         uint32_t _level;
    7058           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7059           4 :         if (ndr_flags & NDR_SCALARS) {
    7060             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7061           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7062           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7063           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7064           4 :                 if (_level != level) {
    7065           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    7066             :                 }
    7067           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7068           4 :                 switch (level) {
    7069           4 :                         case 1: {
    7070           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult1(ndr, NDR_SCALARS, &r->res1));
    7071           4 :                         break; }
    7072             : 
    7073           0 :                         default:
    7074           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7075             :                 }
    7076             :         }
    7077           4 :         if (ndr_flags & NDR_BUFFERS) {
    7078           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7079             :                         /* We didn't get it above, and the token is not needed after this. */
    7080           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7081             :                 }
    7082           0 :                 switch (level) {
    7083           0 :                         case 1:
    7084           0 :                         break;
    7085             : 
    7086           0 :                         default:
    7087           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7088             :                 }
    7089             :         }
    7090           4 :         return NDR_ERR_SUCCESS;
    7091             : }
    7092             : 
    7093           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnResult(struct ndr_print *ndr, const char *name, const union drsuapi_DsWriteAccountSpnResult *r)
    7094             : {
    7095           0 :         uint32_t level;
    7096           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7097           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsWriteAccountSpnResult");
    7098           0 :         switch (level) {
    7099           0 :                 case 1:
    7100           0 :                         ndr_print_drsuapi_DsWriteAccountSpnResult1(ndr, "res1", &r->res1);
    7101           0 :                 break;
    7102             : 
    7103           0 :                 default:
    7104           0 :                         ndr_print_bad_level(ndr, name, level);
    7105             :         }
    7106           0 : }
    7107             : 
    7108          14 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsRemoveDSServerRequest1 *r)
    7109             : {
    7110          14 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7111          14 :         if (ndr_flags & NDR_SCALARS) {
    7112           7 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7113           7 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
    7114           7 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_dn));
    7115           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->commit));
    7116           7 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7117             :         }
    7118          14 :         if (ndr_flags & NDR_BUFFERS) {
    7119           7 :                 if (r->server_dn) {
    7120           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7121           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7122           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7123           7 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_dn, ndr_charset_length(r->server_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7124             :                 }
    7125           7 :                 if (r->domain_dn) {
    7126           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_dn, CH_UTF16)));
    7127           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7128           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_dn, CH_UTF16)));
    7129           7 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_dn, ndr_charset_length(r->domain_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7130             :                 }
    7131             :         }
    7132          14 :         return NDR_ERR_SUCCESS;
    7133             : }
    7134             : 
    7135          14 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsRemoveDSServerRequest1 *r)
    7136             : {
    7137           0 :         uint32_t _ptr_server_dn;
    7138          14 :         uint32_t size_server_dn_1 = 0;
    7139          14 :         uint32_t length_server_dn_1 = 0;
    7140          14 :         TALLOC_CTX *_mem_save_server_dn_0 = NULL;
    7141           0 :         uint32_t _ptr_domain_dn;
    7142          14 :         uint32_t size_domain_dn_1 = 0;
    7143          14 :         uint32_t length_domain_dn_1 = 0;
    7144          14 :         TALLOC_CTX *_mem_save_domain_dn_0 = NULL;
    7145          14 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7146          14 :         if (ndr_flags & NDR_SCALARS) {
    7147           7 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7148           7 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
    7149           7 :                 if (_ptr_server_dn) {
    7150           7 :                         NDR_PULL_ALLOC(ndr, r->server_dn);
    7151             :                 } else {
    7152           0 :                         r->server_dn = NULL;
    7153             :                 }
    7154           7 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_dn));
    7155           7 :                 if (_ptr_domain_dn) {
    7156           7 :                         NDR_PULL_ALLOC(ndr, r->domain_dn);
    7157             :                 } else {
    7158           0 :                         r->domain_dn = NULL;
    7159             :                 }
    7160           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->commit));
    7161           7 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7162             :         }
    7163          14 :         if (ndr_flags & NDR_BUFFERS) {
    7164           7 :                 if (r->server_dn) {
    7165           7 :                         _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7166           7 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
    7167           7 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
    7168           7 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
    7169           7 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
    7170           7 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
    7171           7 :                         if (length_server_dn_1 > size_server_dn_1) {
    7172           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_dn_1, length_server_dn_1);
    7173             :                         }
    7174           7 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
    7175           7 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
    7176           7 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
    7177             :                 }
    7178           7 :                 if (r->domain_dn) {
    7179           7 :                         _mem_save_domain_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7180           7 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_dn, 0);
    7181           7 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_dn));
    7182           7 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_dn));
    7183           7 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_dn, &size_domain_dn_1));
    7184           7 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_dn, &length_domain_dn_1));
    7185           7 :                         if (length_domain_dn_1 > size_domain_dn_1) {
    7186           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_dn_1, length_domain_dn_1);
    7187             :                         }
    7188           7 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_dn_1, sizeof(uint16_t)));
    7189           7 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_dn, length_domain_dn_1, sizeof(uint16_t), CH_UTF16));
    7190           7 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_dn_0, 0);
    7191             :                 }
    7192             :         }
    7193          14 :         return NDR_ERR_SUCCESS;
    7194             : }
    7195             : 
    7196           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsRemoveDSServerRequest1 *r)
    7197             : {
    7198           0 :         ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServerRequest1");
    7199           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7200           0 :         ndr->depth++;
    7201           0 :         ndr_print_ptr(ndr, "server_dn", r->server_dn);
    7202           0 :         ndr->depth++;
    7203           0 :         if (r->server_dn) {
    7204           0 :                 ndr_print_string(ndr, "server_dn", r->server_dn);
    7205             :         }
    7206           0 :         ndr->depth--;
    7207           0 :         ndr_print_ptr(ndr, "domain_dn", r->domain_dn);
    7208           0 :         ndr->depth++;
    7209           0 :         if (r->domain_dn) {
    7210           0 :                 ndr_print_string(ndr, "domain_dn", r->domain_dn);
    7211             :         }
    7212           0 :         ndr->depth--;
    7213           0 :         ndr_print_uint32(ndr, "commit", r->commit);
    7214           0 :         ndr->depth--;
    7215             : }
    7216             : 
    7217           7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsRemoveDSServerRequest *r)
    7218             : {
    7219           0 :         uint32_t level;
    7220           7 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7221           7 :         if (ndr_flags & NDR_SCALARS) {
    7222             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7223           7 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7224           7 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7225           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7226           7 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7227           7 :                 switch (level) {
    7228           7 :                         case 1: {
    7229           7 :                                 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_SCALARS, &r->req1));
    7230           7 :                         break; }
    7231             : 
    7232           0 :                         default:
    7233           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7234             :                 }
    7235             :         }
    7236           7 :         if (ndr_flags & NDR_BUFFERS) {
    7237           7 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7238             :                         /* We didn't get it above, and the token is not needed after this. */
    7239           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7240             :                 }
    7241           7 :                 switch (level) {
    7242           7 :                         case 1:
    7243           7 :                                 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_BUFFERS, &r->req1));
    7244           7 :                         break;
    7245             : 
    7246           0 :                         default:
    7247           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7248             :                 }
    7249             :         }
    7250           7 :         return NDR_ERR_SUCCESS;
    7251             : }
    7252             : 
    7253           7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsRemoveDSServerRequest *r)
    7254             : {
    7255           0 :         uint32_t level;
    7256           0 :         uint32_t _level;
    7257           7 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7258           7 :         if (ndr_flags & NDR_SCALARS) {
    7259             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7260           7 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7261           7 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7262           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7263           7 :                 if (_level != level) {
    7264           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    7265             :                 }
    7266           7 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7267           7 :                 switch (level) {
    7268           7 :                         case 1: {
    7269           7 :                                 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_SCALARS, &r->req1));
    7270           7 :                         break; }
    7271             : 
    7272           0 :                         default:
    7273           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7274             :                 }
    7275             :         }
    7276           7 :         if (ndr_flags & NDR_BUFFERS) {
    7277           7 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7278             :                         /* We didn't get it above, and the token is not needed after this. */
    7279           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7280             :                 }
    7281           7 :                 switch (level) {
    7282           7 :                         case 1:
    7283           7 :                                 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_BUFFERS, &r->req1));
    7284           7 :                         break;
    7285             : 
    7286           0 :                         default:
    7287           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7288             :                 }
    7289             :         }
    7290           7 :         return NDR_ERR_SUCCESS;
    7291             : }
    7292             : 
    7293           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsRemoveDSServerRequest *r)
    7294             : {
    7295           0 :         uint32_t level;
    7296           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7297           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsRemoveDSServerRequest");
    7298           0 :         switch (level) {
    7299           0 :                 case 1:
    7300           0 :                         ndr_print_drsuapi_DsRemoveDSServerRequest1(ndr, "req1", &r->req1);
    7301           0 :                 break;
    7302             : 
    7303           0 :                 default:
    7304           0 :                         ndr_print_bad_level(ndr, name, level);
    7305             :         }
    7306           0 : }
    7307             : 
    7308           7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsRemoveDSServerResult1 *r)
    7309             : {
    7310           7 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7311           7 :         if (ndr_flags & NDR_SCALARS) {
    7312           7 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7313           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->last_dc_in_domain));
    7314           7 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    7315             :         }
    7316           7 :         if (ndr_flags & NDR_BUFFERS) {
    7317           0 :         }
    7318           7 :         return NDR_ERR_SUCCESS;
    7319             : }
    7320             : 
    7321           7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsRemoveDSServerResult1 *r)
    7322             : {
    7323           7 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7324           7 :         if (ndr_flags & NDR_SCALARS) {
    7325           7 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7326           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->last_dc_in_domain));
    7327           7 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    7328             :         }
    7329           7 :         if (ndr_flags & NDR_BUFFERS) {
    7330           0 :         }
    7331           7 :         return NDR_ERR_SUCCESS;
    7332             : }
    7333             : 
    7334           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerResult1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsRemoveDSServerResult1 *r)
    7335             : {
    7336           0 :         ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServerResult1");
    7337           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7338           0 :         ndr->depth++;
    7339           0 :         ndr_print_uint32(ndr, "last_dc_in_domain", r->last_dc_in_domain);
    7340           0 :         ndr->depth--;
    7341             : }
    7342             : 
    7343           7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsRemoveDSServerResult *r)
    7344             : {
    7345           0 :         uint32_t level;
    7346           7 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7347           7 :         if (ndr_flags & NDR_SCALARS) {
    7348             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7349           7 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7350           7 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7351           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7352           7 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7353           7 :                 switch (level) {
    7354           7 :                         case 1: {
    7355           7 :                                 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult1(ndr, NDR_SCALARS, &r->res1));
    7356           7 :                         break; }
    7357             : 
    7358           0 :                         default:
    7359           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7360             :                 }
    7361             :         }
    7362           7 :         if (ndr_flags & NDR_BUFFERS) {
    7363           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7364             :                         /* We didn't get it above, and the token is not needed after this. */
    7365           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7366             :                 }
    7367           0 :                 switch (level) {
    7368           0 :                         case 1:
    7369           0 :                         break;
    7370             : 
    7371           0 :                         default:
    7372           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7373             :                 }
    7374             :         }
    7375           7 :         return NDR_ERR_SUCCESS;
    7376             : }
    7377             : 
    7378           7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsRemoveDSServerResult *r)
    7379             : {
    7380           0 :         uint32_t level;
    7381           0 :         uint32_t _level;
    7382           7 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7383           7 :         if (ndr_flags & NDR_SCALARS) {
    7384             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7385           7 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7386           7 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7387           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7388           7 :                 if (_level != level) {
    7389           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    7390             :                 }
    7391           7 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7392           7 :                 switch (level) {
    7393           7 :                         case 1: {
    7394           7 :                                 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult1(ndr, NDR_SCALARS, &r->res1));
    7395           7 :                         break; }
    7396             : 
    7397           0 :                         default:
    7398           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7399             :                 }
    7400             :         }
    7401           7 :         if (ndr_flags & NDR_BUFFERS) {
    7402           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7403             :                         /* We didn't get it above, and the token is not needed after this. */
    7404           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7405             :                 }
    7406           0 :                 switch (level) {
    7407           0 :                         case 1:
    7408           0 :                         break;
    7409             : 
    7410           0 :                         default:
    7411           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7412             :                 }
    7413             :         }
    7414           7 :         return NDR_ERR_SUCCESS;
    7415             : }
    7416             : 
    7417           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerResult(struct ndr_print *ndr, const char *name, const union drsuapi_DsRemoveDSServerResult *r)
    7418             : {
    7419           0 :         uint32_t level;
    7420           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7421           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsRemoveDSServerResult");
    7422           0 :         switch (level) {
    7423           0 :                 case 1:
    7424           0 :                         ndr_print_drsuapi_DsRemoveDSServerResult1(ndr, "res1", &r->res1);
    7425           0 :                 break;
    7426             : 
    7427           0 :                 default:
    7428           0 :                         ndr_print_bad_level(ndr, name, level);
    7429             :         }
    7430           0 : }
    7431             : 
    7432          18 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtrLevels(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsGetDCInfoCtrLevels r)
    7433             : {
    7434          18 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    7435          18 :         return NDR_ERR_SUCCESS;
    7436             : }
    7437             : 
    7438          12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtrLevels(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsGetDCInfoCtrLevels *r)
    7439             : {
    7440           0 :         uint32_t v;
    7441          12 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    7442          12 :         *r = v;
    7443          12 :         return NDR_ERR_SUCCESS;
    7444             : }
    7445             : 
    7446           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtrLevels(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetDCInfoCtrLevels r)
    7447             : {
    7448           0 :         const char *val = NULL;
    7449             : 
    7450           0 :         switch (r) {
    7451           0 :                 case DRSUAPI_DC_INFO_CTR_1: val = "DRSUAPI_DC_INFO_CTR_1"; break;
    7452           0 :                 case DRSUAPI_DC_INFO_CTR_2: val = "DRSUAPI_DC_INFO_CTR_2"; break;
    7453           0 :                 case DRSUAPI_DC_INFO_CTR_3: val = "DRSUAPI_DC_INFO_CTR_3"; break;
    7454           0 :                 case DRSUAPI_DC_CONNECTION_CTR_01: val = "DRSUAPI_DC_CONNECTION_CTR_01"; break;
    7455             :         }
    7456           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    7457           0 : }
    7458             : 
    7459          12 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfoRequest1 *r)
    7460             : {
    7461          12 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7462          12 :         if (ndr_flags & NDR_SCALARS) {
    7463           6 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7464           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
    7465           6 :                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, r->level));
    7466           6 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7467             :         }
    7468          12 :         if (ndr_flags & NDR_BUFFERS) {
    7469           6 :                 if (r->domain_name) {
    7470           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
    7471           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7472           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
    7473           6 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain_name, ndr_charset_length(r->domain_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7474             :                 }
    7475             :         }
    7476          12 :         return NDR_ERR_SUCCESS;
    7477             : }
    7478             : 
    7479          12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfoRequest1 *r)
    7480             : {
    7481           0 :         uint32_t _ptr_domain_name;
    7482          12 :         uint32_t size_domain_name_1 = 0;
    7483          12 :         uint32_t length_domain_name_1 = 0;
    7484          12 :         TALLOC_CTX *_mem_save_domain_name_0 = NULL;
    7485          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7486          12 :         if (ndr_flags & NDR_SCALARS) {
    7487           6 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7488           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
    7489           6 :                 if (_ptr_domain_name) {
    7490           6 :                         NDR_PULL_ALLOC(ndr, r->domain_name);
    7491             :                 } else {
    7492           0 :                         r->domain_name = NULL;
    7493             :                 }
    7494           6 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, &r->level));
    7495           6 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7496             :         }
    7497          12 :         if (ndr_flags & NDR_BUFFERS) {
    7498           6 :                 if (r->domain_name) {
    7499           6 :                         _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7500           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
    7501           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
    7502           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
    7503           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
    7504           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
    7505           6 :                         if (length_domain_name_1 > size_domain_name_1) {
    7506           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_domain_name_1, length_domain_name_1);
    7507             :                         }
    7508           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
    7509           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
    7510           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
    7511             :                 }
    7512             :         }
    7513          12 :         return NDR_ERR_SUCCESS;
    7514             : }
    7515             : 
    7516           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoRequest1 *r)
    7517             : {
    7518           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoRequest1");
    7519           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7520           0 :         ndr->depth++;
    7521           0 :         ndr_print_ptr(ndr, "domain_name", r->domain_name);
    7522           0 :         ndr->depth++;
    7523           0 :         if (r->domain_name) {
    7524           0 :                 ndr_print_string(ndr, "domain_name", r->domain_name);
    7525             :         }
    7526           0 :         ndr->depth--;
    7527           0 :         ndr_print_drsuapi_DsGetDCInfoCtrLevels(ndr, "level", r->level);
    7528           0 :         ndr->depth--;
    7529             : }
    7530             : 
    7531           6 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetDCInfoRequest *r)
    7532             : {
    7533           0 :         uint32_t level;
    7534           6 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7535           6 :         if (ndr_flags & NDR_SCALARS) {
    7536             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7537           6 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7538           6 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7539           6 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7540           6 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7541           6 :                 switch (level) {
    7542           6 :                         case 1: {
    7543           6 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr, NDR_SCALARS, &r->req1));
    7544           6 :                         break; }
    7545             : 
    7546           0 :                         default:
    7547           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7548             :                 }
    7549             :         }
    7550           6 :         if (ndr_flags & NDR_BUFFERS) {
    7551           6 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7552             :                         /* We didn't get it above, and the token is not needed after this. */
    7553           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7554             :                 }
    7555           6 :                 switch (level) {
    7556           6 :                         case 1:
    7557           6 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
    7558           6 :                         break;
    7559             : 
    7560           0 :                         default:
    7561           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    7562             :                 }
    7563             :         }
    7564           6 :         return NDR_ERR_SUCCESS;
    7565             : }
    7566             : 
    7567           6 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetDCInfoRequest *r)
    7568             : {
    7569           0 :         uint32_t level;
    7570           0 :         uint32_t _level;
    7571           6 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7572           6 :         if (ndr_flags & NDR_SCALARS) {
    7573             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7574           6 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7575           6 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7576           6 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7577           6 :                 if (_level != level) {
    7578           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    7579             :                 }
    7580           6 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7581           6 :                 switch (level) {
    7582           6 :                         case 1: {
    7583           6 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr, NDR_SCALARS, &r->req1));
    7584           6 :                         break; }
    7585             : 
    7586           0 :                         default:
    7587           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7588             :                 }
    7589             :         }
    7590           6 :         if (ndr_flags & NDR_BUFFERS) {
    7591           6 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7592             :                         /* We didn't get it above, and the token is not needed after this. */
    7593           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7594             :                 }
    7595           6 :                 switch (level) {
    7596           6 :                         case 1:
    7597           6 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
    7598           6 :                         break;
    7599             : 
    7600           0 :                         default:
    7601           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    7602             :                 }
    7603             :         }
    7604           6 :         return NDR_ERR_SUCCESS;
    7605             : }
    7606             : 
    7607           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetDCInfoRequest *r)
    7608             : {
    7609           0 :         uint32_t level;
    7610           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7611           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetDCInfoRequest");
    7612           0 :         switch (level) {
    7613           0 :                 case 1:
    7614           0 :                         ndr_print_drsuapi_DsGetDCInfoRequest1(ndr, "req1", &r->req1);
    7615           0 :                 break;
    7616             : 
    7617           0 :                 default:
    7618           0 :                         ndr_print_bad_level(ndr, name, level);
    7619             :         }
    7620           0 : }
    7621             : 
    7622          12 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfo1 *r)
    7623             : {
    7624          12 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7625          12 :         if (ndr_flags & NDR_SCALARS) {
    7626           6 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7627           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
    7628           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
    7629           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_name));
    7630           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_dn));
    7631           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
    7632           6 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc));
    7633           6 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled));
    7634           6 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7635             :         }
    7636          12 :         if (ndr_flags & NDR_BUFFERS) {
    7637           6 :                 if (r->netbios_name) {
    7638           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    7639           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7640           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    7641           6 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7642             :                 }
    7643           6 :                 if (r->dns_name) {
    7644           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    7645           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7646           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    7647           6 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7648             :                 }
    7649           6 :                 if (r->site_name) {
    7650           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    7651           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7652           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    7653           6 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_name, ndr_charset_length(r->site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7654             :                 }
    7655           6 :                 if (r->computer_dn) {
    7656           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    7657           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7658           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    7659           6 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_dn, ndr_charset_length(r->computer_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7660             :                 }
    7661           6 :                 if (r->server_dn) {
    7662           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7663           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7664           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7665           6 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_dn, ndr_charset_length(r->server_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7666             :                 }
    7667             :         }
    7668          12 :         return NDR_ERR_SUCCESS;
    7669             : }
    7670             : 
    7671          12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfo1 *r)
    7672             : {
    7673           0 :         uint32_t _ptr_netbios_name;
    7674          12 :         uint32_t size_netbios_name_1 = 0;
    7675          12 :         uint32_t length_netbios_name_1 = 0;
    7676          12 :         TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
    7677           0 :         uint32_t _ptr_dns_name;
    7678          12 :         uint32_t size_dns_name_1 = 0;
    7679          12 :         uint32_t length_dns_name_1 = 0;
    7680          12 :         TALLOC_CTX *_mem_save_dns_name_0 = NULL;
    7681           0 :         uint32_t _ptr_site_name;
    7682          12 :         uint32_t size_site_name_1 = 0;
    7683          12 :         uint32_t length_site_name_1 = 0;
    7684          12 :         TALLOC_CTX *_mem_save_site_name_0 = NULL;
    7685           0 :         uint32_t _ptr_computer_dn;
    7686          12 :         uint32_t size_computer_dn_1 = 0;
    7687          12 :         uint32_t length_computer_dn_1 = 0;
    7688          12 :         TALLOC_CTX *_mem_save_computer_dn_0 = NULL;
    7689           0 :         uint32_t _ptr_server_dn;
    7690          12 :         uint32_t size_server_dn_1 = 0;
    7691          12 :         uint32_t length_server_dn_1 = 0;
    7692          12 :         TALLOC_CTX *_mem_save_server_dn_0 = NULL;
    7693          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7694          12 :         if (ndr_flags & NDR_SCALARS) {
    7695           6 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7696           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
    7697           6 :                 if (_ptr_netbios_name) {
    7698           6 :                         NDR_PULL_ALLOC(ndr, r->netbios_name);
    7699             :                 } else {
    7700           0 :                         r->netbios_name = NULL;
    7701             :                 }
    7702           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
    7703           6 :                 if (_ptr_dns_name) {
    7704           6 :                         NDR_PULL_ALLOC(ndr, r->dns_name);
    7705             :                 } else {
    7706           0 :                         r->dns_name = NULL;
    7707             :                 }
    7708           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
    7709           6 :                 if (_ptr_site_name) {
    7710           6 :                         NDR_PULL_ALLOC(ndr, r->site_name);
    7711             :                 } else {
    7712           0 :                         r->site_name = NULL;
    7713             :                 }
    7714           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_dn));
    7715           6 :                 if (_ptr_computer_dn) {
    7716           6 :                         NDR_PULL_ALLOC(ndr, r->computer_dn);
    7717             :                 } else {
    7718           0 :                         r->computer_dn = NULL;
    7719             :                 }
    7720           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
    7721           6 :                 if (_ptr_server_dn) {
    7722           6 :                         NDR_PULL_ALLOC(ndr, r->server_dn);
    7723             :                 } else {
    7724           0 :                         r->server_dn = NULL;
    7725             :                 }
    7726           6 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc));
    7727           6 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled));
    7728           6 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7729             :         }
    7730          12 :         if (ndr_flags & NDR_BUFFERS) {
    7731           6 :                 if (r->netbios_name) {
    7732           6 :                         _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7733           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
    7734           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
    7735           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
    7736           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
    7737           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
    7738           6 :                         if (length_netbios_name_1 > size_netbios_name_1) {
    7739           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_netbios_name_1, length_netbios_name_1);
    7740             :                         }
    7741           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
    7742           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
    7743           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
    7744             :                 }
    7745           6 :                 if (r->dns_name) {
    7746           6 :                         _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7747           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
    7748           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
    7749           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
    7750           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
    7751           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
    7752           6 :                         if (length_dns_name_1 > size_dns_name_1) {
    7753           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_name_1, length_dns_name_1);
    7754             :                         }
    7755           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
    7756           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
    7757           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
    7758             :                 }
    7759           6 :                 if (r->site_name) {
    7760           6 :                         _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7761           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_name, 0);
    7762           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_name));
    7763           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->site_name));
    7764           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_name, &size_site_name_1));
    7765           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_name, &length_site_name_1));
    7766           6 :                         if (length_site_name_1 > size_site_name_1) {
    7767           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
    7768             :                         }
    7769           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
    7770           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
    7771           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
    7772             :                 }
    7773           6 :                 if (r->computer_dn) {
    7774           6 :                         _mem_save_computer_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7775           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->computer_dn, 0);
    7776           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_dn));
    7777           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_dn));
    7778           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_dn, &size_computer_dn_1));
    7779           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_dn, &length_computer_dn_1));
    7780           6 :                         if (length_computer_dn_1 > size_computer_dn_1) {
    7781           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_dn_1, length_computer_dn_1);
    7782             :                         }
    7783           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_dn_1, sizeof(uint16_t)));
    7784           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_dn, length_computer_dn_1, sizeof(uint16_t), CH_UTF16));
    7785           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_dn_0, 0);
    7786             :                 }
    7787           6 :                 if (r->server_dn) {
    7788           6 :                         _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7789           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
    7790           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
    7791           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
    7792           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
    7793           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
    7794           6 :                         if (length_server_dn_1 > size_server_dn_1) {
    7795           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_dn_1, length_server_dn_1);
    7796             :                         }
    7797           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
    7798           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
    7799           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
    7800             :                 }
    7801             :         }
    7802          12 :         return NDR_ERR_SUCCESS;
    7803             : }
    7804             : 
    7805           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo1 *r)
    7806             : {
    7807           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfo1");
    7808           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7809           0 :         ndr->depth++;
    7810           0 :         ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
    7811           0 :         ndr->depth++;
    7812           0 :         if (r->netbios_name) {
    7813           0 :                 ndr_print_string(ndr, "netbios_name", r->netbios_name);
    7814             :         }
    7815           0 :         ndr->depth--;
    7816           0 :         ndr_print_ptr(ndr, "dns_name", r->dns_name);
    7817           0 :         ndr->depth++;
    7818           0 :         if (r->dns_name) {
    7819           0 :                 ndr_print_string(ndr, "dns_name", r->dns_name);
    7820             :         }
    7821           0 :         ndr->depth--;
    7822           0 :         ndr_print_ptr(ndr, "site_name", r->site_name);
    7823           0 :         ndr->depth++;
    7824           0 :         if (r->site_name) {
    7825           0 :                 ndr_print_string(ndr, "site_name", r->site_name);
    7826             :         }
    7827           0 :         ndr->depth--;
    7828           0 :         ndr_print_ptr(ndr, "computer_dn", r->computer_dn);
    7829           0 :         ndr->depth++;
    7830           0 :         if (r->computer_dn) {
    7831           0 :                 ndr_print_string(ndr, "computer_dn", r->computer_dn);
    7832             :         }
    7833           0 :         ndr->depth--;
    7834           0 :         ndr_print_ptr(ndr, "server_dn", r->server_dn);
    7835           0 :         ndr->depth++;
    7836           0 :         if (r->server_dn) {
    7837           0 :                 ndr_print_string(ndr, "server_dn", r->server_dn);
    7838             :         }
    7839           0 :         ndr->depth--;
    7840           0 :         ndr_print_uint32(ndr, "is_pdc", r->is_pdc);
    7841           0 :         ndr_print_uint32(ndr, "is_enabled", r->is_enabled);
    7842           0 :         ndr->depth--;
    7843             : }
    7844             : 
    7845           6 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfoCtr1 *r)
    7846             : {
    7847           0 :         uint32_t cntr_array_1;
    7848           6 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7849           6 :         if (ndr_flags & NDR_SCALARS) {
    7850           3 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7851           3 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    7852           3 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    7853           3 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7854             :         }
    7855           6 :         if (ndr_flags & NDR_BUFFERS) {
    7856           3 :                 if (r->array) {
    7857           3 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    7858           9 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    7859           6 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    7860             :                         }
    7861           9 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    7862           6 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    7863             :                         }
    7864             :                 }
    7865             :         }
    7866           6 :         return NDR_ERR_SUCCESS;
    7867             : }
    7868             : 
    7869           6 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfoCtr1 *r)
    7870             : {
    7871           0 :         uint32_t _ptr_array;
    7872           6 :         uint32_t size_array_1 = 0;
    7873           0 :         uint32_t cntr_array_1;
    7874           6 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    7875           6 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    7876           6 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7877           6 :         if (ndr_flags & NDR_SCALARS) {
    7878           3 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7879           3 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    7880           3 :                 if (r->count > 10000) {
    7881           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
    7882             :                 }
    7883           3 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    7884           3 :                 if (_ptr_array) {
    7885           3 :                         NDR_PULL_ALLOC(ndr, r->array);
    7886             :                 } else {
    7887           0 :                         r->array = NULL;
    7888             :                 }
    7889           3 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7890             :         }
    7891           6 :         if (ndr_flags & NDR_BUFFERS) {
    7892           3 :                 if (r->array) {
    7893           3 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7894           3 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    7895           3 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    7896           3 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    7897           3 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    7898           3 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    7899           3 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    7900           9 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    7901           6 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    7902             :                         }
    7903           9 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    7904           6 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    7905             :                         }
    7906           3 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    7907           3 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    7908             :                 }
    7909           3 :                 if (r->array) {
    7910           3 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    7911             :                 }
    7912           9 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    7913           0 :                 }
    7914             :         }
    7915           6 :         return NDR_ERR_SUCCESS;
    7916             : }
    7917             : 
    7918           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr1 *r)
    7919             : {
    7920           0 :         uint32_t cntr_array_1;
    7921           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoCtr1");
    7922           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7923           0 :         ndr->depth++;
    7924           0 :         ndr_print_uint32(ndr, "count", r->count);
    7925           0 :         ndr_print_ptr(ndr, "array", r->array);
    7926           0 :         ndr->depth++;
    7927           0 :         if (r->array) {
    7928           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
    7929           0 :                 ndr->depth++;
    7930           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    7931           0 :                         ndr_print_drsuapi_DsGetDCInfo1(ndr, "array", &r->array[cntr_array_1]);
    7932             :                 }
    7933           0 :                 ndr->depth--;
    7934             :         }
    7935           0 :         ndr->depth--;
    7936           0 :         ndr->depth--;
    7937             : }
    7938             : 
    7939           8 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfo2 *r)
    7940             : {
    7941           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7942           8 :         if (ndr_flags & NDR_SCALARS) {
    7943           4 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7944           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
    7945           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
    7946           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_name));
    7947           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_dn));
    7948           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_dn));
    7949           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
    7950           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ntds_dn));
    7951           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc));
    7952           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled));
    7953           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_gc));
    7954           4 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
    7955           4 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->computer_guid));
    7956           4 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->server_guid));
    7957           4 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
    7958           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7959             :         }
    7960           8 :         if (ndr_flags & NDR_BUFFERS) {
    7961           4 :                 if (r->netbios_name) {
    7962           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    7963           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7964           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    7965           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7966             :                 }
    7967           4 :                 if (r->dns_name) {
    7968           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    7969           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7970           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    7971           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7972             :                 }
    7973           4 :                 if (r->site_name) {
    7974           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    7975           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7976           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    7977           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_name, ndr_charset_length(r->site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7978             :                 }
    7979           4 :                 if (r->site_dn) {
    7980           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
    7981           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7982           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
    7983           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_dn, ndr_charset_length(r->site_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7984             :                 }
    7985           4 :                 if (r->computer_dn) {
    7986           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    7987           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7988           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    7989           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_dn, ndr_charset_length(r->computer_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7990             :                 }
    7991           4 :                 if (r->server_dn) {
    7992           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7993           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7994           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7995           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_dn, ndr_charset_length(r->server_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7996             :                 }
    7997           4 :                 if (r->ntds_dn) {
    7998           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
    7999           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8000           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
    8001           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ntds_dn, ndr_charset_length(r->ntds_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8002             :                 }
    8003             :         }
    8004           8 :         return NDR_ERR_SUCCESS;
    8005             : }
    8006             : 
    8007           8 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfo2 *r)
    8008             : {
    8009           0 :         uint32_t _ptr_netbios_name;
    8010           8 :         uint32_t size_netbios_name_1 = 0;
    8011           8 :         uint32_t length_netbios_name_1 = 0;
    8012           8 :         TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
    8013           0 :         uint32_t _ptr_dns_name;
    8014           8 :         uint32_t size_dns_name_1 = 0;
    8015           8 :         uint32_t length_dns_name_1 = 0;
    8016           8 :         TALLOC_CTX *_mem_save_dns_name_0 = NULL;
    8017           0 :         uint32_t _ptr_site_name;
    8018           8 :         uint32_t size_site_name_1 = 0;
    8019           8 :         uint32_t length_site_name_1 = 0;
    8020           8 :         TALLOC_CTX *_mem_save_site_name_0 = NULL;
    8021           0 :         uint32_t _ptr_site_dn;
    8022           8 :         uint32_t size_site_dn_1 = 0;
    8023           8 :         uint32_t length_site_dn_1 = 0;
    8024           8 :         TALLOC_CTX *_mem_save_site_dn_0 = NULL;
    8025           0 :         uint32_t _ptr_computer_dn;
    8026           8 :         uint32_t size_computer_dn_1 = 0;
    8027           8 :         uint32_t length_computer_dn_1 = 0;
    8028           8 :         TALLOC_CTX *_mem_save_computer_dn_0 = NULL;
    8029           0 :         uint32_t _ptr_server_dn;
    8030           8 :         uint32_t size_server_dn_1 = 0;
    8031           8 :         uint32_t length_server_dn_1 = 0;
    8032           8 :         TALLOC_CTX *_mem_save_server_dn_0 = NULL;
    8033           0 :         uint32_t _ptr_ntds_dn;
    8034           8 :         uint32_t size_ntds_dn_1 = 0;
    8035           8 :         uint32_t length_ntds_dn_1 = 0;
    8036           8 :         TALLOC_CTX *_mem_save_ntds_dn_0 = NULL;
    8037           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8038           8 :         if (ndr_flags & NDR_SCALARS) {
    8039           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8040           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
    8041           4 :                 if (_ptr_netbios_name) {
    8042           4 :                         NDR_PULL_ALLOC(ndr, r->netbios_name);
    8043             :                 } else {
    8044           0 :                         r->netbios_name = NULL;
    8045             :                 }
    8046           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
    8047           4 :                 if (_ptr_dns_name) {
    8048           4 :                         NDR_PULL_ALLOC(ndr, r->dns_name);
    8049             :                 } else {
    8050           0 :                         r->dns_name = NULL;
    8051             :                 }
    8052           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
    8053           4 :                 if (_ptr_site_name) {
    8054           4 :                         NDR_PULL_ALLOC(ndr, r->site_name);
    8055             :                 } else {
    8056           0 :                         r->site_name = NULL;
    8057             :                 }
    8058           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_dn));
    8059           4 :                 if (_ptr_site_dn) {
    8060           4 :                         NDR_PULL_ALLOC(ndr, r->site_dn);
    8061             :                 } else {
    8062           0 :                         r->site_dn = NULL;
    8063             :                 }
    8064           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_dn));
    8065           4 :                 if (_ptr_computer_dn) {
    8066           4 :                         NDR_PULL_ALLOC(ndr, r->computer_dn);
    8067             :                 } else {
    8068           0 :                         r->computer_dn = NULL;
    8069             :                 }
    8070           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
    8071           4 :                 if (_ptr_server_dn) {
    8072           4 :                         NDR_PULL_ALLOC(ndr, r->server_dn);
    8073             :                 } else {
    8074           0 :                         r->server_dn = NULL;
    8075             :                 }
    8076           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ntds_dn));
    8077           4 :                 if (_ptr_ntds_dn) {
    8078           2 :                         NDR_PULL_ALLOC(ndr, r->ntds_dn);
    8079             :                 } else {
    8080           2 :                         r->ntds_dn = NULL;
    8081             :                 }
    8082           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc));
    8083           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled));
    8084           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_gc));
    8085           4 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
    8086           4 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->computer_guid));
    8087           4 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->server_guid));
    8088           4 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
    8089           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8090             :         }
    8091           8 :         if (ndr_flags & NDR_BUFFERS) {
    8092           4 :                 if (r->netbios_name) {
    8093           4 :                         _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8094           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
    8095           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
    8096           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
    8097           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
    8098           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
    8099           4 :                         if (length_netbios_name_1 > size_netbios_name_1) {
    8100           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_netbios_name_1, length_netbios_name_1);
    8101             :                         }
    8102           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
    8103           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
    8104           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
    8105             :                 }
    8106           4 :                 if (r->dns_name) {
    8107           4 :                         _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8108           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
    8109           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
    8110           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
    8111           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
    8112           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
    8113           4 :                         if (length_dns_name_1 > size_dns_name_1) {
    8114           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_name_1, length_dns_name_1);
    8115             :                         }
    8116           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
    8117           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
    8118           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
    8119             :                 }
    8120           4 :                 if (r->site_name) {
    8121           4 :                         _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8122           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_name, 0);
    8123           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_name));
    8124           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->site_name));
    8125           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_name, &size_site_name_1));
    8126           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_name, &length_site_name_1));
    8127           4 :                         if (length_site_name_1 > size_site_name_1) {
    8128           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
    8129             :                         }
    8130           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
    8131           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
    8132           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
    8133             :                 }
    8134           4 :                 if (r->site_dn) {
    8135           4 :                         _mem_save_site_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8136           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_dn, 0);
    8137           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_dn));
    8138           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->site_dn));
    8139           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_dn, &size_site_dn_1));
    8140           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_dn, &length_site_dn_1));
    8141           4 :                         if (length_site_dn_1 > size_site_dn_1) {
    8142           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_dn_1, length_site_dn_1);
    8143             :                         }
    8144           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_dn_1, sizeof(uint16_t)));
    8145           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_dn, length_site_dn_1, sizeof(uint16_t), CH_UTF16));
    8146           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_dn_0, 0);
    8147             :                 }
    8148           4 :                 if (r->computer_dn) {
    8149           4 :                         _mem_save_computer_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8150           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->computer_dn, 0);
    8151           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_dn));
    8152           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_dn));
    8153           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_dn, &size_computer_dn_1));
    8154           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_dn, &length_computer_dn_1));
    8155           4 :                         if (length_computer_dn_1 > size_computer_dn_1) {
    8156           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_dn_1, length_computer_dn_1);
    8157             :                         }
    8158           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_dn_1, sizeof(uint16_t)));
    8159           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_dn, length_computer_dn_1, sizeof(uint16_t), CH_UTF16));
    8160           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_dn_0, 0);
    8161             :                 }
    8162           4 :                 if (r->server_dn) {
    8163           4 :                         _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8164           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
    8165           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
    8166           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
    8167           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
    8168           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
    8169           4 :                         if (length_server_dn_1 > size_server_dn_1) {
    8170           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_dn_1, length_server_dn_1);
    8171             :                         }
    8172           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
    8173           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
    8174           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
    8175             :                 }
    8176           4 :                 if (r->ntds_dn) {
    8177           2 :                         _mem_save_ntds_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8178           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ntds_dn, 0);
    8179           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ntds_dn));
    8180           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->ntds_dn));
    8181           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->ntds_dn, &size_ntds_dn_1));
    8182           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->ntds_dn, &length_ntds_dn_1));
    8183           2 :                         if (length_ntds_dn_1 > size_ntds_dn_1) {
    8184           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ntds_dn_1, length_ntds_dn_1);
    8185             :                         }
    8186           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_ntds_dn_1, sizeof(uint16_t)));
    8187           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ntds_dn, length_ntds_dn_1, sizeof(uint16_t), CH_UTF16));
    8188           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ntds_dn_0, 0);
    8189             :                 }
    8190             :         }
    8191           8 :         return NDR_ERR_SUCCESS;
    8192             : }
    8193             : 
    8194           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfo2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo2 *r)
    8195             : {
    8196           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfo2");
    8197           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8198           0 :         ndr->depth++;
    8199           0 :         ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
    8200           0 :         ndr->depth++;
    8201           0 :         if (r->netbios_name) {
    8202           0 :                 ndr_print_string(ndr, "netbios_name", r->netbios_name);
    8203             :         }
    8204           0 :         ndr->depth--;
    8205           0 :         ndr_print_ptr(ndr, "dns_name", r->dns_name);
    8206           0 :         ndr->depth++;
    8207           0 :         if (r->dns_name) {
    8208           0 :                 ndr_print_string(ndr, "dns_name", r->dns_name);
    8209             :         }
    8210           0 :         ndr->depth--;
    8211           0 :         ndr_print_ptr(ndr, "site_name", r->site_name);
    8212           0 :         ndr->depth++;
    8213           0 :         if (r->site_name) {
    8214           0 :                 ndr_print_string(ndr, "site_name", r->site_name);
    8215             :         }
    8216           0 :         ndr->depth--;
    8217           0 :         ndr_print_ptr(ndr, "site_dn", r->site_dn);
    8218           0 :         ndr->depth++;
    8219           0 :         if (r->site_dn) {
    8220           0 :                 ndr_print_string(ndr, "site_dn", r->site_dn);
    8221             :         }
    8222           0 :         ndr->depth--;
    8223           0 :         ndr_print_ptr(ndr, "computer_dn", r->computer_dn);
    8224           0 :         ndr->depth++;
    8225           0 :         if (r->computer_dn) {
    8226           0 :                 ndr_print_string(ndr, "computer_dn", r->computer_dn);
    8227             :         }
    8228           0 :         ndr->depth--;
    8229           0 :         ndr_print_ptr(ndr, "server_dn", r->server_dn);
    8230           0 :         ndr->depth++;
    8231           0 :         if (r->server_dn) {
    8232           0 :                 ndr_print_string(ndr, "server_dn", r->server_dn);
    8233             :         }
    8234           0 :         ndr->depth--;
    8235           0 :         ndr_print_ptr(ndr, "ntds_dn", r->ntds_dn);
    8236           0 :         ndr->depth++;
    8237           0 :         if (r->ntds_dn) {
    8238           0 :                 ndr_print_string(ndr, "ntds_dn", r->ntds_dn);
    8239             :         }
    8240           0 :         ndr->depth--;
    8241           0 :         ndr_print_uint32(ndr, "is_pdc", r->is_pdc);
    8242           0 :         ndr_print_uint32(ndr, "is_enabled", r->is_enabled);
    8243           0 :         ndr_print_uint32(ndr, "is_gc", r->is_gc);
    8244           0 :         ndr_print_GUID(ndr, "site_guid", &r->site_guid);
    8245           0 :         ndr_print_GUID(ndr, "computer_guid", &r->computer_guid);
    8246           0 :         ndr_print_GUID(ndr, "server_guid", &r->server_guid);
    8247           0 :         ndr_print_GUID(ndr, "ntds_guid", &r->ntds_guid);
    8248           0 :         ndr->depth--;
    8249             : }
    8250             : 
    8251           4 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfoCtr2 *r)
    8252             : {
    8253           0 :         uint32_t cntr_array_1;
    8254           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8255           4 :         if (ndr_flags & NDR_SCALARS) {
    8256           2 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8257           2 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    8258           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    8259           2 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8260             :         }
    8261           4 :         if (ndr_flags & NDR_BUFFERS) {
    8262           2 :                 if (r->array) {
    8263           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    8264           6 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8265           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    8266             :                         }
    8267           6 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8268           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    8269             :                         }
    8270             :                 }
    8271             :         }
    8272           4 :         return NDR_ERR_SUCCESS;
    8273             : }
    8274             : 
    8275           4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfoCtr2 *r)
    8276             : {
    8277           0 :         uint32_t _ptr_array;
    8278           4 :         uint32_t size_array_1 = 0;
    8279           0 :         uint32_t cntr_array_1;
    8280           4 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    8281           4 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    8282           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8283           4 :         if (ndr_flags & NDR_SCALARS) {
    8284           2 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8285           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    8286           2 :                 if (r->count > 10000) {
    8287           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
    8288             :                 }
    8289           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    8290           2 :                 if (_ptr_array) {
    8291           2 :                         NDR_PULL_ALLOC(ndr, r->array);
    8292             :                 } else {
    8293           0 :                         r->array = NULL;
    8294             :                 }
    8295           2 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8296             :         }
    8297           4 :         if (ndr_flags & NDR_BUFFERS) {
    8298           2 :                 if (r->array) {
    8299           2 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8300           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    8301           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    8302           2 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    8303           2 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    8304           2 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    8305           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    8306           6 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8307           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    8308             :                         }
    8309           6 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8310           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    8311             :                         }
    8312           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    8313           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    8314             :                 }
    8315           2 :                 if (r->array) {
    8316           2 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    8317             :                 }
    8318           6 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8319           0 :                 }
    8320             :         }
    8321           4 :         return NDR_ERR_SUCCESS;
    8322             : }
    8323             : 
    8324           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr2 *r)
    8325             : {
    8326           0 :         uint32_t cntr_array_1;
    8327           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoCtr2");
    8328           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8329           0 :         ndr->depth++;
    8330           0 :         ndr_print_uint32(ndr, "count", r->count);
    8331           0 :         ndr_print_ptr(ndr, "array", r->array);
    8332           0 :         ndr->depth++;
    8333           0 :         if (r->array) {
    8334           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
    8335           0 :                 ndr->depth++;
    8336           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8337           0 :                         ndr_print_drsuapi_DsGetDCInfo2(ndr, "array", &r->array[cntr_array_1]);
    8338             :                 }
    8339           0 :                 ndr->depth--;
    8340             :         }
    8341           0 :         ndr->depth--;
    8342           0 :         ndr->depth--;
    8343             : }
    8344             : 
    8345           4 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfo3 *r)
    8346             : {
    8347           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8348           4 :         if (ndr_flags & NDR_SCALARS) {
    8349           2 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8350           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
    8351           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
    8352           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_name));
    8353           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_dn));
    8354           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_dn));
    8355           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
    8356           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ntds_dn));
    8357           2 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc));
    8358           2 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled));
    8359           2 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_gc));
    8360           2 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_rodc));
    8361           2 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
    8362           2 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->computer_guid));
    8363           2 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->server_guid));
    8364           2 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
    8365           2 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8366             :         }
    8367           4 :         if (ndr_flags & NDR_BUFFERS) {
    8368           2 :                 if (r->netbios_name) {
    8369           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    8370           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8371           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    8372           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->netbios_name, ndr_charset_length(r->netbios_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8373             :                 }
    8374           2 :                 if (r->dns_name) {
    8375           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    8376           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8377           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    8378           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dns_name, ndr_charset_length(r->dns_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8379             :                 }
    8380           2 :                 if (r->site_name) {
    8381           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    8382           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8383           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    8384           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_name, ndr_charset_length(r->site_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8385             :                 }
    8386           2 :                 if (r->site_dn) {
    8387           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
    8388           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8389           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
    8390           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_dn, ndr_charset_length(r->site_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8391             :                 }
    8392           2 :                 if (r->computer_dn) {
    8393           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    8394           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8395           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    8396           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_dn, ndr_charset_length(r->computer_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8397             :                 }
    8398           2 :                 if (r->server_dn) {
    8399           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    8400           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8401           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    8402           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_dn, ndr_charset_length(r->server_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8403             :                 }
    8404           2 :                 if (r->ntds_dn) {
    8405           1 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
    8406           1 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8407           1 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
    8408           1 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ntds_dn, ndr_charset_length(r->ntds_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8409             :                 }
    8410             :         }
    8411           4 :         return NDR_ERR_SUCCESS;
    8412             : }
    8413             : 
    8414           4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfo3 *r)
    8415             : {
    8416           0 :         uint32_t _ptr_netbios_name;
    8417           4 :         uint32_t size_netbios_name_1 = 0;
    8418           4 :         uint32_t length_netbios_name_1 = 0;
    8419           4 :         TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
    8420           0 :         uint32_t _ptr_dns_name;
    8421           4 :         uint32_t size_dns_name_1 = 0;
    8422           4 :         uint32_t length_dns_name_1 = 0;
    8423           4 :         TALLOC_CTX *_mem_save_dns_name_0 = NULL;
    8424           0 :         uint32_t _ptr_site_name;
    8425           4 :         uint32_t size_site_name_1 = 0;
    8426           4 :         uint32_t length_site_name_1 = 0;
    8427           4 :         TALLOC_CTX *_mem_save_site_name_0 = NULL;
    8428           0 :         uint32_t _ptr_site_dn;
    8429           4 :         uint32_t size_site_dn_1 = 0;
    8430           4 :         uint32_t length_site_dn_1 = 0;
    8431           4 :         TALLOC_CTX *_mem_save_site_dn_0 = NULL;
    8432           0 :         uint32_t _ptr_computer_dn;
    8433           4 :         uint32_t size_computer_dn_1 = 0;
    8434           4 :         uint32_t length_computer_dn_1 = 0;
    8435           4 :         TALLOC_CTX *_mem_save_computer_dn_0 = NULL;
    8436           0 :         uint32_t _ptr_server_dn;
    8437           4 :         uint32_t size_server_dn_1 = 0;
    8438           4 :         uint32_t length_server_dn_1 = 0;
    8439           4 :         TALLOC_CTX *_mem_save_server_dn_0 = NULL;
    8440           0 :         uint32_t _ptr_ntds_dn;
    8441           4 :         uint32_t size_ntds_dn_1 = 0;
    8442           4 :         uint32_t length_ntds_dn_1 = 0;
    8443           4 :         TALLOC_CTX *_mem_save_ntds_dn_0 = NULL;
    8444           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8445           4 :         if (ndr_flags & NDR_SCALARS) {
    8446           2 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8447           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
    8448           2 :                 if (_ptr_netbios_name) {
    8449           2 :                         NDR_PULL_ALLOC(ndr, r->netbios_name);
    8450             :                 } else {
    8451           0 :                         r->netbios_name = NULL;
    8452             :                 }
    8453           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
    8454           2 :                 if (_ptr_dns_name) {
    8455           2 :                         NDR_PULL_ALLOC(ndr, r->dns_name);
    8456             :                 } else {
    8457           0 :                         r->dns_name = NULL;
    8458             :                 }
    8459           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
    8460           2 :                 if (_ptr_site_name) {
    8461           2 :                         NDR_PULL_ALLOC(ndr, r->site_name);
    8462             :                 } else {
    8463           0 :                         r->site_name = NULL;
    8464             :                 }
    8465           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_dn));
    8466           2 :                 if (_ptr_site_dn) {
    8467           2 :                         NDR_PULL_ALLOC(ndr, r->site_dn);
    8468             :                 } else {
    8469           0 :                         r->site_dn = NULL;
    8470             :                 }
    8471           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_dn));
    8472           2 :                 if (_ptr_computer_dn) {
    8473           2 :                         NDR_PULL_ALLOC(ndr, r->computer_dn);
    8474             :                 } else {
    8475           0 :                         r->computer_dn = NULL;
    8476             :                 }
    8477           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
    8478           2 :                 if (_ptr_server_dn) {
    8479           2 :                         NDR_PULL_ALLOC(ndr, r->server_dn);
    8480             :                 } else {
    8481           0 :                         r->server_dn = NULL;
    8482             :                 }
    8483           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ntds_dn));
    8484           2 :                 if (_ptr_ntds_dn) {
    8485           1 :                         NDR_PULL_ALLOC(ndr, r->ntds_dn);
    8486             :                 } else {
    8487           1 :                         r->ntds_dn = NULL;
    8488             :                 }
    8489           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc));
    8490           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled));
    8491           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_gc));
    8492           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_rodc));
    8493           2 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
    8494           2 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->computer_guid));
    8495           2 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->server_guid));
    8496           2 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
    8497           2 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8498             :         }
    8499           4 :         if (ndr_flags & NDR_BUFFERS) {
    8500           2 :                 if (r->netbios_name) {
    8501           2 :                         _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8502           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
    8503           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
    8504           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
    8505           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
    8506           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
    8507           2 :                         if (length_netbios_name_1 > size_netbios_name_1) {
    8508           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_netbios_name_1, length_netbios_name_1);
    8509             :                         }
    8510           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
    8511           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
    8512           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
    8513             :                 }
    8514           2 :                 if (r->dns_name) {
    8515           2 :                         _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8516           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
    8517           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
    8518           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
    8519           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
    8520           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
    8521           2 :                         if (length_dns_name_1 > size_dns_name_1) {
    8522           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dns_name_1, length_dns_name_1);
    8523             :                         }
    8524           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
    8525           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
    8526           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
    8527             :                 }
    8528           2 :                 if (r->site_name) {
    8529           2 :                         _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8530           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_name, 0);
    8531           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_name));
    8532           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->site_name));
    8533           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_name, &size_site_name_1));
    8534           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_name, &length_site_name_1));
    8535           2 :                         if (length_site_name_1 > size_site_name_1) {
    8536           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_name_1, length_site_name_1);
    8537             :                         }
    8538           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
    8539           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
    8540           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
    8541             :                 }
    8542           2 :                 if (r->site_dn) {
    8543           2 :                         _mem_save_site_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8544           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_dn, 0);
    8545           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_dn));
    8546           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->site_dn));
    8547           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_dn, &size_site_dn_1));
    8548           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_dn, &length_site_dn_1));
    8549           2 :                         if (length_site_dn_1 > size_site_dn_1) {
    8550           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_dn_1, length_site_dn_1);
    8551             :                         }
    8552           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_dn_1, sizeof(uint16_t)));
    8553           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_dn, length_site_dn_1, sizeof(uint16_t), CH_UTF16));
    8554           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_dn_0, 0);
    8555             :                 }
    8556           2 :                 if (r->computer_dn) {
    8557           2 :                         _mem_save_computer_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8558           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->computer_dn, 0);
    8559           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_dn));
    8560           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_dn));
    8561           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_dn, &size_computer_dn_1));
    8562           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_dn, &length_computer_dn_1));
    8563           2 :                         if (length_computer_dn_1 > size_computer_dn_1) {
    8564           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_computer_dn_1, length_computer_dn_1);
    8565             :                         }
    8566           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_dn_1, sizeof(uint16_t)));
    8567           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_dn, length_computer_dn_1, sizeof(uint16_t), CH_UTF16));
    8568           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_dn_0, 0);
    8569             :                 }
    8570           2 :                 if (r->server_dn) {
    8571           2 :                         _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8572           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
    8573           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
    8574           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
    8575           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
    8576           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
    8577           2 :                         if (length_server_dn_1 > size_server_dn_1) {
    8578           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_server_dn_1, length_server_dn_1);
    8579             :                         }
    8580           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
    8581           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
    8582           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
    8583             :                 }
    8584           2 :                 if (r->ntds_dn) {
    8585           1 :                         _mem_save_ntds_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8586           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ntds_dn, 0);
    8587           1 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ntds_dn));
    8588           1 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->ntds_dn));
    8589           1 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->ntds_dn, &size_ntds_dn_1));
    8590           1 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->ntds_dn, &length_ntds_dn_1));
    8591           1 :                         if (length_ntds_dn_1 > size_ntds_dn_1) {
    8592           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ntds_dn_1, length_ntds_dn_1);
    8593             :                         }
    8594           1 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_ntds_dn_1, sizeof(uint16_t)));
    8595           1 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ntds_dn, length_ntds_dn_1, sizeof(uint16_t), CH_UTF16));
    8596           1 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ntds_dn_0, 0);
    8597             :                 }
    8598             :         }
    8599           4 :         return NDR_ERR_SUCCESS;
    8600             : }
    8601             : 
    8602           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfo3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo3 *r)
    8603             : {
    8604           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfo3");
    8605           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8606           0 :         ndr->depth++;
    8607           0 :         ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
    8608           0 :         ndr->depth++;
    8609           0 :         if (r->netbios_name) {
    8610           0 :                 ndr_print_string(ndr, "netbios_name", r->netbios_name);
    8611             :         }
    8612           0 :         ndr->depth--;
    8613           0 :         ndr_print_ptr(ndr, "dns_name", r->dns_name);
    8614           0 :         ndr->depth++;
    8615           0 :         if (r->dns_name) {
    8616           0 :                 ndr_print_string(ndr, "dns_name", r->dns_name);
    8617             :         }
    8618           0 :         ndr->depth--;
    8619           0 :         ndr_print_ptr(ndr, "site_name", r->site_name);
    8620           0 :         ndr->depth++;
    8621           0 :         if (r->site_name) {
    8622           0 :                 ndr_print_string(ndr, "site_name", r->site_name);
    8623             :         }
    8624           0 :         ndr->depth--;
    8625           0 :         ndr_print_ptr(ndr, "site_dn", r->site_dn);
    8626           0 :         ndr->depth++;
    8627           0 :         if (r->site_dn) {
    8628           0 :                 ndr_print_string(ndr, "site_dn", r->site_dn);
    8629             :         }
    8630           0 :         ndr->depth--;
    8631           0 :         ndr_print_ptr(ndr, "computer_dn", r->computer_dn);
    8632           0 :         ndr->depth++;
    8633           0 :         if (r->computer_dn) {
    8634           0 :                 ndr_print_string(ndr, "computer_dn", r->computer_dn);
    8635             :         }
    8636           0 :         ndr->depth--;
    8637           0 :         ndr_print_ptr(ndr, "server_dn", r->server_dn);
    8638           0 :         ndr->depth++;
    8639           0 :         if (r->server_dn) {
    8640           0 :                 ndr_print_string(ndr, "server_dn", r->server_dn);
    8641             :         }
    8642           0 :         ndr->depth--;
    8643           0 :         ndr_print_ptr(ndr, "ntds_dn", r->ntds_dn);
    8644           0 :         ndr->depth++;
    8645           0 :         if (r->ntds_dn) {
    8646           0 :                 ndr_print_string(ndr, "ntds_dn", r->ntds_dn);
    8647             :         }
    8648           0 :         ndr->depth--;
    8649           0 :         ndr_print_uint32(ndr, "is_pdc", r->is_pdc);
    8650           0 :         ndr_print_uint32(ndr, "is_enabled", r->is_enabled);
    8651           0 :         ndr_print_uint32(ndr, "is_gc", r->is_gc);
    8652           0 :         ndr_print_uint32(ndr, "is_rodc", r->is_rodc);
    8653           0 :         ndr_print_GUID(ndr, "site_guid", &r->site_guid);
    8654           0 :         ndr_print_GUID(ndr, "computer_guid", &r->computer_guid);
    8655           0 :         ndr_print_GUID(ndr, "server_guid", &r->server_guid);
    8656           0 :         ndr_print_GUID(ndr, "ntds_guid", &r->ntds_guid);
    8657           0 :         ndr->depth--;
    8658             : }
    8659             : 
    8660           2 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCInfoCtr3 *r)
    8661             : {
    8662           0 :         uint32_t cntr_array_1;
    8663           2 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8664           2 :         if (ndr_flags & NDR_SCALARS) {
    8665           1 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8666           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    8667           1 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    8668           1 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8669             :         }
    8670           2 :         if (ndr_flags & NDR_BUFFERS) {
    8671           1 :                 if (r->array) {
    8672           1 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    8673           3 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8674           2 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    8675             :                         }
    8676           3 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8677           2 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    8678             :                         }
    8679             :                 }
    8680             :         }
    8681           2 :         return NDR_ERR_SUCCESS;
    8682             : }
    8683             : 
    8684           2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCInfoCtr3 *r)
    8685             : {
    8686           0 :         uint32_t _ptr_array;
    8687           2 :         uint32_t size_array_1 = 0;
    8688           0 :         uint32_t cntr_array_1;
    8689           2 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    8690           2 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    8691           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8692           2 :         if (ndr_flags & NDR_SCALARS) {
    8693           1 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8694           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    8695           1 :                 if (r->count > 10000) {
    8696           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
    8697             :                 }
    8698           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    8699           1 :                 if (_ptr_array) {
    8700           1 :                         NDR_PULL_ALLOC(ndr, r->array);
    8701             :                 } else {
    8702           0 :                         r->array = NULL;
    8703             :                 }
    8704           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8705             :         }
    8706           2 :         if (ndr_flags & NDR_BUFFERS) {
    8707           1 :                 if (r->array) {
    8708           1 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8709           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    8710           1 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    8711           1 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    8712           1 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    8713           1 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    8714           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    8715           3 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8716           2 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    8717             :                         }
    8718           3 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8719           2 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    8720             :                         }
    8721           1 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    8722           1 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    8723             :                 }
    8724           1 :                 if (r->array) {
    8725           1 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    8726             :                 }
    8727           3 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8728           0 :                 }
    8729             :         }
    8730           2 :         return NDR_ERR_SUCCESS;
    8731             : }
    8732             : 
    8733           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr3 *r)
    8734             : {
    8735           0 :         uint32_t cntr_array_1;
    8736           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoCtr3");
    8737           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8738           0 :         ndr->depth++;
    8739           0 :         ndr_print_uint32(ndr, "count", r->count);
    8740           0 :         ndr_print_ptr(ndr, "array", r->array);
    8741           0 :         ndr->depth++;
    8742           0 :         if (r->array) {
    8743           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
    8744           0 :                 ndr->depth++;
    8745           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8746           0 :                         ndr_print_drsuapi_DsGetDCInfo3(ndr, "array", &r->array[cntr_array_1]);
    8747             :                 }
    8748           0 :                 ndr->depth--;
    8749             :         }
    8750           0 :         ndr->depth--;
    8751           0 :         ndr->depth--;
    8752             : }
    8753             : 
    8754           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCConnection01(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCConnection01 *r)
    8755             : {
    8756           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8757           0 :         if (ndr_flags & NDR_SCALARS) {
    8758           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8759             :                 {
    8760           0 :                         libndr_flags _flags_save_ipv4address = ndr->flags;
    8761           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
    8762           0 :                         NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->client_ip_address));
    8763           0 :                         ndr->flags = _flags_save_ipv4address;
    8764             :                 }
    8765           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
    8766           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connection_time));
    8767           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
    8768           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5));
    8769           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6));
    8770           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_account));
    8771           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8772             :         }
    8773           0 :         if (ndr_flags & NDR_BUFFERS) {
    8774           0 :                 if (r->client_account) {
    8775           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_account, CH_UTF16)));
    8776           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8777           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_account, CH_UTF16)));
    8778           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_account, ndr_charset_length(r->client_account, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8779             :                 }
    8780             :         }
    8781           0 :         return NDR_ERR_SUCCESS;
    8782             : }
    8783             : 
    8784           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCConnection01(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCConnection01 *r)
    8785             : {
    8786           0 :         uint32_t _ptr_client_account;
    8787           0 :         uint32_t size_client_account_1 = 0;
    8788           0 :         uint32_t length_client_account_1 = 0;
    8789           0 :         TALLOC_CTX *_mem_save_client_account_0 = NULL;
    8790           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8791           0 :         if (ndr_flags & NDR_SCALARS) {
    8792           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8793             :                 {
    8794           0 :                         libndr_flags _flags_save_ipv4address = ndr->flags;
    8795           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
    8796           0 :                         NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->client_ip_address));
    8797           0 :                         ndr->flags = _flags_save_ipv4address;
    8798             :                 }
    8799           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
    8800           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connection_time));
    8801           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
    8802           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5));
    8803           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6));
    8804           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_account));
    8805           0 :                 if (_ptr_client_account) {
    8806           0 :                         NDR_PULL_ALLOC(ndr, r->client_account);
    8807             :                 } else {
    8808           0 :                         r->client_account = NULL;
    8809             :                 }
    8810           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8811             :         }
    8812           0 :         if (ndr_flags & NDR_BUFFERS) {
    8813           0 :                 if (r->client_account) {
    8814           0 :                         _mem_save_client_account_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8815           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client_account, 0);
    8816           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client_account));
    8817           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client_account));
    8818           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_account, &size_client_account_1));
    8819           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_account, &length_client_account_1));
    8820           0 :                         if (length_client_account_1 > size_client_account_1) {
    8821           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_client_account_1, length_client_account_1);
    8822             :                         }
    8823           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_account_1, sizeof(uint16_t)));
    8824           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_account, length_client_account_1, sizeof(uint16_t), CH_UTF16));
    8825           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_account_0, 0);
    8826             :                 }
    8827             :         }
    8828           0 :         return NDR_ERR_SUCCESS;
    8829             : }
    8830             : 
    8831           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCConnection01(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCConnection01 *r)
    8832             : {
    8833           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCConnection01");
    8834           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8835           0 :         ndr->depth++;
    8836             :         {
    8837           0 :                 libndr_flags _flags_save_ipv4address = ndr->flags;
    8838           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
    8839           0 :                 ndr_print_ipv4address(ndr, "client_ip_address", r->client_ip_address);
    8840           0 :                 ndr->flags = _flags_save_ipv4address;
    8841             :         }
    8842           0 :         ndr_print_uint32(ndr, "unknown2", r->unknown2);
    8843           0 :         ndr_print_uint32(ndr, "connection_time", r->connection_time);
    8844           0 :         ndr_print_uint32(ndr, "unknown4", r->unknown4);
    8845           0 :         ndr_print_uint32(ndr, "unknown5", r->unknown5);
    8846           0 :         ndr_print_uint32(ndr, "unknown6", r->unknown6);
    8847           0 :         ndr_print_ptr(ndr, "client_account", r->client_account);
    8848           0 :         ndr->depth++;
    8849           0 :         if (r->client_account) {
    8850           0 :                 ndr_print_string(ndr, "client_account", r->client_account);
    8851             :         }
    8852           0 :         ndr->depth--;
    8853           0 :         ndr->depth--;
    8854             : }
    8855             : 
    8856           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCConnectionCtr01(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetDCConnectionCtr01 *r)
    8857             : {
    8858           0 :         uint32_t cntr_array_1;
    8859           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8860           0 :         if (ndr_flags & NDR_SCALARS) {
    8861           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8862           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    8863           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    8864           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8865             :         }
    8866           0 :         if (ndr_flags & NDR_BUFFERS) {
    8867           0 :                 if (r->array) {
    8868           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    8869           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8870           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnection01(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    8871             :                         }
    8872           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8873           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnection01(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    8874             :                         }
    8875             :                 }
    8876             :         }
    8877           0 :         return NDR_ERR_SUCCESS;
    8878             : }
    8879             : 
    8880           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCConnectionCtr01(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetDCConnectionCtr01 *r)
    8881             : {
    8882           0 :         uint32_t _ptr_array;
    8883           0 :         uint32_t size_array_1 = 0;
    8884           0 :         uint32_t cntr_array_1;
    8885           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    8886           0 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    8887           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8888           0 :         if (ndr_flags & NDR_SCALARS) {
    8889           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8890           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    8891           0 :                 if (r->count > 10000) {
    8892           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
    8893             :                 }
    8894           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    8895           0 :                 if (_ptr_array) {
    8896           0 :                         NDR_PULL_ALLOC(ndr, r->array);
    8897             :                 } else {
    8898           0 :                         r->array = NULL;
    8899             :                 }
    8900           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8901             :         }
    8902           0 :         if (ndr_flags & NDR_BUFFERS) {
    8903           0 :                 if (r->array) {
    8904           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8905           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    8906           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    8907           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    8908           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    8909           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    8910           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    8911           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8912           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnection01(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    8913             :                         }
    8914           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8915           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnection01(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    8916             :                         }
    8917           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    8918           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    8919             :                 }
    8920           0 :                 if (r->array) {
    8921           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    8922             :                 }
    8923           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    8924           0 :                 }
    8925             :         }
    8926           0 :         return NDR_ERR_SUCCESS;
    8927             : }
    8928             : 
    8929           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCConnectionCtr01(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCConnectionCtr01 *r)
    8930             : {
    8931           0 :         uint32_t cntr_array_1;
    8932           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCConnectionCtr01");
    8933           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8934           0 :         ndr->depth++;
    8935           0 :         ndr_print_uint32(ndr, "count", r->count);
    8936           0 :         ndr_print_ptr(ndr, "array", r->array);
    8937           0 :         ndr->depth++;
    8938           0 :         if (r->array) {
    8939           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
    8940           0 :                 ndr->depth++;
    8941           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    8942           0 :                         ndr_print_drsuapi_DsGetDCConnection01(ndr, "array", &r->array[cntr_array_1]);
    8943             :                 }
    8944           0 :                 ndr->depth--;
    8945             :         }
    8946           0 :         ndr->depth--;
    8947           0 :         ndr->depth--;
    8948             : }
    8949             : 
    8950           6 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetDCInfoCtr *r)
    8951             : {
    8952           0 :         uint32_t level;
    8953           6 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8954           6 :         if (ndr_flags & NDR_SCALARS) {
    8955             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    8956           6 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    8957           6 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    8958           6 :                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, level));
    8959           6 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    8960           6 :                 switch (level) {
    8961           3 :                         case DRSUAPI_DC_INFO_CTR_1: {
    8962           3 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr, NDR_SCALARS, &r->ctr1));
    8963           3 :                         break; }
    8964             : 
    8965           2 :                         case DRSUAPI_DC_INFO_CTR_2: {
    8966           2 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr2(ndr, NDR_SCALARS, &r->ctr2));
    8967           2 :                         break; }
    8968             : 
    8969           1 :                         case DRSUAPI_DC_INFO_CTR_3: {
    8970           1 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr3(ndr, NDR_SCALARS, &r->ctr3));
    8971           1 :                         break; }
    8972             : 
    8973           0 :                         case DRSUAPI_DC_CONNECTION_CTR_01: {
    8974           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnectionCtr01(ndr, NDR_SCALARS, &r->ctr01));
    8975           0 :                         break; }
    8976             : 
    8977           0 :                         default:
    8978           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    8979             :                 }
    8980             :         }
    8981           6 :         if (ndr_flags & NDR_BUFFERS) {
    8982           6 :                 if (!(ndr_flags & NDR_SCALARS)) {
    8983             :                         /* We didn't get it above, and the token is not needed after this. */
    8984           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    8985             :                 }
    8986           6 :                 switch (level) {
    8987           3 :                         case DRSUAPI_DC_INFO_CTR_1:
    8988           3 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    8989           3 :                         break;
    8990             : 
    8991           2 :                         case DRSUAPI_DC_INFO_CTR_2:
    8992           2 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr2(ndr, NDR_BUFFERS, &r->ctr2));
    8993           2 :                         break;
    8994             : 
    8995           1 :                         case DRSUAPI_DC_INFO_CTR_3:
    8996           1 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr3(ndr, NDR_BUFFERS, &r->ctr3));
    8997           1 :                         break;
    8998             : 
    8999           0 :                         case DRSUAPI_DC_CONNECTION_CTR_01:
    9000           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCConnectionCtr01(ndr, NDR_BUFFERS, &r->ctr01));
    9001           0 :                         break;
    9002             : 
    9003           0 :                         default:
    9004           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    9005             :                 }
    9006             :         }
    9007           6 :         return NDR_ERR_SUCCESS;
    9008             : }
    9009             : 
    9010           6 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetDCInfoCtr *r)
    9011             : {
    9012           0 :         uint32_t level;
    9013           0 :         uint32_t _level;
    9014           6 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9015           6 :         if (ndr_flags & NDR_SCALARS) {
    9016             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    9017           6 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    9018           6 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    9019           6 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    9020           6 :                 if (_level != level) {
    9021           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    9022             :                 }
    9023           6 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    9024           6 :                 switch (level) {
    9025           3 :                         case DRSUAPI_DC_INFO_CTR_1: {
    9026           3 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr, NDR_SCALARS, &r->ctr1));
    9027           3 :                         break; }
    9028             : 
    9029           2 :                         case DRSUAPI_DC_INFO_CTR_2: {
    9030           2 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr2(ndr, NDR_SCALARS, &r->ctr2));
    9031           2 :                         break; }
    9032             : 
    9033           1 :                         case DRSUAPI_DC_INFO_CTR_3: {
    9034           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr3(ndr, NDR_SCALARS, &r->ctr3));
    9035           1 :                         break; }
    9036             : 
    9037           0 :                         case DRSUAPI_DC_CONNECTION_CTR_01: {
    9038           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnectionCtr01(ndr, NDR_SCALARS, &r->ctr01));
    9039           0 :                         break; }
    9040             : 
    9041           0 :                         default:
    9042           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    9043             :                 }
    9044             :         }
    9045           6 :         if (ndr_flags & NDR_BUFFERS) {
    9046           6 :                 if (!(ndr_flags & NDR_SCALARS)) {
    9047             :                         /* We didn't get it above, and the token is not needed after this. */
    9048           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    9049             :                 }
    9050           6 :                 switch (level) {
    9051           3 :                         case DRSUAPI_DC_INFO_CTR_1:
    9052           3 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    9053           3 :                         break;
    9054             : 
    9055           2 :                         case DRSUAPI_DC_INFO_CTR_2:
    9056           2 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr2(ndr, NDR_BUFFERS, &r->ctr2));
    9057           2 :                         break;
    9058             : 
    9059           1 :                         case DRSUAPI_DC_INFO_CTR_3:
    9060           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr3(ndr, NDR_BUFFERS, &r->ctr3));
    9061           1 :                         break;
    9062             : 
    9063           0 :                         case DRSUAPI_DC_CONNECTION_CTR_01:
    9064           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCConnectionCtr01(ndr, NDR_BUFFERS, &r->ctr01));
    9065           0 :                         break;
    9066             : 
    9067           0 :                         default:
    9068           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    9069             :                 }
    9070             :         }
    9071           6 :         return NDR_ERR_SUCCESS;
    9072             : }
    9073             : 
    9074           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetDCInfoCtr *r)
    9075             : {
    9076           0 :         uint32_t level;
    9077           0 :         level = ndr_print_steal_switch_value(ndr, r);
    9078           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetDCInfoCtr");
    9079           0 :         switch (level) {
    9080           0 :                 case DRSUAPI_DC_INFO_CTR_1:
    9081           0 :                         ndr_print_drsuapi_DsGetDCInfoCtr1(ndr, "ctr1", &r->ctr1);
    9082           0 :                 break;
    9083             : 
    9084           0 :                 case DRSUAPI_DC_INFO_CTR_2:
    9085           0 :                         ndr_print_drsuapi_DsGetDCInfoCtr2(ndr, "ctr2", &r->ctr2);
    9086           0 :                 break;
    9087             : 
    9088           0 :                 case DRSUAPI_DC_INFO_CTR_3:
    9089           0 :                         ndr_print_drsuapi_DsGetDCInfoCtr3(ndr, "ctr3", &r->ctr3);
    9090           0 :                 break;
    9091             : 
    9092           0 :                 case DRSUAPI_DC_CONNECTION_CTR_01:
    9093           0 :                         ndr_print_drsuapi_DsGetDCConnectionCtr01(ndr, "ctr01", &r->ctr01);
    9094           0 :                 break;
    9095             : 
    9096           0 :                 default:
    9097           0 :                         ndr_print_bad_level(ndr, name, level);
    9098             :         }
    9099           0 : }
    9100             : 
    9101         190 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItem(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectListItem *r)
    9102             : {
    9103         190 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9104         190 :         if (ndr_flags & NDR_SCALARS) {
    9105          95 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9106          95 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next_object));
    9107          95 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
    9108          95 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9109             :         }
    9110         190 :         if (ndr_flags & NDR_BUFFERS) {
    9111          95 :                 if (r->next_object) {
    9112           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
    9113             :                 }
    9114          95 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
    9115             :         }
    9116         188 :         return NDR_ERR_SUCCESS;
    9117             : }
    9118             : 
    9119         196 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItem(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectListItem *r)
    9120             : {
    9121           8 :         uint32_t _ptr_next_object;
    9122         196 :         TALLOC_CTX *_mem_save_next_object_0 = NULL;
    9123         196 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9124         196 :         if (ndr_flags & NDR_SCALARS) {
    9125          98 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9126          98 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next_object));
    9127          98 :                 if (_ptr_next_object) {
    9128           0 :                         NDR_PULL_ALLOC(ndr, r->next_object);
    9129             :                 } else {
    9130          98 :                         r->next_object = NULL;
    9131             :                 }
    9132          98 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
    9133          98 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9134             :         }
    9135         196 :         if (ndr_flags & NDR_BUFFERS) {
    9136          98 :                 if (r->next_object) {
    9137           0 :                         _mem_save_next_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9138           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->next_object, 0);
    9139           0 :                         NDR_RECURSION_CHECK(ndr, 20000);
    9140           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
    9141           0 :                         NDR_RECURSION_UNWIND(ndr);
    9142           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_object_0, 0);
    9143             :                 }
    9144          98 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
    9145             :         }
    9146         188 :         return NDR_ERR_SUCCESS;
    9147             : }
    9148             : 
    9149           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct drsuapi_DsReplicaObjectListItem *r)
    9150             : {
    9151           0 :         ndr_print_drsuapi_DsReplicaObjectListItem(ndr, name, r);
    9152           0 : }
    9153             : 
    9154          94 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_DirErr(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_DirErr r)
    9155             : {
    9156          94 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    9157          94 :         return NDR_ERR_SUCCESS;
    9158             : }
    9159             : 
    9160          97 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_DirErr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_DirErr *r)
    9161             : {
    9162           3 :         uint32_t v;
    9163          97 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    9164          97 :         *r = v;
    9165          97 :         return NDR_ERR_SUCCESS;
    9166             : }
    9167             : 
    9168           2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_DirErr(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_DirErr r)
    9169             : {
    9170           2 :         const char *val = NULL;
    9171             : 
    9172           2 :         switch (r) {
    9173           2 :                 case DRSUAPI_DIRERR_OK: val = "DRSUAPI_DIRERR_OK"; break;
    9174           0 :                 case DRSUAPI_DIRERR_ATTRIBUTE: val = "DRSUAPI_DIRERR_ATTRIBUTE"; break;
    9175           0 :                 case DRSUAPI_DIRERR_NAME: val = "DRSUAPI_DIRERR_NAME"; break;
    9176           0 :                 case DRSUAPI_DIRERR_REFERRAL: val = "DRSUAPI_DIRERR_REFERRAL"; break;
    9177           0 :                 case DRSUAPI_DIRERR_SECURITY: val = "DRSUAPI_DIRERR_SECURITY"; break;
    9178           0 :                 case DRSUAPI_DIRERR_SERVICE: val = "DRSUAPI_DIRERR_SERVICE"; break;
    9179           0 :                 case DRSUAPI_DIRERR_UPDATE: val = "DRSUAPI_DIRERR_UPDATE"; break;
    9180           0 :                 case DRSUAPI_DIRERR_SYSTEM: val = "DRSUAPI_DIRERR_SYSTEM"; break;
    9181             :         }
    9182           2 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    9183           2 : }
    9184             : 
    9185         190 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryRequest2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryRequest2 *r)
    9186             : {
    9187         189 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9188         189 :         if (ndr_flags & NDR_SCALARS) {
    9189          95 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9190          95 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object));
    9191          95 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9192             :         }
    9193         189 :         if (ndr_flags & NDR_BUFFERS) {
    9194          95 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object));
    9195             :         }
    9196         188 :         return NDR_ERR_SUCCESS;
    9197             : }
    9198             : 
    9199         196 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryRequest2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryRequest2 *r)
    9200             : {
    9201         196 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9202         196 :         if (ndr_flags & NDR_SCALARS) {
    9203          98 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9204          98 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object));
    9205          98 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9206             :         }
    9207         196 :         if (ndr_flags & NDR_BUFFERS) {
    9208          98 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object));
    9209             :         }
    9210         188 :         return NDR_ERR_SUCCESS;
    9211             : }
    9212             : 
    9213           4 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryRequest2 *r)
    9214             : {
    9215           4 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntryRequest2");
    9216           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9217           4 :         ndr->depth++;
    9218           4 :         ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "first_object", &r->first_object);
    9219           4 :         ndr->depth--;
    9220             : }
    9221             : 
    9222           0 : static enum ndr_err_code ndr_push_drsuapi_SecBufferType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_SecBufferType r)
    9223             : {
    9224           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    9225           0 :         return NDR_ERR_SUCCESS;
    9226             : }
    9227             : 
    9228           0 : static enum ndr_err_code ndr_pull_drsuapi_SecBufferType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_SecBufferType *r)
    9229             : {
    9230           0 :         uint32_t v;
    9231           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    9232           0 :         *r = v;
    9233           0 :         return NDR_ERR_SUCCESS;
    9234             : }
    9235             : 
    9236           0 : static enum ndr_err_code ndr_push_drsuapi_SecBuffer(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_SecBuffer *r)
    9237             : {
    9238           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9239           0 :         if (ndr_flags & NDR_SCALARS) {
    9240           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9241           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buf_size));
    9242           0 :                 NDR_CHECK(ndr_push_drsuapi_SecBufferType(ndr, NDR_SCALARS, r->buf_type));
    9243           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffer));
    9244           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9245             :         }
    9246           0 :         if (ndr_flags & NDR_BUFFERS) {
    9247           0 :                 if (r->buffer) {
    9248           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->buf_size));
    9249           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->buffer, r->buf_size));
    9250             :                 }
    9251             :         }
    9252           0 :         return NDR_ERR_SUCCESS;
    9253             : }
    9254             : 
    9255           0 : static enum ndr_err_code ndr_pull_drsuapi_SecBuffer(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_SecBuffer *r)
    9256             : {
    9257           0 :         uint32_t _ptr_buffer;
    9258           0 :         uint32_t size_buffer_1 = 0;
    9259           0 :         TALLOC_CTX *_mem_save_buffer_0 = NULL;
    9260           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9261           0 :         if (ndr_flags & NDR_SCALARS) {
    9262           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9263           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buf_size));
    9264           0 :                 if (r->buf_size > 10000) {
    9265           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->buf_size), (uint32_t)(0), (uint32_t)(10000));
    9266             :                 }
    9267           0 :                 NDR_CHECK(ndr_pull_drsuapi_SecBufferType(ndr, NDR_SCALARS, &r->buf_type));
    9268           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
    9269           0 :                 if (_ptr_buffer) {
    9270           0 :                         NDR_PULL_ALLOC(ndr, r->buffer);
    9271             :                 } else {
    9272           0 :                         r->buffer = NULL;
    9273             :                 }
    9274           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9275             :         }
    9276           0 :         if (ndr_flags & NDR_BUFFERS) {
    9277           0 :                 if (r->buffer) {
    9278           0 :                         _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9279           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
    9280           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
    9281           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->buffer, &size_buffer_1));
    9282           0 :                         NDR_PULL_ALLOC_N(ndr, r->buffer, size_buffer_1);
    9283           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, size_buffer_1));
    9284           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
    9285             :                 }
    9286           0 :                 if (r->buffer) {
    9287           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->buffer, r->buf_size));
    9288             :                 }
    9289             :         }
    9290           0 :         return NDR_ERR_SUCCESS;
    9291             : }
    9292             : 
    9293           0 : _PUBLIC_ void ndr_print_drsuapi_SecBuffer(struct ndr_print *ndr, const char *name, const struct drsuapi_SecBuffer *r)
    9294             : {
    9295           0 :         ndr_print_struct(ndr, name, "drsuapi_SecBuffer");
    9296           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9297           0 :         ndr->depth++;
    9298           0 :         ndr_print_uint32(ndr, "buf_size", r->buf_size);
    9299           0 :         ndr_print_drsuapi_SecBufferType(ndr, "buf_type", r->buf_type);
    9300           0 :         ndr_print_ptr(ndr, "buffer", r->buffer);
    9301           0 :         ndr->depth++;
    9302           0 :         if (r->buffer) {
    9303           0 :                 ndr_print_array_uint8(ndr, "buffer", r->buffer, r->buf_size);
    9304             :         }
    9305           0 :         ndr->depth--;
    9306           0 :         ndr->depth--;
    9307             : }
    9308             : 
    9309           0 : static enum ndr_err_code ndr_push_drsuapi_SecBufferDesc(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_SecBufferDesc *r)
    9310             : {
    9311           0 :         uint32_t cntr_buffers_1;
    9312           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9313           0 :         if (ndr_flags & NDR_SCALARS) {
    9314           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9315           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    9316           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->buff_count));
    9317           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->buffers));
    9318           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9319             :         }
    9320           0 :         if (ndr_flags & NDR_BUFFERS) {
    9321           0 :                 if (r->buffers) {
    9322           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->buff_count));
    9323           0 :                         for (cntr_buffers_1 = 0; cntr_buffers_1 < (r->buff_count); cntr_buffers_1++) {
    9324           0 :                                 NDR_CHECK(ndr_push_drsuapi_SecBuffer(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_1]));
    9325             :                         }
    9326           0 :                         for (cntr_buffers_1 = 0; cntr_buffers_1 < (r->buff_count); cntr_buffers_1++) {
    9327           0 :                                 NDR_CHECK(ndr_push_drsuapi_SecBuffer(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_1]));
    9328             :                         }
    9329             :                 }
    9330             :         }
    9331           0 :         return NDR_ERR_SUCCESS;
    9332             : }
    9333             : 
    9334           0 : static enum ndr_err_code ndr_pull_drsuapi_SecBufferDesc(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_SecBufferDesc *r)
    9335             : {
    9336           0 :         uint32_t _ptr_buffers;
    9337           0 :         uint32_t size_buffers_1 = 0;
    9338           0 :         uint32_t cntr_buffers_1;
    9339           0 :         TALLOC_CTX *_mem_save_buffers_0 = NULL;
    9340           0 :         TALLOC_CTX *_mem_save_buffers_1 = NULL;
    9341           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9342           0 :         if (ndr_flags & NDR_SCALARS) {
    9343           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9344           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    9345           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->buff_count));
    9346           0 :                 if (r->buff_count > 10000) {
    9347           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->buff_count), (uint32_t)(0), (uint32_t)(10000));
    9348             :                 }
    9349           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffers));
    9350           0 :                 if (_ptr_buffers) {
    9351           0 :                         NDR_PULL_ALLOC(ndr, r->buffers);
    9352             :                 } else {
    9353           0 :                         r->buffers = NULL;
    9354             :                 }
    9355           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9356             :         }
    9357           0 :         if (ndr_flags & NDR_BUFFERS) {
    9358           0 :                 if (r->buffers) {
    9359           0 :                         _mem_save_buffers_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9360           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
    9361           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->buffers));
    9362           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->buffers, &size_buffers_1));
    9363           0 :                         NDR_PULL_ALLOC_N(ndr, r->buffers, size_buffers_1);
    9364           0 :                         _mem_save_buffers_1 = NDR_PULL_GET_MEM_CTX(ndr);
    9365           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->buffers, 0);
    9366           0 :                         for (cntr_buffers_1 = 0; cntr_buffers_1 < (size_buffers_1); cntr_buffers_1++) {
    9367           0 :                                 NDR_CHECK(ndr_pull_drsuapi_SecBuffer(ndr, NDR_SCALARS, &r->buffers[cntr_buffers_1]));
    9368             :                         }
    9369           0 :                         for (cntr_buffers_1 = 0; cntr_buffers_1 < (size_buffers_1); cntr_buffers_1++) {
    9370           0 :                                 NDR_CHECK(ndr_pull_drsuapi_SecBuffer(ndr, NDR_BUFFERS, &r->buffers[cntr_buffers_1]));
    9371             :                         }
    9372           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_1, 0);
    9373           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffers_0, 0);
    9374             :                 }
    9375           0 :                 if (r->buffers) {
    9376           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->buffers, r->buff_count));
    9377             :                 }
    9378           0 :                 for (cntr_buffers_1 = 0; cntr_buffers_1 < (size_buffers_1); cntr_buffers_1++) {
    9379           0 :                 }
    9380             :         }
    9381           0 :         return NDR_ERR_SUCCESS;
    9382             : }
    9383             : 
    9384           0 : _PUBLIC_ void ndr_print_drsuapi_SecBufferDesc(struct ndr_print *ndr, const char *name, const struct drsuapi_SecBufferDesc *r)
    9385             : {
    9386           0 :         uint32_t cntr_buffers_1;
    9387           0 :         ndr_print_struct(ndr, name, "drsuapi_SecBufferDesc");
    9388           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9389           0 :         ndr->depth++;
    9390           0 :         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->version);
    9391           0 :         ndr_print_uint32(ndr, "buff_count", r->buff_count);
    9392           0 :         ndr_print_ptr(ndr, "buffers", r->buffers);
    9393           0 :         ndr->depth++;
    9394           0 :         if (r->buffers) {
    9395           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "buffers", (uint32_t)(r->buff_count));
    9396           0 :                 ndr->depth++;
    9397           0 :                 for (cntr_buffers_1 = 0; cntr_buffers_1 < (r->buff_count); cntr_buffers_1++) {
    9398           0 :                         ndr_print_drsuapi_SecBuffer(ndr, "buffers", &r->buffers[cntr_buffers_1]);
    9399             :                 }
    9400           0 :                 ndr->depth--;
    9401             :         }
    9402           0 :         ndr->depth--;
    9403           0 :         ndr->depth--;
    9404             : }
    9405             : 
    9406           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryRequest3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryRequest3 *r)
    9407             : {
    9408           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9409           0 :         if (ndr_flags & NDR_SCALARS) {
    9410           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9411           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object));
    9412           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_creds));
    9413           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9414             :         }
    9415           0 :         if (ndr_flags & NDR_BUFFERS) {
    9416           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object));
    9417           0 :                 if (r->client_creds) {
    9418           0 :                         NDR_CHECK(ndr_push_drsuapi_SecBufferDesc(ndr, NDR_SCALARS|NDR_BUFFERS, r->client_creds));
    9419             :                 }
    9420             :         }
    9421           0 :         return NDR_ERR_SUCCESS;
    9422             : }
    9423             : 
    9424           0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryRequest3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryRequest3 *r)
    9425             : {
    9426           0 :         uint32_t _ptr_client_creds;
    9427           0 :         TALLOC_CTX *_mem_save_client_creds_0 = NULL;
    9428           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9429           0 :         if (ndr_flags & NDR_SCALARS) {
    9430           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9431           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_SCALARS, &r->first_object));
    9432           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_creds));
    9433           0 :                 if (_ptr_client_creds) {
    9434           0 :                         NDR_PULL_ALLOC(ndr, r->client_creds);
    9435             :                 } else {
    9436           0 :                         r->client_creds = NULL;
    9437             :                 }
    9438           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9439             :         }
    9440           0 :         if (ndr_flags & NDR_BUFFERS) {
    9441           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItem(ndr, NDR_BUFFERS, &r->first_object));
    9442           0 :                 if (r->client_creds) {
    9443           0 :                         _mem_save_client_creds_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9444           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client_creds, 0);
    9445           0 :                         NDR_CHECK(ndr_pull_drsuapi_SecBufferDesc(ndr, NDR_SCALARS|NDR_BUFFERS, r->client_creds));
    9446           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_creds_0, 0);
    9447             :                 }
    9448             :         }
    9449           0 :         return NDR_ERR_SUCCESS;
    9450             : }
    9451             : 
    9452           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryRequest3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryRequest3 *r)
    9453             : {
    9454           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntryRequest3");
    9455           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9456           0 :         ndr->depth++;
    9457           0 :         ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "first_object", &r->first_object);
    9458           0 :         ndr_print_ptr(ndr, "client_creds", r->client_creds);
    9459           0 :         ndr->depth++;
    9460           0 :         if (r->client_creds) {
    9461           0 :                 ndr_print_drsuapi_SecBufferDesc(ndr, "client_creds", r->client_creds);
    9462             :         }
    9463           0 :         ndr->depth--;
    9464           0 :         ndr->depth--;
    9465             : }
    9466             : 
    9467          95 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsAddEntryRequest *r)
    9468             : {
    9469           1 :         uint32_t level;
    9470          95 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9471          95 :         if (ndr_flags & NDR_SCALARS) {
    9472             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    9473          95 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    9474          95 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    9475          95 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    9476          95 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    9477          95 :                 switch (level) {
    9478          95 :                         case 2: {
    9479          95 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr, NDR_SCALARS, &r->req2));
    9480          94 :                         break; }
    9481             : 
    9482           0 :                         case 3: {
    9483           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest3(ndr, NDR_SCALARS, &r->req3));
    9484           0 :                         break; }
    9485             : 
    9486           0 :                         default:
    9487           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    9488             :                 }
    9489             :         }
    9490          95 :         if (ndr_flags & NDR_BUFFERS) {
    9491          95 :                 if (!(ndr_flags & NDR_SCALARS)) {
    9492             :                         /* We didn't get it above, and the token is not needed after this. */
    9493           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    9494             :                 }
    9495          95 :                 switch (level) {
    9496          95 :                         case 2:
    9497          96 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest2(ndr, NDR_BUFFERS, &r->req2));
    9498          94 :                         break;
    9499             : 
    9500           0 :                         case 3:
    9501           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest3(ndr, NDR_BUFFERS, &r->req3));
    9502           0 :                         break;
    9503             : 
    9504           0 :                         default:
    9505           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
    9506             :                 }
    9507             :         }
    9508          94 :         return NDR_ERR_SUCCESS;
    9509             : }
    9510             : 
    9511          98 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsAddEntryRequest *r)
    9512             : {
    9513           4 :         uint32_t level;
    9514           4 :         uint32_t _level;
    9515          98 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9516          98 :         if (ndr_flags & NDR_SCALARS) {
    9517             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    9518          98 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    9519          98 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    9520          98 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    9521          98 :                 if (_level != level) {
    9522           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
    9523             :                 }
    9524          98 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    9525          98 :                 switch (level) {
    9526          98 :                         case 2: {
    9527          98 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr, NDR_SCALARS, &r->req2));
    9528          94 :                         break; }
    9529             : 
    9530           0 :                         case 3: {
    9531           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest3(ndr, NDR_SCALARS, &r->req3));
    9532           0 :                         break; }
    9533             : 
    9534           0 :                         default:
    9535           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    9536             :                 }
    9537             :         }
    9538          98 :         if (ndr_flags & NDR_BUFFERS) {
    9539          98 :                 if (!(ndr_flags & NDR_SCALARS)) {
    9540             :                         /* We didn't get it above, and the token is not needed after this. */
    9541           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    9542             :                 }
    9543          98 :                 switch (level) {
    9544          98 :                         case 2:
    9545          98 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest2(ndr, NDR_BUFFERS, &r->req2));
    9546          94 :                         break;
    9547             : 
    9548           0 :                         case 3:
    9549           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest3(ndr, NDR_BUFFERS, &r->req3));
    9550           0 :                         break;
    9551             : 
    9552           0 :                         default:
    9553           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
    9554             :                 }
    9555             :         }
    9556          94 :         return NDR_ERR_SUCCESS;
    9557             : }
    9558             : 
    9559           4 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryRequest *r)
    9560             : {
    9561           4 :         uint32_t level;
    9562           4 :         level = ndr_print_steal_switch_value(ndr, r);
    9563           4 :         ndr_print_union(ndr, name, level, "drsuapi_DsAddEntryRequest");
    9564           4 :         switch (level) {
    9565           4 :                 case 2:
    9566           4 :                         ndr_print_drsuapi_DsAddEntryRequest2(ndr, "req2", &r->req2);
    9567           4 :                 break;
    9568             : 
    9569           0 :                 case 3:
    9570           0 :                         ndr_print_drsuapi_DsAddEntryRequest3(ndr, "req3", &r->req3);
    9571           0 :                 break;
    9572             : 
    9573           0 :                 default:
    9574           0 :                         ndr_print_bad_level(ndr, name, level);
    9575             :         }
    9576           4 : }
    9577             : 
    9578           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfoX(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryErrorInfoX *r)
    9579             : {
    9580           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9581           0 :         if (ndr_flags & NDR_SCALARS) {
    9582           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    9583           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
    9584           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
    9585           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
    9586           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->problem));
    9587           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    9588             :         }
    9589           0 :         if (ndr_flags & NDR_BUFFERS) {
    9590           0 :         }
    9591           0 :         return NDR_ERR_SUCCESS;
    9592             : }
    9593             : 
    9594           0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfoX(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryErrorInfoX *r)
    9595             : {
    9596           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9597           0 :         if (ndr_flags & NDR_SCALARS) {
    9598           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    9599           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
    9600           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
    9601           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
    9602           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->problem));
    9603           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    9604             :         }
    9605           0 :         if (ndr_flags & NDR_BUFFERS) {
    9606           0 :         }
    9607           0 :         return NDR_ERR_SUCCESS;
    9608             : }
    9609             : 
    9610           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfoX(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfoX *r)
    9611             : {
    9612           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntryErrorInfoX");
    9613           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9614           0 :         ndr->depth++;
    9615           0 :         ndr_print_uint32(ndr, "dsid", r->dsid);
    9616           0 :         ndr_print_WERROR(ndr, "extended_err", r->extended_err);
    9617           0 :         ndr_print_uint32(ndr, "extended_data", r->extended_data);
    9618           0 :         ndr_print_uint16(ndr, "problem", r->problem);
    9619           0 :         ndr->depth--;
    9620             : }
    9621             : 
    9622           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_AttrErr_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntry_AttrErr_V1 *r)
    9623             : {
    9624           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9625           0 :         if (ndr_flags & NDR_SCALARS) {
    9626           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9627           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
    9628           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
    9629           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
    9630           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->problem));
    9631           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
    9632           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_val_returned));
    9633           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->attr_val));
    9634           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9635             :         }
    9636           0 :         if (ndr_flags & NDR_BUFFERS) {
    9637           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->attr_val));
    9638             :         }
    9639           0 :         return NDR_ERR_SUCCESS;
    9640             : }
    9641             : 
    9642           0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_AttrErr_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntry_AttrErr_V1 *r)
    9643             : {
    9644           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9645           0 :         if (ndr_flags & NDR_SCALARS) {
    9646           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9647           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
    9648           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
    9649           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
    9650           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->problem));
    9651           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
    9652           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_val_returned));
    9653           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->attr_val));
    9654           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9655             :         }
    9656           0 :         if (ndr_flags & NDR_BUFFERS) {
    9657           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->attr_val));
    9658             :         }
    9659           0 :         return NDR_ERR_SUCCESS;
    9660             : }
    9661             : 
    9662           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_AttrErr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_AttrErr_V1 *r)
    9663             : {
    9664           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntry_AttrErr_V1");
    9665           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9666           0 :         ndr->depth++;
    9667           0 :         ndr_print_uint32(ndr, "dsid", r->dsid);
    9668           0 :         ndr_print_WERROR(ndr, "extended_err", r->extended_err);
    9669           0 :         ndr_print_uint32(ndr, "extended_data", r->extended_data);
    9670           0 :         ndr_print_uint16(ndr, "problem", r->problem);
    9671           0 :         ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
    9672           0 :         ndr_print_uint32(ndr, "is_val_returned", r->is_val_returned);
    9673           0 :         ndr_print_drsuapi_DsAttributeValue(ndr, "attr_val", &r->attr_val);
    9674           0 :         ndr->depth--;
    9675             : }
    9676             : 
    9677           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_AttrErrListItem_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntry_AttrErrListItem_V1 *r)
    9678             : {
    9679           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9680           0 :         if (ndr_flags & NDR_SCALARS) {
    9681           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9682           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
    9683           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErr_V1(ndr, NDR_SCALARS, &r->err_data));
    9684           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9685             :         }
    9686           0 :         if (ndr_flags & NDR_BUFFERS) {
    9687           0 :                 if (r->next) {
    9688           0 :                         NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
    9689             :                 }
    9690           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErr_V1(ndr, NDR_BUFFERS, &r->err_data));
    9691             :         }
    9692           0 :         return NDR_ERR_SUCCESS;
    9693             : }
    9694             : 
    9695           0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_AttrErrListItem_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntry_AttrErrListItem_V1 *r)
    9696             : {
    9697           0 :         uint32_t _ptr_next;
    9698           0 :         TALLOC_CTX *_mem_save_next_0 = NULL;
    9699           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9700           0 :         if (ndr_flags & NDR_SCALARS) {
    9701           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9702           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
    9703           0 :                 if (_ptr_next) {
    9704           0 :                         NDR_PULL_ALLOC(ndr, r->next);
    9705             :                 } else {
    9706           0 :                         r->next = NULL;
    9707             :                 }
    9708           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErr_V1(ndr, NDR_SCALARS, &r->err_data));
    9709           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9710             :         }
    9711           0 :         if (ndr_flags & NDR_BUFFERS) {
    9712           0 :                 if (r->next) {
    9713           0 :                         _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9714           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
    9715           0 :                         NDR_RECURSION_CHECK(ndr, 20000);
    9716           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
    9717           0 :                         NDR_RECURSION_UNWIND(ndr);
    9718           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
    9719             :                 }
    9720           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErr_V1(ndr, NDR_BUFFERS, &r->err_data));
    9721             :         }
    9722           0 :         return NDR_ERR_SUCCESS;
    9723             : }
    9724             : 
    9725           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo_Attr_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *r)
    9726             : {
    9727           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9728           0 :         if (ndr_flags & NDR_SCALARS) {
    9729           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9730           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
    9731           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    9732           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_SCALARS, &r->first));
    9733           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9734             :         }
    9735           0 :         if (ndr_flags & NDR_BUFFERS) {
    9736           0 :                 if (r->id) {
    9737           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
    9738             :                 }
    9739           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_BUFFERS, &r->first));
    9740             :         }
    9741           0 :         return NDR_ERR_SUCCESS;
    9742             : }
    9743             : 
    9744           0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo_Attr_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *r)
    9745             : {
    9746           0 :         uint32_t _ptr_id;
    9747           0 :         TALLOC_CTX *_mem_save_id_0 = NULL;
    9748           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9749           0 :         if (ndr_flags & NDR_SCALARS) {
    9750           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9751           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
    9752           0 :                 if (_ptr_id) {
    9753           0 :                         NDR_PULL_ALLOC(ndr, r->id);
    9754             :                 } else {
    9755           0 :                         r->id = NULL;
    9756             :                 }
    9757           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    9758           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_SCALARS, &r->first));
    9759           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9760             :         }
    9761           0 :         if (ndr_flags & NDR_BUFFERS) {
    9762           0 :                 if (r->id) {
    9763           0 :                         _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9764           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
    9765           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
    9766           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
    9767             :                 }
    9768           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, NDR_BUFFERS, &r->first));
    9769             :         }
    9770           0 :         return NDR_ERR_SUCCESS;
    9771             : }
    9772             : 
    9773           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfo_Attr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *r)
    9774             : {
    9775           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntryErrorInfo_Attr_V1");
    9776           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9777           0 :         ndr->depth++;
    9778           0 :         ndr_print_ptr(ndr, "id", r->id);
    9779           0 :         ndr->depth++;
    9780           0 :         if (r->id) {
    9781           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id", r->id);
    9782             :         }
    9783           0 :         ndr->depth--;
    9784           0 :         ndr_print_uint32(ndr, "count", r->count);
    9785           0 :         ndr_print_drsuapi_DsAddEntry_AttrErrListItem_V1(ndr, "first", &r->first);
    9786           0 :         ndr->depth--;
    9787             : }
    9788             : 
    9789           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo_Name_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryErrorInfo_Name_V1 *r)
    9790             : {
    9791           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9792           0 :         if (ndr_flags & NDR_SCALARS) {
    9793           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9794           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
    9795           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
    9796           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
    9797           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->problem));
    9798           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->id_matched));
    9799           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9800             :         }
    9801           0 :         if (ndr_flags & NDR_BUFFERS) {
    9802           0 :                 if (r->id_matched) {
    9803           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id_matched));
    9804             :                 }
    9805             :         }
    9806           0 :         return NDR_ERR_SUCCESS;
    9807             : }
    9808             : 
    9809           0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo_Name_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryErrorInfo_Name_V1 *r)
    9810             : {
    9811           0 :         uint32_t _ptr_id_matched;
    9812           0 :         TALLOC_CTX *_mem_save_id_matched_0 = NULL;
    9813           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9814           0 :         if (ndr_flags & NDR_SCALARS) {
    9815           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9816           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
    9817           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
    9818           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
    9819           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->problem));
    9820           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id_matched));
    9821           0 :                 if (_ptr_id_matched) {
    9822           0 :                         NDR_PULL_ALLOC(ndr, r->id_matched);
    9823             :                 } else {
    9824           0 :                         r->id_matched = NULL;
    9825             :                 }
    9826           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9827             :         }
    9828           0 :         if (ndr_flags & NDR_BUFFERS) {
    9829           0 :                 if (r->id_matched) {
    9830           0 :                         _mem_save_id_matched_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9831           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->id_matched, 0);
    9832           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id_matched));
    9833           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_matched_0, 0);
    9834             :                 }
    9835             :         }
    9836           0 :         return NDR_ERR_SUCCESS;
    9837             : }
    9838             : 
    9839           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfo_Name_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Name_V1 *r)
    9840             : {
    9841           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntryErrorInfo_Name_V1");
    9842           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9843           0 :         ndr->depth++;
    9844           0 :         ndr_print_uint32(ndr, "dsid", r->dsid);
    9845           0 :         ndr_print_WERROR(ndr, "extended_err", r->extended_err);
    9846           0 :         ndr_print_uint32(ndr, "extended_data", r->extended_data);
    9847           0 :         ndr_print_uint16(ndr, "problem", r->problem);
    9848           0 :         ndr_print_ptr(ndr, "id_matched", r->id_matched);
    9849           0 :         ndr->depth++;
    9850           0 :         if (r->id_matched) {
    9851           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id_matched", r->id_matched);
    9852             :         }
    9853           0 :         ndr->depth--;
    9854           0 :         ndr->depth--;
    9855             : }
    9856             : 
    9857           0 : static enum ndr_err_code ndr_push_drsuapi_NameResOp_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_NameResOp_V1 *r)
    9858             : {
    9859           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9860           0 :         if (ndr_flags & NDR_SCALARS) {
    9861           0 :                 NDR_CHECK(ndr_push_align(ndr, 2));
    9862           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 83));
    9863           0 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 0));
    9864           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
    9865           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
    9866             :         }
    9867           0 :         if (ndr_flags & NDR_BUFFERS) {
    9868           0 :         }
    9869           0 :         return NDR_ERR_SUCCESS;
    9870             : }
    9871             : 
    9872           1 : static enum ndr_err_code ndr_pull_drsuapi_NameResOp_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_NameResOp_V1 *r)
    9873             : {
    9874           1 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9875           1 :         if (ndr_flags & NDR_SCALARS) {
    9876           1 :                 NDR_CHECK(ndr_pull_align(ndr, 2));
    9877           1 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->name_res));
    9878           1 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->unused_pad));
    9879           1 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->next_rdn));
    9880           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
    9881             :         }
    9882           1 :         if (ndr_flags & NDR_BUFFERS) {
    9883           1 :         }
    9884           1 :         return NDR_ERR_SUCCESS;
    9885             : }
    9886             : 
    9887           0 : _PUBLIC_ void ndr_print_drsuapi_NameResOp_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_NameResOp_V1 *r)
    9888             : {
    9889           0 :         ndr_print_struct(ndr, name, "drsuapi_NameResOp_V1");
    9890           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    9891           0 :         ndr->depth++;
    9892           0 :         ndr_print_uint8(ndr, "name_res", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?83:r->name_res);
    9893           0 :         ndr_print_uint8(ndr, "unused_pad", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->unused_pad);
    9894           0 :         ndr_print_uint16(ndr, "next_rdn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->next_rdn);
    9895           0 :         ndr->depth--;
    9896             : }
    9897             : 
    9898           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_RefType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_RefType r)
    9899             : {
    9900           0 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    9901           0 :         return NDR_ERR_SUCCESS;
    9902             : }
    9903             : 
    9904           1 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_RefType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_RefType *r)
    9905             : {
    9906           1 :         uint16_t v;
    9907           1 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    9908           1 :         *r = v;
    9909           1 :         return NDR_ERR_SUCCESS;
    9910             : }
    9911             : 
    9912           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_RefType(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_RefType r)
    9913             : {
    9914           0 :         const char *val = NULL;
    9915             : 
    9916           0 :         switch (r) {
    9917           0 :                 case DRSUAPI_CH_REFTYPE_SUPERIOR: val = "DRSUAPI_CH_REFTYPE_SUPERIOR"; break;
    9918           0 :                 case DRSUAPI_CH_REFTYPE_SUBORDINATE: val = "DRSUAPI_CH_REFTYPE_SUBORDINATE"; break;
    9919           0 :                 case DRSUAPI_CH_REFTYPE_NSSR: val = "DRSUAPI_CH_REFTYPE_NSSR"; break;
    9920           0 :                 case DRSUAPI_CH_REFTYPE_CROSS: val = "DRSUAPI_CH_REFTYPE_CROSS"; break;
    9921             :         }
    9922           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    9923           0 : }
    9924             : 
    9925           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_ChoiceType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_ChoiceType r)
    9926             : {
    9927           0 :         NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
    9928           0 :         return NDR_ERR_SUCCESS;
    9929             : }
    9930             : 
    9931           1 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_ChoiceType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsAddEntry_ChoiceType *r)
    9932             : {
    9933           1 :         uint8_t v;
    9934           1 :         NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
    9935           1 :         *r = v;
    9936           1 :         return NDR_ERR_SUCCESS;
    9937             : }
    9938             : 
    9939           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_ChoiceType(struct ndr_print *ndr, const char *name, enum drsuapi_DsAddEntry_ChoiceType r)
    9940             : {
    9941           0 :         const char *val = NULL;
    9942             : 
    9943           0 :         switch (r) {
    9944           0 :                 case DRSUAPI_SE_CHOICE_BASE_ONLY: val = "DRSUAPI_SE_CHOICE_BASE_ONLY"; break;
    9945           0 :                 case DRSUAPI_SE_CHOICE_IMMED_CHLDRN: val = "DRSUAPI_SE_CHOICE_IMMED_CHLDRN"; break;
    9946           0 :                 case DRSUAPI_SE_CHOICE_WHOLE_SUBTREE: val = "DRSUAPI_SE_CHOICE_WHOLE_SUBTREE"; break;
    9947             :         }
    9948           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    9949           0 : }
    9950             : 
    9951           0 : static enum ndr_err_code ndr_push_drsuapi_DsaAddressListItem_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsaAddressListItem_V1 *r)
    9952             : {
    9953           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    9954           0 :         if (ndr_flags & NDR_SCALARS) {
    9955           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    9956           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
    9957           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->address));
    9958           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    9959             :         }
    9960           0 :         if (ndr_flags & NDR_BUFFERS) {
    9961           0 :                 if (r->next) {
    9962           0 :                         NDR_CHECK(ndr_push_drsuapi_DsaAddressListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
    9963             :                 }
    9964           0 :                 if (r->address) {
    9965           0 :                         NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->address));
    9966             :                 }
    9967             :         }
    9968           0 :         return NDR_ERR_SUCCESS;
    9969             : }
    9970             : 
    9971        1025 : static enum ndr_err_code ndr_pull_drsuapi_DsaAddressListItem_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsaAddressListItem_V1 *r)
    9972             : {
    9973        1025 :         uint32_t _ptr_next;
    9974        1025 :         TALLOC_CTX *_mem_save_next_0 = NULL;
    9975        1025 :         uint32_t _ptr_address;
    9976        1025 :         TALLOC_CTX *_mem_save_address_0 = NULL;
    9977        1025 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    9978        1025 :         if (ndr_flags & NDR_SCALARS) {
    9979        1025 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    9980        1025 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
    9981        1025 :                 if (_ptr_next) {
    9982        1025 :                         NDR_PULL_ALLOC(ndr, r->next);
    9983             :                 } else {
    9984           0 :                         r->next = NULL;
    9985             :                 }
    9986        1025 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_address));
    9987        1025 :                 if (_ptr_address) {
    9988        1016 :                         NDR_PULL_ALLOC(ndr, r->address);
    9989             :                 } else {
    9990           9 :                         r->address = NULL;
    9991             :                 }
    9992        1025 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    9993             :         }
    9994        1025 :         if (ndr_flags & NDR_BUFFERS) {
    9995        1025 :                 if (r->next) {
    9996        1025 :                         _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
    9997        1025 :                         NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
    9998        1025 :                         NDR_RECURSION_CHECK(ndr, 1024);
    9999        1024 :                         NDR_CHECK(ndr_pull_drsuapi_DsaAddressListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
   10000           0 :                         NDR_RECURSION_UNWIND(ndr);
   10001           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
   10002             :                 }
   10003           0 :                 if (r->address) {
   10004           0 :                         _mem_save_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10005           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->address, 0);
   10006           0 :                         NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->address));
   10007           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_address_0, 0);
   10008             :                 }
   10009             :         }
   10010           0 :         return NDR_ERR_SUCCESS;
   10011             : }
   10012             : 
   10013           0 : _PUBLIC_ void ndr_print_drsuapi_DsaAddressListItem_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsaAddressListItem_V1 *r)
   10014             : {
   10015           0 :         ndr_print_struct(ndr, name, "drsuapi_DsaAddressListItem_V1");
   10016           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10017           0 :         ndr->depth++;
   10018           0 :         ndr_print_ptr(ndr, "next", r->next);
   10019           0 :         ndr->depth++;
   10020           0 :         if (r->next) {
   10021           0 :                 ndr_print_drsuapi_DsaAddressListItem_V1(ndr, "next", r->next);
   10022             :         }
   10023           0 :         ndr->depth--;
   10024           0 :         ndr_print_ptr(ndr, "address", r->address);
   10025           0 :         ndr->depth++;
   10026           0 :         if (r->address) {
   10027           0 :                 ndr_print_lsa_String(ndr, "address", r->address);
   10028             :         }
   10029           0 :         ndr->depth--;
   10030           0 :         ndr->depth--;
   10031             : }
   10032             : 
   10033           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_RefErrListItem_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntry_RefErrListItem_V1 *r)
   10034             : {
   10035           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10036           0 :         if (ndr_flags & NDR_SCALARS) {
   10037           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   10038           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->id_target));
   10039           0 :                 NDR_CHECK(ndr_push_drsuapi_NameResOp_V1(ndr, NDR_SCALARS, &r->op_state));
   10040           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
   10041           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0));
   10042           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_RefType(ndr, NDR_SCALARS, r->ref_type));
   10043           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->addr_list_count));
   10044           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr_list));
   10045           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
   10046           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_choice_set));
   10047           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_ChoiceType(ndr, NDR_SCALARS, r->choice));
   10048           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   10049             :         }
   10050           0 :         if (ndr_flags & NDR_BUFFERS) {
   10051           0 :                 if (r->id_target) {
   10052           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id_target));
   10053             :                 }
   10054           0 :                 if (r->addr_list) {
   10055           0 :                         NDR_CHECK(ndr_push_drsuapi_DsaAddressListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr_list));
   10056             :                 }
   10057           0 :                 if (r->next) {
   10058           0 :                         NDR_CHECK(ndr_push_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
   10059             :                 }
   10060             :         }
   10061           0 :         return NDR_ERR_SUCCESS;
   10062             : }
   10063             : 
   10064           2 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_RefErrListItem_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntry_RefErrListItem_V1 *r)
   10065             : {
   10066           2 :         uint32_t _ptr_id_target;
   10067           2 :         TALLOC_CTX *_mem_save_id_target_0 = NULL;
   10068           2 :         uint32_t _ptr_addr_list;
   10069           2 :         TALLOC_CTX *_mem_save_addr_list_0 = NULL;
   10070           2 :         uint32_t _ptr_next;
   10071           2 :         TALLOC_CTX *_mem_save_next_0 = NULL;
   10072           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10073           2 :         if (ndr_flags & NDR_SCALARS) {
   10074           1 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   10075           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id_target));
   10076           1 :                 if (_ptr_id_target) {
   10077           1 :                         NDR_PULL_ALLOC(ndr, r->id_target);
   10078             :                 } else {
   10079           0 :                         r->id_target = NULL;
   10080             :                 }
   10081           1 :                 NDR_CHECK(ndr_pull_drsuapi_NameResOp_V1(ndr, NDR_SCALARS, &r->op_state));
   10082           1 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->rdn_alias));
   10083           1 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->rdn_internal));
   10084           2 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_RefType(ndr, NDR_SCALARS, &r->ref_type));
   10085           1 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->addr_list_count));
   10086           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr_list));
   10087           1 :                 if (_ptr_addr_list) {
   10088           1 :                         NDR_PULL_ALLOC(ndr, r->addr_list);
   10089             :                 } else {
   10090           0 :                         r->addr_list = NULL;
   10091             :                 }
   10092           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
   10093           1 :                 if (_ptr_next) {
   10094           1 :                         NDR_PULL_ALLOC(ndr, r->next);
   10095             :                 } else {
   10096           0 :                         r->next = NULL;
   10097             :                 }
   10098           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_choice_set));
   10099           2 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_ChoiceType(ndr, NDR_SCALARS, &r->choice));
   10100           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   10101             :         }
   10102           2 :         if (ndr_flags & NDR_BUFFERS) {
   10103           1 :                 if (r->id_target) {
   10104           1 :                         _mem_save_id_target_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10105           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->id_target, 0);
   10106           1 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id_target));
   10107           1 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_target_0, 0);
   10108             :                 }
   10109           1 :                 if (r->addr_list) {
   10110           1 :                         _mem_save_addr_list_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10111           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->addr_list, 0);
   10112           1 :                         NDR_CHECK(ndr_pull_drsuapi_DsaAddressListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->addr_list));
   10113           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_list_0, 0);
   10114             :                 }
   10115           0 :                 if (r->next) {
   10116           0 :                         _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10117           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
   10118           0 :                         NDR_RECURSION_CHECK(ndr, 20000);
   10119           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
   10120           0 :                         NDR_RECURSION_UNWIND(ndr);
   10121           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
   10122             :                 }
   10123             :         }
   10124           0 :         return NDR_ERR_SUCCESS;
   10125             : }
   10126             : 
   10127           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_RefErrListItem_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_RefErrListItem_V1 *r)
   10128             : {
   10129           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntry_RefErrListItem_V1");
   10130           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10131           0 :         ndr->depth++;
   10132           0 :         ndr_print_ptr(ndr, "id_target", r->id_target);
   10133           0 :         ndr->depth++;
   10134           0 :         if (r->id_target) {
   10135           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id_target", r->id_target);
   10136             :         }
   10137           0 :         ndr->depth--;
   10138           0 :         ndr_print_drsuapi_NameResOp_V1(ndr, "op_state", &r->op_state);
   10139           0 :         ndr_print_uint16(ndr, "rdn_alias", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->rdn_alias);
   10140           0 :         ndr_print_uint16(ndr, "rdn_internal", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->rdn_internal);
   10141           0 :         ndr_print_drsuapi_DsAddEntry_RefType(ndr, "ref_type", r->ref_type);
   10142           0 :         ndr_print_uint16(ndr, "addr_list_count", r->addr_list_count);
   10143           0 :         ndr_print_ptr(ndr, "addr_list", r->addr_list);
   10144           0 :         ndr->depth++;
   10145           0 :         if (r->addr_list) {
   10146           0 :                 ndr_print_drsuapi_DsaAddressListItem_V1(ndr, "addr_list", r->addr_list);
   10147             :         }
   10148           0 :         ndr->depth--;
   10149           0 :         ndr_print_ptr(ndr, "next", r->next);
   10150           0 :         ndr->depth++;
   10151           0 :         if (r->next) {
   10152           0 :                 ndr_print_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, "next", r->next);
   10153             :         }
   10154           0 :         ndr->depth--;
   10155           0 :         ndr_print_uint32(ndr, "is_choice_set", r->is_choice_set);
   10156           0 :         ndr_print_drsuapi_DsAddEntry_ChoiceType(ndr, "choice", r->choice);
   10157           0 :         ndr->depth--;
   10158             : }
   10159             : 
   10160           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo_Referr_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *r)
   10161             : {
   10162           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10163           0 :         if (ndr_flags & NDR_SCALARS) {
   10164           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   10165           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
   10166           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
   10167           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
   10168           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_SCALARS, &r->refer));
   10169           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   10170             :         }
   10171           0 :         if (ndr_flags & NDR_BUFFERS) {
   10172           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_BUFFERS, &r->refer));
   10173             :         }
   10174           0 :         return NDR_ERR_SUCCESS;
   10175             : }
   10176             : 
   10177           2 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo_Referr_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *r)
   10178             : {
   10179           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10180           2 :         if (ndr_flags & NDR_SCALARS) {
   10181           1 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   10182           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
   10183           1 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
   10184           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
   10185           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_SCALARS, &r->refer));
   10186           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   10187             :         }
   10188           2 :         if (ndr_flags & NDR_BUFFERS) {
   10189           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, NDR_BUFFERS, &r->refer));
   10190             :         }
   10191           0 :         return NDR_ERR_SUCCESS;
   10192             : }
   10193             : 
   10194           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfo_Referr_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *r)
   10195             : {
   10196           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntryErrorInfo_Referr_V1");
   10197           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10198           0 :         ndr->depth++;
   10199           0 :         ndr_print_uint32(ndr, "dsid", r->dsid);
   10200           0 :         ndr_print_WERROR(ndr, "extended_err", r->extended_err);
   10201           0 :         ndr_print_uint32(ndr, "extended_data", r->extended_data);
   10202           0 :         ndr_print_drsuapi_DsAddEntry_RefErrListItem_V1(ndr, "refer", &r->refer);
   10203           0 :         ndr->depth--;
   10204             : }
   10205             : 
   10206           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryErrorInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsAddEntryErrorInfo *r)
   10207             : {
   10208           0 :         uint32_t level;
   10209           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10210           0 :         if (ndr_flags & NDR_SCALARS) {
   10211             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   10212           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   10213           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   10214           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
   10215           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   10216           0 :                 switch (level) {
   10217           0 :                         case 1: {
   10218           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, NDR_SCALARS, &r->attr_err));
   10219           0 :                         break; }
   10220             : 
   10221           0 :                         case 2: {
   10222           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, NDR_SCALARS, &r->name_err));
   10223           0 :                         break; }
   10224             : 
   10225           0 :                         case 3: {
   10226           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, NDR_SCALARS, &r->referral_err));
   10227           0 :                         break; }
   10228             : 
   10229           0 :                         case 4: {
   10230           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->security_err));
   10231           0 :                         break; }
   10232             : 
   10233           0 :                         case 5: {
   10234           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->service_err));
   10235           0 :                         break; }
   10236             : 
   10237           0 :                         case 6: {
   10238           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->update_err));
   10239           0 :                         break; }
   10240             : 
   10241           0 :                         case 7: {
   10242           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->system_err));
   10243           0 :                         break; }
   10244             : 
   10245           0 :                         default:
   10246           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   10247             :                 }
   10248             :         }
   10249           0 :         if (ndr_flags & NDR_BUFFERS) {
   10250           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   10251             :                         /* We didn't get it above, and the token is not needed after this. */
   10252           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   10253             :                 }
   10254           0 :                 switch (level) {
   10255           0 :                         case 1:
   10256           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, NDR_BUFFERS, &r->attr_err));
   10257           0 :                         break;
   10258             : 
   10259           0 :                         case 2:
   10260           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, NDR_BUFFERS, &r->name_err));
   10261           0 :                         break;
   10262             : 
   10263           0 :                         case 3:
   10264           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, NDR_BUFFERS, &r->referral_err));
   10265           0 :                         break;
   10266             : 
   10267           0 :                         case 4:
   10268           0 :                         break;
   10269             : 
   10270           0 :                         case 5:
   10271           0 :                         break;
   10272             : 
   10273           0 :                         case 6:
   10274           0 :                         break;
   10275             : 
   10276           0 :                         case 7:
   10277           0 :                         break;
   10278             : 
   10279           0 :                         default:
   10280           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   10281             :                 }
   10282             :         }
   10283           0 :         return NDR_ERR_SUCCESS;
   10284             : }
   10285             : 
   10286           1 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryErrorInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsAddEntryErrorInfo *r)
   10287             : {
   10288           1 :         uint32_t level;
   10289           1 :         uint32_t _level;
   10290           1 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10291           1 :         if (ndr_flags & NDR_SCALARS) {
   10292             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   10293           1 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   10294           1 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   10295           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   10296           1 :                 if (_level != level) {
   10297           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   10298             :                 }
   10299           1 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   10300           1 :                 switch (level) {
   10301           0 :                         case 1: {
   10302           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, NDR_SCALARS, &r->attr_err));
   10303           0 :                         break; }
   10304             : 
   10305           0 :                         case 2: {
   10306           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, NDR_SCALARS, &r->name_err));
   10307           0 :                         break; }
   10308             : 
   10309           1 :                         case 3: {
   10310           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, NDR_SCALARS, &r->referral_err));
   10311           0 :                         break; }
   10312             : 
   10313           0 :                         case 4: {
   10314           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->security_err));
   10315           0 :                         break; }
   10316             : 
   10317           0 :                         case 5: {
   10318           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->service_err));
   10319           0 :                         break; }
   10320             : 
   10321           0 :                         case 6: {
   10322           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->update_err));
   10323           0 :                         break; }
   10324             : 
   10325           0 :                         case 7: {
   10326           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->system_err));
   10327           0 :                         break; }
   10328             : 
   10329           0 :                         default:
   10330           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   10331             :                 }
   10332             :         }
   10333           1 :         if (ndr_flags & NDR_BUFFERS) {
   10334           1 :                 if (!(ndr_flags & NDR_SCALARS)) {
   10335             :                         /* We didn't get it above, and the token is not needed after this. */
   10336           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   10337             :                 }
   10338           1 :                 switch (level) {
   10339           0 :                         case 1:
   10340           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, NDR_BUFFERS, &r->attr_err));
   10341           0 :                         break;
   10342             : 
   10343           0 :                         case 2:
   10344           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, NDR_BUFFERS, &r->name_err));
   10345           0 :                         break;
   10346             : 
   10347           1 :                         case 3:
   10348           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, NDR_BUFFERS, &r->referral_err));
   10349           0 :                         break;
   10350             : 
   10351           0 :                         case 4:
   10352           0 :                         break;
   10353             : 
   10354           0 :                         case 5:
   10355           0 :                         break;
   10356             : 
   10357           0 :                         case 6:
   10358           0 :                         break;
   10359             : 
   10360           0 :                         case 7:
   10361           0 :                         break;
   10362             : 
   10363           0 :                         default:
   10364           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   10365             :                 }
   10366             :         }
   10367           0 :         return NDR_ERR_SUCCESS;
   10368             : }
   10369             : 
   10370           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryErrorInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryErrorInfo *r)
   10371             : {
   10372           0 :         uint32_t level;
   10373           0 :         level = ndr_print_steal_switch_value(ndr, r);
   10374           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsAddEntryErrorInfo");
   10375           0 :         switch (level) {
   10376           0 :                 case 1:
   10377           0 :                         ndr_print_drsuapi_DsAddEntryErrorInfo_Attr_V1(ndr, "attr_err", &r->attr_err);
   10378           0 :                 break;
   10379             : 
   10380           0 :                 case 2:
   10381           0 :                         ndr_print_drsuapi_DsAddEntryErrorInfo_Name_V1(ndr, "name_err", &r->name_err);
   10382           0 :                 break;
   10383             : 
   10384           0 :                 case 3:
   10385           0 :                         ndr_print_drsuapi_DsAddEntryErrorInfo_Referr_V1(ndr, "referral_err", &r->referral_err);
   10386           0 :                 break;
   10387             : 
   10388           0 :                 case 4:
   10389           0 :                         ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr, "security_err", &r->security_err);
   10390           0 :                 break;
   10391             : 
   10392           0 :                 case 5:
   10393           0 :                         ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr, "service_err", &r->service_err);
   10394           0 :                 break;
   10395             : 
   10396           0 :                 case 6:
   10397           0 :                         ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr, "update_err", &r->update_err);
   10398           0 :                 break;
   10399             : 
   10400           0 :                 case 7:
   10401           0 :                         ndr_print_drsuapi_DsAddEntryErrorInfoX(ndr, "system_err", &r->system_err);
   10402           0 :                 break;
   10403             : 
   10404           0 :                 default:
   10405           0 :                         ndr_print_bad_level(ndr, name, level);
   10406             :         }
   10407           0 : }
   10408             : 
   10409         188 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_ErrData_V1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntry_ErrData_V1 *r)
   10410             : {
   10411         188 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10412         188 :         if (ndr_flags & NDR_SCALARS) {
   10413          94 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   10414          94 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
   10415          94 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_DirErr(ndr, NDR_SCALARS, r->dir_err));
   10416          94 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
   10417          94 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   10418             :         }
   10419         188 :         if (ndr_flags & NDR_BUFFERS) {
   10420          94 :                 if (r->info) {
   10421           0 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, r->info, r->dir_err));
   10422           0 :                         NDR_CHECK(ndr_push_drsuapi_DsAddEntryErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
   10423             :                 }
   10424             :         }
   10425         188 :         return NDR_ERR_SUCCESS;
   10426             : }
   10427             : 
   10428         194 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_ErrData_V1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntry_ErrData_V1 *r)
   10429             : {
   10430           6 :         uint32_t _ptr_info;
   10431         194 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   10432         194 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10433         194 :         if (ndr_flags & NDR_SCALARS) {
   10434          97 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   10435          97 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
   10436         100 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_DirErr(ndr, NDR_SCALARS, &r->dir_err));
   10437          97 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
   10438          97 :                 if (_ptr_info) {
   10439           1 :                         NDR_PULL_ALLOC(ndr, r->info);
   10440             :                 } else {
   10441          96 :                         r->info = NULL;
   10442             :                 }
   10443          97 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   10444             :         }
   10445         194 :         if (ndr_flags & NDR_BUFFERS) {
   10446          97 :                 if (r->info) {
   10447           1 :                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10448           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
   10449           1 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, r->info, r->dir_err));
   10450           1 :                         NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
   10451           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
   10452             :                 }
   10453             :         }
   10454         188 :         return NDR_ERR_SUCCESS;
   10455             : }
   10456             : 
   10457           2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_ErrData_V1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntry_ErrData_V1 *r)
   10458             : {
   10459           2 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntry_ErrData_V1");
   10460           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10461           2 :         ndr->depth++;
   10462           2 :         ndr_print_WERROR(ndr, "status", r->status);
   10463           2 :         ndr_print_drsuapi_DsAddEntry_DirErr(ndr, "dir_err", r->dir_err);
   10464           2 :         ndr_print_ptr(ndr, "info", r->info);
   10465           2 :         ndr->depth++;
   10466           2 :         if (r->info) {
   10467           0 :                 ndr_print_set_switch_value(ndr, r->info, r->dir_err);
   10468           0 :                 ndr_print_drsuapi_DsAddEntryErrorInfo(ndr, "info", r->info);
   10469             :         }
   10470           2 :         ndr->depth--;
   10471           2 :         ndr->depth--;
   10472             : }
   10473             : 
   10474          94 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntry_ErrData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsAddEntry_ErrData *r)
   10475             : {
   10476           0 :         uint32_t level;
   10477          94 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10478          94 :         if (ndr_flags & NDR_SCALARS) {
   10479             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   10480          94 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   10481          94 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   10482          94 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
   10483          94 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   10484          94 :                 switch (level) {
   10485          94 :                         case 1: {
   10486          94 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_ErrData_V1(ndr, NDR_SCALARS, &r->v1));
   10487          94 :                         break; }
   10488             : 
   10489           0 :                         default:
   10490           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   10491             :                 }
   10492             :         }
   10493          94 :         if (ndr_flags & NDR_BUFFERS) {
   10494          94 :                 if (!(ndr_flags & NDR_SCALARS)) {
   10495             :                         /* We didn't get it above, and the token is not needed after this. */
   10496           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   10497             :                 }
   10498          94 :                 switch (level) {
   10499          94 :                         case 1:
   10500          94 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_ErrData_V1(ndr, NDR_BUFFERS, &r->v1));
   10501          94 :                         break;
   10502             : 
   10503           0 :                         default:
   10504           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   10505             :                 }
   10506             :         }
   10507          94 :         return NDR_ERR_SUCCESS;
   10508             : }
   10509             : 
   10510          97 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntry_ErrData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsAddEntry_ErrData *r)
   10511             : {
   10512           3 :         uint32_t level;
   10513           3 :         uint32_t _level;
   10514          97 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10515          97 :         if (ndr_flags & NDR_SCALARS) {
   10516             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   10517          97 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   10518          97 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   10519          97 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   10520          97 :                 if (_level != level) {
   10521           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   10522             :                 }
   10523          97 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   10524          97 :                 switch (level) {
   10525          97 :                         case 1: {
   10526          97 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_ErrData_V1(ndr, NDR_SCALARS, &r->v1));
   10527          94 :                         break; }
   10528             : 
   10529           0 :                         default:
   10530           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   10531             :                 }
   10532             :         }
   10533          97 :         if (ndr_flags & NDR_BUFFERS) {
   10534          97 :                 if (!(ndr_flags & NDR_SCALARS)) {
   10535             :                         /* We didn't get it above, and the token is not needed after this. */
   10536           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   10537             :                 }
   10538          97 :                 switch (level) {
   10539          97 :                         case 1:
   10540          97 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_ErrData_V1(ndr, NDR_BUFFERS, &r->v1));
   10541          94 :                         break;
   10542             : 
   10543           0 :                         default:
   10544           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   10545             :                 }
   10546             :         }
   10547          94 :         return NDR_ERR_SUCCESS;
   10548             : }
   10549             : 
   10550           2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry_ErrData(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntry_ErrData *r)
   10551             : {
   10552           2 :         uint32_t level;
   10553           2 :         level = ndr_print_steal_switch_value(ndr, r);
   10554           2 :         ndr_print_union(ndr, name, level, "drsuapi_DsAddEntry_ErrData");
   10555           2 :         switch (level) {
   10556           2 :                 case 1:
   10557           2 :                         ndr_print_drsuapi_DsAddEntry_ErrData_V1(ndr, "v1", &r->v1);
   10558           2 :                 break;
   10559             : 
   10560           0 :                 default:
   10561           0 :                         ndr_print_bad_level(ndr, name, level);
   10562             :         }
   10563           2 : }
   10564             : 
   10565         188 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier2 *r)
   10566             : {
   10567         188 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10568         188 :         if (ndr_flags & NDR_SCALARS) {
   10569          94 :                 NDR_CHECK(ndr_push_align(ndr, 4));
   10570          94 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
   10571          94 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
   10572          94 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
   10573             :         }
   10574         188 :         if (ndr_flags & NDR_BUFFERS) {
   10575          94 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
   10576             :         }
   10577         188 :         return NDR_ERR_SUCCESS;
   10578             : }
   10579             : 
   10580         192 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjectIdentifier2 *r)
   10581             : {
   10582         192 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10583         192 :         if (ndr_flags & NDR_SCALARS) {
   10584          96 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
   10585          96 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
   10586          96 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
   10587          96 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
   10588             :         }
   10589         192 :         if (ndr_flags & NDR_BUFFERS) {
   10590          96 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
   10591             :         }
   10592         188 :         return NDR_ERR_SUCCESS;
   10593             : }
   10594             : 
   10595           2 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier2 *r)
   10596             : {
   10597           2 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier2");
   10598           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10599           2 :         ndr->depth++;
   10600           2 :         ndr_print_GUID(ndr, "guid", &r->guid);
   10601           2 :         ndr_print_dom_sid28(ndr, "sid", &r->sid);
   10602           2 :         ndr->depth--;
   10603             : }
   10604             : 
   10605           0 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryCtr2 *r)
   10606             : {
   10607           0 :         uint32_t cntr_objects_1;
   10608           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10609           0 :         if (ndr_flags & NDR_SCALARS) {
   10610           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   10611           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
   10612           0 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntry_DirErr(ndr, NDR_SCALARS, r->dir_err));
   10613           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dsid));
   10614           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->extended_err));
   10615           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->extended_data));
   10616           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->problem));
   10617           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   10618           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->objects));
   10619           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   10620             :         }
   10621           0 :         if (ndr_flags & NDR_BUFFERS) {
   10622           0 :                 if (r->id) {
   10623           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
   10624             :                 }
   10625           0 :                 if (r->objects) {
   10626           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   10627           0 :                         for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
   10628           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_SCALARS, &r->objects[cntr_objects_1]));
   10629             :                         }
   10630           0 :                         for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
   10631           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_BUFFERS, &r->objects[cntr_objects_1]));
   10632             :                         }
   10633             :                 }
   10634             :         }
   10635           0 :         return NDR_ERR_SUCCESS;
   10636             : }
   10637             : 
   10638           0 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryCtr2 *r)
   10639             : {
   10640           0 :         uint32_t _ptr_id;
   10641           0 :         TALLOC_CTX *_mem_save_id_0 = NULL;
   10642           0 :         uint32_t _ptr_objects;
   10643           0 :         uint32_t size_objects_1 = 0;
   10644           0 :         uint32_t cntr_objects_1;
   10645           0 :         TALLOC_CTX *_mem_save_objects_0 = NULL;
   10646           0 :         TALLOC_CTX *_mem_save_objects_1 = NULL;
   10647           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10648           0 :         if (ndr_flags & NDR_SCALARS) {
   10649           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   10650           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
   10651           0 :                 if (_ptr_id) {
   10652           0 :                         NDR_PULL_ALLOC(ndr, r->id);
   10653             :                 } else {
   10654           0 :                         r->id = NULL;
   10655             :                 }
   10656           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_DirErr(ndr, NDR_SCALARS, &r->dir_err));
   10657           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dsid));
   10658           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->extended_err));
   10659           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->extended_data));
   10660           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->problem));
   10661           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   10662           0 :                 if (r->count > 10000) {
   10663           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
   10664             :                 }
   10665           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objects));
   10666           0 :                 if (_ptr_objects) {
   10667           0 :                         NDR_PULL_ALLOC(ndr, r->objects);
   10668             :                 } else {
   10669           0 :                         r->objects = NULL;
   10670             :                 }
   10671           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   10672             :         }
   10673           0 :         if (ndr_flags & NDR_BUFFERS) {
   10674           0 :                 if (r->id) {
   10675           0 :                         _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10676           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
   10677           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
   10678           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
   10679             :                 }
   10680           0 :                 if (r->objects) {
   10681           0 :                         _mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10682           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
   10683           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->objects));
   10684           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->objects, &size_objects_1));
   10685           0 :                         NDR_PULL_ALLOC_N(ndr, r->objects, size_objects_1);
   10686           0 :                         _mem_save_objects_1 = NDR_PULL_GET_MEM_CTX(ndr);
   10687           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
   10688           0 :                         for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
   10689           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_SCALARS, &r->objects[cntr_objects_1]));
   10690             :                         }
   10691           0 :                         for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
   10692           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_BUFFERS, &r->objects[cntr_objects_1]));
   10693             :                         }
   10694           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_1, 0);
   10695           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0);
   10696             :                 }
   10697           0 :                 if (r->objects) {
   10698           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->objects, r->count));
   10699             :                 }
   10700           0 :                 for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
   10701           0 :                 }
   10702             :         }
   10703           0 :         return NDR_ERR_SUCCESS;
   10704             : }
   10705             : 
   10706           0 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryCtr2 *r)
   10707             : {
   10708           0 :         uint32_t cntr_objects_1;
   10709           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntryCtr2");
   10710           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10711           0 :         ndr->depth++;
   10712           0 :         ndr_print_ptr(ndr, "id", r->id);
   10713           0 :         ndr->depth++;
   10714           0 :         if (r->id) {
   10715           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id", r->id);
   10716             :         }
   10717           0 :         ndr->depth--;
   10718           0 :         ndr_print_drsuapi_DsAddEntry_DirErr(ndr, "dir_err", r->dir_err);
   10719           0 :         ndr_print_uint32(ndr, "dsid", r->dsid);
   10720           0 :         ndr_print_WERROR(ndr, "extended_err", r->extended_err);
   10721           0 :         ndr_print_uint32(ndr, "extended_data", r->extended_data);
   10722           0 :         ndr_print_uint16(ndr, "problem", r->problem);
   10723           0 :         ndr_print_uint32(ndr, "count", r->count);
   10724           0 :         ndr_print_ptr(ndr, "objects", r->objects);
   10725           0 :         ndr->depth++;
   10726           0 :         if (r->objects) {
   10727           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "objects", (uint32_t)(r->count));
   10728           0 :                 ndr->depth++;
   10729           0 :                 for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
   10730           0 :                         ndr_print_drsuapi_DsReplicaObjectIdentifier2(ndr, "objects", &r->objects[cntr_objects_1]);
   10731             :                 }
   10732           0 :                 ndr->depth--;
   10733             :         }
   10734           0 :         ndr->depth--;
   10735           0 :         ndr->depth--;
   10736             : }
   10737             : 
   10738         188 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsAddEntryCtr3 *r)
   10739             : {
   10740           0 :         uint32_t cntr_objects_1;
   10741         188 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10742         188 :         if (ndr_flags & NDR_SCALARS) {
   10743          94 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   10744          94 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->id));
   10745          94 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->err_ver));
   10746          94 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->err_data));
   10747          94 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   10748          94 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->objects));
   10749          94 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   10750             :         }
   10751         188 :         if (ndr_flags & NDR_BUFFERS) {
   10752          94 :                 if (r->id) {
   10753           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
   10754             :                 }
   10755          94 :                 if (r->err_data) {
   10756          94 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, r->err_data, r->err_ver));
   10757          94 :                         NDR_CHECK(ndr_push_drsuapi_DsAddEntry_ErrData(ndr, NDR_SCALARS|NDR_BUFFERS, r->err_data));
   10758             :                 }
   10759          94 :                 if (r->objects) {
   10760          94 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   10761         188 :                         for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
   10762          94 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_SCALARS, &r->objects[cntr_objects_1]));
   10763             :                         }
   10764         188 :                         for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
   10765          94 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_BUFFERS, &r->objects[cntr_objects_1]));
   10766             :                         }
   10767             :                 }
   10768             :         }
   10769         188 :         return NDR_ERR_SUCCESS;
   10770             : }
   10771             : 
   10772         194 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsAddEntryCtr3 *r)
   10773             : {
   10774           6 :         uint32_t _ptr_id;
   10775         194 :         TALLOC_CTX *_mem_save_id_0 = NULL;
   10776           6 :         uint32_t _ptr_err_data;
   10777         194 :         TALLOC_CTX *_mem_save_err_data_0 = NULL;
   10778           6 :         uint32_t _ptr_objects;
   10779         194 :         uint32_t size_objects_1 = 0;
   10780           6 :         uint32_t cntr_objects_1;
   10781         194 :         TALLOC_CTX *_mem_save_objects_0 = NULL;
   10782         194 :         TALLOC_CTX *_mem_save_objects_1 = NULL;
   10783         194 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10784         194 :         if (ndr_flags & NDR_SCALARS) {
   10785          97 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   10786          97 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_id));
   10787          97 :                 if (_ptr_id) {
   10788           0 :                         NDR_PULL_ALLOC(ndr, r->id);
   10789             :                 } else {
   10790          97 :                         r->id = NULL;
   10791             :                 }
   10792          97 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->err_ver));
   10793          97 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_err_data));
   10794          97 :                 if (_ptr_err_data) {
   10795          97 :                         NDR_PULL_ALLOC(ndr, r->err_data);
   10796             :                 } else {
   10797           0 :                         r->err_data = NULL;
   10798             :                 }
   10799          97 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   10800          97 :                 if (r->count > 10000) {
   10801           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
   10802             :                 }
   10803          97 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objects));
   10804          97 :                 if (_ptr_objects) {
   10805          97 :                         NDR_PULL_ALLOC(ndr, r->objects);
   10806             :                 } else {
   10807           0 :                         r->objects = NULL;
   10808             :                 }
   10809          97 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   10810             :         }
   10811         194 :         if (ndr_flags & NDR_BUFFERS) {
   10812          97 :                 if (r->id) {
   10813           0 :                         _mem_save_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10814           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->id, 0);
   10815           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->id));
   10816           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_id_0, 0);
   10817             :                 }
   10818          97 :                 if (r->err_data) {
   10819          97 :                         _mem_save_err_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10820          97 :                         NDR_PULL_SET_MEM_CTX(ndr, r->err_data, 0);
   10821          97 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, r->err_data, r->err_ver));
   10822          97 :                         NDR_CHECK(ndr_pull_drsuapi_DsAddEntry_ErrData(ndr, NDR_SCALARS|NDR_BUFFERS, r->err_data));
   10823          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_err_data_0, 0);
   10824             :                 }
   10825          96 :                 if (r->objects) {
   10826          96 :                         _mem_save_objects_0 = NDR_PULL_GET_MEM_CTX(ndr);
   10827          96 :                         NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
   10828          96 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->objects));
   10829          96 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->objects, &size_objects_1));
   10830          96 :                         NDR_PULL_ALLOC_N(ndr, r->objects, size_objects_1);
   10831          96 :                         _mem_save_objects_1 = NDR_PULL_GET_MEM_CTX(ndr);
   10832          96 :                         NDR_PULL_SET_MEM_CTX(ndr, r->objects, 0);
   10833         192 :                         for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
   10834          96 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_SCALARS, &r->objects[cntr_objects_1]));
   10835             :                         }
   10836         192 :                         for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
   10837          96 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier2(ndr, NDR_BUFFERS, &r->objects[cntr_objects_1]));
   10838             :                         }
   10839          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_1, 0);
   10840          96 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objects_0, 0);
   10841             :                 }
   10842          96 :                 if (r->objects) {
   10843          96 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->objects, r->count));
   10844             :                 }
   10845         192 :                 for (cntr_objects_1 = 0; cntr_objects_1 < (size_objects_1); cntr_objects_1++) {
   10846           2 :                 }
   10847             :         }
   10848         188 :         return NDR_ERR_SUCCESS;
   10849             : }
   10850             : 
   10851           2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryCtr3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAddEntryCtr3 *r)
   10852             : {
   10853           2 :         uint32_t cntr_objects_1;
   10854           2 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntryCtr3");
   10855           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
   10856           2 :         ndr->depth++;
   10857           2 :         ndr_print_ptr(ndr, "id", r->id);
   10858           2 :         ndr->depth++;
   10859           2 :         if (r->id) {
   10860           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "id", r->id);
   10861             :         }
   10862           2 :         ndr->depth--;
   10863           2 :         ndr_print_uint32(ndr, "err_ver", r->err_ver);
   10864           2 :         ndr_print_ptr(ndr, "err_data", r->err_data);
   10865           2 :         ndr->depth++;
   10866           2 :         if (r->err_data) {
   10867           2 :                 ndr_print_set_switch_value(ndr, r->err_data, r->err_ver);
   10868           2 :                 ndr_print_drsuapi_DsAddEntry_ErrData(ndr, "err_data", r->err_data);
   10869             :         }
   10870           2 :         ndr->depth--;
   10871           2 :         ndr_print_uint32(ndr, "count", r->count);
   10872           2 :         ndr_print_ptr(ndr, "objects", r->objects);
   10873           2 :         ndr->depth++;
   10874           2 :         if (r->objects) {
   10875           2 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "objects", (uint32_t)(r->count));
   10876           2 :                 ndr->depth++;
   10877           4 :                 for (cntr_objects_1 = 0; cntr_objects_1 < (r->count); cntr_objects_1++) {
   10878           2 :                         ndr_print_drsuapi_DsReplicaObjectIdentifier2(ndr, "objects", &r->objects[cntr_objects_1]);
   10879             :                 }
   10880           2 :                 ndr->depth--;
   10881             :         }
   10882           2 :         ndr->depth--;
   10883           2 :         ndr->depth--;
   10884             : }
   10885             : 
   10886          94 : static enum ndr_err_code ndr_push_drsuapi_DsAddEntryCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsAddEntryCtr *r)
   10887             : {
   10888           0 :         uint32_t level;
   10889          94 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   10890          94 :         if (ndr_flags & NDR_SCALARS) {
   10891             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   10892          94 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   10893          94 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   10894          94 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
   10895          94 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   10896          94 :                 switch (level) {
   10897           0 :                         case 2: {
   10898           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr, NDR_SCALARS, &r->ctr2));
   10899           0 :                         break; }
   10900             : 
   10901          94 :                         case 3: {
   10902          94 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr3(ndr, NDR_SCALARS, &r->ctr3));
   10903          94 :                         break; }
   10904             : 
   10905           0 :                         default:
   10906           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   10907             :                 }
   10908             :         }
   10909          94 :         if (ndr_flags & NDR_BUFFERS) {
   10910          94 :                 if (!(ndr_flags & NDR_SCALARS)) {
   10911             :                         /* We didn't get it above, and the token is not needed after this. */
   10912           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   10913             :                 }
   10914          94 :                 switch (level) {
   10915           0 :                         case 2:
   10916           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr2(ndr, NDR_BUFFERS, &r->ctr2));
   10917           0 :                         break;
   10918             : 
   10919          94 :                         case 3:
   10920          94 :                                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr3(ndr, NDR_BUFFERS, &r->ctr3));
   10921          94 :                         break;
   10922             : 
   10923           0 :                         default:
   10924           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   10925             :                 }
   10926             :         }
   10927          94 :         return NDR_ERR_SUCCESS;
   10928             : }
   10929             : 
   10930          97 : static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsAddEntryCtr *r)
   10931             : {
   10932           3 :         uint32_t level;
   10933           3 :         uint32_t _level;
   10934          97 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   10935          97 :         if (ndr_flags & NDR_SCALARS) {
   10936             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   10937          97 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   10938          97 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   10939          97 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   10940          97 :                 if (_level != level) {
   10941           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   10942             :                 }
   10943          97 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   10944          97 :                 switch (level) {
   10945           0 :                         case 2: {
   10946           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr, NDR_SCALARS, &r->ctr2));
   10947           0 :                         break; }
   10948             : 
   10949          97 :                         case 3: {
   10950          97 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr3(ndr, NDR_SCALARS, &r->ctr3));
   10951          94 :                         break; }
   10952             : 
   10953           0 :                         default:
   10954           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   10955             :                 }
   10956             :         }
   10957          97 :         if (ndr_flags & NDR_BUFFERS) {
   10958          97 :                 if (!(ndr_flags & NDR_SCALARS)) {
   10959             :                         /* We didn't get it above, and the token is not needed after this. */
   10960           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   10961             :                 }
   10962          97 :                 switch (level) {
   10963           0 :                         case 2:
   10964           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr2(ndr, NDR_BUFFERS, &r->ctr2));
   10965           0 :                         break;
   10966             : 
   10967          97 :                         case 3:
   10968          97 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr3(ndr, NDR_BUFFERS, &r->ctr3));
   10969          94 :                         break;
   10970             : 
   10971           0 :                         default:
   10972           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   10973             :                 }
   10974             :         }
   10975          94 :         return NDR_ERR_SUCCESS;
   10976             : }
   10977             : 
   10978           2 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntryCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsAddEntryCtr *r)
   10979             : {
   10980           2 :         uint32_t level;
   10981           2 :         level = ndr_print_steal_switch_value(ndr, r);
   10982           2 :         ndr_print_union(ndr, name, level, "drsuapi_DsAddEntryCtr");
   10983           2 :         switch (level) {
   10984           0 :                 case 2:
   10985           0 :                         ndr_print_drsuapi_DsAddEntryCtr2(ndr, "ctr2", &r->ctr2);
   10986           0 :                 break;
   10987             : 
   10988           2 :                 case 3:
   10989           2 :                         ndr_print_drsuapi_DsAddEntryCtr3(ndr, "ctr3", &r->ctr3);
   10990           2 :                 break;
   10991             : 
   10992           0 :                 default:
   10993           0 :                         ndr_print_bad_level(ndr, name, level);
   10994             :         }
   10995           2 : }
   10996             : 
   10997           4 : static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCCFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
   10998             : {
   10999           4 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
   11000           4 :         return NDR_ERR_SUCCESS;
   11001             : }
   11002             : 
   11003           4 : static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCCFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
   11004             : {
   11005           0 :         uint32_t v;
   11006           4 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
   11007           4 :         *r = v;
   11008           4 :         return NDR_ERR_SUCCESS;
   11009             : }
   11010             : 
   11011           0 : _PUBLIC_ void ndr_print_drsuapi_DsExecuteKCCFlags(struct ndr_print *ndr, const char *name, uint32_t r)
   11012             : {
   11013           0 :         ndr_print_uint32(ndr, name, r);
   11014           0 :         ndr->depth++;
   11015           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION", DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION, r);
   11016           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_EXECUTE_KCC_DAMPED", DRSUAPI_DS_EXECUTE_KCC_DAMPED, r);
   11017           0 :         ndr->depth--;
   11018           0 : }
   11019             : 
   11020           4 : static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCC1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsExecuteKCC1 *r)
   11021             : {
   11022           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11023           4 :         if (ndr_flags & NDR_SCALARS) {
   11024           4 :                 NDR_CHECK(ndr_push_align(ndr, 4));
   11025           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->taskID));
   11026           4 :                 NDR_CHECK(ndr_push_drsuapi_DsExecuteKCCFlags(ndr, NDR_SCALARS, r->flags));
   11027           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
   11028             :         }
   11029           4 :         if (ndr_flags & NDR_BUFFERS) {
   11030           0 :         }
   11031           4 :         return NDR_ERR_SUCCESS;
   11032             : }
   11033             : 
   11034           4 : static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCC1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsExecuteKCC1 *r)
   11035             : {
   11036           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11037           4 :         if (ndr_flags & NDR_SCALARS) {
   11038           4 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
   11039           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->taskID));
   11040           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCCFlags(ndr, NDR_SCALARS, &r->flags));
   11041           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
   11042             :         }
   11043           4 :         if (ndr_flags & NDR_BUFFERS) {
   11044           0 :         }
   11045           4 :         return NDR_ERR_SUCCESS;
   11046             : }
   11047             : 
   11048           0 : _PUBLIC_ void ndr_print_drsuapi_DsExecuteKCC1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsExecuteKCC1 *r)
   11049             : {
   11050           0 :         ndr_print_struct(ndr, name, "drsuapi_DsExecuteKCC1");
   11051           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11052           0 :         ndr->depth++;
   11053           0 :         ndr_print_uint32(ndr, "taskID", r->taskID);
   11054           0 :         ndr_print_drsuapi_DsExecuteKCCFlags(ndr, "flags", r->flags);
   11055           0 :         ndr->depth--;
   11056             : }
   11057             : 
   11058           4 : static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCCRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsExecuteKCCRequest *r)
   11059             : {
   11060           0 :         uint32_t level;
   11061           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11062           4 :         if (ndr_flags & NDR_SCALARS) {
   11063             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   11064           4 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   11065           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
   11066           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
   11067           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
   11068           4 :                 switch (level) {
   11069           4 :                         case 1: {
   11070           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsExecuteKCC1(ndr, NDR_SCALARS, &r->ctr1));
   11071           4 :                         break; }
   11072             : 
   11073           0 :                         default:
   11074           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   11075             :                 }
   11076             :         }
   11077           4 :         if (ndr_flags & NDR_BUFFERS) {
   11078           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   11079             :                         /* We didn't get it above, and the token is not needed after this. */
   11080           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   11081             :                 }
   11082           0 :                 switch (level) {
   11083           0 :                         case 1:
   11084           0 :                         break;
   11085             : 
   11086           0 :                         default:
   11087           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   11088             :                 }
   11089             :         }
   11090           4 :         return NDR_ERR_SUCCESS;
   11091             : }
   11092             : 
   11093           4 : static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCCRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsExecuteKCCRequest *r)
   11094             : {
   11095           0 :         uint32_t level;
   11096           0 :         uint32_t _level;
   11097           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11098           4 :         if (ndr_flags & NDR_SCALARS) {
   11099             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   11100           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   11101           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
   11102           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   11103           4 :                 if (_level != level) {
   11104           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   11105             :                 }
   11106           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
   11107           4 :                 switch (level) {
   11108           4 :                         case 1: {
   11109           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCC1(ndr, NDR_SCALARS, &r->ctr1));
   11110           4 :                         break; }
   11111             : 
   11112           0 :                         default:
   11113           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   11114             :                 }
   11115             :         }
   11116           4 :         if (ndr_flags & NDR_BUFFERS) {
   11117           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   11118             :                         /* We didn't get it above, and the token is not needed after this. */
   11119           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   11120             :                 }
   11121           0 :                 switch (level) {
   11122           0 :                         case 1:
   11123           0 :                         break;
   11124             : 
   11125           0 :                         default:
   11126           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   11127             :                 }
   11128             :         }
   11129           4 :         return NDR_ERR_SUCCESS;
   11130             : }
   11131             : 
   11132           0 : _PUBLIC_ void ndr_print_drsuapi_DsExecuteKCCRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsExecuteKCCRequest *r)
   11133             : {
   11134           0 :         uint32_t level;
   11135           0 :         level = ndr_print_steal_switch_value(ndr, r);
   11136           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsExecuteKCCRequest");
   11137           0 :         switch (level) {
   11138           0 :                 case 1:
   11139           0 :                         ndr_print_drsuapi_DsExecuteKCC1(ndr, "ctr1", &r->ctr1);
   11140           0 :                 break;
   11141             : 
   11142           0 :                 default:
   11143           0 :                         ndr_print_bad_level(ndr, name, level);
   11144             :         }
   11145           0 : }
   11146             : 
   11147          40 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoLevel(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaGetInfoLevel r)
   11148             : {
   11149          40 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
   11150          40 :         return NDR_ERR_SUCCESS;
   11151             : }
   11152             : 
   11153          20 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoLevel(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaGetInfoLevel *r)
   11154             : {
   11155           0 :         uint32_t v;
   11156          20 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
   11157          20 :         *r = v;
   11158          20 :         return NDR_ERR_SUCCESS;
   11159             : }
   11160             : 
   11161           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfoLevel(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaGetInfoLevel r)
   11162             : {
   11163           0 :         const char *val = NULL;
   11164             : 
   11165           0 :         switch (r) {
   11166           0 :                 case DRSUAPI_DS_REPLICA_GET_INFO: val = "DRSUAPI_DS_REPLICA_GET_INFO"; break;
   11167           0 :                 case DRSUAPI_DS_REPLICA_GET_INFO2: val = "DRSUAPI_DS_REPLICA_GET_INFO2"; break;
   11168             :         }
   11169           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
   11170           0 : }
   11171             : 
   11172          60 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaInfoType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaInfoType r)
   11173             : {
   11174          60 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
   11175          60 :         return NDR_ERR_SUCCESS;
   11176             : }
   11177             : 
   11178          40 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaInfoType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaInfoType *r)
   11179             : {
   11180           0 :         uint32_t v;
   11181          40 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
   11182          40 :         *r = v;
   11183          40 :         return NDR_ERR_SUCCESS;
   11184             : }
   11185             : 
   11186           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaInfoType(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaInfoType r)
   11187             : {
   11188           0 :         const char *val = NULL;
   11189             : 
   11190           0 :         switch (r) {
   11191           0 :                 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS: val = "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS"; break;
   11192           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS: val = "DRSUAPI_DS_REPLICA_INFO_CURSORS"; break;
   11193           0 :                 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA: val = "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA"; break;
   11194           0 :                 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES: val = "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES"; break;
   11195           0 :                 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES: val = "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES"; break;
   11196           0 :                 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS: val = "DRSUAPI_DS_REPLICA_INFO_PENDING_OPS"; break;
   11197           0 :                 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA: val = "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA"; break;
   11198           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS2: val = "DRSUAPI_DS_REPLICA_INFO_CURSORS2"; break;
   11199           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS3: val = "DRSUAPI_DS_REPLICA_INFO_CURSORS3"; break;
   11200           0 :                 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2: val = "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2"; break;
   11201           0 :                 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2: val = "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2"; break;
   11202           0 :                 case DRSUAPI_DS_REPLICA_INFO_REPSTO: val = "DRSUAPI_DS_REPLICA_INFO_REPSTO"; break;
   11203           0 :                 case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS: val = "DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS"; break;
   11204           0 :                 case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1: val = "DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1"; break;
   11205           0 :                 case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS: val = "DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS"; break;
   11206             :         }
   11207           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
   11208           0 : }
   11209             : 
   11210          40 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaGetInfoRequest1 *r)
   11211             : {
   11212          40 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11213          40 :         if (ndr_flags & NDR_SCALARS) {
   11214          20 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   11215          20 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, r->info_type));
   11216          20 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
   11217          20 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
   11218          20 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   11219             :         }
   11220          40 :         if (ndr_flags & NDR_BUFFERS) {
   11221          20 :                 if (r->object_dn) {
   11222           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
   11223           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11224           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
   11225           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11226             :                 }
   11227             :         }
   11228          40 :         return NDR_ERR_SUCCESS;
   11229             : }
   11230             : 
   11231          40 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaGetInfoRequest1 *r)
   11232             : {
   11233           0 :         uint32_t _ptr_object_dn;
   11234          40 :         uint32_t size_object_dn_1 = 0;
   11235          40 :         uint32_t length_object_dn_1 = 0;
   11236          40 :         TALLOC_CTX *_mem_save_object_dn_0 = NULL;
   11237          40 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11238          40 :         if (ndr_flags & NDR_SCALARS) {
   11239          20 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   11240          20 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, &r->info_type));
   11241          20 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
   11242          20 :                 if (_ptr_object_dn) {
   11243           0 :                         NDR_PULL_ALLOC(ndr, r->object_dn);
   11244             :                 } else {
   11245          20 :                         r->object_dn = NULL;
   11246             :                 }
   11247          20 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
   11248          20 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   11249             :         }
   11250          40 :         if (ndr_flags & NDR_BUFFERS) {
   11251          20 :                 if (r->object_dn) {
   11252           0 :                         _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11253           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
   11254           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
   11255           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
   11256           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
   11257           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
   11258           0 :                         if (length_object_dn_1 > size_object_dn_1) {
   11259           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
   11260             :                         }
   11261           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
   11262           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
   11263           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
   11264             :                 }
   11265             :         }
   11266          40 :         return NDR_ERR_SUCCESS;
   11267             : }
   11268             : 
   11269           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfoRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaGetInfoRequest1 *r)
   11270             : {
   11271           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaGetInfoRequest1");
   11272           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11273           0 :         ndr->depth++;
   11274           0 :         ndr_print_drsuapi_DsReplicaInfoType(ndr, "info_type", r->info_type);
   11275           0 :         ndr_print_ptr(ndr, "object_dn", r->object_dn);
   11276           0 :         ndr->depth++;
   11277           0 :         if (r->object_dn) {
   11278           0 :                 ndr_print_string(ndr, "object_dn", r->object_dn);
   11279             :         }
   11280           0 :         ndr->depth--;
   11281           0 :         ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
   11282           0 :         ndr->depth--;
   11283             : }
   11284             : 
   11285           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaGetInfoRequest2 *r)
   11286             : {
   11287           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11288           0 :         if (ndr_flags & NDR_SCALARS) {
   11289           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   11290           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, r->info_type));
   11291           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
   11292           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
   11293           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
   11294           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
   11295           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->value_dn_str));
   11296           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
   11297           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   11298             :         }
   11299           0 :         if (ndr_flags & NDR_BUFFERS) {
   11300           0 :                 if (r->object_dn) {
   11301           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
   11302           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11303           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
   11304           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11305             :                 }
   11306           0 :                 if (r->attribute_name) {
   11307           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   11308           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11309           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   11310           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11311             :                 }
   11312           0 :                 if (r->value_dn_str) {
   11313           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->value_dn_str, CH_UTF16)));
   11314           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11315           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->value_dn_str, CH_UTF16)));
   11316           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->value_dn_str, ndr_charset_length(r->value_dn_str, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11317             :                 }
   11318             :         }
   11319           0 :         return NDR_ERR_SUCCESS;
   11320             : }
   11321             : 
   11322           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaGetInfoRequest2 *r)
   11323             : {
   11324           0 :         uint32_t _ptr_object_dn;
   11325           0 :         uint32_t size_object_dn_1 = 0;
   11326           0 :         uint32_t length_object_dn_1 = 0;
   11327           0 :         TALLOC_CTX *_mem_save_object_dn_0 = NULL;
   11328           0 :         uint32_t _ptr_attribute_name;
   11329           0 :         uint32_t size_attribute_name_1 = 0;
   11330           0 :         uint32_t length_attribute_name_1 = 0;
   11331           0 :         TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
   11332           0 :         uint32_t _ptr_value_dn_str;
   11333           0 :         uint32_t size_value_dn_str_1 = 0;
   11334           0 :         uint32_t length_value_dn_str_1 = 0;
   11335           0 :         TALLOC_CTX *_mem_save_value_dn_str_0 = NULL;
   11336           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11337           0 :         if (ndr_flags & NDR_SCALARS) {
   11338           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   11339           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, &r->info_type));
   11340           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
   11341           0 :                 if (_ptr_object_dn) {
   11342           0 :                         NDR_PULL_ALLOC(ndr, r->object_dn);
   11343             :                 } else {
   11344           0 :                         r->object_dn = NULL;
   11345             :                 }
   11346           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
   11347           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
   11348           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
   11349           0 :                 if (_ptr_attribute_name) {
   11350           0 :                         NDR_PULL_ALLOC(ndr, r->attribute_name);
   11351             :                 } else {
   11352           0 :                         r->attribute_name = NULL;
   11353             :                 }
   11354           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_dn_str));
   11355           0 :                 if (_ptr_value_dn_str) {
   11356           0 :                         NDR_PULL_ALLOC(ndr, r->value_dn_str);
   11357             :                 } else {
   11358           0 :                         r->value_dn_str = NULL;
   11359             :                 }
   11360           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
   11361           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   11362             :         }
   11363           0 :         if (ndr_flags & NDR_BUFFERS) {
   11364           0 :                 if (r->object_dn) {
   11365           0 :                         _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11366           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
   11367           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
   11368           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
   11369           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
   11370           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
   11371           0 :                         if (length_object_dn_1 > size_object_dn_1) {
   11372           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
   11373             :                         }
   11374           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
   11375           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
   11376           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
   11377             :                 }
   11378           0 :                 if (r->attribute_name) {
   11379           0 :                         _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11380           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
   11381           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
   11382           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
   11383           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
   11384           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
   11385           0 :                         if (length_attribute_name_1 > size_attribute_name_1) {
   11386           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
   11387             :                         }
   11388           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
   11389           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
   11390           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
   11391             :                 }
   11392           0 :                 if (r->value_dn_str) {
   11393           0 :                         _mem_save_value_dn_str_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11394           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->value_dn_str, 0);
   11395           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->value_dn_str));
   11396           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->value_dn_str));
   11397           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->value_dn_str, &size_value_dn_str_1));
   11398           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->value_dn_str, &length_value_dn_str_1));
   11399           0 :                         if (length_value_dn_str_1 > size_value_dn_str_1) {
   11400           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_dn_str_1, length_value_dn_str_1);
   11401             :                         }
   11402           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_value_dn_str_1, sizeof(uint16_t)));
   11403           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->value_dn_str, length_value_dn_str_1, sizeof(uint16_t), CH_UTF16));
   11404           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_dn_str_0, 0);
   11405             :                 }
   11406             :         }
   11407           0 :         return NDR_ERR_SUCCESS;
   11408             : }
   11409             : 
   11410           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfoRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaGetInfoRequest2 *r)
   11411             : {
   11412           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaGetInfoRequest2");
   11413           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11414           0 :         ndr->depth++;
   11415           0 :         ndr_print_drsuapi_DsReplicaInfoType(ndr, "info_type", r->info_type);
   11416           0 :         ndr_print_ptr(ndr, "object_dn", r->object_dn);
   11417           0 :         ndr->depth++;
   11418           0 :         if (r->object_dn) {
   11419           0 :                 ndr_print_string(ndr, "object_dn", r->object_dn);
   11420             :         }
   11421           0 :         ndr->depth--;
   11422           0 :         ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
   11423           0 :         ndr_print_uint32(ndr, "flags", r->flags);
   11424           0 :         ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
   11425           0 :         ndr->depth++;
   11426           0 :         if (r->attribute_name) {
   11427           0 :                 ndr_print_string(ndr, "attribute_name", r->attribute_name);
   11428             :         }
   11429           0 :         ndr->depth--;
   11430           0 :         ndr_print_ptr(ndr, "value_dn_str", r->value_dn_str);
   11431           0 :         ndr->depth++;
   11432           0 :         if (r->value_dn_str) {
   11433           0 :                 ndr_print_string(ndr, "value_dn_str", r->value_dn_str);
   11434             :         }
   11435           0 :         ndr->depth--;
   11436           0 :         ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
   11437           0 :         ndr->depth--;
   11438             : }
   11439             : 
   11440          20 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfoRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaGetInfoRequest *r)
   11441             : {
   11442           0 :         uint32_t level;
   11443          20 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11444          20 :         if (ndr_flags & NDR_SCALARS) {
   11445             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   11446          20 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   11447          20 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   11448          20 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr, NDR_SCALARS, level));
   11449          20 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   11450          20 :                 switch (level) {
   11451          20 :                         case DRSUAPI_DS_REPLICA_GET_INFO: {
   11452          20 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_SCALARS, &r->req1));
   11453          20 :                         break; }
   11454             : 
   11455           0 :                         case DRSUAPI_DS_REPLICA_GET_INFO2: {
   11456           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest2(ndr, NDR_SCALARS, &r->req2));
   11457           0 :                         break; }
   11458             : 
   11459           0 :                         default:
   11460           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   11461             :                 }
   11462             :         }
   11463          20 :         if (ndr_flags & NDR_BUFFERS) {
   11464          20 :                 if (!(ndr_flags & NDR_SCALARS)) {
   11465             :                         /* We didn't get it above, and the token is not needed after this. */
   11466           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   11467             :                 }
   11468          20 :                 switch (level) {
   11469          20 :                         case DRSUAPI_DS_REPLICA_GET_INFO:
   11470          20 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
   11471          20 :                         break;
   11472             : 
   11473           0 :                         case DRSUAPI_DS_REPLICA_GET_INFO2:
   11474           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest2(ndr, NDR_BUFFERS, &r->req2));
   11475           0 :                         break;
   11476             : 
   11477           0 :                         default:
   11478           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   11479             :                 }
   11480             :         }
   11481          20 :         return NDR_ERR_SUCCESS;
   11482             : }
   11483             : 
   11484          20 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfoRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaGetInfoRequest *r)
   11485             : {
   11486           0 :         uint32_t level;
   11487           0 :         uint32_t _level;
   11488          20 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11489          20 :         if (ndr_flags & NDR_SCALARS) {
   11490             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   11491          20 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   11492          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   11493          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   11494          20 :                 if (_level != level) {
   11495           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   11496             :                 }
   11497          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   11498          20 :                 switch (level) {
   11499          20 :                         case DRSUAPI_DS_REPLICA_GET_INFO: {
   11500          20 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_SCALARS, &r->req1));
   11501          20 :                         break; }
   11502             : 
   11503           0 :                         case DRSUAPI_DS_REPLICA_GET_INFO2: {
   11504           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest2(ndr, NDR_SCALARS, &r->req2));
   11505           0 :                         break; }
   11506             : 
   11507           0 :                         default:
   11508           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   11509             :                 }
   11510             :         }
   11511          20 :         if (ndr_flags & NDR_BUFFERS) {
   11512          20 :                 if (!(ndr_flags & NDR_SCALARS)) {
   11513             :                         /* We didn't get it above, and the token is not needed after this. */
   11514           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   11515             :                 }
   11516          20 :                 switch (level) {
   11517          20 :                         case DRSUAPI_DS_REPLICA_GET_INFO:
   11518          20 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
   11519          20 :                         break;
   11520             : 
   11521           0 :                         case DRSUAPI_DS_REPLICA_GET_INFO2:
   11522           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest2(ndr, NDR_BUFFERS, &r->req2));
   11523           0 :                         break;
   11524             : 
   11525           0 :                         default:
   11526           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   11527             :                 }
   11528             :         }
   11529          20 :         return NDR_ERR_SUCCESS;
   11530             : }
   11531             : 
   11532           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfoRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaGetInfoRequest *r)
   11533             : {
   11534           0 :         uint32_t level;
   11535           0 :         level = ndr_print_steal_switch_value(ndr, r);
   11536           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaGetInfoRequest");
   11537           0 :         switch (level) {
   11538           0 :                 case DRSUAPI_DS_REPLICA_GET_INFO:
   11539           0 :                         ndr_print_drsuapi_DsReplicaGetInfoRequest1(ndr, "req1", &r->req1);
   11540           0 :                 break;
   11541             : 
   11542           0 :                 case DRSUAPI_DS_REPLICA_GET_INFO2:
   11543           0 :                         ndr_print_drsuapi_DsReplicaGetInfoRequest2(ndr, "req2", &r->req2);
   11544           0 :                 break;
   11545             : 
   11546           0 :                 default:
   11547           0 :                         ndr_print_bad_level(ndr, name, level);
   11548             :         }
   11549           0 : }
   11550             : 
   11551         160 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaNeighbour(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaNeighbour *r)
   11552             : {
   11553         160 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11554         160 :         if (ndr_flags & NDR_SCALARS) {
   11555          80 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   11556          80 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->naming_context_dn));
   11557          80 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_obj_dn));
   11558          80 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
   11559          80 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport_obj_dn));
   11560          80 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
   11561          80 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
   11562          80 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->naming_context_obj_guid));
   11563          80 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
   11564          80 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
   11565          80 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->transport_obj_guid));
   11566          80 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->tmp_highest_usn));
   11567          80 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
   11568          80 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_success));
   11569          80 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_attempt));
   11570          80 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->result_last_attempt));
   11571          80 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->consecutive_sync_failures));
   11572          80 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   11573             :         }
   11574         160 :         if (ndr_flags & NDR_BUFFERS) {
   11575          80 :                 if (r->naming_context_dn) {
   11576          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->naming_context_dn, CH_UTF16)));
   11577          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11578          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->naming_context_dn, CH_UTF16)));
   11579          80 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->naming_context_dn, ndr_charset_length(r->naming_context_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11580             :                 }
   11581          80 :                 if (r->source_dsa_obj_dn) {
   11582          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16)));
   11583          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11584          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16)));
   11585          80 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_obj_dn, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11586             :                 }
   11587          80 :                 if (r->source_dsa_address) {
   11588          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
   11589          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11590          80 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
   11591          80 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_address, ndr_charset_length(r->source_dsa_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11592             :                 }
   11593          80 :                 if (r->transport_obj_dn) {
   11594           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport_obj_dn, CH_UTF16)));
   11595           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11596           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport_obj_dn, CH_UTF16)));
   11597           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->transport_obj_dn, ndr_charset_length(r->transport_obj_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11598             :                 }
   11599             :         }
   11600         160 :         return NDR_ERR_SUCCESS;
   11601             : }
   11602             : 
   11603         160 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaNeighbour(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaNeighbour *r)
   11604             : {
   11605           0 :         uint32_t _ptr_naming_context_dn;
   11606         160 :         uint32_t size_naming_context_dn_1 = 0;
   11607         160 :         uint32_t length_naming_context_dn_1 = 0;
   11608         160 :         TALLOC_CTX *_mem_save_naming_context_dn_0 = NULL;
   11609           0 :         uint32_t _ptr_source_dsa_obj_dn;
   11610         160 :         uint32_t size_source_dsa_obj_dn_1 = 0;
   11611         160 :         uint32_t length_source_dsa_obj_dn_1 = 0;
   11612         160 :         TALLOC_CTX *_mem_save_source_dsa_obj_dn_0 = NULL;
   11613           0 :         uint32_t _ptr_source_dsa_address;
   11614         160 :         uint32_t size_source_dsa_address_1 = 0;
   11615         160 :         uint32_t length_source_dsa_address_1 = 0;
   11616         160 :         TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
   11617           0 :         uint32_t _ptr_transport_obj_dn;
   11618         160 :         uint32_t size_transport_obj_dn_1 = 0;
   11619         160 :         uint32_t length_transport_obj_dn_1 = 0;
   11620         160 :         TALLOC_CTX *_mem_save_transport_obj_dn_0 = NULL;
   11621         160 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11622         160 :         if (ndr_flags & NDR_SCALARS) {
   11623          80 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   11624          80 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_naming_context_dn));
   11625          80 :                 if (_ptr_naming_context_dn) {
   11626          80 :                         NDR_PULL_ALLOC(ndr, r->naming_context_dn);
   11627             :                 } else {
   11628           0 :                         r->naming_context_dn = NULL;
   11629             :                 }
   11630          80 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_obj_dn));
   11631          80 :                 if (_ptr_source_dsa_obj_dn) {
   11632          80 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_obj_dn);
   11633             :                 } else {
   11634           0 :                         r->source_dsa_obj_dn = NULL;
   11635             :                 }
   11636          80 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
   11637          80 :                 if (_ptr_source_dsa_address) {
   11638          80 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_address);
   11639             :                 } else {
   11640           0 :                         r->source_dsa_address = NULL;
   11641             :                 }
   11642          80 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport_obj_dn));
   11643          80 :                 if (_ptr_transport_obj_dn) {
   11644           0 :                         NDR_PULL_ALLOC(ndr, r->transport_obj_dn);
   11645             :                 } else {
   11646          80 :                         r->transport_obj_dn = NULL;
   11647             :                 }
   11648          80 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
   11649          80 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
   11650          80 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->naming_context_obj_guid));
   11651          80 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_obj_guid));
   11652          80 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
   11653          80 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->transport_obj_guid));
   11654          80 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->tmp_highest_usn));
   11655          80 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
   11656          80 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_success));
   11657          80 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_attempt));
   11658          80 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->result_last_attempt));
   11659          80 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->consecutive_sync_failures));
   11660          80 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   11661             :         }
   11662         160 :         if (ndr_flags & NDR_BUFFERS) {
   11663          80 :                 if (r->naming_context_dn) {
   11664          80 :                         _mem_save_naming_context_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11665          80 :                         NDR_PULL_SET_MEM_CTX(ndr, r->naming_context_dn, 0);
   11666          80 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->naming_context_dn));
   11667          80 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->naming_context_dn));
   11668          80 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->naming_context_dn, &size_naming_context_dn_1));
   11669          80 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->naming_context_dn, &length_naming_context_dn_1));
   11670          80 :                         if (length_naming_context_dn_1 > size_naming_context_dn_1) {
   11671           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_naming_context_dn_1, length_naming_context_dn_1);
   11672             :                         }
   11673          80 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_naming_context_dn_1, sizeof(uint16_t)));
   11674          80 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->naming_context_dn, length_naming_context_dn_1, sizeof(uint16_t), CH_UTF16));
   11675          80 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_dn_0, 0);
   11676             :                 }
   11677          80 :                 if (r->source_dsa_obj_dn) {
   11678          80 :                         _mem_save_source_dsa_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11679          80 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_obj_dn, 0);
   11680          80 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_obj_dn));
   11681          80 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_obj_dn));
   11682          80 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_obj_dn, &size_source_dsa_obj_dn_1));
   11683          80 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_obj_dn, &length_source_dsa_obj_dn_1));
   11684          80 :                         if (length_source_dsa_obj_dn_1 > size_source_dsa_obj_dn_1) {
   11685           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_obj_dn_1, length_source_dsa_obj_dn_1);
   11686             :                         }
   11687          80 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_obj_dn_1, sizeof(uint16_t)));
   11688          80 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_obj_dn, length_source_dsa_obj_dn_1, sizeof(uint16_t), CH_UTF16));
   11689          80 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_obj_dn_0, 0);
   11690             :                 }
   11691          80 :                 if (r->source_dsa_address) {
   11692          80 :                         _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11693          80 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
   11694          80 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
   11695          80 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
   11696          80 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
   11697          80 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
   11698          80 :                         if (length_source_dsa_address_1 > size_source_dsa_address_1) {
   11699           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_address_1, length_source_dsa_address_1);
   11700             :                         }
   11701          80 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint16_t)));
   11702          80 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint16_t), CH_UTF16));
   11703          80 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
   11704             :                 }
   11705          80 :                 if (r->transport_obj_dn) {
   11706           0 :                         _mem_save_transport_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11707           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->transport_obj_dn, 0);
   11708           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->transport_obj_dn));
   11709           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->transport_obj_dn));
   11710           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->transport_obj_dn, &size_transport_obj_dn_1));
   11711           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->transport_obj_dn, &length_transport_obj_dn_1));
   11712           0 :                         if (length_transport_obj_dn_1 > size_transport_obj_dn_1) {
   11713           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_transport_obj_dn_1, length_transport_obj_dn_1);
   11714             :                         }
   11715           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_obj_dn_1, sizeof(uint16_t)));
   11716           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport_obj_dn, length_transport_obj_dn_1, sizeof(uint16_t), CH_UTF16));
   11717           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_obj_dn_0, 0);
   11718             :                 }
   11719             :         }
   11720         160 :         return NDR_ERR_SUCCESS;
   11721             : }
   11722             : 
   11723           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaNeighbour(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaNeighbour *r)
   11724             : {
   11725           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaNeighbour");
   11726           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11727           0 :         ndr->depth++;
   11728           0 :         ndr_print_ptr(ndr, "naming_context_dn", r->naming_context_dn);
   11729           0 :         ndr->depth++;
   11730           0 :         if (r->naming_context_dn) {
   11731           0 :                 ndr_print_string(ndr, "naming_context_dn", r->naming_context_dn);
   11732             :         }
   11733           0 :         ndr->depth--;
   11734           0 :         ndr_print_ptr(ndr, "source_dsa_obj_dn", r->source_dsa_obj_dn);
   11735           0 :         ndr->depth++;
   11736           0 :         if (r->source_dsa_obj_dn) {
   11737           0 :                 ndr_print_string(ndr, "source_dsa_obj_dn", r->source_dsa_obj_dn);
   11738             :         }
   11739           0 :         ndr->depth--;
   11740           0 :         ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
   11741           0 :         ndr->depth++;
   11742           0 :         if (r->source_dsa_address) {
   11743           0 :                 ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
   11744             :         }
   11745           0 :         ndr->depth--;
   11746           0 :         ndr_print_ptr(ndr, "transport_obj_dn", r->transport_obj_dn);
   11747           0 :         ndr->depth++;
   11748           0 :         if (r->transport_obj_dn) {
   11749           0 :                 ndr_print_string(ndr, "transport_obj_dn", r->transport_obj_dn);
   11750             :         }
   11751           0 :         ndr->depth--;
   11752           0 :         ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
   11753           0 :         ndr_print_uint32(ndr, "reserved", r->reserved);
   11754           0 :         ndr_print_GUID(ndr, "naming_context_obj_guid", &r->naming_context_obj_guid);
   11755           0 :         ndr_print_GUID(ndr, "source_dsa_obj_guid", &r->source_dsa_obj_guid);
   11756           0 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
   11757           0 :         ndr_print_GUID(ndr, "transport_obj_guid", &r->transport_obj_guid);
   11758           0 :         ndr_print_hyper(ndr, "tmp_highest_usn", r->tmp_highest_usn);
   11759           0 :         ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
   11760           0 :         ndr_print_NTTIME(ndr, "last_success", r->last_success);
   11761           0 :         ndr_print_NTTIME(ndr, "last_attempt", r->last_attempt);
   11762           0 :         ndr_print_WERROR(ndr, "result_last_attempt", r->result_last_attempt);
   11763           0 :         ndr_print_uint32(ndr, "consecutive_sync_failures", r->consecutive_sync_failures);
   11764           0 :         ndr->depth--;
   11765             : }
   11766             : 
   11767          20 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaNeighbourCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaNeighbourCtr *r)
   11768             : {
   11769           0 :         uint32_t cntr_array_0;
   11770          20 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11771          20 :         if (ndr_flags & NDR_SCALARS) {
   11772          20 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   11773          20 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   11774          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   11775          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
   11776         100 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   11777          80 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   11778             :                 }
   11779          20 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   11780             :         }
   11781          20 :         if (ndr_flags & NDR_BUFFERS) {
   11782         100 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   11783          80 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbour(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   11784             :                 }
   11785             :         }
   11786          20 :         return NDR_ERR_SUCCESS;
   11787             : }
   11788             : 
   11789          20 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaNeighbourCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaNeighbourCtr *r)
   11790             : {
   11791          20 :         uint32_t size_array_0 = 0;
   11792           0 :         uint32_t cntr_array_0;
   11793          20 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   11794          20 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11795          20 :         if (ndr_flags & NDR_SCALARS) {
   11796          20 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   11797          20 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   11798          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   11799          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
   11800          20 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   11801          20 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   11802          20 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11803          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   11804         100 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   11805          80 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbour(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   11806             :                 }
   11807          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   11808          20 :                 if (r->array) {
   11809          20 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   11810             :                 }
   11811          20 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   11812             :         }
   11813          20 :         if (ndr_flags & NDR_BUFFERS) {
   11814          20 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   11815          20 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11816          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   11817         100 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   11818          80 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbour(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   11819             :                 }
   11820          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   11821         100 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   11822             :                 }
   11823             :         }
   11824          20 :         return NDR_ERR_SUCCESS;
   11825             : }
   11826             : 
   11827           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaNeighbourCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaNeighbourCtr *r)
   11828             : {
   11829           0 :         uint32_t cntr_array_0;
   11830           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaNeighbourCtr");
   11831           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11832           0 :         ndr->depth++;
   11833           0 :         ndr_print_uint32(ndr, "count", r->count);
   11834           0 :         ndr_print_uint32(ndr, "reserved", r->reserved);
   11835           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   11836           0 :         ndr->depth++;
   11837           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   11838           0 :                 ndr_print_drsuapi_DsReplicaNeighbour(ndr, "array", &r->array[cntr_array_0]);
   11839             :         }
   11840           0 :         ndr->depth--;
   11841           0 :         ndr->depth--;
   11842             : }
   11843             : 
   11844           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursorCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursorCtr *r)
   11845             : {
   11846           0 :         uint32_t cntr_array_0;
   11847           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11848           0 :         if (ndr_flags & NDR_SCALARS) {
   11849           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   11850           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   11851           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   11852           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
   11853           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   11854           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   11855             :                 }
   11856           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   11857             :         }
   11858           0 :         if (ndr_flags & NDR_BUFFERS) {
   11859           0 :         }
   11860           0 :         return NDR_ERR_SUCCESS;
   11861             : }
   11862             : 
   11863           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursorCtr *r)
   11864             : {
   11865           0 :         uint32_t size_array_0 = 0;
   11866           0 :         uint32_t cntr_array_0;
   11867           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   11868           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11869           0 :         if (ndr_flags & NDR_SCALARS) {
   11870           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   11871           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   11872           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   11873           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
   11874           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   11875           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   11876           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11877           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   11878           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   11879           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   11880             :                 }
   11881           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   11882           0 :                 if (r->array) {
   11883           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
   11884             :                 }
   11885           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   11886             :         }
   11887           0 :         if (ndr_flags & NDR_BUFFERS) {
   11888           0 :         }
   11889           0 :         return NDR_ERR_SUCCESS;
   11890             : }
   11891             : 
   11892           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursorCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursorCtr *r)
   11893             : {
   11894           0 :         uint32_t cntr_array_0;
   11895           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursorCtr");
   11896           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11897           0 :         ndr->depth++;
   11898           0 :         ndr_print_uint32(ndr, "count", r->count);
   11899           0 :         ndr_print_uint32(ndr, "reserved", r->reserved);
   11900           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   11901           0 :         ndr->depth++;
   11902           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   11903           0 :                 ndr_print_drsuapi_DsReplicaCursor(ndr, "array", &r->array[cntr_array_0]);
   11904             :         }
   11905           0 :         ndr->depth--;
   11906           0 :         ndr->depth--;
   11907             : }
   11908             : 
   11909           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjMetaData *r)
   11910             : {
   11911           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11912           0 :         if (ndr_flags & NDR_SCALARS) {
   11913           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   11914           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
   11915           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
   11916           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->originating_change_time));
   11917           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
   11918           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
   11919           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
   11920           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   11921             :         }
   11922           0 :         if (ndr_flags & NDR_BUFFERS) {
   11923           0 :                 if (r->attribute_name) {
   11924           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   11925           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   11926           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   11927           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   11928             :                 }
   11929             :         }
   11930           0 :         return NDR_ERR_SUCCESS;
   11931             : }
   11932             : 
   11933           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjMetaData *r)
   11934             : {
   11935           0 :         uint32_t _ptr_attribute_name;
   11936           0 :         uint32_t size_attribute_name_1 = 0;
   11937           0 :         uint32_t length_attribute_name_1 = 0;
   11938           0 :         TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
   11939           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   11940           0 :         if (ndr_flags & NDR_SCALARS) {
   11941           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   11942           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
   11943           0 :                 if (_ptr_attribute_name) {
   11944           0 :                         NDR_PULL_ALLOC(ndr, r->attribute_name);
   11945             :                 } else {
   11946           0 :                         r->attribute_name = NULL;
   11947             :                 }
   11948           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
   11949           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->originating_change_time));
   11950           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
   11951           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
   11952           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
   11953           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   11954             :         }
   11955           0 :         if (ndr_flags & NDR_BUFFERS) {
   11956           0 :                 if (r->attribute_name) {
   11957           0 :                         _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   11958           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
   11959           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
   11960           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
   11961           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
   11962           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
   11963           0 :                         if (length_attribute_name_1 > size_attribute_name_1) {
   11964           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
   11965             :                         }
   11966           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
   11967           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
   11968           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
   11969             :                 }
   11970             :         }
   11971           0 :         return NDR_ERR_SUCCESS;
   11972             : }
   11973             : 
   11974           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData *r)
   11975             : {
   11976           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjMetaData");
   11977           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   11978           0 :         ndr->depth++;
   11979           0 :         ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
   11980           0 :         ndr->depth++;
   11981           0 :         if (r->attribute_name) {
   11982           0 :                 ndr_print_string(ndr, "attribute_name", r->attribute_name);
   11983             :         }
   11984           0 :         ndr->depth--;
   11985           0 :         ndr_print_uint32(ndr, "version", r->version);
   11986           0 :         ndr_print_NTTIME(ndr, "originating_change_time", r->originating_change_time);
   11987           0 :         ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
   11988           0 :         ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
   11989           0 :         ndr_print_hyper(ndr, "local_usn", r->local_usn);
   11990           0 :         ndr->depth--;
   11991             : }
   11992             : 
   11993           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjMetaDataCtr *r)
   11994             : {
   11995           0 :         uint32_t cntr_array_0;
   11996           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   11997           0 :         if (ndr_flags & NDR_SCALARS) {
   11998           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   11999           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   12000           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   12001           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
   12002           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12003           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12004             :                 }
   12005           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   12006             :         }
   12007           0 :         if (ndr_flags & NDR_BUFFERS) {
   12008           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12009           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12010             :                 }
   12011             :         }
   12012           0 :         return NDR_ERR_SUCCESS;
   12013             : }
   12014             : 
   12015           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjMetaDataCtr *r)
   12016             : {
   12017           0 :         uint32_t size_array_0 = 0;
   12018           0 :         uint32_t cntr_array_0;
   12019           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   12020           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12021           0 :         if (ndr_flags & NDR_SCALARS) {
   12022           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   12023           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   12024           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   12025           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
   12026           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12027           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   12028           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12029           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12030           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12031           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12032             :                 }
   12033           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12034           0 :                 if (r->array) {
   12035           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   12036             :                 }
   12037           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   12038             :         }
   12039           0 :         if (ndr_flags & NDR_BUFFERS) {
   12040           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12041           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12042           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12043           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12044           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12045             :                 }
   12046           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12047           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12048             :                 }
   12049             :         }
   12050           0 :         return NDR_ERR_SUCCESS;
   12051             : }
   12052             : 
   12053           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaDataCtr *r)
   12054             : {
   12055           0 :         uint32_t cntr_array_0;
   12056           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjMetaDataCtr");
   12057           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12058           0 :         ndr->depth++;
   12059           0 :         ndr_print_uint32(ndr, "count", r->count);
   12060           0 :         ndr_print_uint32(ndr, "reserved", r->reserved);
   12061           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   12062           0 :         ndr->depth++;
   12063           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12064           0 :                 ndr_print_drsuapi_DsReplicaObjMetaData(ndr, "array", &r->array[cntr_array_0]);
   12065             :         }
   12066           0 :         ndr->depth--;
   12067           0 :         ndr->depth--;
   12068             : }
   12069             : 
   12070           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaKccDsaFailure(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaKccDsaFailure *r)
   12071             : {
   12072           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12073           0 :         if (ndr_flags & NDR_SCALARS) {
   12074           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   12075           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dsa_obj_dn));
   12076           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->dsa_obj_guid));
   12077           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->first_failure));
   12078           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_failures));
   12079           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_result));
   12080           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   12081             :         }
   12082           0 :         if (ndr_flags & NDR_BUFFERS) {
   12083           0 :                 if (r->dsa_obj_dn) {
   12084           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dsa_obj_dn, CH_UTF16)));
   12085           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12086           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dsa_obj_dn, CH_UTF16)));
   12087           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dsa_obj_dn, ndr_charset_length(r->dsa_obj_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12088             :                 }
   12089             :         }
   12090           0 :         return NDR_ERR_SUCCESS;
   12091             : }
   12092             : 
   12093           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaKccDsaFailure(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaKccDsaFailure *r)
   12094             : {
   12095           0 :         uint32_t _ptr_dsa_obj_dn;
   12096           0 :         uint32_t size_dsa_obj_dn_1 = 0;
   12097           0 :         uint32_t length_dsa_obj_dn_1 = 0;
   12098           0 :         TALLOC_CTX *_mem_save_dsa_obj_dn_0 = NULL;
   12099           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12100           0 :         if (ndr_flags & NDR_SCALARS) {
   12101           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   12102           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dsa_obj_dn));
   12103           0 :                 if (_ptr_dsa_obj_dn) {
   12104           0 :                         NDR_PULL_ALLOC(ndr, r->dsa_obj_dn);
   12105             :                 } else {
   12106           0 :                         r->dsa_obj_dn = NULL;
   12107             :                 }
   12108           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->dsa_obj_guid));
   12109           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->first_failure));
   12110           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_failures));
   12111           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_result));
   12112           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   12113             :         }
   12114           0 :         if (ndr_flags & NDR_BUFFERS) {
   12115           0 :                 if (r->dsa_obj_dn) {
   12116           0 :                         _mem_save_dsa_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12117           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dsa_obj_dn, 0);
   12118           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dsa_obj_dn));
   12119           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dsa_obj_dn));
   12120           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dsa_obj_dn, &size_dsa_obj_dn_1));
   12121           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dsa_obj_dn, &length_dsa_obj_dn_1));
   12122           0 :                         if (length_dsa_obj_dn_1 > size_dsa_obj_dn_1) {
   12123           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dsa_obj_dn_1, length_dsa_obj_dn_1);
   12124             :                         }
   12125           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dsa_obj_dn_1, sizeof(uint16_t)));
   12126           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dsa_obj_dn, length_dsa_obj_dn_1, sizeof(uint16_t), CH_UTF16));
   12127           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dsa_obj_dn_0, 0);
   12128             :                 }
   12129             :         }
   12130           0 :         return NDR_ERR_SUCCESS;
   12131             : }
   12132             : 
   12133           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaKccDsaFailure(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaKccDsaFailure *r)
   12134             : {
   12135           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaKccDsaFailure");
   12136           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12137           0 :         ndr->depth++;
   12138           0 :         ndr_print_ptr(ndr, "dsa_obj_dn", r->dsa_obj_dn);
   12139           0 :         ndr->depth++;
   12140           0 :         if (r->dsa_obj_dn) {
   12141           0 :                 ndr_print_string(ndr, "dsa_obj_dn", r->dsa_obj_dn);
   12142             :         }
   12143           0 :         ndr->depth--;
   12144           0 :         ndr_print_GUID(ndr, "dsa_obj_guid", &r->dsa_obj_guid);
   12145           0 :         ndr_print_NTTIME(ndr, "first_failure", r->first_failure);
   12146           0 :         ndr_print_uint32(ndr, "num_failures", r->num_failures);
   12147           0 :         ndr_print_WERROR(ndr, "last_result", r->last_result);
   12148           0 :         ndr->depth--;
   12149             : }
   12150             : 
   12151           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaKccDsaFailuresCtr *r)
   12152             : {
   12153           0 :         uint32_t cntr_array_0;
   12154           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12155           0 :         if (ndr_flags & NDR_SCALARS) {
   12156           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   12157           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   12158           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   12159           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
   12160           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12161           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12162             :                 }
   12163           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   12164             :         }
   12165           0 :         if (ndr_flags & NDR_BUFFERS) {
   12166           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12167           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12168             :                 }
   12169             :         }
   12170           0 :         return NDR_ERR_SUCCESS;
   12171             : }
   12172             : 
   12173           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaKccDsaFailuresCtr *r)
   12174             : {
   12175           0 :         uint32_t size_array_0 = 0;
   12176           0 :         uint32_t cntr_array_0;
   12177           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   12178           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12179           0 :         if (ndr_flags & NDR_SCALARS) {
   12180           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   12181           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   12182           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   12183           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
   12184           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12185           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   12186           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12187           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12188           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12189           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12190             :                 }
   12191           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12192           0 :                 if (r->array) {
   12193           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   12194             :                 }
   12195           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   12196             :         }
   12197           0 :         if (ndr_flags & NDR_BUFFERS) {
   12198           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12199           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12200           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12201           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12202           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailure(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12203             :                 }
   12204           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12205           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12206             :                 }
   12207             :         }
   12208           0 :         return NDR_ERR_SUCCESS;
   12209             : }
   12210             : 
   12211           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaKccDsaFailuresCtr *r)
   12212             : {
   12213           0 :         uint32_t cntr_array_0;
   12214           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaKccDsaFailuresCtr");
   12215           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12216           0 :         ndr->depth++;
   12217           0 :         ndr_print_uint32(ndr, "count", r->count);
   12218           0 :         ndr_print_uint32(ndr, "reserved", r->reserved);
   12219           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   12220           0 :         ndr->depth++;
   12221           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12222           0 :                 ndr_print_drsuapi_DsReplicaKccDsaFailure(ndr, "array", &r->array[cntr_array_0]);
   12223             :         }
   12224           0 :         ndr->depth--;
   12225           0 :         ndr->depth--;
   12226             : }
   12227             : 
   12228           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOpType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaOpType r)
   12229             : {
   12230           0 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
   12231           0 :         return NDR_ERR_SUCCESS;
   12232             : }
   12233             : 
   12234           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOpType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum drsuapi_DsReplicaOpType *r)
   12235             : {
   12236           0 :         uint16_t v;
   12237           0 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
   12238           0 :         *r = v;
   12239           0 :         return NDR_ERR_SUCCESS;
   12240             : }
   12241             : 
   12242           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOpType(struct ndr_print *ndr, const char *name, enum drsuapi_DsReplicaOpType r)
   12243             : {
   12244           0 :         const char *val = NULL;
   12245             : 
   12246           0 :         switch (r) {
   12247           0 :                 case DRSUAPI_DS_REPLICA_OP_TYPE_SYNC: val = "DRSUAPI_DS_REPLICA_OP_TYPE_SYNC"; break;
   12248           0 :                 case DRSUAPI_DS_REPLICA_OP_TYPE_ADD: val = "DRSUAPI_DS_REPLICA_OP_TYPE_ADD"; break;
   12249           0 :                 case DRSUAPI_DS_REPLICA_OP_TYPE_DELETE: val = "DRSUAPI_DS_REPLICA_OP_TYPE_DELETE"; break;
   12250           0 :                 case DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY: val = "DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY"; break;
   12251           0 :                 case DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS: val = "DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS"; break;
   12252             :         }
   12253           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
   12254           0 : }
   12255             : 
   12256           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOp(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOp *r)
   12257             : {
   12258           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12259           0 :         if (ndr_flags & NDR_SCALARS) {
   12260           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   12261           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->operation_start));
   12262           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_num));
   12263           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
   12264           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOpType(ndr, NDR_SCALARS, r->operation_type));
   12265           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
   12266           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->nc_dn));
   12267           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote_dsa_obj_dn));
   12268           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->remote_dsa_address));
   12269           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->nc_obj_guid));
   12270           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->remote_dsa_obj_guid));
   12271           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   12272             :         }
   12273           0 :         if (ndr_flags & NDR_BUFFERS) {
   12274           0 :                 if (r->nc_dn) {
   12275           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->nc_dn, CH_UTF16)));
   12276           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12277           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->nc_dn, CH_UTF16)));
   12278           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->nc_dn, ndr_charset_length(r->nc_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12279             :                 }
   12280           0 :                 if (r->remote_dsa_obj_dn) {
   12281           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_dsa_obj_dn, CH_UTF16)));
   12282           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12283           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_dsa_obj_dn, CH_UTF16)));
   12284           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_dsa_obj_dn, ndr_charset_length(r->remote_dsa_obj_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12285             :                 }
   12286           0 :                 if (r->remote_dsa_address) {
   12287           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_dsa_address, CH_UTF16)));
   12288           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12289           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->remote_dsa_address, CH_UTF16)));
   12290           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->remote_dsa_address, ndr_charset_length(r->remote_dsa_address, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12291             :                 }
   12292             :         }
   12293           0 :         return NDR_ERR_SUCCESS;
   12294             : }
   12295             : 
   12296           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOp(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOp *r)
   12297             : {
   12298           0 :         uint32_t _ptr_nc_dn;
   12299           0 :         uint32_t size_nc_dn_1 = 0;
   12300           0 :         uint32_t length_nc_dn_1 = 0;
   12301           0 :         TALLOC_CTX *_mem_save_nc_dn_0 = NULL;
   12302           0 :         uint32_t _ptr_remote_dsa_obj_dn;
   12303           0 :         uint32_t size_remote_dsa_obj_dn_1 = 0;
   12304           0 :         uint32_t length_remote_dsa_obj_dn_1 = 0;
   12305           0 :         TALLOC_CTX *_mem_save_remote_dsa_obj_dn_0 = NULL;
   12306           0 :         uint32_t _ptr_remote_dsa_address;
   12307           0 :         uint32_t size_remote_dsa_address_1 = 0;
   12308           0 :         uint32_t length_remote_dsa_address_1 = 0;
   12309           0 :         TALLOC_CTX *_mem_save_remote_dsa_address_0 = NULL;
   12310           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12311           0 :         if (ndr_flags & NDR_SCALARS) {
   12312           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   12313           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->operation_start));
   12314           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_num));
   12315           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
   12316           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOpType(ndr, NDR_SCALARS, &r->operation_type));
   12317           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
   12318           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_nc_dn));
   12319           0 :                 if (_ptr_nc_dn) {
   12320           0 :                         NDR_PULL_ALLOC(ndr, r->nc_dn);
   12321             :                 } else {
   12322           0 :                         r->nc_dn = NULL;
   12323             :                 }
   12324           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote_dsa_obj_dn));
   12325           0 :                 if (_ptr_remote_dsa_obj_dn) {
   12326           0 :                         NDR_PULL_ALLOC(ndr, r->remote_dsa_obj_dn);
   12327             :                 } else {
   12328           0 :                         r->remote_dsa_obj_dn = NULL;
   12329             :                 }
   12330           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_remote_dsa_address));
   12331           0 :                 if (_ptr_remote_dsa_address) {
   12332           0 :                         NDR_PULL_ALLOC(ndr, r->remote_dsa_address);
   12333             :                 } else {
   12334           0 :                         r->remote_dsa_address = NULL;
   12335             :                 }
   12336           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->nc_obj_guid));
   12337           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->remote_dsa_obj_guid));
   12338           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   12339             :         }
   12340           0 :         if (ndr_flags & NDR_BUFFERS) {
   12341           0 :                 if (r->nc_dn) {
   12342           0 :                         _mem_save_nc_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12343           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->nc_dn, 0);
   12344           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->nc_dn));
   12345           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->nc_dn));
   12346           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->nc_dn, &size_nc_dn_1));
   12347           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->nc_dn, &length_nc_dn_1));
   12348           0 :                         if (length_nc_dn_1 > size_nc_dn_1) {
   12349           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_nc_dn_1, length_nc_dn_1);
   12350             :                         }
   12351           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_nc_dn_1, sizeof(uint16_t)));
   12352           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->nc_dn, length_nc_dn_1, sizeof(uint16_t), CH_UTF16));
   12353           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_nc_dn_0, 0);
   12354             :                 }
   12355           0 :                 if (r->remote_dsa_obj_dn) {
   12356           0 :                         _mem_save_remote_dsa_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12357           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->remote_dsa_obj_dn, 0);
   12358           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_dsa_obj_dn));
   12359           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_dsa_obj_dn));
   12360           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_dsa_obj_dn, &size_remote_dsa_obj_dn_1));
   12361           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_dsa_obj_dn, &length_remote_dsa_obj_dn_1));
   12362           0 :                         if (length_remote_dsa_obj_dn_1 > size_remote_dsa_obj_dn_1) {
   12363           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_dsa_obj_dn_1, length_remote_dsa_obj_dn_1);
   12364             :                         }
   12365           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_dsa_obj_dn_1, sizeof(uint16_t)));
   12366           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_dsa_obj_dn, length_remote_dsa_obj_dn_1, sizeof(uint16_t), CH_UTF16));
   12367           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_dsa_obj_dn_0, 0);
   12368             :                 }
   12369           0 :                 if (r->remote_dsa_address) {
   12370           0 :                         _mem_save_remote_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12371           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->remote_dsa_address, 0);
   12372           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->remote_dsa_address));
   12373           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->remote_dsa_address));
   12374           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->remote_dsa_address, &size_remote_dsa_address_1));
   12375           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->remote_dsa_address, &length_remote_dsa_address_1));
   12376           0 :                         if (length_remote_dsa_address_1 > size_remote_dsa_address_1) {
   12377           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_remote_dsa_address_1, length_remote_dsa_address_1);
   12378             :                         }
   12379           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_remote_dsa_address_1, sizeof(uint16_t)));
   12380           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->remote_dsa_address, length_remote_dsa_address_1, sizeof(uint16_t), CH_UTF16));
   12381           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_remote_dsa_address_0, 0);
   12382             :                 }
   12383             :         }
   12384           0 :         return NDR_ERR_SUCCESS;
   12385             : }
   12386             : 
   12387           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOp(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOp *r)
   12388             : {
   12389           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaOp");
   12390           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12391           0 :         ndr->depth++;
   12392           0 :         ndr_print_NTTIME(ndr, "operation_start", r->operation_start);
   12393           0 :         ndr_print_uint32(ndr, "serial_num", r->serial_num);
   12394           0 :         ndr_print_uint32(ndr, "priority", r->priority);
   12395           0 :         ndr_print_drsuapi_DsReplicaOpType(ndr, "operation_type", r->operation_type);
   12396           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
   12397           0 :         ndr_print_ptr(ndr, "nc_dn", r->nc_dn);
   12398           0 :         ndr->depth++;
   12399           0 :         if (r->nc_dn) {
   12400           0 :                 ndr_print_string(ndr, "nc_dn", r->nc_dn);
   12401             :         }
   12402           0 :         ndr->depth--;
   12403           0 :         ndr_print_ptr(ndr, "remote_dsa_obj_dn", r->remote_dsa_obj_dn);
   12404           0 :         ndr->depth++;
   12405           0 :         if (r->remote_dsa_obj_dn) {
   12406           0 :                 ndr_print_string(ndr, "remote_dsa_obj_dn", r->remote_dsa_obj_dn);
   12407             :         }
   12408           0 :         ndr->depth--;
   12409           0 :         ndr_print_ptr(ndr, "remote_dsa_address", r->remote_dsa_address);
   12410           0 :         ndr->depth++;
   12411           0 :         if (r->remote_dsa_address) {
   12412           0 :                 ndr_print_string(ndr, "remote_dsa_address", r->remote_dsa_address);
   12413             :         }
   12414           0 :         ndr->depth--;
   12415           0 :         ndr_print_GUID(ndr, "nc_obj_guid", &r->nc_obj_guid);
   12416           0 :         ndr_print_GUID(ndr, "remote_dsa_obj_guid", &r->remote_dsa_obj_guid);
   12417           0 :         ndr->depth--;
   12418             : }
   12419             : 
   12420           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOpCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaOpCtr *r)
   12421             : {
   12422           0 :         uint32_t cntr_array_0;
   12423           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12424           0 :         if (ndr_flags & NDR_SCALARS) {
   12425           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   12426           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   12427           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
   12428           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   12429           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12430           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12431             :                 }
   12432           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   12433             :         }
   12434           0 :         if (ndr_flags & NDR_BUFFERS) {
   12435           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12436           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaOp(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12437             :                 }
   12438             :         }
   12439           0 :         return NDR_ERR_SUCCESS;
   12440             : }
   12441             : 
   12442           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOpCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaOpCtr *r)
   12443             : {
   12444           0 :         uint32_t size_array_0 = 0;
   12445           0 :         uint32_t cntr_array_0;
   12446           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   12447           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12448           0 :         if (ndr_flags & NDR_SCALARS) {
   12449           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   12450           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   12451           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
   12452           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   12453           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12454           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   12455           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12456           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12457           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12458           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaOp(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12459             :                 }
   12460           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12461           0 :                 if (r->array) {
   12462           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   12463             :                 }
   12464           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   12465             :         }
   12466           0 :         if (ndr_flags & NDR_BUFFERS) {
   12467           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12468           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12469           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12470           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12471           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaOp(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12472             :                 }
   12473           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12474           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12475             :                 }
   12476             :         }
   12477           0 :         return NDR_ERR_SUCCESS;
   12478             : }
   12479             : 
   12480           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOpCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOpCtr *r)
   12481             : {
   12482           0 :         uint32_t cntr_array_0;
   12483           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaOpCtr");
   12484           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12485           0 :         ndr->depth++;
   12486           0 :         ndr_print_NTTIME(ndr, "time", r->time);
   12487           0 :         ndr_print_uint32(ndr, "count", r->count);
   12488           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   12489           0 :         ndr->depth++;
   12490           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12491           0 :                 ndr_print_drsuapi_DsReplicaOp(ndr, "array", &r->array[cntr_array_0]);
   12492             :         }
   12493           0 :         ndr->depth--;
   12494           0 :         ndr->depth--;
   12495             : }
   12496             : 
   12497           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttrValMetaData *r)
   12498             : {
   12499           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12500           0 :         if (ndr_flags & NDR_SCALARS) {
   12501           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   12502           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
   12503           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
   12504           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_DATA_BLOB(0, r->binary, 0)));
   12505           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary));
   12506           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->deleted));
   12507           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->created));
   12508           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
   12509           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->originating_change_time));
   12510           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
   12511           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
   12512           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
   12513           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   12514             :         }
   12515           0 :         if (ndr_flags & NDR_BUFFERS) {
   12516           0 :                 if (r->attribute_name) {
   12517           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   12518           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12519           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   12520           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12521             :                 }
   12522           0 :                 if (r->object_dn) {
   12523           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
   12524           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12525           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
   12526           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12527             :                 }
   12528           0 :                 if (r->binary) {
   12529           0 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->binary));
   12530             :                 }
   12531             :         }
   12532           0 :         return NDR_ERR_SUCCESS;
   12533             : }
   12534             : 
   12535           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttrValMetaData *r)
   12536             : {
   12537           0 :         uint32_t _ptr_attribute_name;
   12538           0 :         uint32_t size_attribute_name_1 = 0;
   12539           0 :         uint32_t length_attribute_name_1 = 0;
   12540           0 :         TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
   12541           0 :         uint32_t _ptr_object_dn;
   12542           0 :         uint32_t size_object_dn_1 = 0;
   12543           0 :         uint32_t length_object_dn_1 = 0;
   12544           0 :         TALLOC_CTX *_mem_save_object_dn_0 = NULL;
   12545           0 :         uint32_t _ptr_binary;
   12546           0 :         TALLOC_CTX *_mem_save_binary_0 = NULL;
   12547           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12548           0 :         if (ndr_flags & NDR_SCALARS) {
   12549           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   12550           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
   12551           0 :                 if (_ptr_attribute_name) {
   12552           0 :                         NDR_PULL_ALLOC(ndr, r->attribute_name);
   12553             :                 } else {
   12554           0 :                         r->attribute_name = NULL;
   12555             :                 }
   12556           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
   12557           0 :                 if (_ptr_object_dn) {
   12558           0 :                         NDR_PULL_ALLOC(ndr, r->object_dn);
   12559             :                 } else {
   12560           0 :                         r->object_dn = NULL;
   12561             :                 }
   12562           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_binary));
   12563           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary));
   12564           0 :                 if (_ptr_binary) {
   12565           0 :                         NDR_PULL_ALLOC(ndr, r->binary);
   12566             :                 } else {
   12567           0 :                         r->binary = NULL;
   12568             :                 }
   12569           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->deleted));
   12570           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->created));
   12571           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
   12572           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->originating_change_time));
   12573           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
   12574           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
   12575           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
   12576           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   12577             :         }
   12578           0 :         if (ndr_flags & NDR_BUFFERS) {
   12579           0 :                 if (r->attribute_name) {
   12580           0 :                         _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12581           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
   12582           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
   12583           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
   12584           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
   12585           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
   12586           0 :                         if (length_attribute_name_1 > size_attribute_name_1) {
   12587           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
   12588             :                         }
   12589           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
   12590           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
   12591           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
   12592             :                 }
   12593           0 :                 if (r->object_dn) {
   12594           0 :                         _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12595           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
   12596           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
   12597           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
   12598           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
   12599           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
   12600           0 :                         if (length_object_dn_1 > size_object_dn_1) {
   12601           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
   12602             :                         }
   12603           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
   12604           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
   12605           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
   12606             :                 }
   12607           0 :                 if (r->binary) {
   12608           0 :                         _mem_save_binary_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12609           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->binary, 0);
   12610           0 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
   12611           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_0, 0);
   12612             :                 }
   12613             :         }
   12614           0 :         return NDR_ERR_SUCCESS;
   12615             : }
   12616             : 
   12617           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttrValMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData *r)
   12618             : {
   12619           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttrValMetaData");
   12620           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12621           0 :         ndr->depth++;
   12622           0 :         ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
   12623           0 :         ndr->depth++;
   12624           0 :         if (r->attribute_name) {
   12625           0 :                 ndr_print_string(ndr, "attribute_name", r->attribute_name);
   12626             :         }
   12627           0 :         ndr->depth--;
   12628           0 :         ndr_print_ptr(ndr, "object_dn", r->object_dn);
   12629           0 :         ndr->depth++;
   12630           0 :         if (r->object_dn) {
   12631           0 :                 ndr_print_string(ndr, "object_dn", r->object_dn);
   12632             :         }
   12633           0 :         ndr->depth--;
   12634           0 :         ndr_print_uint32(ndr, "__ndr_size_binary", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_DATA_BLOB(0, r->binary, 0):r->__ndr_size_binary);
   12635           0 :         ndr_print_ptr(ndr, "binary", r->binary);
   12636           0 :         ndr->depth++;
   12637           0 :         if (r->binary) {
   12638           0 :                 ndr_print_DATA_BLOB(ndr, "binary", *r->binary);
   12639             :         }
   12640           0 :         ndr->depth--;
   12641           0 :         ndr_print_NTTIME(ndr, "deleted", r->deleted);
   12642           0 :         ndr_print_NTTIME(ndr, "created", r->created);
   12643           0 :         ndr_print_uint32(ndr, "version", r->version);
   12644           0 :         ndr_print_NTTIME(ndr, "originating_change_time", r->originating_change_time);
   12645           0 :         ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
   12646           0 :         ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
   12647           0 :         ndr_print_hyper(ndr, "local_usn", r->local_usn);
   12648           0 :         ndr->depth--;
   12649             : }
   12650             : 
   12651           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttrValMetaDataCtr *r)
   12652             : {
   12653           0 :         uint32_t cntr_array_0;
   12654           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12655           0 :         if (ndr_flags & NDR_SCALARS) {
   12656           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   12657           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   12658           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   12659           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
   12660           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12661           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12662             :                 }
   12663           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   12664             :         }
   12665           0 :         if (ndr_flags & NDR_BUFFERS) {
   12666           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12667           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12668             :                 }
   12669             :         }
   12670           0 :         return NDR_ERR_SUCCESS;
   12671             : }
   12672             : 
   12673           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttrValMetaDataCtr *r)
   12674             : {
   12675           0 :         uint32_t size_array_0 = 0;
   12676           0 :         uint32_t cntr_array_0;
   12677           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   12678           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12679           0 :         if (ndr_flags & NDR_SCALARS) {
   12680           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   12681           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   12682           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   12683           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
   12684           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12685           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   12686           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12687           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12688           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12689           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12690             :                 }
   12691           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12692           0 :                 if (r->array) {
   12693           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   12694             :                 }
   12695           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   12696             :         }
   12697           0 :         if (ndr_flags & NDR_BUFFERS) {
   12698           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12699           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12700           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12701           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12702           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12703             :                 }
   12704           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12705           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12706             :                 }
   12707             :         }
   12708           0 :         return NDR_ERR_SUCCESS;
   12709             : }
   12710             : 
   12711           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaDataCtr *r)
   12712             : {
   12713           0 :         uint32_t cntr_array_0;
   12714           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttrValMetaDataCtr");
   12715           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12716           0 :         ndr->depth++;
   12717           0 :         ndr_print_uint32(ndr, "count", r->count);
   12718           0 :         ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
   12719           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   12720           0 :         ndr->depth++;
   12721           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12722           0 :                 ndr_print_drsuapi_DsReplicaAttrValMetaData(ndr, "array", &r->array[cntr_array_0]);
   12723             :         }
   12724           0 :         ndr->depth--;
   12725           0 :         ndr->depth--;
   12726             : }
   12727             : 
   12728           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor2Ctr *r)
   12729             : {
   12730           0 :         uint32_t cntr_array_0;
   12731           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12732           0 :         if (ndr_flags & NDR_SCALARS) {
   12733           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   12734           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   12735           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   12736           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
   12737           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12738           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12739             :                 }
   12740           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   12741             :         }
   12742           0 :         if (ndr_flags & NDR_BUFFERS) {
   12743           0 :         }
   12744           0 :         return NDR_ERR_SUCCESS;
   12745             : }
   12746             : 
   12747           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor2Ctr *r)
   12748             : {
   12749           0 :         uint32_t size_array_0 = 0;
   12750           0 :         uint32_t cntr_array_0;
   12751           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   12752           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12753           0 :         if (ndr_flags & NDR_SCALARS) {
   12754           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   12755           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   12756           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   12757           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
   12758           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12759           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   12760           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12761           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12762           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12763           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12764             :                 }
   12765           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12766           0 :                 if (r->array) {
   12767           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
   12768             :                 }
   12769           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   12770             :         }
   12771           0 :         if (ndr_flags & NDR_BUFFERS) {
   12772           0 :         }
   12773           0 :         return NDR_ERR_SUCCESS;
   12774             : }
   12775             : 
   12776           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2Ctr *r)
   12777             : {
   12778           0 :         uint32_t cntr_array_0;
   12779           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2Ctr");
   12780           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12781           0 :         ndr->depth++;
   12782           0 :         ndr_print_uint32(ndr, "count", r->count);
   12783           0 :         ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
   12784           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   12785           0 :         ndr->depth++;
   12786           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12787           0 :                 ndr_print_drsuapi_DsReplicaCursor2(ndr, "array", &r->array[cntr_array_0]);
   12788             :         }
   12789           0 :         ndr->depth--;
   12790           0 :         ndr->depth--;
   12791             : }
   12792             : 
   12793           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor3 *r)
   12794             : {
   12795           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12796           0 :         if (ndr_flags & NDR_SCALARS) {
   12797           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   12798           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
   12799           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
   12800           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_sync_success));
   12801           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_obj_dn));
   12802           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   12803             :         }
   12804           0 :         if (ndr_flags & NDR_BUFFERS) {
   12805           0 :                 if (r->source_dsa_obj_dn) {
   12806           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16)));
   12807           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12808           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16)));
   12809           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->source_dsa_obj_dn, ndr_charset_length(r->source_dsa_obj_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12810             :                 }
   12811             :         }
   12812           0 :         return NDR_ERR_SUCCESS;
   12813             : }
   12814             : 
   12815           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor3 *r)
   12816             : {
   12817           0 :         uint32_t _ptr_source_dsa_obj_dn;
   12818           0 :         uint32_t size_source_dsa_obj_dn_1 = 0;
   12819           0 :         uint32_t length_source_dsa_obj_dn_1 = 0;
   12820           0 :         TALLOC_CTX *_mem_save_source_dsa_obj_dn_0 = NULL;
   12821           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12822           0 :         if (ndr_flags & NDR_SCALARS) {
   12823           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   12824           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
   12825           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
   12826           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_sync_success));
   12827           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_obj_dn));
   12828           0 :                 if (_ptr_source_dsa_obj_dn) {
   12829           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_obj_dn);
   12830             :                 } else {
   12831           0 :                         r->source_dsa_obj_dn = NULL;
   12832             :                 }
   12833           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   12834             :         }
   12835           0 :         if (ndr_flags & NDR_BUFFERS) {
   12836           0 :                 if (r->source_dsa_obj_dn) {
   12837           0 :                         _mem_save_source_dsa_obj_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12838           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_obj_dn, 0);
   12839           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_obj_dn));
   12840           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_obj_dn));
   12841           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_obj_dn, &size_source_dsa_obj_dn_1));
   12842           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_obj_dn, &length_source_dsa_obj_dn_1));
   12843           0 :                         if (length_source_dsa_obj_dn_1 > size_source_dsa_obj_dn_1) {
   12844           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_source_dsa_obj_dn_1, length_source_dsa_obj_dn_1);
   12845             :                         }
   12846           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_obj_dn_1, sizeof(uint16_t)));
   12847           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_obj_dn, length_source_dsa_obj_dn_1, sizeof(uint16_t), CH_UTF16));
   12848           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_obj_dn_0, 0);
   12849             :                 }
   12850             :         }
   12851           0 :         return NDR_ERR_SUCCESS;
   12852             : }
   12853             : 
   12854           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor3 *r)
   12855             : {
   12856           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor3");
   12857           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12858           0 :         ndr->depth++;
   12859           0 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
   12860           0 :         ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
   12861           0 :         ndr_print_NTTIME(ndr, "last_sync_success", r->last_sync_success);
   12862           0 :         ndr_print_ptr(ndr, "source_dsa_obj_dn", r->source_dsa_obj_dn);
   12863           0 :         ndr->depth++;
   12864           0 :         if (r->source_dsa_obj_dn) {
   12865           0 :                 ndr_print_string(ndr, "source_dsa_obj_dn", r->source_dsa_obj_dn);
   12866             :         }
   12867           0 :         ndr->depth--;
   12868           0 :         ndr->depth--;
   12869             : }
   12870             : 
   12871           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor3Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaCursor3Ctr *r)
   12872             : {
   12873           0 :         uint32_t cntr_array_0;
   12874           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12875           0 :         if (ndr_flags & NDR_SCALARS) {
   12876           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   12877           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   12878           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   12879           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
   12880           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12881           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12882             :                 }
   12883           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   12884             :         }
   12885           0 :         if (ndr_flags & NDR_BUFFERS) {
   12886           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12887           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12888             :                 }
   12889             :         }
   12890           0 :         return NDR_ERR_SUCCESS;
   12891             : }
   12892             : 
   12893           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor3Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaCursor3Ctr *r)
   12894             : {
   12895           0 :         uint32_t size_array_0 = 0;
   12896           0 :         uint32_t cntr_array_0;
   12897           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   12898           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12899           0 :         if (ndr_flags & NDR_SCALARS) {
   12900           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   12901           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   12902           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   12903           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
   12904           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12905           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   12906           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12907           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12908           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12909           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   12910             :                 }
   12911           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12912           0 :                 if (r->array) {
   12913           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   12914             :                 }
   12915           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   12916             :         }
   12917           0 :         if (ndr_flags & NDR_BUFFERS) {
   12918           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   12919           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   12920           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   12921           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12922           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   12923             :                 }
   12924           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   12925           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   12926             :                 }
   12927             :         }
   12928           0 :         return NDR_ERR_SUCCESS;
   12929             : }
   12930             : 
   12931           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor3Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor3Ctr *r)
   12932             : {
   12933           0 :         uint32_t cntr_array_0;
   12934           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor3Ctr");
   12935           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   12936           0 :         ndr->depth++;
   12937           0 :         ndr_print_uint32(ndr, "count", r->count);
   12938           0 :         ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
   12939           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   12940           0 :         ndr->depth++;
   12941           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   12942           0 :                 ndr_print_drsuapi_DsReplicaCursor3(ndr, "array", &r->array[cntr_array_0]);
   12943             :         }
   12944           0 :         ndr->depth--;
   12945           0 :         ndr->depth--;
   12946             : }
   12947             : 
   12948           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjMetaData2 *r)
   12949             : {
   12950           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   12951           0 :         if (ndr_flags & NDR_SCALARS) {
   12952           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   12953           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
   12954           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
   12955           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->originating_change_time));
   12956           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
   12957           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
   12958           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
   12959           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->originating_dsa_dn));
   12960           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   12961             :         }
   12962           0 :         if (ndr_flags & NDR_BUFFERS) {
   12963           0 :                 if (r->attribute_name) {
   12964           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   12965           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12966           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   12967           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12968             :                 }
   12969           0 :                 if (r->originating_dsa_dn) {
   12970           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->originating_dsa_dn, CH_UTF16)));
   12971           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   12972           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->originating_dsa_dn, CH_UTF16)));
   12973           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->originating_dsa_dn, ndr_charset_length(r->originating_dsa_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   12974             :                 }
   12975             :         }
   12976           0 :         return NDR_ERR_SUCCESS;
   12977             : }
   12978             : 
   12979           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjMetaData2 *r)
   12980             : {
   12981           0 :         uint32_t _ptr_attribute_name;
   12982           0 :         uint32_t size_attribute_name_1 = 0;
   12983           0 :         uint32_t length_attribute_name_1 = 0;
   12984           0 :         TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
   12985           0 :         uint32_t _ptr_originating_dsa_dn;
   12986           0 :         uint32_t size_originating_dsa_dn_1 = 0;
   12987           0 :         uint32_t length_originating_dsa_dn_1 = 0;
   12988           0 :         TALLOC_CTX *_mem_save_originating_dsa_dn_0 = NULL;
   12989           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   12990           0 :         if (ndr_flags & NDR_SCALARS) {
   12991           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   12992           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
   12993           0 :                 if (_ptr_attribute_name) {
   12994           0 :                         NDR_PULL_ALLOC(ndr, r->attribute_name);
   12995             :                 } else {
   12996           0 :                         r->attribute_name = NULL;
   12997             :                 }
   12998           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
   12999           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->originating_change_time));
   13000           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
   13001           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
   13002           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
   13003           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_originating_dsa_dn));
   13004           0 :                 if (_ptr_originating_dsa_dn) {
   13005           0 :                         NDR_PULL_ALLOC(ndr, r->originating_dsa_dn);
   13006             :                 } else {
   13007           0 :                         r->originating_dsa_dn = NULL;
   13008             :                 }
   13009           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   13010             :         }
   13011           0 :         if (ndr_flags & NDR_BUFFERS) {
   13012           0 :                 if (r->attribute_name) {
   13013           0 :                         _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13014           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
   13015           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
   13016           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
   13017           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
   13018           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
   13019           0 :                         if (length_attribute_name_1 > size_attribute_name_1) {
   13020           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
   13021             :                         }
   13022           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
   13023           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
   13024           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
   13025             :                 }
   13026           0 :                 if (r->originating_dsa_dn) {
   13027           0 :                         _mem_save_originating_dsa_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13028           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->originating_dsa_dn, 0);
   13029           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->originating_dsa_dn));
   13030           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->originating_dsa_dn));
   13031           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->originating_dsa_dn, &size_originating_dsa_dn_1));
   13032           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->originating_dsa_dn, &length_originating_dsa_dn_1));
   13033           0 :                         if (length_originating_dsa_dn_1 > size_originating_dsa_dn_1) {
   13034           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_originating_dsa_dn_1, length_originating_dsa_dn_1);
   13035             :                         }
   13036           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_originating_dsa_dn_1, sizeof(uint16_t)));
   13037           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->originating_dsa_dn, length_originating_dsa_dn_1, sizeof(uint16_t), CH_UTF16));
   13038           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_originating_dsa_dn_0, 0);
   13039             :                 }
   13040             :         }
   13041           0 :         return NDR_ERR_SUCCESS;
   13042             : }
   13043             : 
   13044           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjMetaData2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData2 *r)
   13045             : {
   13046           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjMetaData2");
   13047           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13048           0 :         ndr->depth++;
   13049           0 :         ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
   13050           0 :         ndr->depth++;
   13051           0 :         if (r->attribute_name) {
   13052           0 :                 ndr_print_string(ndr, "attribute_name", r->attribute_name);
   13053             :         }
   13054           0 :         ndr->depth--;
   13055           0 :         ndr_print_uint32(ndr, "version", r->version);
   13056           0 :         ndr_print_NTTIME(ndr, "originating_change_time", r->originating_change_time);
   13057           0 :         ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
   13058           0 :         ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
   13059           0 :         ndr_print_hyper(ndr, "local_usn", r->local_usn);
   13060           0 :         ndr_print_ptr(ndr, "originating_dsa_dn", r->originating_dsa_dn);
   13061           0 :         ndr->depth++;
   13062           0 :         if (r->originating_dsa_dn) {
   13063           0 :                 ndr_print_string(ndr, "originating_dsa_dn", r->originating_dsa_dn);
   13064             :         }
   13065           0 :         ndr->depth--;
   13066           0 :         ndr->depth--;
   13067             : }
   13068             : 
   13069           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaObjMetaData2Ctr *r)
   13070             : {
   13071           0 :         uint32_t cntr_array_0;
   13072           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   13073           0 :         if (ndr_flags & NDR_SCALARS) {
   13074           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   13075           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   13076           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   13077           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
   13078           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13079           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   13080             :                 }
   13081           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   13082             :         }
   13083           0 :         if (ndr_flags & NDR_BUFFERS) {
   13084           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13085           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   13086             :                 }
   13087             :         }
   13088           0 :         return NDR_ERR_SUCCESS;
   13089             : }
   13090             : 
   13091           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaObjMetaData2Ctr *r)
   13092             : {
   13093           0 :         uint32_t size_array_0 = 0;
   13094           0 :         uint32_t cntr_array_0;
   13095           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   13096           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   13097           0 :         if (ndr_flags & NDR_SCALARS) {
   13098           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   13099           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   13100           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   13101           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
   13102           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   13103           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   13104           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13105           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   13106           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13107           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   13108             :                 }
   13109           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   13110           0 :                 if (r->array) {
   13111           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   13112             :                 }
   13113           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   13114             :         }
   13115           0 :         if (ndr_flags & NDR_BUFFERS) {
   13116           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   13117           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13118           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   13119           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13120           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   13121             :                 }
   13122           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   13123           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13124             :                 }
   13125             :         }
   13126           0 :         return NDR_ERR_SUCCESS;
   13127             : }
   13128             : 
   13129           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjMetaData2Ctr *r)
   13130             : {
   13131           0 :         uint32_t cntr_array_0;
   13132           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjMetaData2Ctr");
   13133           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13134           0 :         ndr->depth++;
   13135           0 :         ndr_print_uint32(ndr, "count", r->count);
   13136           0 :         ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
   13137           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   13138           0 :         ndr->depth++;
   13139           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13140           0 :                 ndr_print_drsuapi_DsReplicaObjMetaData2(ndr, "array", &r->array[cntr_array_0]);
   13141             :         }
   13142           0 :         ndr->depth--;
   13143           0 :         ndr->depth--;
   13144             : }
   13145             : 
   13146           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttrValMetaData2 *r)
   13147             : {
   13148           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   13149           0 :         if (ndr_flags & NDR_SCALARS) {
   13150           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   13151           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attribute_name));
   13152           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
   13153           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_DATA_BLOB(0, r->binary, 0)));
   13154           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary));
   13155           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->deleted));
   13156           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->created));
   13157           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
   13158           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->originating_change_time));
   13159           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
   13160           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
   13161           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->local_usn));
   13162           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->originating_dsa_dn));
   13163           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   13164             :         }
   13165           0 :         if (ndr_flags & NDR_BUFFERS) {
   13166           0 :                 if (r->attribute_name) {
   13167           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   13168           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13169           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->attribute_name, CH_UTF16)));
   13170           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->attribute_name, ndr_charset_length(r->attribute_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13171             :                 }
   13172           0 :                 if (r->object_dn) {
   13173           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
   13174           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13175           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
   13176           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_dn, ndr_charset_length(r->object_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13177             :                 }
   13178           0 :                 if (r->binary) {
   13179           0 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->binary));
   13180             :                 }
   13181           0 :                 if (r->originating_dsa_dn) {
   13182           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->originating_dsa_dn, CH_UTF16)));
   13183           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13184           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->originating_dsa_dn, CH_UTF16)));
   13185           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->originating_dsa_dn, ndr_charset_length(r->originating_dsa_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13186             :                 }
   13187             :         }
   13188           0 :         return NDR_ERR_SUCCESS;
   13189             : }
   13190             : 
   13191           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttrValMetaData2 *r)
   13192             : {
   13193           0 :         uint32_t _ptr_attribute_name;
   13194           0 :         uint32_t size_attribute_name_1 = 0;
   13195           0 :         uint32_t length_attribute_name_1 = 0;
   13196           0 :         TALLOC_CTX *_mem_save_attribute_name_0 = NULL;
   13197           0 :         uint32_t _ptr_object_dn;
   13198           0 :         uint32_t size_object_dn_1 = 0;
   13199           0 :         uint32_t length_object_dn_1 = 0;
   13200           0 :         TALLOC_CTX *_mem_save_object_dn_0 = NULL;
   13201           0 :         uint32_t _ptr_binary;
   13202           0 :         TALLOC_CTX *_mem_save_binary_0 = NULL;
   13203           0 :         uint32_t _ptr_originating_dsa_dn;
   13204           0 :         uint32_t size_originating_dsa_dn_1 = 0;
   13205           0 :         uint32_t length_originating_dsa_dn_1 = 0;
   13206           0 :         TALLOC_CTX *_mem_save_originating_dsa_dn_0 = NULL;
   13207           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   13208           0 :         if (ndr_flags & NDR_SCALARS) {
   13209           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   13210           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attribute_name));
   13211           0 :                 if (_ptr_attribute_name) {
   13212           0 :                         NDR_PULL_ALLOC(ndr, r->attribute_name);
   13213             :                 } else {
   13214           0 :                         r->attribute_name = NULL;
   13215             :                 }
   13216           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
   13217           0 :                 if (_ptr_object_dn) {
   13218           0 :                         NDR_PULL_ALLOC(ndr, r->object_dn);
   13219             :                 } else {
   13220           0 :                         r->object_dn = NULL;
   13221             :                 }
   13222           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_binary));
   13223           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary));
   13224           0 :                 if (_ptr_binary) {
   13225           0 :                         NDR_PULL_ALLOC(ndr, r->binary);
   13226             :                 } else {
   13227           0 :                         r->binary = NULL;
   13228             :                 }
   13229           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->deleted));
   13230           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->created));
   13231           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
   13232           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->originating_change_time));
   13233           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
   13234           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
   13235           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->local_usn));
   13236           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_originating_dsa_dn));
   13237           0 :                 if (_ptr_originating_dsa_dn) {
   13238           0 :                         NDR_PULL_ALLOC(ndr, r->originating_dsa_dn);
   13239             :                 } else {
   13240           0 :                         r->originating_dsa_dn = NULL;
   13241             :                 }
   13242           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   13243             :         }
   13244           0 :         if (ndr_flags & NDR_BUFFERS) {
   13245           0 :                 if (r->attribute_name) {
   13246           0 :                         _mem_save_attribute_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13247           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attribute_name, 0);
   13248           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attribute_name));
   13249           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->attribute_name));
   13250           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->attribute_name, &size_attribute_name_1));
   13251           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->attribute_name, &length_attribute_name_1));
   13252           0 :                         if (length_attribute_name_1 > size_attribute_name_1) {
   13253           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_attribute_name_1, length_attribute_name_1);
   13254             :                         }
   13255           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_attribute_name_1, sizeof(uint16_t)));
   13256           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->attribute_name, length_attribute_name_1, sizeof(uint16_t), CH_UTF16));
   13257           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attribute_name_0, 0);
   13258             :                 }
   13259           0 :                 if (r->object_dn) {
   13260           0 :                         _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13261           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
   13262           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
   13263           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
   13264           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
   13265           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
   13266           0 :                         if (length_object_dn_1 > size_object_dn_1) {
   13267           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_object_dn_1, length_object_dn_1);
   13268             :                         }
   13269           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
   13270           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
   13271           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
   13272             :                 }
   13273           0 :                 if (r->binary) {
   13274           0 :                         _mem_save_binary_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13275           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->binary, 0);
   13276           0 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
   13277           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_0, 0);
   13278             :                 }
   13279           0 :                 if (r->originating_dsa_dn) {
   13280           0 :                         _mem_save_originating_dsa_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13281           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->originating_dsa_dn, 0);
   13282           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->originating_dsa_dn));
   13283           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->originating_dsa_dn));
   13284           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->originating_dsa_dn, &size_originating_dsa_dn_1));
   13285           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->originating_dsa_dn, &length_originating_dsa_dn_1));
   13286           0 :                         if (length_originating_dsa_dn_1 > size_originating_dsa_dn_1) {
   13287           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_originating_dsa_dn_1, length_originating_dsa_dn_1);
   13288             :                         }
   13289           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_originating_dsa_dn_1, sizeof(uint16_t)));
   13290           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->originating_dsa_dn, length_originating_dsa_dn_1, sizeof(uint16_t), CH_UTF16));
   13291           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_originating_dsa_dn_0, 0);
   13292             :                 }
   13293             :         }
   13294           0 :         return NDR_ERR_SUCCESS;
   13295             : }
   13296             : 
   13297           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttrValMetaData2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData2 *r)
   13298             : {
   13299           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttrValMetaData2");
   13300           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13301           0 :         ndr->depth++;
   13302           0 :         ndr_print_ptr(ndr, "attribute_name", r->attribute_name);
   13303           0 :         ndr->depth++;
   13304           0 :         if (r->attribute_name) {
   13305           0 :                 ndr_print_string(ndr, "attribute_name", r->attribute_name);
   13306             :         }
   13307           0 :         ndr->depth--;
   13308           0 :         ndr_print_ptr(ndr, "object_dn", r->object_dn);
   13309           0 :         ndr->depth++;
   13310           0 :         if (r->object_dn) {
   13311           0 :                 ndr_print_string(ndr, "object_dn", r->object_dn);
   13312             :         }
   13313           0 :         ndr->depth--;
   13314           0 :         ndr_print_uint32(ndr, "__ndr_size_binary", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_DATA_BLOB(0, r->binary, 0):r->__ndr_size_binary);
   13315           0 :         ndr_print_ptr(ndr, "binary", r->binary);
   13316           0 :         ndr->depth++;
   13317           0 :         if (r->binary) {
   13318           0 :                 ndr_print_DATA_BLOB(ndr, "binary", *r->binary);
   13319             :         }
   13320           0 :         ndr->depth--;
   13321           0 :         ndr_print_NTTIME(ndr, "deleted", r->deleted);
   13322           0 :         ndr_print_NTTIME(ndr, "created", r->created);
   13323           0 :         ndr_print_uint32(ndr, "version", r->version);
   13324           0 :         ndr_print_NTTIME(ndr, "originating_change_time", r->originating_change_time);
   13325           0 :         ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
   13326           0 :         ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
   13327           0 :         ndr_print_hyper(ndr, "local_usn", r->local_usn);
   13328           0 :         ndr_print_ptr(ndr, "originating_dsa_dn", r->originating_dsa_dn);
   13329           0 :         ndr->depth++;
   13330           0 :         if (r->originating_dsa_dn) {
   13331           0 :                 ndr_print_string(ndr, "originating_dsa_dn", r->originating_dsa_dn);
   13332             :         }
   13333           0 :         ndr->depth--;
   13334           0 :         ndr->depth--;
   13335             : }
   13336             : 
   13337           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaAttrValMetaData2Ctr *r)
   13338             : {
   13339           0 :         uint32_t cntr_array_0;
   13340           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   13341           0 :         if (ndr_flags & NDR_SCALARS) {
   13342           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   13343           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   13344           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   13345           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumeration_context));
   13346           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13347           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   13348             :                 }
   13349           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   13350             :         }
   13351           0 :         if (ndr_flags & NDR_BUFFERS) {
   13352           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13353           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   13354             :                 }
   13355             :         }
   13356           0 :         return NDR_ERR_SUCCESS;
   13357             : }
   13358             : 
   13359           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaAttrValMetaData2Ctr *r)
   13360             : {
   13361           0 :         uint32_t size_array_0 = 0;
   13362           0 :         uint32_t cntr_array_0;
   13363           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   13364           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   13365           0 :         if (ndr_flags & NDR_SCALARS) {
   13366           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   13367           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   13368           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   13369           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumeration_context));
   13370           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   13371           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   13372           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13373           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   13374           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13375           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   13376             :                 }
   13377           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   13378           0 :                 if (r->array) {
   13379           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   13380             :                 }
   13381           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   13382             :         }
   13383           0 :         if (ndr_flags & NDR_BUFFERS) {
   13384           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   13385           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13386           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   13387           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13388           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   13389             :                 }
   13390           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   13391           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13392             :                 }
   13393             :         }
   13394           0 :         return NDR_ERR_SUCCESS;
   13395             : }
   13396             : 
   13397           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttrValMetaData2Ctr *r)
   13398             : {
   13399           0 :         uint32_t cntr_array_0;
   13400           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttrValMetaData2Ctr");
   13401           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13402           0 :         ndr->depth++;
   13403           0 :         ndr_print_uint32(ndr, "count", r->count);
   13404           0 :         ndr_print_uint32(ndr, "enumeration_context", r->enumeration_context);
   13405           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   13406           0 :         ndr->depth++;
   13407           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13408           0 :                 ndr_print_drsuapi_DsReplicaAttrValMetaData2(ndr, "array", &r->array[cntr_array_0]);
   13409             :         }
   13410           0 :         ndr->depth--;
   13411           0 :         ndr->depth--;
   13412             : }
   13413             : 
   13414           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaConnection04(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaConnection04 *r)
   13415             : {
   13416           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   13417           0 :         if (ndr_flags & NDR_SCALARS) {
   13418           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   13419           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->u1));
   13420           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
   13421           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
   13422           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->bind_guid));
   13423           0 :                 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->bind_time));
   13424             :                 {
   13425           0 :                         libndr_flags _flags_save_ipv4address = ndr->flags;
   13426           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
   13427           0 :                         NDR_CHECK(ndr_push_ipv4address(ndr, NDR_SCALARS, r->client_ip_address));
   13428           0 :                         ndr->flags = _flags_save_ipv4address;
   13429             :                 }
   13430           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u5));
   13431           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   13432             :         }
   13433           0 :         if (ndr_flags & NDR_BUFFERS) {
   13434           0 :         }
   13435           0 :         return NDR_ERR_SUCCESS;
   13436             : }
   13437             : 
   13438           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaConnection04(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaConnection04 *r)
   13439             : {
   13440           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   13441           0 :         if (ndr_flags & NDR_SCALARS) {
   13442           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   13443           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->u1));
   13444           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
   13445           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
   13446           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->bind_guid));
   13447           0 :                 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->bind_time));
   13448             :                 {
   13449           0 :                         libndr_flags _flags_save_ipv4address = ndr->flags;
   13450           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
   13451           0 :                         NDR_CHECK(ndr_pull_ipv4address(ndr, NDR_SCALARS, &r->client_ip_address));
   13452           0 :                         ndr->flags = _flags_save_ipv4address;
   13453             :                 }
   13454           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u5));
   13455           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   13456             :         }
   13457           0 :         if (ndr_flags & NDR_BUFFERS) {
   13458           0 :         }
   13459           0 :         return NDR_ERR_SUCCESS;
   13460             : }
   13461             : 
   13462           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaConnection04(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaConnection04 *r)
   13463             : {
   13464           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaConnection04");
   13465           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13466           0 :         ndr->depth++;
   13467           0 :         ndr_print_hyper(ndr, "u1", r->u1);
   13468           0 :         ndr_print_uint32(ndr, "u2", r->u2);
   13469           0 :         ndr_print_uint32(ndr, "u3", r->u3);
   13470           0 :         ndr_print_GUID(ndr, "bind_guid", &r->bind_guid);
   13471           0 :         ndr_print_NTTIME_1sec(ndr, "bind_time", r->bind_time);
   13472             :         {
   13473           0 :                 libndr_flags _flags_save_ipv4address = ndr->flags;
   13474           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
   13475           0 :                 ndr_print_ipv4address(ndr, "client_ip_address", r->client_ip_address);
   13476           0 :                 ndr->flags = _flags_save_ipv4address;
   13477             :         }
   13478           0 :         ndr_print_uint32(ndr, "u5", r->u5);
   13479           0 :         ndr->depth--;
   13480             : }
   13481             : 
   13482           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaConnection04Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplicaConnection04Ctr *r)
   13483             : {
   13484           0 :         uint32_t cntr_array_0;
   13485           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   13486           0 :         if (ndr_flags & NDR_SCALARS) {
   13487           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   13488           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   13489           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   13490           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
   13491           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13492           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   13493             :                 }
   13494           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   13495             :         }
   13496           0 :         if (ndr_flags & NDR_BUFFERS) {
   13497           0 :         }
   13498           0 :         return NDR_ERR_SUCCESS;
   13499             : }
   13500             : 
   13501           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaConnection04Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplicaConnection04Ctr *r)
   13502             : {
   13503           0 :         uint32_t size_array_0 = 0;
   13504           0 :         uint32_t cntr_array_0;
   13505           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   13506           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   13507           0 :         if (ndr_flags & NDR_SCALARS) {
   13508           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   13509           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   13510           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   13511           0 :                 if (r->count > 10000) {
   13512           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(10000));
   13513             :                 }
   13514           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
   13515           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   13516           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   13517           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13518           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   13519           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13520           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaConnection04(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   13521             :                 }
   13522           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   13523           0 :                 if (r->array) {
   13524           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
   13525             :                 }
   13526           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   13527             :         }
   13528           0 :         if (ndr_flags & NDR_BUFFERS) {
   13529           0 :         }
   13530           0 :         return NDR_ERR_SUCCESS;
   13531             : }
   13532             : 
   13533           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaConnection04Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaConnection04Ctr *r)
   13534             : {
   13535           0 :         uint32_t cntr_array_0;
   13536           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaConnection04Ctr");
   13537           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13538           0 :         ndr->depth++;
   13539           0 :         ndr_print_uint32(ndr, "count", r->count);
   13540           0 :         ndr_print_uint32(ndr, "reserved", r->reserved);
   13541           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   13542           0 :         ndr->depth++;
   13543           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13544           0 :                 ndr_print_drsuapi_DsReplicaConnection04(ndr, "array", &r->array[cntr_array_0]);
   13545             :         }
   13546           0 :         ndr->depth--;
   13547           0 :         ndr->depth--;
   13548             : }
   13549             : 
   13550           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplica06(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplica06 *r)
   13551             : {
   13552           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   13553           0 :         if (ndr_flags & NDR_SCALARS) {
   13554           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   13555           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->str1));
   13556           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u1));
   13557           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
   13558           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
   13559           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u4));
   13560           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u5));
   13561           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->u6));
   13562           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u7));
   13563           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   13564             :         }
   13565           0 :         if (ndr_flags & NDR_BUFFERS) {
   13566           0 :                 if (r->str1) {
   13567           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str1, CH_UTF16)));
   13568           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   13569           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str1, CH_UTF16)));
   13570           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->str1, ndr_charset_length(r->str1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   13571             :                 }
   13572             :         }
   13573           0 :         return NDR_ERR_SUCCESS;
   13574             : }
   13575             : 
   13576           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplica06(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplica06 *r)
   13577             : {
   13578           0 :         uint32_t _ptr_str1;
   13579           0 :         uint32_t size_str1_1 = 0;
   13580           0 :         uint32_t length_str1_1 = 0;
   13581           0 :         TALLOC_CTX *_mem_save_str1_0 = NULL;
   13582           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   13583           0 :         if (ndr_flags & NDR_SCALARS) {
   13584           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   13585           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_str1));
   13586           0 :                 if (_ptr_str1) {
   13587           0 :                         NDR_PULL_ALLOC(ndr, r->str1);
   13588             :                 } else {
   13589           0 :                         r->str1 = NULL;
   13590             :                 }
   13591           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1));
   13592           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
   13593           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
   13594           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u4));
   13595           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u5));
   13596           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->u6));
   13597           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u7));
   13598           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   13599             :         }
   13600           0 :         if (ndr_flags & NDR_BUFFERS) {
   13601           0 :                 if (r->str1) {
   13602           0 :                         _mem_save_str1_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13603           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->str1, 0);
   13604           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->str1));
   13605           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->str1));
   13606           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->str1, &size_str1_1));
   13607           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->str1, &length_str1_1));
   13608           0 :                         if (length_str1_1 > size_str1_1) {
   13609           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_str1_1, length_str1_1);
   13610             :                         }
   13611           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_str1_1, sizeof(uint16_t)));
   13612           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->str1, length_str1_1, sizeof(uint16_t), CH_UTF16));
   13613           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_str1_0, 0);
   13614             :                 }
   13615             :         }
   13616           0 :         return NDR_ERR_SUCCESS;
   13617             : }
   13618             : 
   13619           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplica06(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplica06 *r)
   13620             : {
   13621           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplica06");
   13622           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13623           0 :         ndr->depth++;
   13624           0 :         ndr_print_ptr(ndr, "str1", r->str1);
   13625           0 :         ndr->depth++;
   13626           0 :         if (r->str1) {
   13627           0 :                 ndr_print_string(ndr, "str1", r->str1);
   13628             :         }
   13629           0 :         ndr->depth--;
   13630           0 :         ndr_print_uint32(ndr, "u1", r->u1);
   13631           0 :         ndr_print_uint32(ndr, "u2", r->u2);
   13632           0 :         ndr_print_uint32(ndr, "u3", r->u3);
   13633           0 :         ndr_print_uint32(ndr, "u4", r->u4);
   13634           0 :         ndr_print_uint32(ndr, "u5", r->u5);
   13635           0 :         ndr_print_hyper(ndr, "u6", r->u6);
   13636           0 :         ndr_print_uint32(ndr, "u7", r->u7);
   13637           0 :         ndr->depth--;
   13638             : }
   13639             : 
   13640           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplica06Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsReplica06Ctr *r)
   13641             : {
   13642           0 :         uint32_t cntr_array_0;
   13643           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   13644           0 :         if (ndr_flags & NDR_SCALARS) {
   13645           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
   13646           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
   13647           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
   13648           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
   13649           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13650           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   13651             :                 }
   13652           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
   13653             :         }
   13654           0 :         if (ndr_flags & NDR_BUFFERS) {
   13655           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13656           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplica06(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   13657             :                 }
   13658             :         }
   13659           0 :         return NDR_ERR_SUCCESS;
   13660             : }
   13661             : 
   13662           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplica06Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsReplica06Ctr *r)
   13663             : {
   13664           0 :         uint32_t size_array_0 = 0;
   13665           0 :         uint32_t cntr_array_0;
   13666           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
   13667           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   13668           0 :         if (ndr_flags & NDR_SCALARS) {
   13669           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
   13670           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
   13671           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
   13672           0 :                 if (r->count > 256) {
   13673           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->count), (uint32_t)(0), (uint32_t)(256));
   13674             :                 }
   13675           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
   13676           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   13677           0 :                 NDR_PULL_ALLOC_N(ndr, r->array, size_array_0);
   13678           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13679           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   13680           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13681           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplica06(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
   13682             :                 }
   13683           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   13684           0 :                 if (r->array) {
   13685           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
   13686             :                 }
   13687           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
   13688             :         }
   13689           0 :         if (ndr_flags & NDR_BUFFERS) {
   13690           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_0));
   13691           0 :                 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   13692           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
   13693           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13694           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplica06(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
   13695             :                 }
   13696           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
   13697           0 :                 for (cntr_array_0 = 0; cntr_array_0 < (size_array_0); cntr_array_0++) {
   13698             :                 }
   13699             :         }
   13700           0 :         return NDR_ERR_SUCCESS;
   13701             : }
   13702             : 
   13703           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplica06Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplica06Ctr *r)
   13704             : {
   13705           0 :         uint32_t cntr_array_0;
   13706           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplica06Ctr");
   13707           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   13708           0 :         ndr->depth++;
   13709           0 :         ndr_print_uint32(ndr, "count", r->count);
   13710           0 :         ndr_print_uint32(ndr, "reserved", r->reserved);
   13711           0 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "array", (uint32_t)(r->count));
   13712           0 :         ndr->depth++;
   13713           0 :         for (cntr_array_0 = 0; cntr_array_0 < (r->count); cntr_array_0++) {
   13714           0 :                 ndr_print_drsuapi_DsReplica06(ndr, "array", &r->array[cntr_array_0]);
   13715             :         }
   13716           0 :         ndr->depth--;
   13717           0 :         ndr->depth--;
   13718             : }
   13719             : 
   13720          20 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsReplicaInfo *r)
   13721             : {
   13722           0 :         uint32_t level;
   13723          20 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   13724          20 :         if (ndr_flags & NDR_SCALARS) {
   13725             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   13726          20 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   13727          20 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   13728          20 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, level));
   13729          20 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   13730          20 :                 switch (level) {
   13731          10 :                         case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS: {
   13732          10 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->neighbours));
   13733          10 :                         break; }
   13734             : 
   13735           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS: {
   13736           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->cursors));
   13737           0 :                         break; }
   13738             : 
   13739           0 :                         case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA: {
   13740           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->objmetadata));
   13741           0 :                         break; }
   13742             : 
   13743           0 :                         case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES: {
   13744           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->connectfailures));
   13745           0 :                         break; }
   13746             : 
   13747           0 :                         case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES: {
   13748           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->linkfailures));
   13749           0 :                         break; }
   13750             : 
   13751           0 :                         case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS: {
   13752           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->pendingops));
   13753           0 :                         break; }
   13754             : 
   13755           0 :                         case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA: {
   13756           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attrvalmetadata));
   13757           0 :                         break; }
   13758             : 
   13759           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS2: {
   13760           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->cursors2));
   13761           0 :                         break; }
   13762             : 
   13763           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS3: {
   13764           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->cursors3));
   13765           0 :                         break; }
   13766             : 
   13767           0 :                         case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2: {
   13768           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->objmetadata2));
   13769           0 :                         break; }
   13770             : 
   13771           0 :                         case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2: {
   13772           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attrvalmetadata2));
   13773           0 :                         break; }
   13774             : 
   13775          10 :                         case DRSUAPI_DS_REPLICA_INFO_REPSTO: {
   13776          10 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->repsto));
   13777          10 :                         break; }
   13778             : 
   13779           0 :                         case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS: {
   13780           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->clientctx));
   13781           0 :                         break; }
   13782             : 
   13783           0 :                         case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1: {
   13784           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->udv1));
   13785           0 :                         break; }
   13786             : 
   13787           0 :                         case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS: {
   13788           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvoutgoingcalls));
   13789           0 :                         break; }
   13790             : 
   13791           0 :                         default:
   13792           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   13793             :                 }
   13794             :         }
   13795          20 :         if (ndr_flags & NDR_BUFFERS) {
   13796          20 :                 if (!(ndr_flags & NDR_SCALARS)) {
   13797             :                         /* We didn't get it above, and the token is not needed after this. */
   13798           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   13799             :                 }
   13800          20 :                 switch (level) {
   13801          10 :                         case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
   13802          10 :                                 if (r->neighbours) {
   13803          10 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->neighbours));
   13804             :                                 }
   13805          10 :                         break;
   13806             : 
   13807           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS:
   13808           0 :                                 if (r->cursors) {
   13809           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtr(ndr, NDR_SCALARS, r->cursors));
   13810             :                                 }
   13811           0 :                         break;
   13812             : 
   13813           0 :                         case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
   13814           0 :                                 if (r->objmetadata) {
   13815           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaDataCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->objmetadata));
   13816             :                                 }
   13817           0 :                         break;
   13818             : 
   13819           0 :                         case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
   13820           0 :                                 if (r->connectfailures) {
   13821           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->connectfailures));
   13822             :                                 }
   13823           0 :                         break;
   13824             : 
   13825           0 :                         case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
   13826           0 :                                 if (r->linkfailures) {
   13827           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->linkfailures));
   13828             :                                 }
   13829           0 :                         break;
   13830             : 
   13831           0 :                         case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
   13832           0 :                                 if (r->pendingops) {
   13833           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaOpCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->pendingops));
   13834             :                                 }
   13835           0 :                         break;
   13836             : 
   13837           0 :                         case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
   13838           0 :                                 if (r->attrvalmetadata) {
   13839           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaDataCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->attrvalmetadata));
   13840             :                                 }
   13841           0 :                         break;
   13842             : 
   13843           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
   13844           0 :                                 if (r->cursors2) {
   13845           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2Ctr(ndr, NDR_SCALARS, r->cursors2));
   13846             :                                 }
   13847           0 :                         break;
   13848             : 
   13849           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
   13850           0 :                                 if (r->cursors3) {
   13851           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor3Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->cursors3));
   13852             :                                 }
   13853           0 :                         break;
   13854             : 
   13855           0 :                         case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
   13856           0 :                                 if (r->objmetadata2) {
   13857           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjMetaData2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->objmetadata2));
   13858             :                                 }
   13859           0 :                         break;
   13860             : 
   13861           0 :                         case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
   13862           0 :                                 if (r->attrvalmetadata2) {
   13863           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->attrvalmetadata2));
   13864             :                                 }
   13865           0 :                         break;
   13866             : 
   13867          10 :                         case DRSUAPI_DS_REPLICA_INFO_REPSTO:
   13868          10 :                                 if (r->repsto) {
   13869          10 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->repsto));
   13870             :                                 }
   13871          10 :                         break;
   13872             : 
   13873           0 :                         case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
   13874           0 :                                 if (r->clientctx) {
   13875           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaConnection04Ctr(ndr, NDR_SCALARS, r->clientctx));
   13876             :                                 }
   13877           0 :                         break;
   13878             : 
   13879           0 :                         case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
   13880           0 :                                 if (r->udv1) {
   13881           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->udv1));
   13882             :                                 }
   13883           0 :                         break;
   13884             : 
   13885           0 :                         case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
   13886           0 :                                 if (r->srvoutgoingcalls) {
   13887           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplica06Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->srvoutgoingcalls));
   13888             :                                 }
   13889           0 :                         break;
   13890             : 
   13891           0 :                         default:
   13892           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   13893             :                 }
   13894             :         }
   13895          20 :         return NDR_ERR_SUCCESS;
   13896             : }
   13897             : 
   13898          20 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsReplicaInfo *r)
   13899             : {
   13900           0 :         uint32_t level;
   13901           0 :         uint32_t _level;
   13902          20 :         TALLOC_CTX *_mem_save_neighbours_0 = NULL;
   13903           0 :         uint32_t _ptr_neighbours;
   13904          20 :         TALLOC_CTX *_mem_save_cursors_0 = NULL;
   13905           0 :         uint32_t _ptr_cursors;
   13906          20 :         TALLOC_CTX *_mem_save_objmetadata_0 = NULL;
   13907           0 :         uint32_t _ptr_objmetadata;
   13908          20 :         TALLOC_CTX *_mem_save_connectfailures_0 = NULL;
   13909           0 :         uint32_t _ptr_connectfailures;
   13910          20 :         TALLOC_CTX *_mem_save_linkfailures_0 = NULL;
   13911           0 :         uint32_t _ptr_linkfailures;
   13912          20 :         TALLOC_CTX *_mem_save_pendingops_0 = NULL;
   13913           0 :         uint32_t _ptr_pendingops;
   13914          20 :         TALLOC_CTX *_mem_save_attrvalmetadata_0 = NULL;
   13915           0 :         uint32_t _ptr_attrvalmetadata;
   13916          20 :         TALLOC_CTX *_mem_save_cursors2_0 = NULL;
   13917           0 :         uint32_t _ptr_cursors2;
   13918          20 :         TALLOC_CTX *_mem_save_cursors3_0 = NULL;
   13919           0 :         uint32_t _ptr_cursors3;
   13920          20 :         TALLOC_CTX *_mem_save_objmetadata2_0 = NULL;
   13921           0 :         uint32_t _ptr_objmetadata2;
   13922          20 :         TALLOC_CTX *_mem_save_attrvalmetadata2_0 = NULL;
   13923           0 :         uint32_t _ptr_attrvalmetadata2;
   13924          20 :         TALLOC_CTX *_mem_save_repsto_0 = NULL;
   13925           0 :         uint32_t _ptr_repsto;
   13926          20 :         TALLOC_CTX *_mem_save_clientctx_0 = NULL;
   13927           0 :         uint32_t _ptr_clientctx;
   13928          20 :         TALLOC_CTX *_mem_save_udv1_0 = NULL;
   13929           0 :         uint32_t _ptr_udv1;
   13930          20 :         TALLOC_CTX *_mem_save_srvoutgoingcalls_0 = NULL;
   13931           0 :         uint32_t _ptr_srvoutgoingcalls;
   13932          20 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   13933          20 :         if (ndr_flags & NDR_SCALARS) {
   13934             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   13935          20 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   13936          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   13937          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   13938          20 :                 if (_level != level) {
   13939           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   13940             :                 }
   13941          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   13942          20 :                 switch (level) {
   13943          10 :                         case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS: {
   13944          10 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_neighbours));
   13945          10 :                                 if (_ptr_neighbours) {
   13946          10 :                                         NDR_PULL_ALLOC(ndr, r->neighbours);
   13947             :                                 } else {
   13948           0 :                                         r->neighbours = NULL;
   13949             :                                 }
   13950          10 :                         break; }
   13951             : 
   13952           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS: {
   13953           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cursors));
   13954           0 :                                 if (_ptr_cursors) {
   13955           0 :                                         NDR_PULL_ALLOC(ndr, r->cursors);
   13956             :                                 } else {
   13957           0 :                                         r->cursors = NULL;
   13958             :                                 }
   13959           0 :                         break; }
   13960             : 
   13961           0 :                         case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA: {
   13962           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objmetadata));
   13963           0 :                                 if (_ptr_objmetadata) {
   13964           0 :                                         NDR_PULL_ALLOC(ndr, r->objmetadata);
   13965             :                                 } else {
   13966           0 :                                         r->objmetadata = NULL;
   13967             :                                 }
   13968           0 :                         break; }
   13969             : 
   13970           0 :                         case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES: {
   13971           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_connectfailures));
   13972           0 :                                 if (_ptr_connectfailures) {
   13973           0 :                                         NDR_PULL_ALLOC(ndr, r->connectfailures);
   13974             :                                 } else {
   13975           0 :                                         r->connectfailures = NULL;
   13976             :                                 }
   13977           0 :                         break; }
   13978             : 
   13979           0 :                         case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES: {
   13980           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_linkfailures));
   13981           0 :                                 if (_ptr_linkfailures) {
   13982           0 :                                         NDR_PULL_ALLOC(ndr, r->linkfailures);
   13983             :                                 } else {
   13984           0 :                                         r->linkfailures = NULL;
   13985             :                                 }
   13986           0 :                         break; }
   13987             : 
   13988           0 :                         case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS: {
   13989           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pendingops));
   13990           0 :                                 if (_ptr_pendingops) {
   13991           0 :                                         NDR_PULL_ALLOC(ndr, r->pendingops);
   13992             :                                 } else {
   13993           0 :                                         r->pendingops = NULL;
   13994             :                                 }
   13995           0 :                         break; }
   13996             : 
   13997           0 :                         case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA: {
   13998           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attrvalmetadata));
   13999           0 :                                 if (_ptr_attrvalmetadata) {
   14000           0 :                                         NDR_PULL_ALLOC(ndr, r->attrvalmetadata);
   14001             :                                 } else {
   14002           0 :                                         r->attrvalmetadata = NULL;
   14003             :                                 }
   14004           0 :                         break; }
   14005             : 
   14006           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS2: {
   14007           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cursors2));
   14008           0 :                                 if (_ptr_cursors2) {
   14009           0 :                                         NDR_PULL_ALLOC(ndr, r->cursors2);
   14010             :                                 } else {
   14011           0 :                                         r->cursors2 = NULL;
   14012             :                                 }
   14013           0 :                         break; }
   14014             : 
   14015           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS3: {
   14016           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_cursors3));
   14017           0 :                                 if (_ptr_cursors3) {
   14018           0 :                                         NDR_PULL_ALLOC(ndr, r->cursors3);
   14019             :                                 } else {
   14020           0 :                                         r->cursors3 = NULL;
   14021             :                                 }
   14022           0 :                         break; }
   14023             : 
   14024           0 :                         case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2: {
   14025           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objmetadata2));
   14026           0 :                                 if (_ptr_objmetadata2) {
   14027           0 :                                         NDR_PULL_ALLOC(ndr, r->objmetadata2);
   14028             :                                 } else {
   14029           0 :                                         r->objmetadata2 = NULL;
   14030             :                                 }
   14031           0 :                         break; }
   14032             : 
   14033           0 :                         case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2: {
   14034           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attrvalmetadata2));
   14035           0 :                                 if (_ptr_attrvalmetadata2) {
   14036           0 :                                         NDR_PULL_ALLOC(ndr, r->attrvalmetadata2);
   14037             :                                 } else {
   14038           0 :                                         r->attrvalmetadata2 = NULL;
   14039             :                                 }
   14040           0 :                         break; }
   14041             : 
   14042          10 :                         case DRSUAPI_DS_REPLICA_INFO_REPSTO: {
   14043          10 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_repsto));
   14044          10 :                                 if (_ptr_repsto) {
   14045          10 :                                         NDR_PULL_ALLOC(ndr, r->repsto);
   14046             :                                 } else {
   14047           0 :                                         r->repsto = NULL;
   14048             :                                 }
   14049          10 :                         break; }
   14050             : 
   14051           0 :                         case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS: {
   14052           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_clientctx));
   14053           0 :                                 if (_ptr_clientctx) {
   14054           0 :                                         NDR_PULL_ALLOC(ndr, r->clientctx);
   14055             :                                 } else {
   14056           0 :                                         r->clientctx = NULL;
   14057             :                                 }
   14058           0 :                         break; }
   14059             : 
   14060           0 :                         case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1: {
   14061           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_udv1));
   14062           0 :                                 if (_ptr_udv1) {
   14063           0 :                                         NDR_PULL_ALLOC(ndr, r->udv1);
   14064             :                                 } else {
   14065           0 :                                         r->udv1 = NULL;
   14066             :                                 }
   14067           0 :                         break; }
   14068             : 
   14069           0 :                         case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS: {
   14070           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvoutgoingcalls));
   14071           0 :                                 if (_ptr_srvoutgoingcalls) {
   14072           0 :                                         NDR_PULL_ALLOC(ndr, r->srvoutgoingcalls);
   14073             :                                 } else {
   14074           0 :                                         r->srvoutgoingcalls = NULL;
   14075             :                                 }
   14076           0 :                         break; }
   14077             : 
   14078           0 :                         default:
   14079           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   14080             :                 }
   14081             :         }
   14082          20 :         if (ndr_flags & NDR_BUFFERS) {
   14083          20 :                 if (!(ndr_flags & NDR_SCALARS)) {
   14084             :                         /* We didn't get it above, and the token is not needed after this. */
   14085           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   14086             :                 }
   14087          20 :                 switch (level) {
   14088          10 :                         case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
   14089          10 :                                 if (r->neighbours) {
   14090          10 :                                         _mem_save_neighbours_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14091          10 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->neighbours, 0);
   14092          10 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->neighbours));
   14093          10 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_neighbours_0, 0);
   14094             :                                 }
   14095          10 :                         break;
   14096             : 
   14097           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS:
   14098           0 :                                 if (r->cursors) {
   14099           0 :                                         _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14100           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
   14101           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtr(ndr, NDR_SCALARS, r->cursors));
   14102           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
   14103             :                                 }
   14104           0 :                         break;
   14105             : 
   14106           0 :                         case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
   14107           0 :                                 if (r->objmetadata) {
   14108           0 :                                         _mem_save_objmetadata_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14109           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->objmetadata, 0);
   14110           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaDataCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->objmetadata));
   14111           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objmetadata_0, 0);
   14112             :                                 }
   14113           0 :                         break;
   14114             : 
   14115           0 :                         case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
   14116           0 :                                 if (r->connectfailures) {
   14117           0 :                                         _mem_save_connectfailures_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14118           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->connectfailures, 0);
   14119           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->connectfailures));
   14120           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_connectfailures_0, 0);
   14121             :                                 }
   14122           0 :                         break;
   14123             : 
   14124           0 :                         case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
   14125           0 :                                 if (r->linkfailures) {
   14126           0 :                                         _mem_save_linkfailures_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14127           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->linkfailures, 0);
   14128           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->linkfailures));
   14129           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_linkfailures_0, 0);
   14130             :                                 }
   14131           0 :                         break;
   14132             : 
   14133           0 :                         case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
   14134           0 :                                 if (r->pendingops) {
   14135           0 :                                         _mem_save_pendingops_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14136           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->pendingops, 0);
   14137           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaOpCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->pendingops));
   14138           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pendingops_0, 0);
   14139             :                                 }
   14140           0 :                         break;
   14141             : 
   14142           0 :                         case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
   14143           0 :                                 if (r->attrvalmetadata) {
   14144           0 :                                         _mem_save_attrvalmetadata_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14145           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->attrvalmetadata, 0);
   14146           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaDataCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->attrvalmetadata));
   14147           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attrvalmetadata_0, 0);
   14148             :                                 }
   14149           0 :                         break;
   14150             : 
   14151           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
   14152           0 :                                 if (r->cursors2) {
   14153           0 :                                         _mem_save_cursors2_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14154           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->cursors2, 0);
   14155           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2Ctr(ndr, NDR_SCALARS, r->cursors2));
   14156           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors2_0, 0);
   14157             :                                 }
   14158           0 :                         break;
   14159             : 
   14160           0 :                         case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
   14161           0 :                                 if (r->cursors3) {
   14162           0 :                                         _mem_save_cursors3_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14163           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->cursors3, 0);
   14164           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor3Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->cursors3));
   14165           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors3_0, 0);
   14166             :                                 }
   14167           0 :                         break;
   14168             : 
   14169           0 :                         case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
   14170           0 :                                 if (r->objmetadata2) {
   14171           0 :                                         _mem_save_objmetadata2_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14172           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->objmetadata2, 0);
   14173           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjMetaData2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->objmetadata2));
   14174           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_objmetadata2_0, 0);
   14175             :                                 }
   14176           0 :                         break;
   14177             : 
   14178           0 :                         case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
   14179           0 :                                 if (r->attrvalmetadata2) {
   14180           0 :                                         _mem_save_attrvalmetadata2_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14181           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->attrvalmetadata2, 0);
   14182           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->attrvalmetadata2));
   14183           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attrvalmetadata2_0, 0);
   14184             :                                 }
   14185           0 :                         break;
   14186             : 
   14187          10 :                         case DRSUAPI_DS_REPLICA_INFO_REPSTO:
   14188          10 :                                 if (r->repsto) {
   14189          10 :                                         _mem_save_repsto_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14190          10 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->repsto, 0);
   14191          10 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->repsto));
   14192          10 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_repsto_0, 0);
   14193             :                                 }
   14194          10 :                         break;
   14195             : 
   14196           0 :                         case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
   14197           0 :                                 if (r->clientctx) {
   14198           0 :                                         _mem_save_clientctx_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14199           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->clientctx, 0);
   14200           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaConnection04Ctr(ndr, NDR_SCALARS, r->clientctx));
   14201           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_clientctx_0, 0);
   14202             :                                 }
   14203           0 :                         break;
   14204             : 
   14205           0 :                         case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
   14206           0 :                                 if (r->udv1) {
   14207           0 :                                         _mem_save_udv1_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14208           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->udv1, 0);
   14209           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->udv1));
   14210           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_udv1_0, 0);
   14211             :                                 }
   14212           0 :                         break;
   14213             : 
   14214           0 :                         case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
   14215           0 :                                 if (r->srvoutgoingcalls) {
   14216           0 :                                         _mem_save_srvoutgoingcalls_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14217           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->srvoutgoingcalls, 0);
   14218           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplica06Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->srvoutgoingcalls));
   14219           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvoutgoingcalls_0, 0);
   14220             :                                 }
   14221           0 :                         break;
   14222             : 
   14223           0 :                         default:
   14224           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   14225             :                 }
   14226             :         }
   14227          20 :         return NDR_ERR_SUCCESS;
   14228             : }
   14229             : 
   14230           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaInfo *r)
   14231             : {
   14232           0 :         uint32_t level;
   14233           0 :         level = ndr_print_steal_switch_value(ndr, r);
   14234           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaInfo");
   14235           0 :         switch (level) {
   14236           0 :                 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
   14237           0 :                         ndr_print_ptr(ndr, "neighbours", r->neighbours);
   14238           0 :                         ndr->depth++;
   14239           0 :                         if (r->neighbours) {
   14240           0 :                                 ndr_print_drsuapi_DsReplicaNeighbourCtr(ndr, "neighbours", r->neighbours);
   14241             :                         }
   14242           0 :                         ndr->depth--;
   14243           0 :                 break;
   14244             : 
   14245           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS:
   14246           0 :                         ndr_print_ptr(ndr, "cursors", r->cursors);
   14247           0 :                         ndr->depth++;
   14248           0 :                         if (r->cursors) {
   14249           0 :                                 ndr_print_drsuapi_DsReplicaCursorCtr(ndr, "cursors", r->cursors);
   14250             :                         }
   14251           0 :                         ndr->depth--;
   14252           0 :                 break;
   14253             : 
   14254           0 :                 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
   14255           0 :                         ndr_print_ptr(ndr, "objmetadata", r->objmetadata);
   14256           0 :                         ndr->depth++;
   14257           0 :                         if (r->objmetadata) {
   14258           0 :                                 ndr_print_drsuapi_DsReplicaObjMetaDataCtr(ndr, "objmetadata", r->objmetadata);
   14259             :                         }
   14260           0 :                         ndr->depth--;
   14261           0 :                 break;
   14262             : 
   14263           0 :                 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
   14264           0 :                         ndr_print_ptr(ndr, "connectfailures", r->connectfailures);
   14265           0 :                         ndr->depth++;
   14266           0 :                         if (r->connectfailures) {
   14267           0 :                                 ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, "connectfailures", r->connectfailures);
   14268             :                         }
   14269           0 :                         ndr->depth--;
   14270           0 :                 break;
   14271             : 
   14272           0 :                 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
   14273           0 :                         ndr_print_ptr(ndr, "linkfailures", r->linkfailures);
   14274           0 :                         ndr->depth++;
   14275           0 :                         if (r->linkfailures) {
   14276           0 :                                 ndr_print_drsuapi_DsReplicaKccDsaFailuresCtr(ndr, "linkfailures", r->linkfailures);
   14277             :                         }
   14278           0 :                         ndr->depth--;
   14279           0 :                 break;
   14280             : 
   14281           0 :                 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
   14282           0 :                         ndr_print_ptr(ndr, "pendingops", r->pendingops);
   14283           0 :                         ndr->depth++;
   14284           0 :                         if (r->pendingops) {
   14285           0 :                                 ndr_print_drsuapi_DsReplicaOpCtr(ndr, "pendingops", r->pendingops);
   14286             :                         }
   14287           0 :                         ndr->depth--;
   14288           0 :                 break;
   14289             : 
   14290           0 :                 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
   14291           0 :                         ndr_print_ptr(ndr, "attrvalmetadata", r->attrvalmetadata);
   14292           0 :                         ndr->depth++;
   14293           0 :                         if (r->attrvalmetadata) {
   14294           0 :                                 ndr_print_drsuapi_DsReplicaAttrValMetaDataCtr(ndr, "attrvalmetadata", r->attrvalmetadata);
   14295             :                         }
   14296           0 :                         ndr->depth--;
   14297           0 :                 break;
   14298             : 
   14299           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
   14300           0 :                         ndr_print_ptr(ndr, "cursors2", r->cursors2);
   14301           0 :                         ndr->depth++;
   14302           0 :                         if (r->cursors2) {
   14303           0 :                                 ndr_print_drsuapi_DsReplicaCursor2Ctr(ndr, "cursors2", r->cursors2);
   14304             :                         }
   14305           0 :                         ndr->depth--;
   14306           0 :                 break;
   14307             : 
   14308           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
   14309           0 :                         ndr_print_ptr(ndr, "cursors3", r->cursors3);
   14310           0 :                         ndr->depth++;
   14311           0 :                         if (r->cursors3) {
   14312           0 :                                 ndr_print_drsuapi_DsReplicaCursor3Ctr(ndr, "cursors3", r->cursors3);
   14313             :                         }
   14314           0 :                         ndr->depth--;
   14315           0 :                 break;
   14316             : 
   14317           0 :                 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
   14318           0 :                         ndr_print_ptr(ndr, "objmetadata2", r->objmetadata2);
   14319           0 :                         ndr->depth++;
   14320           0 :                         if (r->objmetadata2) {
   14321           0 :                                 ndr_print_drsuapi_DsReplicaObjMetaData2Ctr(ndr, "objmetadata2", r->objmetadata2);
   14322             :                         }
   14323           0 :                         ndr->depth--;
   14324           0 :                 break;
   14325             : 
   14326           0 :                 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
   14327           0 :                         ndr_print_ptr(ndr, "attrvalmetadata2", r->attrvalmetadata2);
   14328           0 :                         ndr->depth++;
   14329           0 :                         if (r->attrvalmetadata2) {
   14330           0 :                                 ndr_print_drsuapi_DsReplicaAttrValMetaData2Ctr(ndr, "attrvalmetadata2", r->attrvalmetadata2);
   14331             :                         }
   14332           0 :                         ndr->depth--;
   14333           0 :                 break;
   14334             : 
   14335           0 :                 case DRSUAPI_DS_REPLICA_INFO_REPSTO:
   14336           0 :                         ndr_print_ptr(ndr, "repsto", r->repsto);
   14337           0 :                         ndr->depth++;
   14338           0 :                         if (r->repsto) {
   14339           0 :                                 ndr_print_drsuapi_DsReplicaNeighbourCtr(ndr, "repsto", r->repsto);
   14340             :                         }
   14341           0 :                         ndr->depth--;
   14342           0 :                 break;
   14343             : 
   14344           0 :                 case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
   14345           0 :                         ndr_print_ptr(ndr, "clientctx", r->clientctx);
   14346           0 :                         ndr->depth++;
   14347           0 :                         if (r->clientctx) {
   14348           0 :                                 ndr_print_drsuapi_DsReplicaConnection04Ctr(ndr, "clientctx", r->clientctx);
   14349             :                         }
   14350           0 :                         ndr->depth--;
   14351           0 :                 break;
   14352             : 
   14353           0 :                 case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
   14354           0 :                         ndr_print_ptr(ndr, "udv1", r->udv1);
   14355           0 :                         ndr->depth++;
   14356           0 :                         if (r->udv1) {
   14357           0 :                                 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "udv1", r->udv1);
   14358             :                         }
   14359           0 :                         ndr->depth--;
   14360           0 :                 break;
   14361             : 
   14362           0 :                 case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
   14363           0 :                         ndr_print_ptr(ndr, "srvoutgoingcalls", r->srvoutgoingcalls);
   14364           0 :                         ndr->depth++;
   14365           0 :                         if (r->srvoutgoingcalls) {
   14366           0 :                                 ndr_print_drsuapi_DsReplica06Ctr(ndr, "srvoutgoingcalls", r->srvoutgoingcalls);
   14367             :                         }
   14368           0 :                         ndr->depth--;
   14369           0 :                 break;
   14370             : 
   14371           0 :                 default:
   14372           0 :                         ndr_print_bad_level(ndr, name, level);
   14373             :         }
   14374           0 : }
   14375             : 
   14376           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetMemberships2Ctr *r)
   14377             : {
   14378           0 :         uint32_t level;
   14379           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   14380           0 :         if (ndr_flags & NDR_SCALARS) {
   14381             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   14382           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   14383           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   14384           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
   14385           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   14386           0 :                 switch (level) {
   14387           0 :                         case 1: {
   14388           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
   14389           0 :                         break; }
   14390             : 
   14391           0 :                         default:
   14392           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   14393             :                 }
   14394             :         }
   14395           0 :         if (ndr_flags & NDR_BUFFERS) {
   14396           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   14397             :                         /* We didn't get it above, and the token is not needed after this. */
   14398           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   14399             :                 }
   14400           0 :                 switch (level) {
   14401           0 :                         case 1:
   14402           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
   14403           0 :                         break;
   14404             : 
   14405           0 :                         default:
   14406           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   14407             :                 }
   14408             :         }
   14409           0 :         return NDR_ERR_SUCCESS;
   14410             : }
   14411             : 
   14412           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetMemberships2Ctr *r)
   14413             : {
   14414           0 :         uint32_t level;
   14415           0 :         uint32_t _level;
   14416           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   14417           0 :         if (ndr_flags & NDR_SCALARS) {
   14418             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   14419           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   14420           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   14421           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   14422           0 :                 if (_level != level) {
   14423           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   14424             :                 }
   14425           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   14426           0 :                 switch (level) {
   14427           0 :                         case 1: {
   14428           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
   14429           0 :                         break; }
   14430             : 
   14431           0 :                         default:
   14432           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   14433             :                 }
   14434             :         }
   14435           0 :         if (ndr_flags & NDR_BUFFERS) {
   14436           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   14437             :                         /* We didn't get it above, and the token is not needed after this. */
   14438           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   14439             :                 }
   14440           0 :                 switch (level) {
   14441           0 :                         case 1:
   14442           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
   14443           0 :                         break;
   14444             : 
   14445           0 :                         default:
   14446           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   14447             :                 }
   14448             :         }
   14449           0 :         return NDR_ERR_SUCCESS;
   14450             : }
   14451             : 
   14452           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships2Ctr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMemberships2Ctr *r)
   14453             : {
   14454           0 :         uint32_t level;
   14455           0 :         level = ndr_print_steal_switch_value(ndr, r);
   14456           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetMemberships2Ctr");
   14457           0 :         switch (level) {
   14458           0 :                 case 1:
   14459           0 :                         ndr_print_drsuapi_DsGetMembershipsCtr1(ndr, "ctr1", &r->ctr1);
   14460           0 :                 break;
   14461             : 
   14462           0 :                 default:
   14463           0 :                         ndr_print_bad_level(ndr, name, level);
   14464             :         }
   14465           0 : }
   14466             : 
   14467           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Request1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsGetMemberships2Request1 *r)
   14468             : {
   14469           0 :         uint32_t cntr_req_array_1;
   14470           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   14471           0 :         if (ndr_flags & NDR_SCALARS) {
   14472           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   14473           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_req));
   14474           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->req_array));
   14475           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   14476             :         }
   14477           0 :         if (ndr_flags & NDR_BUFFERS) {
   14478           0 :                 if (r->req_array) {
   14479           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_req));
   14480           0 :                         for (cntr_req_array_1 = 0; cntr_req_array_1 < (r->num_req); cntr_req_array_1++) {
   14481           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->req_array[cntr_req_array_1]));
   14482             :                         }
   14483           0 :                         for (cntr_req_array_1 = 0; cntr_req_array_1 < (r->num_req); cntr_req_array_1++) {
   14484           0 :                                 if (r->req_array[cntr_req_array_1]) {
   14485           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS|NDR_BUFFERS, r->req_array[cntr_req_array_1]));
   14486             :                                 }
   14487             :                         }
   14488             :                 }
   14489             :         }
   14490           0 :         return NDR_ERR_SUCCESS;
   14491             : }
   14492             : 
   14493           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Request1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsGetMemberships2Request1 *r)
   14494             : {
   14495           0 :         uint32_t _ptr_req_array;
   14496           0 :         uint32_t size_req_array_1 = 0;
   14497           0 :         uint32_t cntr_req_array_1;
   14498           0 :         TALLOC_CTX *_mem_save_req_array_0 = NULL;
   14499           0 :         TALLOC_CTX *_mem_save_req_array_1 = NULL;
   14500           0 :         TALLOC_CTX *_mem_save_req_array_2 = NULL;
   14501           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   14502           0 :         if (ndr_flags & NDR_SCALARS) {
   14503           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   14504           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_req));
   14505           0 :                 if (r->num_req < 1 || r->num_req > 10000) {
   14506           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_req), (uint32_t)(1), (uint32_t)(10000));
   14507             :                 }
   14508           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_req_array));
   14509           0 :                 if (_ptr_req_array) {
   14510           0 :                         NDR_PULL_ALLOC(ndr, r->req_array);
   14511             :                 } else {
   14512           0 :                         r->req_array = NULL;
   14513             :                 }
   14514           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   14515             :         }
   14516           0 :         if (ndr_flags & NDR_BUFFERS) {
   14517           0 :                 if (r->req_array) {
   14518           0 :                         _mem_save_req_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14519           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->req_array, 0);
   14520           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->req_array));
   14521           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->req_array, &size_req_array_1));
   14522           0 :                         NDR_PULL_ALLOC_N(ndr, r->req_array, size_req_array_1);
   14523           0 :                         _mem_save_req_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
   14524           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->req_array, 0);
   14525           0 :                         for (cntr_req_array_1 = 0; cntr_req_array_1 < (size_req_array_1); cntr_req_array_1++) {
   14526           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_req_array));
   14527           0 :                                 if (_ptr_req_array) {
   14528           0 :                                         NDR_PULL_ALLOC(ndr, r->req_array[cntr_req_array_1]);
   14529             :                                 } else {
   14530           0 :                                         r->req_array[cntr_req_array_1] = NULL;
   14531             :                                 }
   14532             :                         }
   14533           0 :                         for (cntr_req_array_1 = 0; cntr_req_array_1 < (size_req_array_1); cntr_req_array_1++) {
   14534           0 :                                 if (r->req_array[cntr_req_array_1]) {
   14535           0 :                                         _mem_save_req_array_2 = NDR_PULL_GET_MEM_CTX(ndr);
   14536           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->req_array[cntr_req_array_1], 0);
   14537           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS|NDR_BUFFERS, r->req_array[cntr_req_array_1]));
   14538           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_array_2, 0);
   14539             :                                 }
   14540             :                         }
   14541           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_array_1, 0);
   14542           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_array_0, 0);
   14543             :                 }
   14544           0 :                 if (r->req_array) {
   14545           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->req_array, r->num_req));
   14546             :                 }
   14547           0 :                 for (cntr_req_array_1 = 0; cntr_req_array_1 < (size_req_array_1); cntr_req_array_1++) {
   14548           0 :                 }
   14549             :         }
   14550           0 :         return NDR_ERR_SUCCESS;
   14551             : }
   14552             : 
   14553           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships2Request1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMemberships2Request1 *r)
   14554             : {
   14555           0 :         uint32_t cntr_req_array_1;
   14556           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetMemberships2Request1");
   14557           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14558           0 :         ndr->depth++;
   14559           0 :         ndr_print_uint32(ndr, "num_req", r->num_req);
   14560           0 :         ndr_print_ptr(ndr, "req_array", r->req_array);
   14561           0 :         ndr->depth++;
   14562           0 :         if (r->req_array) {
   14563           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "req_array", (uint32_t)(r->num_req));
   14564           0 :                 ndr->depth++;
   14565           0 :                 for (cntr_req_array_1 = 0; cntr_req_array_1 < (r->num_req); cntr_req_array_1++) {
   14566           0 :                         ndr_print_ptr(ndr, "req_array", r->req_array[cntr_req_array_1]);
   14567           0 :                         ndr->depth++;
   14568           0 :                         if (r->req_array[cntr_req_array_1]) {
   14569           0 :                                 ndr_print_drsuapi_DsGetMembershipsRequest1(ndr, "req_array", r->req_array[cntr_req_array_1]);
   14570             :                         }
   14571           0 :                         ndr->depth--;
   14572             :                 }
   14573           0 :                 ndr->depth--;
   14574             :         }
   14575           0 :         ndr->depth--;
   14576           0 :         ndr->depth--;
   14577             : }
   14578             : 
   14579           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2Request(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_DsGetMemberships2Request *r)
   14580             : {
   14581           0 :         uint32_t level;
   14582           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   14583           0 :         if (ndr_flags & NDR_SCALARS) {
   14584             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   14585           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   14586           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   14587           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
   14588           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   14589           0 :                 switch (level) {
   14590           0 :                         case 1: {
   14591           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr, NDR_SCALARS, &r->req1));
   14592           0 :                         break; }
   14593             : 
   14594           0 :                         default:
   14595           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   14596             :                 }
   14597             :         }
   14598           0 :         if (ndr_flags & NDR_BUFFERS) {
   14599           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   14600             :                         /* We didn't get it above, and the token is not needed after this. */
   14601           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   14602             :                 }
   14603           0 :                 switch (level) {
   14604           0 :                         case 1:
   14605           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request1(ndr, NDR_BUFFERS, &r->req1));
   14606           0 :                         break;
   14607             : 
   14608           0 :                         default:
   14609           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   14610             :                 }
   14611             :         }
   14612           0 :         return NDR_ERR_SUCCESS;
   14613             : }
   14614             : 
   14615           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2Request(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_DsGetMemberships2Request *r)
   14616             : {
   14617           0 :         uint32_t level;
   14618           0 :         uint32_t _level;
   14619           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   14620           0 :         if (ndr_flags & NDR_SCALARS) {
   14621             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   14622           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   14623           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   14624           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   14625           0 :                 if (_level != level) {
   14626           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   14627             :                 }
   14628           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   14629           0 :                 switch (level) {
   14630           0 :                         case 1: {
   14631           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr, NDR_SCALARS, &r->req1));
   14632           0 :                         break; }
   14633             : 
   14634           0 :                         default:
   14635           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   14636             :                 }
   14637             :         }
   14638           0 :         if (ndr_flags & NDR_BUFFERS) {
   14639           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   14640             :                         /* We didn't get it above, and the token is not needed after this. */
   14641           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   14642             :                 }
   14643           0 :                 switch (level) {
   14644           0 :                         case 1:
   14645           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request1(ndr, NDR_BUFFERS, &r->req1));
   14646           0 :                         break;
   14647             : 
   14648           0 :                         default:
   14649           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   14650             :                 }
   14651             :         }
   14652           0 :         return NDR_ERR_SUCCESS;
   14653             : }
   14654             : 
   14655           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships2Request(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMemberships2Request *r)
   14656             : {
   14657           0 :         uint32_t level;
   14658           0 :         level = ndr_print_steal_switch_value(ndr, r);
   14659           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetMemberships2Request");
   14660           0 :         switch (level) {
   14661           0 :                 case 1:
   14662           0 :                         ndr_print_drsuapi_DsGetMemberships2Request1(ndr, "req1", &r->req1);
   14663           0 :                 break;
   14664             : 
   14665           0 :                 default:
   14666           0 :                         ndr_print_bad_level(ndr, name, level);
   14667             :         }
   14668           0 : }
   14669             : 
   14670           0 : static enum ndr_err_code ndr_push_drsuapi_DsSiteCostInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_DsSiteCostInfo *r)
   14671             : {
   14672           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   14673           0 :         if (ndr_flags & NDR_SCALARS) {
   14674           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
   14675           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->error_code));
   14676           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->site_cost));
   14677           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
   14678             :         }
   14679           0 :         if (ndr_flags & NDR_BUFFERS) {
   14680           0 :         }
   14681           0 :         return NDR_ERR_SUCCESS;
   14682             : }
   14683             : 
   14684           0 : static enum ndr_err_code ndr_pull_drsuapi_DsSiteCostInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_DsSiteCostInfo *r)
   14685             : {
   14686           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   14687           0 :         if (ndr_flags & NDR_SCALARS) {
   14688           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
   14689           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->error_code));
   14690           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->site_cost));
   14691           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
   14692             :         }
   14693           0 :         if (ndr_flags & NDR_BUFFERS) {
   14694           0 :         }
   14695           0 :         return NDR_ERR_SUCCESS;
   14696             : }
   14697             : 
   14698           0 : _PUBLIC_ void ndr_print_drsuapi_DsSiteCostInfo(struct ndr_print *ndr, const char *name, const struct drsuapi_DsSiteCostInfo *r)
   14699             : {
   14700           0 :         ndr_print_struct(ndr, name, "drsuapi_DsSiteCostInfo");
   14701           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14702           0 :         ndr->depth++;
   14703           0 :         ndr_print_WERROR(ndr, "error_code", r->error_code);
   14704           0 :         ndr_print_uint32(ndr, "site_cost", r->site_cost);
   14705           0 :         ndr->depth--;
   14706             : }
   14707             : 
   14708           0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostCtr1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_QuerySitesByCostCtr1 *r)
   14709             : {
   14710           0 :         uint32_t cntr_info_1;
   14711           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   14712           0 :         if (ndr_flags & NDR_SCALARS) {
   14713           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   14714           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_info));
   14715           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
   14716           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
   14717           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   14718             :         }
   14719           0 :         if (ndr_flags & NDR_BUFFERS) {
   14720           0 :                 if (r->info) {
   14721           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_info));
   14722           0 :                         for (cntr_info_1 = 0; cntr_info_1 < (r->num_info); cntr_info_1++) {
   14723           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsSiteCostInfo(ndr, NDR_SCALARS, &r->info[cntr_info_1]));
   14724             :                         }
   14725             :                 }
   14726             :         }
   14727           0 :         return NDR_ERR_SUCCESS;
   14728             : }
   14729             : 
   14730           0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostCtr1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_QuerySitesByCostCtr1 *r)
   14731             : {
   14732           0 :         uint32_t _ptr_info;
   14733           0 :         uint32_t size_info_1 = 0;
   14734           0 :         uint32_t cntr_info_1;
   14735           0 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   14736           0 :         TALLOC_CTX *_mem_save_info_1 = NULL;
   14737           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   14738           0 :         if (ndr_flags & NDR_SCALARS) {
   14739           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   14740           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_info));
   14741           0 :                 if (r->num_info > 10000) {
   14742           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_info), (uint32_t)(0), (uint32_t)(10000));
   14743             :                 }
   14744           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
   14745           0 :                 if (_ptr_info) {
   14746           0 :                         NDR_PULL_ALLOC(ndr, r->info);
   14747             :                 } else {
   14748           0 :                         r->info = NULL;
   14749             :                 }
   14750           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags_reserved));
   14751           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   14752             :         }
   14753           0 :         if (ndr_flags & NDR_BUFFERS) {
   14754           0 :                 if (r->info) {
   14755           0 :                         _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14756           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
   14757           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->info));
   14758           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->info, &size_info_1));
   14759           0 :                         NDR_PULL_ALLOC_N(ndr, r->info, size_info_1);
   14760           0 :                         _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
   14761           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
   14762           0 :                         for (cntr_info_1 = 0; cntr_info_1 < (size_info_1); cntr_info_1++) {
   14763           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsSiteCostInfo(ndr, NDR_SCALARS, &r->info[cntr_info_1]));
   14764             :                         }
   14765           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
   14766           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
   14767             :                 }
   14768           0 :                 if (r->info) {
   14769           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->info, r->num_info));
   14770             :                 }
   14771             :         }
   14772           0 :         return NDR_ERR_SUCCESS;
   14773             : }
   14774             : 
   14775           0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCostCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_QuerySitesByCostCtr1 *r)
   14776             : {
   14777           0 :         uint32_t cntr_info_1;
   14778           0 :         ndr_print_struct(ndr, name, "drsuapi_QuerySitesByCostCtr1");
   14779           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   14780           0 :         ndr->depth++;
   14781           0 :         ndr_print_uint32(ndr, "num_info", r->num_info);
   14782           0 :         ndr_print_ptr(ndr, "info", r->info);
   14783           0 :         ndr->depth++;
   14784           0 :         if (r->info) {
   14785           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "info", (uint32_t)(r->num_info));
   14786           0 :                 ndr->depth++;
   14787           0 :                 for (cntr_info_1 = 0; cntr_info_1 < (r->num_info); cntr_info_1++) {
   14788           0 :                         ndr_print_drsuapi_DsSiteCostInfo(ndr, "info", &r->info[cntr_info_1]);
   14789             :                 }
   14790           0 :                 ndr->depth--;
   14791             :         }
   14792           0 :         ndr->depth--;
   14793           0 :         ndr_print_uint32(ndr, "flags_reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->flags_reserved);
   14794           0 :         ndr->depth--;
   14795             : }
   14796             : 
   14797           0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostCtr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_QuerySitesByCostCtr *r)
   14798             : {
   14799           0 :         uint32_t level;
   14800           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   14801           0 :         if (ndr_flags & NDR_SCALARS) {
   14802             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   14803           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   14804           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   14805           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
   14806           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   14807           0 :                 switch (level) {
   14808           0 :                         case 1: {
   14809           0 :                                 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr, NDR_SCALARS, &r->ctr1));
   14810           0 :                         break; }
   14811             : 
   14812           0 :                         default:
   14813           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   14814             :                 }
   14815             :         }
   14816           0 :         if (ndr_flags & NDR_BUFFERS) {
   14817           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   14818             :                         /* We didn't get it above, and the token is not needed after this. */
   14819           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   14820             :                 }
   14821           0 :                 switch (level) {
   14822           0 :                         case 1:
   14823           0 :                                 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr1(ndr, NDR_BUFFERS, &r->ctr1));
   14824           0 :                         break;
   14825             : 
   14826           0 :                         default:
   14827           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   14828             :                 }
   14829             :         }
   14830           0 :         return NDR_ERR_SUCCESS;
   14831             : }
   14832             : 
   14833           0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostCtr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_QuerySitesByCostCtr *r)
   14834             : {
   14835           0 :         uint32_t level;
   14836           0 :         uint32_t _level;
   14837           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   14838           0 :         if (ndr_flags & NDR_SCALARS) {
   14839             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   14840           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   14841           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   14842           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   14843           0 :                 if (_level != level) {
   14844           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   14845             :                 }
   14846           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   14847           0 :                 switch (level) {
   14848           0 :                         case 1: {
   14849           0 :                                 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr, NDR_SCALARS, &r->ctr1));
   14850           0 :                         break; }
   14851             : 
   14852           0 :                         default:
   14853           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   14854             :                 }
   14855             :         }
   14856           0 :         if (ndr_flags & NDR_BUFFERS) {
   14857           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   14858             :                         /* We didn't get it above, and the token is not needed after this. */
   14859           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   14860             :                 }
   14861           0 :                 switch (level) {
   14862           0 :                         case 1:
   14863           0 :                                 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr1(ndr, NDR_BUFFERS, &r->ctr1));
   14864           0 :                         break;
   14865             : 
   14866           0 :                         default:
   14867           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   14868             :                 }
   14869             :         }
   14870           0 :         return NDR_ERR_SUCCESS;
   14871             : }
   14872             : 
   14873           0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCostCtr(struct ndr_print *ndr, const char *name, const union drsuapi_QuerySitesByCostCtr *r)
   14874             : {
   14875           0 :         uint32_t level;
   14876           0 :         level = ndr_print_steal_switch_value(ndr, r);
   14877           0 :         ndr_print_union(ndr, name, level, "drsuapi_QuerySitesByCostCtr");
   14878           0 :         switch (level) {
   14879           0 :                 case 1:
   14880           0 :                         ndr_print_drsuapi_QuerySitesByCostCtr1(ndr, "ctr1", &r->ctr1);
   14881           0 :                 break;
   14882             : 
   14883           0 :                 default:
   14884           0 :                         ndr_print_bad_level(ndr, name, level);
   14885             :         }
   14886           0 : }
   14887             : 
   14888           0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostRequest1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct drsuapi_QuerySitesByCostRequest1 *r)
   14889             : {
   14890           0 :         uint32_t cntr_site_to_1;
   14891           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   14892           0 :         if (ndr_flags & NDR_SCALARS) {
   14893           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
   14894           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_from));
   14895           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_req));
   14896           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_to));
   14897           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
   14898           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
   14899             :         }
   14900           0 :         if (ndr_flags & NDR_BUFFERS) {
   14901           0 :                 if (r->site_from) {
   14902           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_from, CH_UTF16)));
   14903           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14904           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_from, CH_UTF16)));
   14905           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_from, ndr_charset_length(r->site_from, CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14906             :                 }
   14907           0 :                 if (r->site_to) {
   14908           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_req));
   14909           0 :                         for (cntr_site_to_1 = 0; cntr_site_to_1 < (r->num_req); cntr_site_to_1++) {
   14910           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_to[cntr_site_to_1]));
   14911             :                         }
   14912           0 :                         for (cntr_site_to_1 = 0; cntr_site_to_1 < (r->num_req); cntr_site_to_1++) {
   14913           0 :                                 if (r->site_to[cntr_site_to_1]) {
   14914           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_to[cntr_site_to_1], CH_UTF16)));
   14915           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
   14916           0 :                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_to[cntr_site_to_1], CH_UTF16)));
   14917           0 :                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->site_to[cntr_site_to_1], ndr_charset_length(r->site_to[cntr_site_to_1], CH_UTF16), sizeof(uint16_t), CH_UTF16));
   14918             :                                 }
   14919             :                         }
   14920             :                 }
   14921             :         }
   14922           0 :         return NDR_ERR_SUCCESS;
   14923             : }
   14924             : 
   14925           0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostRequest1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct drsuapi_QuerySitesByCostRequest1 *r)
   14926             : {
   14927           0 :         uint32_t _ptr_site_from;
   14928           0 :         uint32_t size_site_from_1 = 0;
   14929           0 :         uint32_t length_site_from_1 = 0;
   14930           0 :         TALLOC_CTX *_mem_save_site_from_0 = NULL;
   14931           0 :         uint32_t _ptr_site_to;
   14932           0 :         uint32_t size_site_to_1 = 0;
   14933           0 :         uint32_t cntr_site_to_1;
   14934           0 :         uint32_t size_site_to_3 = 0;
   14935           0 :         uint32_t length_site_to_3 = 0;
   14936           0 :         TALLOC_CTX *_mem_save_site_to_0 = NULL;
   14937           0 :         TALLOC_CTX *_mem_save_site_to_1 = NULL;
   14938           0 :         TALLOC_CTX *_mem_save_site_to_2 = NULL;
   14939           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   14940           0 :         if (ndr_flags & NDR_SCALARS) {
   14941           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
   14942           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_from));
   14943           0 :                 if (_ptr_site_from) {
   14944           0 :                         NDR_PULL_ALLOC(ndr, r->site_from);
   14945             :                 } else {
   14946           0 :                         r->site_from = NULL;
   14947             :                 }
   14948           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_req));
   14949           0 :                 if (r->num_req < 1 || r->num_req > 10000) {
   14950           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_req), (uint32_t)(1), (uint32_t)(10000));
   14951             :                 }
   14952           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_to));
   14953           0 :                 if (_ptr_site_to) {
   14954           0 :                         NDR_PULL_ALLOC(ndr, r->site_to);
   14955             :                 } else {
   14956           0 :                         r->site_to = NULL;
   14957             :                 }
   14958           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
   14959           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
   14960             :         }
   14961           0 :         if (ndr_flags & NDR_BUFFERS) {
   14962           0 :                 if (r->site_from) {
   14963           0 :                         _mem_save_site_from_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14964           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_from, 0);
   14965           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_from));
   14966           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->site_from));
   14967           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_from, &size_site_from_1));
   14968           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_from, &length_site_from_1));
   14969           0 :                         if (length_site_from_1 > size_site_from_1) {
   14970           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_from_1, length_site_from_1);
   14971             :                         }
   14972           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_from_1, sizeof(uint16_t)));
   14973           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_from, length_site_from_1, sizeof(uint16_t), CH_UTF16));
   14974           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_from_0, 0);
   14975             :                 }
   14976           0 :                 if (r->site_to) {
   14977           0 :                         _mem_save_site_to_0 = NDR_PULL_GET_MEM_CTX(ndr);
   14978           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_to, 0);
   14979           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_to));
   14980           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->site_to, &size_site_to_1));
   14981           0 :                         NDR_PULL_ALLOC_N(ndr, r->site_to, size_site_to_1);
   14982           0 :                         _mem_save_site_to_1 = NDR_PULL_GET_MEM_CTX(ndr);
   14983           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_to, 0);
   14984           0 :                         for (cntr_site_to_1 = 0; cntr_site_to_1 < (size_site_to_1); cntr_site_to_1++) {
   14985           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_to));
   14986           0 :                                 if (_ptr_site_to) {
   14987           0 :                                         NDR_PULL_ALLOC(ndr, r->site_to[cntr_site_to_1]);
   14988             :                                 } else {
   14989           0 :                                         r->site_to[cntr_site_to_1] = NULL;
   14990             :                                 }
   14991             :                         }
   14992           0 :                         for (cntr_site_to_1 = 0; cntr_site_to_1 < (size_site_to_1); cntr_site_to_1++) {
   14993           0 :                                 if (r->site_to[cntr_site_to_1]) {
   14994           0 :                                         _mem_save_site_to_2 = NDR_PULL_GET_MEM_CTX(ndr);
   14995           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->site_to[cntr_site_to_1], 0);
   14996           0 :                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_to[cntr_site_to_1]));
   14997           0 :                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->site_to[cntr_site_to_1]));
   14998           0 :                                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_to[cntr_site_to_1], &size_site_to_3));
   14999           0 :                                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_to[cntr_site_to_1], &length_site_to_3));
   15000           0 :                                         if (length_site_to_3 > size_site_to_3) {
   15001           0 :                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_site_to_3, length_site_to_3);
   15002             :                                         }
   15003           0 :                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_to_3, sizeof(uint16_t)));
   15004           0 :                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_to[cntr_site_to_1], length_site_to_3, sizeof(uint16_t), CH_UTF16));
   15005           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_to_2, 0);
   15006             :                                 }
   15007             :                         }
   15008           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_to_1, 0);
   15009           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_to_0, 0);
   15010             :                 }
   15011           0 :                 if (r->site_to) {
   15012           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->site_to, r->num_req));
   15013             :                 }
   15014           0 :                 for (cntr_site_to_1 = 0; cntr_site_to_1 < (size_site_to_1); cntr_site_to_1++) {
   15015           0 :                 }
   15016             :         }
   15017           0 :         return NDR_ERR_SUCCESS;
   15018             : }
   15019             : 
   15020           0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCostRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_QuerySitesByCostRequest1 *r)
   15021             : {
   15022           0 :         uint32_t cntr_site_to_1;
   15023           0 :         ndr_print_struct(ndr, name, "drsuapi_QuerySitesByCostRequest1");
   15024           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15025           0 :         ndr->depth++;
   15026           0 :         ndr_print_ptr(ndr, "site_from", r->site_from);
   15027           0 :         ndr->depth++;
   15028           0 :         if (r->site_from) {
   15029           0 :                 ndr_print_string(ndr, "site_from", r->site_from);
   15030             :         }
   15031           0 :         ndr->depth--;
   15032           0 :         ndr_print_uint32(ndr, "num_req", r->num_req);
   15033           0 :         ndr_print_ptr(ndr, "site_to", r->site_to);
   15034           0 :         ndr->depth++;
   15035           0 :         if (r->site_to) {
   15036           0 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "site_to", (uint32_t)(r->num_req));
   15037           0 :                 ndr->depth++;
   15038           0 :                 for (cntr_site_to_1 = 0; cntr_site_to_1 < (r->num_req); cntr_site_to_1++) {
   15039           0 :                         ndr_print_ptr(ndr, "site_to", r->site_to[cntr_site_to_1]);
   15040           0 :                         ndr->depth++;
   15041           0 :                         if (r->site_to[cntr_site_to_1]) {
   15042           0 :                                 ndr_print_string(ndr, "site_to", r->site_to[cntr_site_to_1]);
   15043             :                         }
   15044           0 :                         ndr->depth--;
   15045             :                 }
   15046           0 :                 ndr->depth--;
   15047             :         }
   15048           0 :         ndr->depth--;
   15049           0 :         ndr_print_uint32(ndr, "flags", r->flags);
   15050           0 :         ndr->depth--;
   15051             : }
   15052             : 
   15053           0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCostRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union drsuapi_QuerySitesByCostRequest *r)
   15054             : {
   15055           0 :         uint32_t level;
   15056           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
   15057           0 :         if (ndr_flags & NDR_SCALARS) {
   15058             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   15059           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   15060           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   15061           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
   15062           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
   15063           0 :                 switch (level) {
   15064           0 :                         case 1: {
   15065           0 :                                 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr, NDR_SCALARS, &r->req1));
   15066           0 :                         break; }
   15067             : 
   15068           0 :                         default:
   15069           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   15070             :                 }
   15071             :         }
   15072           0 :         if (ndr_flags & NDR_BUFFERS) {
   15073           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   15074             :                         /* We didn't get it above, and the token is not needed after this. */
   15075           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
   15076             :                 }
   15077           0 :                 switch (level) {
   15078           0 :                         case 1:
   15079           0 :                                 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest1(ndr, NDR_BUFFERS, &r->req1));
   15080           0 :                         break;
   15081             : 
   15082           0 :                         default:
   15083           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
   15084             :                 }
   15085             :         }
   15086           0 :         return NDR_ERR_SUCCESS;
   15087             : }
   15088             : 
   15089           0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union drsuapi_QuerySitesByCostRequest *r)
   15090             : {
   15091           0 :         uint32_t level;
   15092           0 :         uint32_t _level;
   15093           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
   15094           0 :         if (ndr_flags & NDR_SCALARS) {
   15095             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
   15096           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   15097           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   15098           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
   15099           0 :                 if (_level != level) {
   15100           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
   15101             :                 }
   15102           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
   15103           0 :                 switch (level) {
   15104           0 :                         case 1: {
   15105           0 :                                 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr, NDR_SCALARS, &r->req1));
   15106           0 :                         break; }
   15107             : 
   15108           0 :                         default:
   15109           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   15110             :                 }
   15111             :         }
   15112           0 :         if (ndr_flags & NDR_BUFFERS) {
   15113           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
   15114             :                         /* We didn't get it above, and the token is not needed after this. */
   15115           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
   15116             :                 }
   15117           0 :                 switch (level) {
   15118           0 :                         case 1:
   15119           0 :                                 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest1(ndr, NDR_BUFFERS, &r->req1));
   15120           0 :                         break;
   15121             : 
   15122           0 :                         default:
   15123           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
   15124             :                 }
   15125             :         }
   15126           0 :         return NDR_ERR_SUCCESS;
   15127             : }
   15128             : 
   15129           0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCostRequest(struct ndr_print *ndr, const char *name, const union drsuapi_QuerySitesByCostRequest *r)
   15130             : {
   15131           0 :         uint32_t level;
   15132           0 :         level = ndr_print_steal_switch_value(ndr, r);
   15133           0 :         ndr_print_union(ndr, name, level, "drsuapi_QuerySitesByCostRequest");
   15134           0 :         switch (level) {
   15135           0 :                 case 1:
   15136           0 :                         ndr_print_drsuapi_QuerySitesByCostRequest1(ndr, "req1", &r->req1);
   15137           0 :                 break;
   15138             : 
   15139           0 :                 default:
   15140           0 :                         ndr_print_bad_level(ndr, name, level);
   15141             :         }
   15142           0 : }
   15143             : 
   15144        4780 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBind(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsBind *r)
   15145             : {
   15146        4780 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15147        4780 :         if (flags & NDR_IN) {
   15148        2320 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.bind_guid));
   15149        2320 :                 if (r->in.bind_guid) {
   15150        2320 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.bind_guid));
   15151             :                 }
   15152        2320 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.bind_info));
   15153        2320 :                 if (r->in.bind_info) {
   15154        1675 :                         NDR_CHECK(ndr_push_drsuapi_DsBindInfoCtr(ndr, NDR_SCALARS, r->in.bind_info));
   15155             :                 }
   15156             :         }
   15157        4780 :         if (flags & NDR_OUT) {
   15158        2460 :                 if (r->out.bind_handle == NULL) {
   15159           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15160             :                 }
   15161        2460 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.bind_info));
   15162        2460 :                 if (r->out.bind_info) {
   15163        2460 :                         NDR_CHECK(ndr_push_drsuapi_DsBindInfoCtr(ndr, NDR_SCALARS, r->out.bind_info));
   15164             :                 }
   15165        2460 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.bind_handle));
   15166        2460 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15167             :         }
   15168        4577 :         return NDR_ERR_SUCCESS;
   15169             : }
   15170             : 
   15171        4646 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBind(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsBind *r)
   15172             : {
   15173         187 :         uint32_t _ptr_bind_guid;
   15174         187 :         uint32_t _ptr_bind_info;
   15175        4646 :         TALLOC_CTX *_mem_save_bind_guid_0 = NULL;
   15176        4646 :         TALLOC_CTX *_mem_save_bind_info_0 = NULL;
   15177        4646 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15178        4646 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15179        4646 :         if (flags & NDR_IN) {
   15180        2340 :                 NDR_ZERO_STRUCT(r->out);
   15181             : 
   15182        2340 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bind_guid));
   15183        2340 :                 if (_ptr_bind_guid) {
   15184        2340 :                         NDR_PULL_ALLOC(ndr, r->in.bind_guid);
   15185             :                 } else {
   15186           0 :                         r->in.bind_guid = NULL;
   15187             :                 }
   15188        2340 :                 if (r->in.bind_guid) {
   15189        2340 :                         _mem_save_bind_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15190        2340 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_guid, 0);
   15191        2340 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.bind_guid));
   15192        2340 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_guid_0, 0);
   15193             :                 }
   15194        2340 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bind_info));
   15195        2340 :                 if (_ptr_bind_info) {
   15196        1703 :                         NDR_PULL_ALLOC(ndr, r->in.bind_info);
   15197             :                 } else {
   15198         637 :                         r->in.bind_info = NULL;
   15199             :                 }
   15200        2340 :                 if (r->in.bind_info) {
   15201        1703 :                         _mem_save_bind_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15202        1703 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_info, 0);
   15203        1703 :                         NDR_CHECK(ndr_pull_drsuapi_DsBindInfoCtr(ndr, NDR_SCALARS, r->in.bind_info));
   15204        1703 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_info_0, 0);
   15205             :                 }
   15206        2340 :                 NDR_PULL_ALLOC(ndr, r->out.bind_handle);
   15207        2340 :                 NDR_ZERO_STRUCTP(r->out.bind_handle);
   15208             :         }
   15209        4646 :         if (flags & NDR_OUT) {
   15210             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15211             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15212        2306 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bind_info));
   15213        2306 :                 if (_ptr_bind_info) {
   15214        2306 :                         NDR_PULL_ALLOC(ndr, r->out.bind_info);
   15215             :                 } else {
   15216           0 :                         r->out.bind_info = NULL;
   15217             :                 }
   15218        2306 :                 if (r->out.bind_info) {
   15219        2306 :                         _mem_save_bind_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15220        2306 :                         NDR_PULL_SET_MEM_CTX(ndr, r->out.bind_info, 0);
   15221        2306 :                         NDR_CHECK(ndr_pull_drsuapi_DsBindInfoCtr(ndr, NDR_SCALARS, r->out.bind_info));
   15222        2306 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_info_0, 0);
   15223             :                 }
   15224        2306 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15225        1746 :                         NDR_PULL_ALLOC(ndr, r->out.bind_handle);
   15226             :                 }
   15227        2306 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15228        2306 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15229        2306 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.bind_handle));
   15230        2306 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15231        2306 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15232             :         }
   15233        4459 :         return NDR_ERR_SUCCESS;
   15234             : }
   15235             : 
   15236         256 : _PUBLIC_ void ndr_print_drsuapi_DsBind(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsBind *r)
   15237             : {
   15238         256 :         ndr_print_struct(ndr, name, "drsuapi_DsBind");
   15239         256 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15240         256 :         ndr->depth++;
   15241         256 :         if (flags & NDR_SET_VALUES) {
   15242           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15243             :         }
   15244         256 :         if (flags & NDR_IN) {
   15245           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsBind");
   15246           0 :                 ndr->depth++;
   15247           0 :                 ndr_print_ptr(ndr, "bind_guid", r->in.bind_guid);
   15248           0 :                 ndr->depth++;
   15249           0 :                 if (r->in.bind_guid) {
   15250           0 :                         ndr_print_GUID(ndr, "bind_guid", r->in.bind_guid);
   15251             :                 }
   15252           0 :                 ndr->depth--;
   15253           0 :                 ndr_print_ptr(ndr, "bind_info", r->in.bind_info);
   15254           0 :                 ndr->depth++;
   15255           0 :                 if (r->in.bind_info) {
   15256           0 :                         ndr_print_drsuapi_DsBindInfoCtr(ndr, "bind_info", r->in.bind_info);
   15257             :                 }
   15258           0 :                 ndr->depth--;
   15259           0 :                 ndr->depth--;
   15260             :         }
   15261         256 :         if (flags & NDR_OUT) {
   15262         256 :                 ndr_print_struct(ndr, "out", "drsuapi_DsBind");
   15263         256 :                 ndr->depth++;
   15264         256 :                 ndr_print_ptr(ndr, "bind_info", r->out.bind_info);
   15265         256 :                 ndr->depth++;
   15266         256 :                 if (r->out.bind_info) {
   15267         256 :                         ndr_print_drsuapi_DsBindInfoCtr(ndr, "bind_info", r->out.bind_info);
   15268             :                 }
   15269         256 :                 ndr->depth--;
   15270         256 :                 ndr_print_ptr(ndr, "bind_handle", r->out.bind_handle);
   15271         256 :                 ndr->depth++;
   15272         256 :                 ndr_print_policy_handle(ndr, "bind_handle", r->out.bind_handle);
   15273         256 :                 ndr->depth--;
   15274         256 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15275         256 :                 ndr->depth--;
   15276             :         }
   15277         256 :         ndr->depth--;
   15278             : }
   15279             : 
   15280          54 : static enum ndr_err_code ndr_push_drsuapi_DsUnbind(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsUnbind *r)
   15281             : {
   15282          54 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15283          54 :         if (flags & NDR_IN) {
   15284          29 :                 if (r->in.bind_handle == NULL) {
   15285           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15286             :                 }
   15287          29 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15288             :         }
   15289          54 :         if (flags & NDR_OUT) {
   15290          25 :                 if (r->out.bind_handle == NULL) {
   15291           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15292             :                 }
   15293          25 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.bind_handle));
   15294          25 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15295             :         }
   15296          50 :         return NDR_ERR_SUCCESS;
   15297             : }
   15298             : 
   15299          50 : static enum ndr_err_code ndr_pull_drsuapi_DsUnbind(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsUnbind *r)
   15300             : {
   15301          50 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15302          50 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15303          50 :         if (flags & NDR_IN) {
   15304          29 :                 NDR_ZERO_STRUCT(r->out);
   15305             : 
   15306          29 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15307          29 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15308             :                 }
   15309          29 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15310          29 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15311          29 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15312          29 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15313          29 :                 NDR_PULL_ALLOC(ndr, r->out.bind_handle);
   15314          29 :                 *r->out.bind_handle = *r->in.bind_handle;
   15315             :         }
   15316          50 :         if (flags & NDR_OUT) {
   15317             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15318             :                 if (r->in.bind_handle == NULL) {
   15319             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15320             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   15321             :                 }
   15322             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15323          21 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15324           5 :                         NDR_PULL_ALLOC(ndr, r->out.bind_handle);
   15325             :                 }
   15326          21 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15327          21 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15328          21 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.bind_handle));
   15329          21 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15330          21 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15331             :         }
   15332          46 :         return NDR_ERR_SUCCESS;
   15333             : }
   15334             : 
   15335           8 : _PUBLIC_ void ndr_print_drsuapi_DsUnbind(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsUnbind *r)
   15336             : {
   15337           8 :         ndr_print_struct(ndr, name, "drsuapi_DsUnbind");
   15338           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15339           8 :         ndr->depth++;
   15340           8 :         if (flags & NDR_SET_VALUES) {
   15341           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15342             :         }
   15343           8 :         if (flags & NDR_IN) {
   15344           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsUnbind");
   15345           0 :                 ndr->depth++;
   15346           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   15347           0 :                 ndr->depth++;
   15348           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   15349           0 :                 ndr->depth--;
   15350           0 :                 ndr->depth--;
   15351             :         }
   15352           8 :         if (flags & NDR_OUT) {
   15353           8 :                 ndr_print_struct(ndr, "out", "drsuapi_DsUnbind");
   15354           8 :                 ndr->depth++;
   15355           8 :                 ndr_print_ptr(ndr, "bind_handle", r->out.bind_handle);
   15356           8 :                 ndr->depth++;
   15357           8 :                 ndr_print_policy_handle(ndr, "bind_handle", r->out.bind_handle);
   15358           8 :                 ndr->depth--;
   15359           8 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15360           8 :                 ndr->depth--;
   15361             :         }
   15362           8 :         ndr->depth--;
   15363             : }
   15364             : 
   15365        8408 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaSync(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaSync *r)
   15366             : {
   15367        8408 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15368        8408 :         if (flags & NDR_IN) {
   15369        4204 :                 if (r->in.bind_handle == NULL) {
   15370           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15371             :                 }
   15372        4204 :                 if (r->in.req == NULL) {
   15373           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15374             :                 }
   15375        4204 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15376        4204 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   15377        4204 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   15378        4204 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   15379             :         }
   15380        8408 :         if (flags & NDR_OUT) {
   15381        4204 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15382             :         }
   15383        8408 :         return NDR_ERR_SUCCESS;
   15384             : }
   15385             : 
   15386        8408 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSync(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaSync *r)
   15387             : {
   15388        8408 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15389        8408 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   15390        8408 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15391        8408 :         if (flags & NDR_IN) {
   15392        4204 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15393        4204 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15394             :                 }
   15395        4204 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15396        4204 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15397        4204 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15398        4204 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15399        4204 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   15400        4204 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15401        4204 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   15402             :                 }
   15403        4204 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15404        4204 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   15405        4204 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   15406        4204 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   15407        4204 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   15408             :         }
   15409        8408 :         if (flags & NDR_OUT) {
   15410             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15411             :                 if (r->in.bind_handle == NULL) {
   15412             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15413             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   15414             :                 }
   15415             :                 if (r->in.req == NULL) {
   15416             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   15417             :                         NDR_ZERO_STRUCTP(r->in.req);
   15418             :                 }
   15419             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15420        4204 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15421             :         }
   15422        8408 :         return NDR_ERR_SUCCESS;
   15423             : }
   15424             : 
   15425           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaSync(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaSync *r)
   15426             : {
   15427           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaSync");
   15428           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15429           0 :         ndr->depth++;
   15430           0 :         if (flags & NDR_SET_VALUES) {
   15431           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15432             :         }
   15433           0 :         if (flags & NDR_IN) {
   15434           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsReplicaSync");
   15435           0 :                 ndr->depth++;
   15436           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   15437           0 :                 ndr->depth++;
   15438           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   15439           0 :                 ndr->depth--;
   15440           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   15441           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   15442           0 :                 ndr->depth++;
   15443           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   15444           0 :                 ndr_print_drsuapi_DsReplicaSyncRequest(ndr, "req", r->in.req);
   15445           0 :                 ndr->depth--;
   15446           0 :                 ndr->depth--;
   15447             :         }
   15448           0 :         if (flags & NDR_OUT) {
   15449           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsReplicaSync");
   15450           0 :                 ndr->depth++;
   15451           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15452           0 :                 ndr->depth--;
   15453             :         }
   15454           0 :         ndr->depth--;
   15455             : }
   15456             : 
   15457       20170 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChanges(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetNCChanges *r)
   15458             : {
   15459       20170 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15460       20170 :         if (flags & NDR_IN) {
   15461       10059 :                 if (r->in.bind_handle == NULL) {
   15462           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15463             :                 }
   15464       10059 :                 if (r->in.req == NULL) {
   15465           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15466             :                 }
   15467       10059 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15468       10059 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   15469       10059 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   15470       10059 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   15471             :         }
   15472       20170 :         if (flags & NDR_OUT) {
   15473       10111 :                 if (r->out.level_out == NULL) {
   15474           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15475             :                 }
   15476       10111 :                 if (r->out.ctr == NULL) {
   15477           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15478             :                 }
   15479       10111 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   15480       10111 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   15481       10111 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   15482       10111 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15483             :         }
   15484       20170 :         return NDR_ERR_SUCCESS;
   15485             : }
   15486             : 
   15487       20152 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChanges(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetNCChanges *r)
   15488             : {
   15489       20152 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15490       20152 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   15491       20152 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   15492       20152 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   15493       20152 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15494       20152 :         if (flags & NDR_IN) {
   15495       10091 :                 NDR_ZERO_STRUCT(r->out);
   15496             : 
   15497       10091 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15498       10091 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15499             :                 }
   15500       10091 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15501       10091 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15502       10091 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15503       10091 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15504       10091 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   15505       10091 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15506       10091 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   15507             :                 }
   15508       10091 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15509       10091 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   15510       10091 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   15511       10091 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   15512       10091 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   15513       10091 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   15514       10091 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   15515       10091 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   15516       10091 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   15517             :         }
   15518       20152 :         if (flags & NDR_OUT) {
   15519             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15520             :                 if (r->in.bind_handle == NULL) {
   15521             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15522             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   15523             :                 }
   15524             :                 if (r->in.req == NULL) {
   15525             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   15526             :                         NDR_ZERO_STRUCTP(r->in.req);
   15527             :                 }
   15528             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15529       10061 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15530        5615 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   15531             :                 }
   15532       10061 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15533       10061 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   15534       10061 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   15535       10061 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   15536       10061 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15537        5615 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   15538             :                 }
   15539       10061 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15540       10061 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   15541       10061 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   15542       10061 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   15543       10060 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   15544       10060 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15545             :         }
   15546       20150 :         return NDR_ERR_SUCCESS;
   15547             : }
   15548             : 
   15549          41 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChanges(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetNCChanges *r)
   15550             : {
   15551          41 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChanges");
   15552          41 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15553          41 :         ndr->depth++;
   15554          41 :         if (flags & NDR_SET_VALUES) {
   15555           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15556             :         }
   15557          41 :         if (flags & NDR_IN) {
   15558           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsGetNCChanges");
   15559           0 :                 ndr->depth++;
   15560           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   15561           0 :                 ndr->depth++;
   15562           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   15563           0 :                 ndr->depth--;
   15564           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   15565           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   15566           0 :                 ndr->depth++;
   15567           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   15568           0 :                 ndr_print_drsuapi_DsGetNCChangesRequest(ndr, "req", r->in.req);
   15569           0 :                 ndr->depth--;
   15570           0 :                 ndr->depth--;
   15571             :         }
   15572          41 :         if (flags & NDR_OUT) {
   15573          41 :                 ndr_print_struct(ndr, "out", "drsuapi_DsGetNCChanges");
   15574          41 :                 ndr->depth++;
   15575          41 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   15576          41 :                 ndr->depth++;
   15577          41 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   15578          41 :                 ndr->depth--;
   15579          41 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   15580          41 :                 ndr->depth++;
   15581          41 :                 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
   15582          41 :                 ndr_print_drsuapi_DsGetNCChangesCtr(ndr, "ctr", r->out.ctr);
   15583          41 :                 ndr->depth--;
   15584          41 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15585          41 :                 ndr->depth--;
   15586             :         }
   15587          41 :         ndr->depth--;
   15588             : }
   15589             : 
   15590        3238 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefs(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaUpdateRefs *r)
   15591             : {
   15592        3238 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15593        3238 :         if (flags & NDR_IN) {
   15594        1619 :                 if (r->in.bind_handle == NULL) {
   15595           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15596             :                 }
   15597        1619 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15598        1619 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   15599        1619 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level));
   15600        1619 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
   15601             :         }
   15602        3238 :         if (flags & NDR_OUT) {
   15603        1619 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15604             :         }
   15605        3238 :         return NDR_ERR_SUCCESS;
   15606             : }
   15607             : 
   15608        3238 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefs(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaUpdateRefs *r)
   15609             : {
   15610        3238 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15611        3238 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15612        3238 :         if (flags & NDR_IN) {
   15613        1619 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15614        1619 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15615             :                 }
   15616        1619 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15617        1619 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15618        1619 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15619        1619 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15620        1619 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   15621        1619 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level));
   15622        1619 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
   15623             :         }
   15624        3238 :         if (flags & NDR_OUT) {
   15625             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15626             :                 if (r->in.bind_handle == NULL) {
   15627             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15628             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   15629             :                 }
   15630             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15631        1619 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15632             :         }
   15633        3238 :         return NDR_ERR_SUCCESS;
   15634             : }
   15635             : 
   15636           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefs(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaUpdateRefs *r)
   15637             : {
   15638           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaUpdateRefs");
   15639           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15640           0 :         ndr->depth++;
   15641           0 :         if (flags & NDR_SET_VALUES) {
   15642           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15643             :         }
   15644           0 :         if (flags & NDR_IN) {
   15645           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsReplicaUpdateRefs");
   15646           0 :                 ndr->depth++;
   15647           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   15648           0 :                 ndr->depth++;
   15649           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   15650           0 :                 ndr->depth--;
   15651           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   15652           0 :                 ndr_print_set_switch_value(ndr, &r->in.req, r->in.level);
   15653           0 :                 ndr_print_drsuapi_DsReplicaUpdateRefsRequest(ndr, "req", &r->in.req);
   15654           0 :                 ndr->depth--;
   15655             :         }
   15656           0 :         if (flags & NDR_OUT) {
   15657           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsReplicaUpdateRefs");
   15658           0 :                 ndr->depth++;
   15659           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15660           0 :                 ndr->depth--;
   15661             :         }
   15662           0 :         ndr->depth--;
   15663             : }
   15664             : 
   15665           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAdd(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaAdd *r)
   15666             : {
   15667           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15668           0 :         if (flags & NDR_IN) {
   15669           0 :                 if (r->in.bind_handle == NULL) {
   15670           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15671             :                 }
   15672           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15673           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   15674           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level));
   15675           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
   15676             :         }
   15677           0 :         if (flags & NDR_OUT) {
   15678           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15679             :         }
   15680           0 :         return NDR_ERR_SUCCESS;
   15681             : }
   15682             : 
   15683           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAdd(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaAdd *r)
   15684             : {
   15685           0 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15686           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15687           0 :         if (flags & NDR_IN) {
   15688           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15689           0 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15690             :                 }
   15691           0 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15692           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15693           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15694           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15695           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   15696           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level));
   15697           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
   15698             :         }
   15699           0 :         if (flags & NDR_OUT) {
   15700             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15701             :                 if (r->in.bind_handle == NULL) {
   15702             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15703             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   15704             :                 }
   15705             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15706           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15707             :         }
   15708           0 :         return NDR_ERR_SUCCESS;
   15709             : }
   15710             : 
   15711           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAdd(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaAdd *r)
   15712             : {
   15713           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAdd");
   15714           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15715           0 :         ndr->depth++;
   15716           0 :         if (flags & NDR_SET_VALUES) {
   15717           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15718             :         }
   15719           0 :         if (flags & NDR_IN) {
   15720           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsReplicaAdd");
   15721           0 :                 ndr->depth++;
   15722           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   15723           0 :                 ndr->depth++;
   15724           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   15725           0 :                 ndr->depth--;
   15726           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   15727           0 :                 ndr_print_set_switch_value(ndr, &r->in.req, r->in.level);
   15728           0 :                 ndr_print_drsuapi_DsReplicaAddRequest(ndr, "req", &r->in.req);
   15729           0 :                 ndr->depth--;
   15730             :         }
   15731           0 :         if (flags & NDR_OUT) {
   15732           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsReplicaAdd");
   15733           0 :                 ndr->depth++;
   15734           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15735           0 :                 ndr->depth--;
   15736             :         }
   15737           0 :         ndr->depth--;
   15738             : }
   15739             : 
   15740           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaDel(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaDel *r)
   15741             : {
   15742           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15743           0 :         if (flags & NDR_IN) {
   15744           0 :                 if (r->in.bind_handle == NULL) {
   15745           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15746             :                 }
   15747           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15748           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   15749           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level));
   15750           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
   15751             :         }
   15752           0 :         if (flags & NDR_OUT) {
   15753           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15754             :         }
   15755           0 :         return NDR_ERR_SUCCESS;
   15756             : }
   15757             : 
   15758           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDel(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaDel *r)
   15759             : {
   15760           0 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15761           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15762           0 :         if (flags & NDR_IN) {
   15763           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15764           0 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15765             :                 }
   15766           0 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15767           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15768           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15769           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15770           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   15771           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level));
   15772           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
   15773             :         }
   15774           0 :         if (flags & NDR_OUT) {
   15775             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15776             :                 if (r->in.bind_handle == NULL) {
   15777             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15778             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   15779             :                 }
   15780             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15781           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15782             :         }
   15783           0 :         return NDR_ERR_SUCCESS;
   15784             : }
   15785             : 
   15786           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaDel(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaDel *r)
   15787             : {
   15788           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaDel");
   15789           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15790           0 :         ndr->depth++;
   15791           0 :         if (flags & NDR_SET_VALUES) {
   15792           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15793             :         }
   15794           0 :         if (flags & NDR_IN) {
   15795           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsReplicaDel");
   15796           0 :                 ndr->depth++;
   15797           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   15798           0 :                 ndr->depth++;
   15799           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   15800           0 :                 ndr->depth--;
   15801           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   15802           0 :                 ndr_print_set_switch_value(ndr, &r->in.req, r->in.level);
   15803           0 :                 ndr_print_drsuapi_DsReplicaDelRequest(ndr, "req", &r->in.req);
   15804           0 :                 ndr->depth--;
   15805             :         }
   15806           0 :         if (flags & NDR_OUT) {
   15807           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsReplicaDel");
   15808           0 :                 ndr->depth++;
   15809           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15810           0 :                 ndr->depth--;
   15811             :         }
   15812           0 :         ndr->depth--;
   15813             : }
   15814             : 
   15815           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaMod(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaMod *r)
   15816             : {
   15817           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15818           0 :         if (flags & NDR_IN) {
   15819           0 :                 if (r->in.bind_handle == NULL) {
   15820           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15821             :                 }
   15822           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15823           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   15824           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.req, r->in.level));
   15825           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
   15826             :         }
   15827           0 :         if (flags & NDR_OUT) {
   15828           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15829             :         }
   15830           0 :         return NDR_ERR_SUCCESS;
   15831             : }
   15832             : 
   15833           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaMod(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaMod *r)
   15834             : {
   15835           0 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15836           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15837           0 :         if (flags & NDR_IN) {
   15838           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15839           0 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15840             :                 }
   15841           0 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15842           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15843           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15844           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15845           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   15846           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.req, r->in.level));
   15847           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.req));
   15848             :         }
   15849           0 :         if (flags & NDR_OUT) {
   15850             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15851             :                 if (r->in.bind_handle == NULL) {
   15852             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15853             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   15854             :                 }
   15855             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15856           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15857             :         }
   15858           0 :         return NDR_ERR_SUCCESS;
   15859             : }
   15860             : 
   15861           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaMod(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaMod *r)
   15862             : {
   15863           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaMod");
   15864           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15865           0 :         ndr->depth++;
   15866           0 :         if (flags & NDR_SET_VALUES) {
   15867           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15868             :         }
   15869           0 :         if (flags & NDR_IN) {
   15870           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsReplicaMod");
   15871           0 :                 ndr->depth++;
   15872           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   15873           0 :                 ndr->depth++;
   15874           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   15875           0 :                 ndr->depth--;
   15876           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   15877           0 :                 ndr_print_set_switch_value(ndr, &r->in.req, r->in.level);
   15878           0 :                 ndr_print_drsuapi_DsReplicaModRequest(ndr, "req", &r->in.req);
   15879           0 :                 ndr->depth--;
   15880             :         }
   15881           0 :         if (flags & NDR_OUT) {
   15882           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsReplicaMod");
   15883           0 :                 ndr->depth++;
   15884           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15885           0 :                 ndr->depth--;
   15886             :         }
   15887           0 :         ndr->depth--;
   15888             : }
   15889             : 
   15890           0 : static enum ndr_err_code ndr_push_DRSUAPI_VERIFY_NAMES(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_VERIFY_NAMES *r)
   15891             : {
   15892           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15893           0 :         if (flags & NDR_IN) {
   15894           0 :         }
   15895           0 :         if (flags & NDR_OUT) {
   15896           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15897             :         }
   15898           0 :         return NDR_ERR_SUCCESS;
   15899             : }
   15900             : 
   15901           0 : static enum ndr_err_code ndr_pull_DRSUAPI_VERIFY_NAMES(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_VERIFY_NAMES *r)
   15902             : {
   15903           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15904           0 :         if (flags & NDR_IN) {
   15905           0 :         }
   15906           0 :         if (flags & NDR_OUT) {
   15907             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15908             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   15909           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   15910             :         }
   15911           0 :         return NDR_ERR_SUCCESS;
   15912             : }
   15913             : 
   15914           0 : _PUBLIC_ void ndr_print_DRSUAPI_VERIFY_NAMES(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_VERIFY_NAMES *r)
   15915             : {
   15916           0 :         ndr_print_struct(ndr, name, "DRSUAPI_VERIFY_NAMES");
   15917           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   15918           0 :         ndr->depth++;
   15919           0 :         if (flags & NDR_SET_VALUES) {
   15920           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   15921             :         }
   15922           0 :         if (flags & NDR_IN) {
   15923           0 :                 ndr_print_struct(ndr, "in", "DRSUAPI_VERIFY_NAMES");
   15924           0 :                 ndr->depth++;
   15925           0 :                 ndr->depth--;
   15926             :         }
   15927           0 :         if (flags & NDR_OUT) {
   15928           0 :                 ndr_print_struct(ndr, "out", "DRSUAPI_VERIFY_NAMES");
   15929           0 :                 ndr->depth++;
   15930           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   15931           0 :                 ndr->depth--;
   15932             :         }
   15933           0 :         ndr->depth--;
   15934             : }
   15935             : 
   15936           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetMemberships *r)
   15937             : {
   15938           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   15939           0 :         if (flags & NDR_IN) {
   15940           0 :                 if (r->in.bind_handle == NULL) {
   15941           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15942             :                 }
   15943           0 :                 if (r->in.req == NULL) {
   15944           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15945             :                 }
   15946           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15947           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   15948           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   15949           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   15950             :         }
   15951           0 :         if (flags & NDR_OUT) {
   15952           0 :                 if (r->out.level_out == NULL) {
   15953           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15954             :                 }
   15955           0 :                 if (r->out.ctr == NULL) {
   15956           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   15957             :                 }
   15958           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   15959           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   15960           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   15961           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   15962             :         }
   15963           0 :         return NDR_ERR_SUCCESS;
   15964             : }
   15965             : 
   15966           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetMemberships *r)
   15967             : {
   15968           0 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   15969           0 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   15970           0 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   15971           0 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   15972           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   15973           0 :         if (flags & NDR_IN) {
   15974           0 :                 NDR_ZERO_STRUCT(r->out);
   15975             : 
   15976           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15977           0 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   15978             :                 }
   15979           0 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15980           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   15981           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   15982           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   15983           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   15984           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   15985           0 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   15986             :                 }
   15987           0 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   15988           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   15989           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   15990           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   15991           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   15992           0 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   15993           0 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   15994           0 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   15995           0 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   15996             :         }
   15997           0 :         if (flags & NDR_OUT) {
   15998             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   15999             :                 if (r->in.bind_handle == NULL) {
   16000             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16001             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   16002             :                 }
   16003             :                 if (r->in.req == NULL) {
   16004             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16005             :                         NDR_ZERO_STRUCTP(r->in.req);
   16006             :                 }
   16007             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16008           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16009           0 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   16010             :                 }
   16011           0 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16012           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   16013           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   16014           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   16015           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16016           0 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   16017             :                 }
   16018           0 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16019           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   16020           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   16021           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   16022           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   16023           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16024             :         }
   16025           0 :         return NDR_ERR_SUCCESS;
   16026             : }
   16027             : 
   16028           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetMemberships *r)
   16029             : {
   16030           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetMemberships");
   16031           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16032           0 :         ndr->depth++;
   16033           0 :         if (flags & NDR_SET_VALUES) {
   16034           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16035             :         }
   16036           0 :         if (flags & NDR_IN) {
   16037           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsGetMemberships");
   16038           0 :                 ndr->depth++;
   16039           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   16040           0 :                 ndr->depth++;
   16041           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   16042           0 :                 ndr->depth--;
   16043           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   16044           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   16045           0 :                 ndr->depth++;
   16046           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   16047           0 :                 ndr_print_drsuapi_DsGetMembershipsRequest(ndr, "req", r->in.req);
   16048           0 :                 ndr->depth--;
   16049           0 :                 ndr->depth--;
   16050             :         }
   16051           0 :         if (flags & NDR_OUT) {
   16052           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsGetMemberships");
   16053           0 :                 ndr->depth++;
   16054           0 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   16055           0 :                 ndr->depth++;
   16056           0 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   16057           0 :                 ndr->depth--;
   16058           0 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   16059           0 :                 ndr->depth++;
   16060           0 :                 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
   16061           0 :                 ndr_print_drsuapi_DsGetMembershipsCtr(ndr, "ctr", r->out.ctr);
   16062           0 :                 ndr->depth--;
   16063           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16064           0 :                 ndr->depth--;
   16065             :         }
   16066           0 :         ndr->depth--;
   16067             : }
   16068             : 
   16069           0 : static enum ndr_err_code ndr_push_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_INTER_DOMAIN_MOVE *r)
   16070             : {
   16071           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16072           0 :         if (flags & NDR_IN) {
   16073           0 :         }
   16074           0 :         if (flags & NDR_OUT) {
   16075           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16076             :         }
   16077           0 :         return NDR_ERR_SUCCESS;
   16078             : }
   16079             : 
   16080           0 : static enum ndr_err_code ndr_pull_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_INTER_DOMAIN_MOVE *r)
   16081             : {
   16082           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16083           0 :         if (flags & NDR_IN) {
   16084           0 :         }
   16085           0 :         if (flags & NDR_OUT) {
   16086             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16087             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16088           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16089             :         }
   16090           0 :         return NDR_ERR_SUCCESS;
   16091             : }
   16092             : 
   16093           0 : _PUBLIC_ void ndr_print_DRSUAPI_INTER_DOMAIN_MOVE(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_INTER_DOMAIN_MOVE *r)
   16094             : {
   16095           0 :         ndr_print_struct(ndr, name, "DRSUAPI_INTER_DOMAIN_MOVE");
   16096           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16097           0 :         ndr->depth++;
   16098           0 :         if (flags & NDR_SET_VALUES) {
   16099           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16100             :         }
   16101           0 :         if (flags & NDR_IN) {
   16102           0 :                 ndr_print_struct(ndr, "in", "DRSUAPI_INTER_DOMAIN_MOVE");
   16103           0 :                 ndr->depth++;
   16104           0 :                 ndr->depth--;
   16105             :         }
   16106           0 :         if (flags & NDR_OUT) {
   16107           0 :                 ndr_print_struct(ndr, "out", "DRSUAPI_INTER_DOMAIN_MOVE");
   16108           0 :                 ndr->depth++;
   16109           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16110           0 :                 ndr->depth--;
   16111             :         }
   16112           0 :         ndr->depth--;
   16113             : }
   16114             : 
   16115           4 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLog(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetNT4ChangeLog *r)
   16116             : {
   16117           4 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16118           4 :         if (flags & NDR_IN) {
   16119           4 :                 if (r->in.bind_handle == NULL) {
   16120           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16121             :                 }
   16122           4 :                 if (r->in.req == NULL) {
   16123           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16124             :                 }
   16125           4 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16126           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   16127           4 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   16128           4 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16129             :         }
   16130           4 :         if (flags & NDR_OUT) {
   16131           0 :                 if (r->out.level_out == NULL) {
   16132           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16133             :                 }
   16134           0 :                 if (r->out.info == NULL) {
   16135           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16136             :                 }
   16137           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   16138           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, *r->out.level_out));
   16139           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
   16140           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16141             :         }
   16142           4 :         return NDR_ERR_SUCCESS;
   16143             : }
   16144             : 
   16145           4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLog(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetNT4ChangeLog *r)
   16146             : {
   16147           4 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   16148           4 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   16149           4 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   16150           4 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   16151           4 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16152           4 :         if (flags & NDR_IN) {
   16153           4 :                 NDR_ZERO_STRUCT(r->out);
   16154             : 
   16155           4 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16156           4 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16157             :                 }
   16158           4 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16159           4 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   16160           4 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16161           4 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   16162           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   16163           4 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16164           4 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16165             :                 }
   16166           4 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16167           4 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   16168           4 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   16169           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16170           4 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   16171           4 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   16172           4 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   16173           4 :                 NDR_PULL_ALLOC(ndr, r->out.info);
   16174           4 :                 NDR_ZERO_STRUCTP(r->out.info);
   16175             :         }
   16176           4 :         if (flags & NDR_OUT) {
   16177             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16178             :                 if (r->in.bind_handle == NULL) {
   16179             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16180             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   16181             :                 }
   16182             :                 if (r->in.req == NULL) {
   16183             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16184             :                         NDR_ZERO_STRUCTP(r->in.req);
   16185             :                 }
   16186             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16187           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16188           0 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   16189             :                 }
   16190           0 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16191           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   16192           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   16193           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   16194           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16195           0 :                         NDR_PULL_ALLOC(ndr, r->out.info);
   16196             :                 }
   16197           0 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16198           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
   16199           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, *r->out.level_out));
   16200           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
   16201           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
   16202           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16203             :         }
   16204           4 :         return NDR_ERR_SUCCESS;
   16205             : }
   16206             : 
   16207           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLog(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetNT4ChangeLog *r)
   16208             : {
   16209           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNT4ChangeLog");
   16210           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16211           0 :         ndr->depth++;
   16212           0 :         if (flags & NDR_SET_VALUES) {
   16213           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16214             :         }
   16215           0 :         if (flags & NDR_IN) {
   16216           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsGetNT4ChangeLog");
   16217           0 :                 ndr->depth++;
   16218           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   16219           0 :                 ndr->depth++;
   16220           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   16221           0 :                 ndr->depth--;
   16222           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   16223           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   16224           0 :                 ndr->depth++;
   16225           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   16226           0 :                 ndr_print_drsuapi_DsGetNT4ChangeLogRequest(ndr, "req", r->in.req);
   16227           0 :                 ndr->depth--;
   16228           0 :                 ndr->depth--;
   16229             :         }
   16230           0 :         if (flags & NDR_OUT) {
   16231           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsGetNT4ChangeLog");
   16232           0 :                 ndr->depth++;
   16233           0 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   16234           0 :                 ndr->depth++;
   16235           0 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   16236           0 :                 ndr->depth--;
   16237           0 :                 ndr_print_ptr(ndr, "info", r->out.info);
   16238           0 :                 ndr->depth++;
   16239           0 :                 ndr_print_set_switch_value(ndr, r->out.info, *r->out.level_out);
   16240           0 :                 ndr_print_drsuapi_DsGetNT4ChangeLogInfo(ndr, "info", r->out.info);
   16241           0 :                 ndr->depth--;
   16242           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16243           0 :                 ndr->depth--;
   16244             :         }
   16245           0 :         ndr->depth--;
   16246             : }
   16247             : 
   16248        3522 : static enum ndr_err_code ndr_push_drsuapi_DsCrackNames(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsCrackNames *r)
   16249             : {
   16250        3522 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16251        3522 :         if (flags & NDR_IN) {
   16252        1639 :                 if (r->in.bind_handle == NULL) {
   16253           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16254             :                 }
   16255        1639 :                 if (r->in.req == NULL) {
   16256           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16257             :                 }
   16258        1639 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16259        1639 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   16260        1639 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   16261        1639 :                 NDR_CHECK(ndr_push_drsuapi_DsNameRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16262             :         }
   16263        3522 :         if (flags & NDR_OUT) {
   16264        1883 :                 if (r->out.level_out == NULL) {
   16265           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16266             :                 }
   16267        1883 :                 if (r->out.ctr == NULL) {
   16268           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16269             :                 }
   16270        1883 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   16271        1883 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   16272        1883 :                 NDR_CHECK(ndr_push_drsuapi_DsNameCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   16273        1883 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16274             :         }
   16275        3126 :         return NDR_ERR_SUCCESS;
   16276             : }
   16277             : 
   16278        3278 : static enum ndr_err_code ndr_pull_drsuapi_DsCrackNames(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsCrackNames *r)
   16279             : {
   16280        3278 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   16281        3278 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   16282        3278 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   16283        3278 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   16284        3278 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16285        3278 :         if (flags & NDR_IN) {
   16286        1639 :                 NDR_ZERO_STRUCT(r->out);
   16287             : 
   16288        1639 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16289        1639 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16290             :                 }
   16291        1639 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16292        1639 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   16293        1639 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16294        1639 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   16295        1639 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   16296        1639 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16297        1639 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16298             :                 }
   16299        1639 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16300        1639 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   16301        1639 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   16302        1639 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16303        1639 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   16304        1639 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   16305        1639 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   16306        1639 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   16307        1639 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   16308             :         }
   16309        3278 :         if (flags & NDR_OUT) {
   16310             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16311             :                 if (r->in.bind_handle == NULL) {
   16312             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16313             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   16314             :                 }
   16315             :                 if (r->in.req == NULL) {
   16316             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16317             :                         NDR_ZERO_STRUCTP(r->in.req);
   16318             :                 }
   16319             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16320        1639 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16321         268 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   16322             :                 }
   16323        1639 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16324        1639 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   16325        1639 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   16326        1639 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   16327        1639 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16328         268 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   16329             :                 }
   16330        1639 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16331        1639 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   16332        1639 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   16333        1639 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   16334        1639 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   16335        1639 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16336             :         }
   16337        2918 :         return NDR_ERR_SUCCESS;
   16338             : }
   16339             : 
   16340         488 : _PUBLIC_ void ndr_print_drsuapi_DsCrackNames(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsCrackNames *r)
   16341             : {
   16342         488 :         ndr_print_struct(ndr, name, "drsuapi_DsCrackNames");
   16343         488 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16344         488 :         ndr->depth++;
   16345         488 :         if (flags & NDR_SET_VALUES) {
   16346           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16347             :         }
   16348         488 :         if (flags & NDR_IN) {
   16349           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsCrackNames");
   16350           0 :                 ndr->depth++;
   16351           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   16352           0 :                 ndr->depth++;
   16353           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   16354           0 :                 ndr->depth--;
   16355           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   16356           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   16357           0 :                 ndr->depth++;
   16358           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   16359           0 :                 ndr_print_drsuapi_DsNameRequest(ndr, "req", r->in.req);
   16360           0 :                 ndr->depth--;
   16361           0 :                 ndr->depth--;
   16362             :         }
   16363         488 :         if (flags & NDR_OUT) {
   16364         488 :                 ndr_print_struct(ndr, "out", "drsuapi_DsCrackNames");
   16365         488 :                 ndr->depth++;
   16366         488 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   16367         488 :                 ndr->depth++;
   16368         488 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   16369         488 :                 ndr->depth--;
   16370         488 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   16371         488 :                 ndr->depth++;
   16372         488 :                 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
   16373         488 :                 ndr_print_drsuapi_DsNameCtr(ndr, "ctr", r->out.ctr);
   16374         488 :                 ndr->depth--;
   16375         488 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16376         488 :                 ndr->depth--;
   16377             :         }
   16378         488 :         ndr->depth--;
   16379             : }
   16380             : 
   16381           8 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpn(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsWriteAccountSpn *r)
   16382             : {
   16383           8 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16384           8 :         if (flags & NDR_IN) {
   16385           4 :                 if (r->in.bind_handle == NULL) {
   16386           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16387             :                 }
   16388           4 :                 if (r->in.req == NULL) {
   16389           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16390             :                 }
   16391           4 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16392           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   16393           4 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   16394           4 :                 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16395             :         }
   16396           8 :         if (flags & NDR_OUT) {
   16397           4 :                 if (r->out.level_out == NULL) {
   16398           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16399             :                 }
   16400           4 :                 if (r->out.res == NULL) {
   16401           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16402             :                 }
   16403           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   16404           4 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.res, *r->out.level_out));
   16405           4 :                 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult(ndr, NDR_SCALARS, r->out.res));
   16406           4 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16407             :         }
   16408           8 :         return NDR_ERR_SUCCESS;
   16409             : }
   16410             : 
   16411           8 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpn(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsWriteAccountSpn *r)
   16412             : {
   16413           8 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   16414           8 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   16415           8 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   16416           8 :         TALLOC_CTX *_mem_save_res_0 = NULL;
   16417           8 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16418           8 :         if (flags & NDR_IN) {
   16419           4 :                 NDR_ZERO_STRUCT(r->out);
   16420             : 
   16421           4 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16422           4 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16423             :                 }
   16424           4 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16425           4 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   16426           4 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16427           4 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   16428           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   16429           4 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16430           4 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16431             :                 }
   16432           4 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16433           4 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   16434           4 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   16435           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16436           4 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   16437           4 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   16438           4 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   16439           4 :                 NDR_PULL_ALLOC(ndr, r->out.res);
   16440           4 :                 NDR_ZERO_STRUCTP(r->out.res);
   16441             :         }
   16442           8 :         if (flags & NDR_OUT) {
   16443             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16444             :                 if (r->in.bind_handle == NULL) {
   16445             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16446             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   16447             :                 }
   16448             :                 if (r->in.req == NULL) {
   16449             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16450             :                         NDR_ZERO_STRUCTP(r->in.req);
   16451             :                 }
   16452             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16453           4 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16454           2 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   16455             :                 }
   16456           4 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16457           4 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   16458           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   16459           4 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   16460           4 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16461           2 :                         NDR_PULL_ALLOC(ndr, r->out.res);
   16462             :                 }
   16463           4 :                 _mem_save_res_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16464           4 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.res, LIBNDR_FLAG_REF_ALLOC);
   16465           4 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.res, *r->out.level_out));
   16466           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult(ndr, NDR_SCALARS, r->out.res));
   16467           4 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_0, LIBNDR_FLAG_REF_ALLOC);
   16468           4 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16469             :         }
   16470           8 :         return NDR_ERR_SUCCESS;
   16471             : }
   16472             : 
   16473           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpn(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsWriteAccountSpn *r)
   16474             : {
   16475           0 :         ndr_print_struct(ndr, name, "drsuapi_DsWriteAccountSpn");
   16476           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16477           0 :         ndr->depth++;
   16478           0 :         if (flags & NDR_SET_VALUES) {
   16479           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16480             :         }
   16481           0 :         if (flags & NDR_IN) {
   16482           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsWriteAccountSpn");
   16483           0 :                 ndr->depth++;
   16484           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   16485           0 :                 ndr->depth++;
   16486           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   16487           0 :                 ndr->depth--;
   16488           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   16489           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   16490           0 :                 ndr->depth++;
   16491           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   16492           0 :                 ndr_print_drsuapi_DsWriteAccountSpnRequest(ndr, "req", r->in.req);
   16493           0 :                 ndr->depth--;
   16494           0 :                 ndr->depth--;
   16495             :         }
   16496           0 :         if (flags & NDR_OUT) {
   16497           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsWriteAccountSpn");
   16498           0 :                 ndr->depth++;
   16499           0 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   16500           0 :                 ndr->depth++;
   16501           0 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   16502           0 :                 ndr->depth--;
   16503           0 :                 ndr_print_ptr(ndr, "res", r->out.res);
   16504           0 :                 ndr->depth++;
   16505           0 :                 ndr_print_set_switch_value(ndr, r->out.res, *r->out.level_out);
   16506           0 :                 ndr_print_drsuapi_DsWriteAccountSpnResult(ndr, "res", r->out.res);
   16507           0 :                 ndr->depth--;
   16508           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16509           0 :                 ndr->depth--;
   16510             :         }
   16511           0 :         ndr->depth--;
   16512             : }
   16513             : 
   16514          14 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServer(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsRemoveDSServer *r)
   16515             : {
   16516          14 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16517          14 :         if (flags & NDR_IN) {
   16518           7 :                 if (r->in.bind_handle == NULL) {
   16519           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16520             :                 }
   16521           7 :                 if (r->in.req == NULL) {
   16522           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16523             :                 }
   16524           7 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16525           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   16526           7 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   16527           7 :                 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16528             :         }
   16529          14 :         if (flags & NDR_OUT) {
   16530           7 :                 if (r->out.level_out == NULL) {
   16531           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16532             :                 }
   16533           7 :                 if (r->out.res == NULL) {
   16534           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16535             :                 }
   16536           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   16537           7 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.res, *r->out.level_out));
   16538           7 :                 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult(ndr, NDR_SCALARS, r->out.res));
   16539           7 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16540             :         }
   16541          14 :         return NDR_ERR_SUCCESS;
   16542             : }
   16543             : 
   16544          14 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServer(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsRemoveDSServer *r)
   16545             : {
   16546          14 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   16547          14 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   16548          14 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   16549          14 :         TALLOC_CTX *_mem_save_res_0 = NULL;
   16550          14 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16551          14 :         if (flags & NDR_IN) {
   16552           7 :                 NDR_ZERO_STRUCT(r->out);
   16553             : 
   16554           7 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16555           7 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16556             :                 }
   16557           7 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16558           7 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   16559           7 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16560           7 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   16561           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   16562           7 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16563           7 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16564             :                 }
   16565           7 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16566           7 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   16567           7 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   16568           7 :                 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16569           7 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   16570           7 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   16571           7 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   16572           7 :                 NDR_PULL_ALLOC(ndr, r->out.res);
   16573           7 :                 NDR_ZERO_STRUCTP(r->out.res);
   16574             :         }
   16575          14 :         if (flags & NDR_OUT) {
   16576             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16577             :                 if (r->in.bind_handle == NULL) {
   16578             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16579             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   16580             :                 }
   16581             :                 if (r->in.req == NULL) {
   16582             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16583             :                         NDR_ZERO_STRUCTP(r->in.req);
   16584             :                 }
   16585             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16586           7 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16587           3 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   16588             :                 }
   16589           7 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16590           7 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   16591           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   16592           7 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   16593           7 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16594           3 :                         NDR_PULL_ALLOC(ndr, r->out.res);
   16595             :                 }
   16596           7 :                 _mem_save_res_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16597           7 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.res, LIBNDR_FLAG_REF_ALLOC);
   16598           7 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.res, *r->out.level_out));
   16599           7 :                 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult(ndr, NDR_SCALARS, r->out.res));
   16600           7 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_0, LIBNDR_FLAG_REF_ALLOC);
   16601           7 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16602             :         }
   16603          14 :         return NDR_ERR_SUCCESS;
   16604             : }
   16605             : 
   16606           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServer(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsRemoveDSServer *r)
   16607             : {
   16608           0 :         ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServer");
   16609           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16610           0 :         ndr->depth++;
   16611           0 :         if (flags & NDR_SET_VALUES) {
   16612           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16613             :         }
   16614           0 :         if (flags & NDR_IN) {
   16615           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsRemoveDSServer");
   16616           0 :                 ndr->depth++;
   16617           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   16618           0 :                 ndr->depth++;
   16619           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   16620           0 :                 ndr->depth--;
   16621           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   16622           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   16623           0 :                 ndr->depth++;
   16624           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   16625           0 :                 ndr_print_drsuapi_DsRemoveDSServerRequest(ndr, "req", r->in.req);
   16626           0 :                 ndr->depth--;
   16627           0 :                 ndr->depth--;
   16628             :         }
   16629           0 :         if (flags & NDR_OUT) {
   16630           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsRemoveDSServer");
   16631           0 :                 ndr->depth++;
   16632           0 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   16633           0 :                 ndr->depth++;
   16634           0 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   16635           0 :                 ndr->depth--;
   16636           0 :                 ndr_print_ptr(ndr, "res", r->out.res);
   16637           0 :                 ndr->depth++;
   16638           0 :                 ndr_print_set_switch_value(ndr, r->out.res, *r->out.level_out);
   16639           0 :                 ndr_print_drsuapi_DsRemoveDSServerResult(ndr, "res", r->out.res);
   16640           0 :                 ndr->depth--;
   16641           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16642           0 :                 ndr->depth--;
   16643             :         }
   16644           0 :         ndr->depth--;
   16645             : }
   16646             : 
   16647           0 : static enum ndr_err_code ndr_push_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_REMOVE_DS_DOMAIN *r)
   16648             : {
   16649           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16650           0 :         if (flags & NDR_IN) {
   16651           0 :         }
   16652           0 :         if (flags & NDR_OUT) {
   16653           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16654             :         }
   16655           0 :         return NDR_ERR_SUCCESS;
   16656             : }
   16657             : 
   16658           0 : static enum ndr_err_code ndr_pull_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_REMOVE_DS_DOMAIN *r)
   16659             : {
   16660           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16661           0 :         if (flags & NDR_IN) {
   16662           0 :         }
   16663           0 :         if (flags & NDR_OUT) {
   16664             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16665             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16666           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16667             :         }
   16668           0 :         return NDR_ERR_SUCCESS;
   16669             : }
   16670             : 
   16671           0 : _PUBLIC_ void ndr_print_DRSUAPI_REMOVE_DS_DOMAIN(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_REMOVE_DS_DOMAIN *r)
   16672             : {
   16673           0 :         ndr_print_struct(ndr, name, "DRSUAPI_REMOVE_DS_DOMAIN");
   16674           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16675           0 :         ndr->depth++;
   16676           0 :         if (flags & NDR_SET_VALUES) {
   16677           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16678             :         }
   16679           0 :         if (flags & NDR_IN) {
   16680           0 :                 ndr_print_struct(ndr, "in", "DRSUAPI_REMOVE_DS_DOMAIN");
   16681           0 :                 ndr->depth++;
   16682           0 :                 ndr->depth--;
   16683             :         }
   16684           0 :         if (flags & NDR_OUT) {
   16685           0 :                 ndr_print_struct(ndr, "out", "DRSUAPI_REMOVE_DS_DOMAIN");
   16686           0 :                 ndr->depth++;
   16687           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16688           0 :                 ndr->depth--;
   16689             :         }
   16690           0 :         ndr->depth--;
   16691             : }
   16692             : 
   16693          12 : static enum ndr_err_code ndr_push_drsuapi_DsGetDomainControllerInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetDomainControllerInfo *r)
   16694             : {
   16695          12 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16696          12 :         if (flags & NDR_IN) {
   16697           6 :                 if (r->in.bind_handle == NULL) {
   16698           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16699             :                 }
   16700           6 :                 if (r->in.req == NULL) {
   16701           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16702             :                 }
   16703           6 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16704           6 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   16705           6 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   16706           6 :                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16707             :         }
   16708          12 :         if (flags & NDR_OUT) {
   16709           6 :                 if (r->out.level_out == NULL) {
   16710           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16711             :                 }
   16712           6 :                 if (r->out.ctr == NULL) {
   16713           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16714             :                 }
   16715           6 :                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, *r->out.level_out));
   16716           6 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   16717           6 :                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   16718           6 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16719             :         }
   16720          12 :         return NDR_ERR_SUCCESS;
   16721             : }
   16722             : 
   16723          12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDomainControllerInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetDomainControllerInfo *r)
   16724             : {
   16725          12 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   16726          12 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   16727          12 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   16728          12 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   16729          12 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16730          12 :         if (flags & NDR_IN) {
   16731           6 :                 NDR_ZERO_STRUCT(r->out);
   16732             : 
   16733           6 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16734           6 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16735             :                 }
   16736           6 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16737           6 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   16738           6 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16739           6 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   16740           6 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   16741           6 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16742           6 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16743             :                 }
   16744           6 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16745           6 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   16746           6 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   16747           6 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16748           6 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   16749           6 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   16750           6 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   16751           6 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   16752           6 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   16753             :         }
   16754          12 :         if (flags & NDR_OUT) {
   16755             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16756             :                 if (r->in.bind_handle == NULL) {
   16757             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16758             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   16759             :                 }
   16760             :                 if (r->in.req == NULL) {
   16761             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16762             :                         NDR_ZERO_STRUCTP(r->in.req);
   16763             :                 }
   16764             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16765           6 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16766           0 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   16767             :                 }
   16768           6 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16769           6 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   16770           6 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, r->out.level_out));
   16771           6 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   16772           6 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16773           0 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   16774             :                 }
   16775           6 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16776           6 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   16777           6 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   16778           6 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   16779           6 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   16780           6 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16781             :         }
   16782          12 :         return NDR_ERR_SUCCESS;
   16783             : }
   16784             : 
   16785           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDomainControllerInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetDomainControllerInfo *r)
   16786             : {
   16787           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDomainControllerInfo");
   16788           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16789           0 :         ndr->depth++;
   16790           0 :         if (flags & NDR_SET_VALUES) {
   16791           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16792             :         }
   16793           0 :         if (flags & NDR_IN) {
   16794           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsGetDomainControllerInfo");
   16795           0 :                 ndr->depth++;
   16796           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   16797           0 :                 ndr->depth++;
   16798           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   16799           0 :                 ndr->depth--;
   16800           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   16801           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   16802           0 :                 ndr->depth++;
   16803           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   16804           0 :                 ndr_print_drsuapi_DsGetDCInfoRequest(ndr, "req", r->in.req);
   16805           0 :                 ndr->depth--;
   16806           0 :                 ndr->depth--;
   16807             :         }
   16808           0 :         if (flags & NDR_OUT) {
   16809           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsGetDomainControllerInfo");
   16810           0 :                 ndr->depth++;
   16811           0 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   16812           0 :                 ndr->depth++;
   16813           0 :                 ndr_print_drsuapi_DsGetDCInfoCtrLevels(ndr, "level_out", *r->out.level_out);
   16814           0 :                 ndr->depth--;
   16815           0 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   16816           0 :                 ndr->depth++;
   16817           0 :                 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
   16818           0 :                 ndr_print_drsuapi_DsGetDCInfoCtr(ndr, "ctr", r->out.ctr);
   16819           0 :                 ndr->depth--;
   16820           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16821           0 :                 ndr->depth--;
   16822             :         }
   16823           0 :         ndr->depth--;
   16824             : }
   16825             : 
   16826         189 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsAddEntry(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsAddEntry *r)
   16827             : {
   16828         189 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16829         189 :         if (flags & NDR_IN) {
   16830          95 :                 if (r->in.bind_handle == NULL) {
   16831           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16832             :                 }
   16833          95 :                 if (r->in.req == NULL) {
   16834           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16835             :                 }
   16836          95 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16837          95 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   16838          95 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   16839          95 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16840             :         }
   16841         189 :         if (flags & NDR_OUT) {
   16842          94 :                 if (r->out.level_out == NULL) {
   16843           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16844             :                 }
   16845          94 :                 if (r->out.ctr == NULL) {
   16846           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16847             :                 }
   16848          94 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   16849          94 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   16850          94 :                 NDR_CHECK(ndr_push_drsuapi_DsAddEntryCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   16851          94 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16852             :         }
   16853         188 :         return NDR_ERR_SUCCESS;
   16854             : }
   16855             : 
   16856         195 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsAddEntry(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsAddEntry *r)
   16857             : {
   16858         195 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   16859         195 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   16860         195 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   16861         195 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   16862         195 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16863         195 :         if (flags & NDR_IN) {
   16864          98 :                 NDR_ZERO_STRUCT(r->out);
   16865             : 
   16866          98 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16867          98 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16868             :                 }
   16869          98 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16870          98 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   16871          98 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16872          98 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   16873          98 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   16874          98 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16875          98 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16876             :                 }
   16877          98 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16878          98 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   16879          98 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   16880          98 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   16881          98 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   16882          98 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   16883          98 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   16884          98 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   16885          98 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   16886             :         }
   16887         195 :         if (flags & NDR_OUT) {
   16888             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   16889             :                 if (r->in.bind_handle == NULL) {
   16890             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16891             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   16892             :                 }
   16893             :                 if (r->in.req == NULL) {
   16894             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16895             :                         NDR_ZERO_STRUCTP(r->in.req);
   16896             :                 }
   16897             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   16898          97 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16899          93 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   16900             :                 }
   16901          97 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16902          97 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   16903          97 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   16904          97 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   16905          97 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16906          93 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   16907             :                 }
   16908          97 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16909          97 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   16910          97 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   16911          97 :                 NDR_CHECK(ndr_pull_drsuapi_DsAddEntryCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   16912          96 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   16913          96 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   16914             :         }
   16915         188 :         return NDR_ERR_SUCCESS;
   16916             : }
   16917             : 
   16918           6 : _PUBLIC_ void ndr_print_drsuapi_DsAddEntry(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsAddEntry *r)
   16919             : {
   16920           6 :         ndr_print_struct(ndr, name, "drsuapi_DsAddEntry");
   16921           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
   16922           6 :         ndr->depth++;
   16923           6 :         if (flags & NDR_SET_VALUES) {
   16924           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   16925             :         }
   16926           6 :         if (flags & NDR_IN) {
   16927           4 :                 ndr_print_struct(ndr, "in", "drsuapi_DsAddEntry");
   16928           4 :                 ndr->depth++;
   16929           4 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   16930           4 :                 ndr->depth++;
   16931           4 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   16932           4 :                 ndr->depth--;
   16933           4 :                 ndr_print_uint32(ndr, "level", r->in.level);
   16934           4 :                 ndr_print_ptr(ndr, "req", r->in.req);
   16935           4 :                 ndr->depth++;
   16936           4 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   16937           4 :                 ndr_print_drsuapi_DsAddEntryRequest(ndr, "req", r->in.req);
   16938           4 :                 ndr->depth--;
   16939           4 :                 ndr->depth--;
   16940             :         }
   16941           6 :         if (flags & NDR_OUT) {
   16942           2 :                 ndr_print_struct(ndr, "out", "drsuapi_DsAddEntry");
   16943           2 :                 ndr->depth++;
   16944           2 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   16945           2 :                 ndr->depth++;
   16946           2 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   16947           2 :                 ndr->depth--;
   16948           2 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   16949           2 :                 ndr->depth++;
   16950           2 :                 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
   16951           2 :                 ndr_print_drsuapi_DsAddEntryCtr(ndr, "ctr", r->out.ctr);
   16952           2 :                 ndr->depth--;
   16953           2 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   16954           2 :                 ndr->depth--;
   16955             :         }
   16956           6 :         ndr->depth--;
   16957             : }
   16958             : 
   16959           8 : static enum ndr_err_code ndr_push_drsuapi_DsExecuteKCC(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsExecuteKCC *r)
   16960             : {
   16961           8 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   16962           8 :         if (flags & NDR_IN) {
   16963           4 :                 if (r->in.bind_handle == NULL) {
   16964           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16965             :                 }
   16966           4 :                 if (r->in.req == NULL) {
   16967           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   16968             :                 }
   16969           4 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16970           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   16971           4 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   16972           4 :                 NDR_CHECK(ndr_push_drsuapi_DsExecuteKCCRequest(ndr, NDR_SCALARS, r->in.req));
   16973             :         }
   16974           8 :         if (flags & NDR_OUT) {
   16975           4 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   16976             :         }
   16977           8 :         return NDR_ERR_SUCCESS;
   16978             : }
   16979             : 
   16980           8 : static enum ndr_err_code ndr_pull_drsuapi_DsExecuteKCC(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsExecuteKCC *r)
   16981             : {
   16982           8 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   16983           8 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   16984           8 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   16985           8 :         if (flags & NDR_IN) {
   16986           4 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16987           4 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   16988             :                 }
   16989           4 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16990           4 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   16991           4 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   16992           4 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   16993           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   16994           4 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   16995           4 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   16996             :                 }
   16997           4 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   16998           4 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   16999           4 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   17000           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsExecuteKCCRequest(ndr, NDR_SCALARS, r->in.req));
   17001           4 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   17002             :         }
   17003           8 :         if (flags & NDR_OUT) {
   17004             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17005             :                 if (r->in.bind_handle == NULL) {
   17006             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   17007             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   17008             :                 }
   17009             :                 if (r->in.req == NULL) {
   17010             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   17011             :                         NDR_ZERO_STRUCTP(r->in.req);
   17012             :                 }
   17013             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17014           4 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17015             :         }
   17016           8 :         return NDR_ERR_SUCCESS;
   17017             : }
   17018             : 
   17019           0 : _PUBLIC_ void ndr_print_drsuapi_DsExecuteKCC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsExecuteKCC *r)
   17020             : {
   17021           0 :         ndr_print_struct(ndr, name, "drsuapi_DsExecuteKCC");
   17022           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17023           0 :         ndr->depth++;
   17024           0 :         if (flags & NDR_SET_VALUES) {
   17025           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17026             :         }
   17027           0 :         if (flags & NDR_IN) {
   17028           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsExecuteKCC");
   17029           0 :                 ndr->depth++;
   17030           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   17031           0 :                 ndr->depth++;
   17032           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   17033           0 :                 ndr->depth--;
   17034           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   17035           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   17036           0 :                 ndr->depth++;
   17037           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   17038           0 :                 ndr_print_drsuapi_DsExecuteKCCRequest(ndr, "req", r->in.req);
   17039           0 :                 ndr->depth--;
   17040           0 :                 ndr->depth--;
   17041             :         }
   17042           0 :         if (flags & NDR_OUT) {
   17043           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsExecuteKCC");
   17044           0 :                 ndr->depth++;
   17045           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17046           0 :                 ndr->depth--;
   17047             :         }
   17048           0 :         ndr->depth--;
   17049             : }
   17050             : 
   17051          40 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaGetInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsReplicaGetInfo *r)
   17052             : {
   17053          40 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17054          40 :         if (flags & NDR_IN) {
   17055          20 :                 if (r->in.bind_handle == NULL) {
   17056           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17057             :                 }
   17058          20 :                 if (r->in.req == NULL) {
   17059           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17060             :                 }
   17061          20 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   17062          20 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoLevel(ndr, NDR_SCALARS, r->in.level));
   17063          20 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   17064          20 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaGetInfoRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   17065             :         }
   17066          40 :         if (flags & NDR_OUT) {
   17067          20 :                 if (r->out.info_type == NULL) {
   17068           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17069             :                 }
   17070          20 :                 if (r->out.info == NULL) {
   17071           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17072             :                 }
   17073          20 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, *r->out.info_type));
   17074          20 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, *r->out.info_type));
   17075          20 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
   17076          20 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17077             :         }
   17078          40 :         return NDR_ERR_SUCCESS;
   17079             : }
   17080             : 
   17081          40 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaGetInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsReplicaGetInfo *r)
   17082             : {
   17083          40 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   17084          40 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   17085          40 :         TALLOC_CTX *_mem_save_info_type_0 = NULL;
   17086          40 :         TALLOC_CTX *_mem_save_info_0 = NULL;
   17087          40 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17088          40 :         if (flags & NDR_IN) {
   17089          20 :                 NDR_ZERO_STRUCT(r->out);
   17090             : 
   17091          20 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17092          20 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   17093             :                 }
   17094          20 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17095          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   17096          20 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   17097          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   17098          20 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoLevel(ndr, NDR_SCALARS, &r->in.level));
   17099          20 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17100          20 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   17101             :                 }
   17102          20 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17103          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   17104          20 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   17105          20 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaGetInfoRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   17106          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   17107          20 :                 NDR_PULL_ALLOC(ndr, r->out.info_type);
   17108          20 :                 NDR_ZERO_STRUCTP(r->out.info_type);
   17109          20 :                 NDR_PULL_ALLOC(ndr, r->out.info);
   17110          20 :                 NDR_ZERO_STRUCTP(r->out.info);
   17111             :         }
   17112          40 :         if (flags & NDR_OUT) {
   17113             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17114             :                 if (r->in.bind_handle == NULL) {
   17115             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   17116             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   17117             :                 }
   17118             :                 if (r->in.req == NULL) {
   17119             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   17120             :                         NDR_ZERO_STRUCTP(r->in.req);
   17121             :                 }
   17122             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17123          20 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17124          20 :                         NDR_PULL_ALLOC(ndr, r->out.info_type);
   17125             :                 }
   17126          20 :                 _mem_save_info_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17127          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_type, LIBNDR_FLAG_REF_ALLOC);
   17128          20 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfoType(ndr, NDR_SCALARS, r->out.info_type));
   17129          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_type_0, LIBNDR_FLAG_REF_ALLOC);
   17130          20 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17131          20 :                         NDR_PULL_ALLOC(ndr, r->out.info);
   17132             :                 }
   17133          20 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17134          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
   17135          20 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, *r->out.info_type));
   17136          20 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
   17137          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
   17138          20 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17139             :         }
   17140          40 :         return NDR_ERR_SUCCESS;
   17141             : }
   17142             : 
   17143           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaGetInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsReplicaGetInfo *r)
   17144             : {
   17145           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaGetInfo");
   17146           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17147           0 :         ndr->depth++;
   17148           0 :         if (flags & NDR_SET_VALUES) {
   17149           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17150             :         }
   17151           0 :         if (flags & NDR_IN) {
   17152           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsReplicaGetInfo");
   17153           0 :                 ndr->depth++;
   17154           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   17155           0 :                 ndr->depth++;
   17156           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   17157           0 :                 ndr->depth--;
   17158           0 :                 ndr_print_drsuapi_DsReplicaGetInfoLevel(ndr, "level", r->in.level);
   17159           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   17160           0 :                 ndr->depth++;
   17161           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   17162           0 :                 ndr_print_drsuapi_DsReplicaGetInfoRequest(ndr, "req", r->in.req);
   17163           0 :                 ndr->depth--;
   17164           0 :                 ndr->depth--;
   17165             :         }
   17166           0 :         if (flags & NDR_OUT) {
   17167           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsReplicaGetInfo");
   17168           0 :                 ndr->depth++;
   17169           0 :                 ndr_print_ptr(ndr, "info_type", r->out.info_type);
   17170           0 :                 ndr->depth++;
   17171           0 :                 ndr_print_drsuapi_DsReplicaInfoType(ndr, "info_type", *r->out.info_type);
   17172           0 :                 ndr->depth--;
   17173           0 :                 ndr_print_ptr(ndr, "info", r->out.info);
   17174           0 :                 ndr->depth++;
   17175           0 :                 ndr_print_set_switch_value(ndr, r->out.info, *r->out.info_type);
   17176           0 :                 ndr_print_drsuapi_DsReplicaInfo(ndr, "info", r->out.info);
   17177           0 :                 ndr->depth--;
   17178           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17179           0 :                 ndr->depth--;
   17180             :         }
   17181           0 :         ndr->depth--;
   17182             : }
   17183             : 
   17184           0 : static enum ndr_err_code ndr_push_DRSUAPI_ADD_SID_HISTORY(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_ADD_SID_HISTORY *r)
   17185             : {
   17186           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17187           0 :         if (flags & NDR_IN) {
   17188           0 :         }
   17189           0 :         if (flags & NDR_OUT) {
   17190           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17191             :         }
   17192           0 :         return NDR_ERR_SUCCESS;
   17193             : }
   17194             : 
   17195           0 : static enum ndr_err_code ndr_pull_DRSUAPI_ADD_SID_HISTORY(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_ADD_SID_HISTORY *r)
   17196             : {
   17197           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17198           0 :         if (flags & NDR_IN) {
   17199           0 :         }
   17200           0 :         if (flags & NDR_OUT) {
   17201             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17202             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17203           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17204             :         }
   17205           0 :         return NDR_ERR_SUCCESS;
   17206             : }
   17207             : 
   17208           0 : _PUBLIC_ void ndr_print_DRSUAPI_ADD_SID_HISTORY(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_ADD_SID_HISTORY *r)
   17209             : {
   17210           0 :         ndr_print_struct(ndr, name, "DRSUAPI_ADD_SID_HISTORY");
   17211           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17212           0 :         ndr->depth++;
   17213           0 :         if (flags & NDR_SET_VALUES) {
   17214           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17215             :         }
   17216           0 :         if (flags & NDR_IN) {
   17217           0 :                 ndr_print_struct(ndr, "in", "DRSUAPI_ADD_SID_HISTORY");
   17218           0 :                 ndr->depth++;
   17219           0 :                 ndr->depth--;
   17220             :         }
   17221           0 :         if (flags & NDR_OUT) {
   17222           0 :                 ndr_print_struct(ndr, "out", "DRSUAPI_ADD_SID_HISTORY");
   17223           0 :                 ndr->depth++;
   17224           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17225           0 :                 ndr->depth--;
   17226             :         }
   17227           0 :         ndr->depth--;
   17228             : }
   17229             : 
   17230           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMemberships2(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_DsGetMemberships2 *r)
   17231             : {
   17232           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17233           0 :         if (flags & NDR_IN) {
   17234           0 :                 if (r->in.bind_handle == NULL) {
   17235           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17236             :                 }
   17237           0 :                 if (r->in.req == NULL) {
   17238           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17239             :                 }
   17240           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   17241           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   17242           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   17243           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Request(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   17244             :         }
   17245           0 :         if (flags & NDR_OUT) {
   17246           0 :                 if (r->out.level_out == NULL) {
   17247           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17248             :                 }
   17249           0 :                 if (r->out.ctr == NULL) {
   17250           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17251             :                 }
   17252           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   17253           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   17254           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetMemberships2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   17255           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17256             :         }
   17257           0 :         return NDR_ERR_SUCCESS;
   17258             : }
   17259             : 
   17260           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMemberships2(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_DsGetMemberships2 *r)
   17261             : {
   17262           0 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   17263           0 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   17264           0 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   17265           0 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   17266           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17267           0 :         if (flags & NDR_IN) {
   17268           0 :                 NDR_ZERO_STRUCT(r->out);
   17269             : 
   17270           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17271           0 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   17272             :                 }
   17273           0 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17274           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   17275           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   17276           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   17277           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   17278           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17279           0 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   17280             :                 }
   17281           0 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17282           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   17283           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   17284           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Request(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   17285           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   17286           0 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   17287           0 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   17288           0 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   17289           0 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   17290             :         }
   17291           0 :         if (flags & NDR_OUT) {
   17292             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17293             :                 if (r->in.bind_handle == NULL) {
   17294             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   17295             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   17296             :                 }
   17297             :                 if (r->in.req == NULL) {
   17298             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   17299             :                         NDR_ZERO_STRUCTP(r->in.req);
   17300             :                 }
   17301             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17302           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17303           0 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   17304             :                 }
   17305           0 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17306           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   17307           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   17308           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   17309           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17310           0 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   17311             :                 }
   17312           0 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17313           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   17314           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   17315           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetMemberships2Ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   17316           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   17317           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17318             :         }
   17319           0 :         return NDR_ERR_SUCCESS;
   17320             : }
   17321             : 
   17322           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMemberships2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_DsGetMemberships2 *r)
   17323             : {
   17324           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetMemberships2");
   17325           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17326           0 :         ndr->depth++;
   17327           0 :         if (flags & NDR_SET_VALUES) {
   17328           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17329             :         }
   17330           0 :         if (flags & NDR_IN) {
   17331           0 :                 ndr_print_struct(ndr, "in", "drsuapi_DsGetMemberships2");
   17332           0 :                 ndr->depth++;
   17333           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   17334           0 :                 ndr->depth++;
   17335           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   17336           0 :                 ndr->depth--;
   17337           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   17338           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   17339           0 :                 ndr->depth++;
   17340           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   17341           0 :                 ndr_print_drsuapi_DsGetMemberships2Request(ndr, "req", r->in.req);
   17342           0 :                 ndr->depth--;
   17343           0 :                 ndr->depth--;
   17344             :         }
   17345           0 :         if (flags & NDR_OUT) {
   17346           0 :                 ndr_print_struct(ndr, "out", "drsuapi_DsGetMemberships2");
   17347           0 :                 ndr->depth++;
   17348           0 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   17349           0 :                 ndr->depth++;
   17350           0 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   17351           0 :                 ndr->depth--;
   17352           0 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   17353           0 :                 ndr->depth++;
   17354           0 :                 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
   17355           0 :                 ndr_print_drsuapi_DsGetMemberships2Ctr(ndr, "ctr", r->out.ctr);
   17356           0 :                 ndr->depth--;
   17357           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17358           0 :                 ndr->depth--;
   17359             :         }
   17360           0 :         ndr->depth--;
   17361             : }
   17362             : 
   17363           0 : static enum ndr_err_code ndr_push_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r)
   17364             : {
   17365           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17366           0 :         if (flags & NDR_IN) {
   17367           0 :         }
   17368           0 :         if (flags & NDR_OUT) {
   17369           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17370             :         }
   17371           0 :         return NDR_ERR_SUCCESS;
   17372             : }
   17373             : 
   17374           0 : static enum ndr_err_code ndr_pull_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r)
   17375             : {
   17376           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17377           0 :         if (flags & NDR_IN) {
   17378           0 :         }
   17379           0 :         if (flags & NDR_OUT) {
   17380             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17381             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17382           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17383             :         }
   17384           0 :         return NDR_ERR_SUCCESS;
   17385             : }
   17386             : 
   17387           0 : _PUBLIC_ void ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_REPLICA_VERIFY_OBJECTS *r)
   17388             : {
   17389           0 :         ndr_print_struct(ndr, name, "DRSUAPI_REPLICA_VERIFY_OBJECTS");
   17390           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17391           0 :         ndr->depth++;
   17392           0 :         if (flags & NDR_SET_VALUES) {
   17393           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17394             :         }
   17395           0 :         if (flags & NDR_IN) {
   17396           0 :                 ndr_print_struct(ndr, "in", "DRSUAPI_REPLICA_VERIFY_OBJECTS");
   17397           0 :                 ndr->depth++;
   17398           0 :                 ndr->depth--;
   17399             :         }
   17400           0 :         if (flags & NDR_OUT) {
   17401           0 :                 ndr_print_struct(ndr, "out", "DRSUAPI_REPLICA_VERIFY_OBJECTS");
   17402           0 :                 ndr->depth++;
   17403           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17404           0 :                 ndr->depth--;
   17405             :         }
   17406           0 :         ndr->depth--;
   17407             : }
   17408             : 
   17409           0 : static enum ndr_err_code ndr_push_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_push *ndr, ndr_flags_type flags, const struct DRSUAPI_GET_OBJECT_EXISTENCE *r)
   17410             : {
   17411           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17412           0 :         if (flags & NDR_IN) {
   17413           0 :         }
   17414           0 :         if (flags & NDR_OUT) {
   17415           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17416             :         }
   17417           0 :         return NDR_ERR_SUCCESS;
   17418             : }
   17419             : 
   17420           0 : static enum ndr_err_code ndr_pull_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_pull *ndr, ndr_flags_type flags, struct DRSUAPI_GET_OBJECT_EXISTENCE *r)
   17421             : {
   17422           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17423           0 :         if (flags & NDR_IN) {
   17424           0 :         }
   17425           0 :         if (flags & NDR_OUT) {
   17426             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17427             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17428           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17429             :         }
   17430           0 :         return NDR_ERR_SUCCESS;
   17431             : }
   17432             : 
   17433           0 : _PUBLIC_ void ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct DRSUAPI_GET_OBJECT_EXISTENCE *r)
   17434             : {
   17435           0 :         ndr_print_struct(ndr, name, "DRSUAPI_GET_OBJECT_EXISTENCE");
   17436           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17437           0 :         ndr->depth++;
   17438           0 :         if (flags & NDR_SET_VALUES) {
   17439           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17440             :         }
   17441           0 :         if (flags & NDR_IN) {
   17442           0 :                 ndr_print_struct(ndr, "in", "DRSUAPI_GET_OBJECT_EXISTENCE");
   17443           0 :                 ndr->depth++;
   17444           0 :                 ndr->depth--;
   17445             :         }
   17446           0 :         if (flags & NDR_OUT) {
   17447           0 :                 ndr_print_struct(ndr, "out", "DRSUAPI_GET_OBJECT_EXISTENCE");
   17448           0 :                 ndr->depth++;
   17449           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17450           0 :                 ndr->depth--;
   17451             :         }
   17452           0 :         ndr->depth--;
   17453             : }
   17454             : 
   17455           0 : static enum ndr_err_code ndr_push_drsuapi_QuerySitesByCost(struct ndr_push *ndr, ndr_flags_type flags, const struct drsuapi_QuerySitesByCost *r)
   17456             : {
   17457           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
   17458           0 :         if (flags & NDR_IN) {
   17459           0 :                 if (r->in.bind_handle == NULL) {
   17460           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17461             :                 }
   17462           0 :                 if (r->in.req == NULL) {
   17463           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17464             :                 }
   17465           0 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   17466           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
   17467           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.req, r->in.level));
   17468           0 :                 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   17469             :         }
   17470           0 :         if (flags & NDR_OUT) {
   17471           0 :                 if (r->out.level_out == NULL) {
   17472           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17473             :                 }
   17474           0 :                 if (r->out.ctr == NULL) {
   17475           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
   17476             :                 }
   17477           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level_out));
   17478           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   17479           0 :                 NDR_CHECK(ndr_push_drsuapi_QuerySitesByCostCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   17480           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
   17481             :         }
   17482           0 :         return NDR_ERR_SUCCESS;
   17483             : }
   17484             : 
   17485           0 : static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCost(struct ndr_pull *ndr, ndr_flags_type flags, struct drsuapi_QuerySitesByCost *r)
   17486             : {
   17487           0 :         TALLOC_CTX *_mem_save_bind_handle_0 = NULL;
   17488           0 :         TALLOC_CTX *_mem_save_req_0 = NULL;
   17489           0 :         TALLOC_CTX *_mem_save_level_out_0 = NULL;
   17490           0 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
   17491           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
   17492           0 :         if (flags & NDR_IN) {
   17493           0 :                 NDR_ZERO_STRUCT(r->out);
   17494             : 
   17495           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17496           0 :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   17497             :                 }
   17498           0 :                 _mem_save_bind_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17499           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.bind_handle, LIBNDR_FLAG_REF_ALLOC);
   17500           0 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.bind_handle));
   17501           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bind_handle_0, LIBNDR_FLAG_REF_ALLOC);
   17502           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
   17503           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17504           0 :                         NDR_PULL_ALLOC(ndr, r->in.req);
   17505             :                 }
   17506           0 :                 _mem_save_req_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17507           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.req, LIBNDR_FLAG_REF_ALLOC);
   17508           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.req, r->in.level));
   17509           0 :                 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostRequest(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.req));
   17510           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_req_0, LIBNDR_FLAG_REF_ALLOC);
   17511           0 :                 NDR_PULL_ALLOC(ndr, r->out.level_out);
   17512           0 :                 NDR_ZERO_STRUCTP(r->out.level_out);
   17513           0 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
   17514           0 :                 NDR_ZERO_STRUCTP(r->out.ctr);
   17515             :         }
   17516           0 :         if (flags & NDR_OUT) {
   17517             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
   17518             :                 if (r->in.bind_handle == NULL) {
   17519             :                         NDR_PULL_ALLOC(ndr, r->in.bind_handle);
   17520             :                         NDR_ZERO_STRUCTP(r->in.bind_handle);
   17521             :                 }
   17522             :                 if (r->in.req == NULL) {
   17523             :                         NDR_PULL_ALLOC(ndr, r->in.req);
   17524             :                         NDR_ZERO_STRUCTP(r->in.req);
   17525             :                 }
   17526             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
   17527           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17528           0 :                         NDR_PULL_ALLOC(ndr, r->out.level_out);
   17529             :                 }
   17530           0 :                 _mem_save_level_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17531           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.level_out, LIBNDR_FLAG_REF_ALLOC);
   17532           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level_out));
   17533           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_out_0, LIBNDR_FLAG_REF_ALLOC);
   17534           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
   17535           0 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
   17536             :                 }
   17537           0 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
   17538           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
   17539           0 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level_out));
   17540           0 :                 NDR_CHECK(ndr_pull_drsuapi_QuerySitesByCostCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
   17541           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
   17542           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
   17543             :         }
   17544           0 :         return NDR_ERR_SUCCESS;
   17545             : }
   17546             : 
   17547           0 : _PUBLIC_ void ndr_print_drsuapi_QuerySitesByCost(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct drsuapi_QuerySitesByCost *r)
   17548             : {
   17549           0 :         ndr_print_struct(ndr, name, "drsuapi_QuerySitesByCost");
   17550           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
   17551           0 :         ndr->depth++;
   17552           0 :         if (flags & NDR_SET_VALUES) {
   17553           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
   17554             :         }
   17555           0 :         if (flags & NDR_IN) {
   17556           0 :                 ndr_print_struct(ndr, "in", "drsuapi_QuerySitesByCost");
   17557           0 :                 ndr->depth++;
   17558           0 :                 ndr_print_ptr(ndr, "bind_handle", r->in.bind_handle);
   17559           0 :                 ndr->depth++;
   17560           0 :                 ndr_print_policy_handle(ndr, "bind_handle", r->in.bind_handle);
   17561           0 :                 ndr->depth--;
   17562           0 :                 ndr_print_uint32(ndr, "level", r->in.level);
   17563           0 :                 ndr_print_ptr(ndr, "req", r->in.req);
   17564           0 :                 ndr->depth++;
   17565           0 :                 ndr_print_set_switch_value(ndr, r->in.req, r->in.level);
   17566           0 :                 ndr_print_drsuapi_QuerySitesByCostRequest(ndr, "req", r->in.req);
   17567           0 :                 ndr->depth--;
   17568           0 :                 ndr->depth--;
   17569             :         }
   17570           0 :         if (flags & NDR_OUT) {
   17571           0 :                 ndr_print_struct(ndr, "out", "drsuapi_QuerySitesByCost");
   17572           0 :                 ndr->depth++;
   17573           0 :                 ndr_print_ptr(ndr, "level_out", r->out.level_out);
   17574           0 :                 ndr->depth++;
   17575           0 :                 ndr_print_uint32(ndr, "level_out", *r->out.level_out);
   17576           0 :                 ndr->depth--;
   17577           0 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
   17578           0 :                 ndr->depth++;
   17579           0 :                 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level_out);
   17580           0 :                 ndr_print_drsuapi_QuerySitesByCostCtr(ndr, "ctr", r->out.ctr);
   17581           0 :                 ndr->depth--;
   17582           0 :                 ndr_print_WERROR(ndr, "result", r->out.result);
   17583           0 :                 ndr->depth--;
   17584             :         }
   17585           0 :         ndr->depth--;
   17586             : }
   17587             : 
   17588             : #ifndef SKIP_NDR_TABLE_drsuapi
   17589             : static const struct ndr_interface_public_struct drsuapi_public_structs[] = {
   17590             :         {
   17591             :                 .name = "drsuapi_DsBindInfo24",
   17592             :                 .struct_size = sizeof(struct drsuapi_DsBindInfo24 ),
   17593             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo24,
   17594             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo24,
   17595             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo24,
   17596             :         },
   17597             :         {
   17598             :                 .name = "drsuapi_DsBindInfo28",
   17599             :                 .struct_size = sizeof(struct drsuapi_DsBindInfo28 ),
   17600             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo28,
   17601             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo28,
   17602             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo28,
   17603             :         },
   17604             :         {
   17605             :                 .name = "drsuapi_DsBindInfo32",
   17606             :                 .struct_size = sizeof(struct drsuapi_DsBindInfo32 ),
   17607             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo32,
   17608             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo32,
   17609             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo32,
   17610             :         },
   17611             :         {
   17612             :                 .name = "drsuapi_DsBindInfo48",
   17613             :                 .struct_size = sizeof(struct drsuapi_DsBindInfo48 ),
   17614             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo48,
   17615             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo48,
   17616             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo48,
   17617             :         },
   17618             :         {
   17619             :                 .name = "drsuapi_DsBindInfo52",
   17620             :                 .struct_size = sizeof(struct drsuapi_DsBindInfo52 ),
   17621             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfo52,
   17622             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfo52,
   17623             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfo52,
   17624             :         },
   17625             :         {
   17626             :                 .name = "drsuapi_DsBindInfoFallBack",
   17627             :                 .struct_size = sizeof(struct drsuapi_DsBindInfoFallBack ),
   17628             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBindInfoFallBack,
   17629             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBindInfoFallBack,
   17630             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsBindInfoFallBack,
   17631             :         },
   17632             :         {
   17633             :                 .name = "drsuapi_DsReplicaObjectIdentifier",
   17634             :                 .struct_size = sizeof(struct drsuapi_DsReplicaObjectIdentifier ),
   17635             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectIdentifier,
   17636             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectIdentifier,
   17637             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectIdentifier,
   17638             :         },
   17639             :         {
   17640             :                 .name = "drsuapi_DsReplicaHighWaterMark",
   17641             :                 .struct_size = sizeof(struct drsuapi_DsReplicaHighWaterMark ),
   17642             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaHighWaterMark,
   17643             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaHighWaterMark,
   17644             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaHighWaterMark,
   17645             :         },
   17646             :         {
   17647             :                 .name = "drsuapi_DsReplicaCursor",
   17648             :                 .struct_size = sizeof(struct drsuapi_DsReplicaCursor ),
   17649             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaCursor,
   17650             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaCursor,
   17651             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaCursor,
   17652             :         },
   17653             :         {
   17654             :                 .name = "drsuapi_DsReplicaOIDMapping_Ctr",
   17655             :                 .struct_size = sizeof(struct drsuapi_DsReplicaOIDMapping_Ctr ),
   17656             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaOIDMapping_Ctr,
   17657             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr,
   17658             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaOIDMapping_Ctr,
   17659             :         },
   17660             :         {
   17661             :                 .name = "drsuapi_DsGetNCChangesRequest8",
   17662             :                 .struct_size = sizeof(struct drsuapi_DsGetNCChangesRequest8 ),
   17663             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesRequest8,
   17664             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesRequest8,
   17665             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesRequest8,
   17666             :         },
   17667             :         {
   17668             :                 .name = "drsuapi_DsGetNCChangesRequest10",
   17669             :                 .struct_size = sizeof(struct drsuapi_DsGetNCChangesRequest10 ),
   17670             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesRequest10,
   17671             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesRequest10,
   17672             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesRequest10,
   17673             :         },
   17674             :         {
   17675             :                 .name = "drsuapi_DsReplicaCursor2",
   17676             :                 .struct_size = sizeof(struct drsuapi_DsReplicaCursor2 ),
   17677             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaCursor2,
   17678             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaCursor2,
   17679             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaCursor2,
   17680             :         },
   17681             :         {
   17682             :                 .name = "drsuapi_DsReplicaObjectIdentifier3",
   17683             :                 .struct_size = sizeof(struct drsuapi_DsReplicaObjectIdentifier3 ),
   17684             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectIdentifier3,
   17685             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectIdentifier3,
   17686             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3,
   17687             :         },
   17688             :         {
   17689             :                 .name = "drsuapi_DsReplicaObjectIdentifier3Binary",
   17690             :                 .struct_size = sizeof(struct drsuapi_DsReplicaObjectIdentifier3Binary ),
   17691             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary,
   17692             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary,
   17693             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3Binary,
   17694             :         },
   17695             :         {
   17696             :                 .name = "drsuapi_DsReplicaAttribute",
   17697             :                 .struct_size = sizeof(struct drsuapi_DsReplicaAttribute ),
   17698             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaAttribute,
   17699             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaAttribute,
   17700             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaAttribute,
   17701             :         },
   17702             :         {
   17703             :                 .name = "drsuapi_DsReplicaObject",
   17704             :                 .struct_size = sizeof(struct drsuapi_DsReplicaObject ),
   17705             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObject,
   17706             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObject,
   17707             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObject,
   17708             :         },
   17709             :         {
   17710             :                 .name = "drsuapi_DsReplicaMetaDataCtr",
   17711             :                 .struct_size = sizeof(struct drsuapi_DsReplicaMetaDataCtr ),
   17712             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaMetaDataCtr,
   17713             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaMetaDataCtr,
   17714             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaMetaDataCtr,
   17715             :         },
   17716             :         {
   17717             :                 .name = "drsuapi_DsReplicaObjectListItemEx",
   17718             :                 .struct_size = sizeof(struct drsuapi_DsReplicaObjectListItemEx ),
   17719             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectListItemEx,
   17720             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectListItemEx,
   17721             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectListItemEx,
   17722             :         },
   17723             :         {
   17724             :                 .name = "drsuapi_DsGetNCChangesCtr1",
   17725             :                 .struct_size = sizeof(struct drsuapi_DsGetNCChangesCtr1 ),
   17726             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesCtr1,
   17727             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesCtr1,
   17728             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesCtr1,
   17729             :         },
   17730             :         {
   17731             :                 .name = "drsuapi_DsReplicaLinkedAttribute",
   17732             :                 .struct_size = sizeof(struct drsuapi_DsReplicaLinkedAttribute ),
   17733             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaLinkedAttribute,
   17734             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaLinkedAttribute,
   17735             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaLinkedAttribute,
   17736             :         },
   17737             :         {
   17738             :                 .name = "drsuapi_DsGetNCChangesCtr6",
   17739             :                 .struct_size = sizeof(struct drsuapi_DsGetNCChangesCtr6 ),
   17740             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesCtr6,
   17741             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesCtr6,
   17742             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesCtr6,
   17743             :         },
   17744             :         {
   17745             :                 .name = "drsuapi_DsGetNCChangesCtr1TS",
   17746             :                 .struct_size = sizeof(struct drsuapi_DsGetNCChangesCtr1TS ),
   17747             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesCtr1TS,
   17748             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesCtr1TS,
   17749             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesCtr1TS,
   17750             :         },
   17751             :         {
   17752             :                 .name = "drsuapi_DsGetNCChangesCtr6TS",
   17753             :                 .struct_size = sizeof(struct drsuapi_DsGetNCChangesCtr6TS ),
   17754             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChangesCtr6TS,
   17755             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChangesCtr6TS,
   17756             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsGetNCChangesCtr6TS,
   17757             :         },
   17758             :         {
   17759             :                 .name = "drsuapi_DsReplicaObjectListItem",
   17760             :                 .struct_size = sizeof(struct drsuapi_DsReplicaObjectListItem ),
   17761             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaObjectListItem,
   17762             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaObjectListItem,
   17763             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_drsuapi_DsReplicaObjectListItem,
   17764             :         },
   17765             :         { .name = NULL }
   17766             : };
   17767             : 
   17768             : static const struct ndr_interface_call drsuapi_calls[] = {
   17769             :         {
   17770             :                 "drsuapi_DsBind",
   17771             :                 sizeof(struct drsuapi_DsBind),
   17772             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsBind,
   17773             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsBind,
   17774             :                 (ndr_print_function_t) ndr_print_drsuapi_DsBind,
   17775             :                 { 0, NULL },
   17776             :                 { 0, NULL },
   17777             :         },
   17778             :         {
   17779             :                 "drsuapi_DsUnbind",
   17780             :                 sizeof(struct drsuapi_DsUnbind),
   17781             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsUnbind,
   17782             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsUnbind,
   17783             :                 (ndr_print_function_t) ndr_print_drsuapi_DsUnbind,
   17784             :                 { 0, NULL },
   17785             :                 { 0, NULL },
   17786             :         },
   17787             :         {
   17788             :                 "drsuapi_DsReplicaSync",
   17789             :                 sizeof(struct drsuapi_DsReplicaSync),
   17790             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaSync,
   17791             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaSync,
   17792             :                 (ndr_print_function_t) ndr_print_drsuapi_DsReplicaSync,
   17793             :                 { 0, NULL },
   17794             :                 { 0, NULL },
   17795             :         },
   17796             :         {
   17797             :                 "drsuapi_DsGetNCChanges",
   17798             :                 sizeof(struct drsuapi_DsGetNCChanges),
   17799             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNCChanges,
   17800             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNCChanges,
   17801             :                 (ndr_print_function_t) ndr_print_drsuapi_DsGetNCChanges,
   17802             :                 { 0, NULL },
   17803             :                 { 0, NULL },
   17804             :         },
   17805             :         {
   17806             :                 "drsuapi_DsReplicaUpdateRefs",
   17807             :                 sizeof(struct drsuapi_DsReplicaUpdateRefs),
   17808             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaUpdateRefs,
   17809             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaUpdateRefs,
   17810             :                 (ndr_print_function_t) ndr_print_drsuapi_DsReplicaUpdateRefs,
   17811             :                 { 0, NULL },
   17812             :                 { 0, NULL },
   17813             :         },
   17814             :         {
   17815             :                 "drsuapi_DsReplicaAdd",
   17816             :                 sizeof(struct drsuapi_DsReplicaAdd),
   17817             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaAdd,
   17818             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaAdd,
   17819             :                 (ndr_print_function_t) ndr_print_drsuapi_DsReplicaAdd,
   17820             :                 { 0, NULL },
   17821             :                 { 0, NULL },
   17822             :         },
   17823             :         {
   17824             :                 "drsuapi_DsReplicaDel",
   17825             :                 sizeof(struct drsuapi_DsReplicaDel),
   17826             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaDel,
   17827             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaDel,
   17828             :                 (ndr_print_function_t) ndr_print_drsuapi_DsReplicaDel,
   17829             :                 { 0, NULL },
   17830             :                 { 0, NULL },
   17831             :         },
   17832             :         {
   17833             :                 "drsuapi_DsReplicaMod",
   17834             :                 sizeof(struct drsuapi_DsReplicaMod),
   17835             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaMod,
   17836             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaMod,
   17837             :                 (ndr_print_function_t) ndr_print_drsuapi_DsReplicaMod,
   17838             :                 { 0, NULL },
   17839             :                 { 0, NULL },
   17840             :         },
   17841             :         {
   17842             :                 "DRSUAPI_VERIFY_NAMES",
   17843             :                 sizeof(struct DRSUAPI_VERIFY_NAMES),
   17844             :                 (ndr_push_flags_fn_t) ndr_push_DRSUAPI_VERIFY_NAMES,
   17845             :                 (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_VERIFY_NAMES,
   17846             :                 (ndr_print_function_t) ndr_print_DRSUAPI_VERIFY_NAMES,
   17847             :                 { 0, NULL },
   17848             :                 { 0, NULL },
   17849             :         },
   17850             :         {
   17851             :                 "drsuapi_DsGetMemberships",
   17852             :                 sizeof(struct drsuapi_DsGetMemberships),
   17853             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetMemberships,
   17854             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetMemberships,
   17855             :                 (ndr_print_function_t) ndr_print_drsuapi_DsGetMemberships,
   17856             :                 { 0, NULL },
   17857             :                 { 0, NULL },
   17858             :         },
   17859             :         {
   17860             :                 "DRSUAPI_INTER_DOMAIN_MOVE",
   17861             :                 sizeof(struct DRSUAPI_INTER_DOMAIN_MOVE),
   17862             :                 (ndr_push_flags_fn_t) ndr_push_DRSUAPI_INTER_DOMAIN_MOVE,
   17863             :                 (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_INTER_DOMAIN_MOVE,
   17864             :                 (ndr_print_function_t) ndr_print_DRSUAPI_INTER_DOMAIN_MOVE,
   17865             :                 { 0, NULL },
   17866             :                 { 0, NULL },
   17867             :         },
   17868             :         {
   17869             :                 "drsuapi_DsGetNT4ChangeLog",
   17870             :                 sizeof(struct drsuapi_DsGetNT4ChangeLog),
   17871             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetNT4ChangeLog,
   17872             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetNT4ChangeLog,
   17873             :                 (ndr_print_function_t) ndr_print_drsuapi_DsGetNT4ChangeLog,
   17874             :                 { 0, NULL },
   17875             :                 { 0, NULL },
   17876             :         },
   17877             :         {
   17878             :                 "drsuapi_DsCrackNames",
   17879             :                 sizeof(struct drsuapi_DsCrackNames),
   17880             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsCrackNames,
   17881             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsCrackNames,
   17882             :                 (ndr_print_function_t) ndr_print_drsuapi_DsCrackNames,
   17883             :                 { 0, NULL },
   17884             :                 { 0, NULL },
   17885             :         },
   17886             :         {
   17887             :                 "drsuapi_DsWriteAccountSpn",
   17888             :                 sizeof(struct drsuapi_DsWriteAccountSpn),
   17889             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsWriteAccountSpn,
   17890             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsWriteAccountSpn,
   17891             :                 (ndr_print_function_t) ndr_print_drsuapi_DsWriteAccountSpn,
   17892             :                 { 0, NULL },
   17893             :                 { 0, NULL },
   17894             :         },
   17895             :         {
   17896             :                 "drsuapi_DsRemoveDSServer",
   17897             :                 sizeof(struct drsuapi_DsRemoveDSServer),
   17898             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsRemoveDSServer,
   17899             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsRemoveDSServer,
   17900             :                 (ndr_print_function_t) ndr_print_drsuapi_DsRemoveDSServer,
   17901             :                 { 0, NULL },
   17902             :                 { 0, NULL },
   17903             :         },
   17904             :         {
   17905             :                 "DRSUAPI_REMOVE_DS_DOMAIN",
   17906             :                 sizeof(struct DRSUAPI_REMOVE_DS_DOMAIN),
   17907             :                 (ndr_push_flags_fn_t) ndr_push_DRSUAPI_REMOVE_DS_DOMAIN,
   17908             :                 (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_REMOVE_DS_DOMAIN,
   17909             :                 (ndr_print_function_t) ndr_print_DRSUAPI_REMOVE_DS_DOMAIN,
   17910             :                 { 0, NULL },
   17911             :                 { 0, NULL },
   17912             :         },
   17913             :         {
   17914             :                 "drsuapi_DsGetDomainControllerInfo",
   17915             :                 sizeof(struct drsuapi_DsGetDomainControllerInfo),
   17916             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetDomainControllerInfo,
   17917             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetDomainControllerInfo,
   17918             :                 (ndr_print_function_t) ndr_print_drsuapi_DsGetDomainControllerInfo,
   17919             :                 { 0, NULL },
   17920             :                 { 0, NULL },
   17921             :         },
   17922             :         {
   17923             :                 "drsuapi_DsAddEntry",
   17924             :                 sizeof(struct drsuapi_DsAddEntry),
   17925             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsAddEntry,
   17926             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsAddEntry,
   17927             :                 (ndr_print_function_t) ndr_print_drsuapi_DsAddEntry,
   17928             :                 { 0, NULL },
   17929             :                 { 0, NULL },
   17930             :         },
   17931             :         {
   17932             :                 "drsuapi_DsExecuteKCC",
   17933             :                 sizeof(struct drsuapi_DsExecuteKCC),
   17934             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsExecuteKCC,
   17935             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsExecuteKCC,
   17936             :                 (ndr_print_function_t) ndr_print_drsuapi_DsExecuteKCC,
   17937             :                 { 0, NULL },
   17938             :                 { 0, NULL },
   17939             :         },
   17940             :         {
   17941             :                 "drsuapi_DsReplicaGetInfo",
   17942             :                 sizeof(struct drsuapi_DsReplicaGetInfo),
   17943             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsReplicaGetInfo,
   17944             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsReplicaGetInfo,
   17945             :                 (ndr_print_function_t) ndr_print_drsuapi_DsReplicaGetInfo,
   17946             :                 { 0, NULL },
   17947             :                 { 0, NULL },
   17948             :         },
   17949             :         {
   17950             :                 "DRSUAPI_ADD_SID_HISTORY",
   17951             :                 sizeof(struct DRSUAPI_ADD_SID_HISTORY),
   17952             :                 (ndr_push_flags_fn_t) ndr_push_DRSUAPI_ADD_SID_HISTORY,
   17953             :                 (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_ADD_SID_HISTORY,
   17954             :                 (ndr_print_function_t) ndr_print_DRSUAPI_ADD_SID_HISTORY,
   17955             :                 { 0, NULL },
   17956             :                 { 0, NULL },
   17957             :         },
   17958             :         {
   17959             :                 "drsuapi_DsGetMemberships2",
   17960             :                 sizeof(struct drsuapi_DsGetMemberships2),
   17961             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_DsGetMemberships2,
   17962             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_DsGetMemberships2,
   17963             :                 (ndr_print_function_t) ndr_print_drsuapi_DsGetMemberships2,
   17964             :                 { 0, NULL },
   17965             :                 { 0, NULL },
   17966             :         },
   17967             :         {
   17968             :                 "DRSUAPI_REPLICA_VERIFY_OBJECTS",
   17969             :                 sizeof(struct DRSUAPI_REPLICA_VERIFY_OBJECTS),
   17970             :                 (ndr_push_flags_fn_t) ndr_push_DRSUAPI_REPLICA_VERIFY_OBJECTS,
   17971             :                 (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_REPLICA_VERIFY_OBJECTS,
   17972             :                 (ndr_print_function_t) ndr_print_DRSUAPI_REPLICA_VERIFY_OBJECTS,
   17973             :                 { 0, NULL },
   17974             :                 { 0, NULL },
   17975             :         },
   17976             :         {
   17977             :                 "DRSUAPI_GET_OBJECT_EXISTENCE",
   17978             :                 sizeof(struct DRSUAPI_GET_OBJECT_EXISTENCE),
   17979             :                 (ndr_push_flags_fn_t) ndr_push_DRSUAPI_GET_OBJECT_EXISTENCE,
   17980             :                 (ndr_pull_flags_fn_t) ndr_pull_DRSUAPI_GET_OBJECT_EXISTENCE,
   17981             :                 (ndr_print_function_t) ndr_print_DRSUAPI_GET_OBJECT_EXISTENCE,
   17982             :                 { 0, NULL },
   17983             :                 { 0, NULL },
   17984             :         },
   17985             :         {
   17986             :                 "drsuapi_QuerySitesByCost",
   17987             :                 sizeof(struct drsuapi_QuerySitesByCost),
   17988             :                 (ndr_push_flags_fn_t) ndr_push_drsuapi_QuerySitesByCost,
   17989             :                 (ndr_pull_flags_fn_t) ndr_pull_drsuapi_QuerySitesByCost,
   17990             :                 (ndr_print_function_t) ndr_print_drsuapi_QuerySitesByCost,
   17991             :                 { 0, NULL },
   17992             :                 { 0, NULL },
   17993             :         },
   17994             :         { .name = NULL }
   17995             : };
   17996             : 
   17997             : static const char * const drsuapi_endpoint_strings[] = {
   17998             :         "ncacn_np:[\\pipe\\lsass]", 
   17999             :         "ncacn_np:[\\pipe\\protected_storage]", 
   18000             :         "ncacn_ip_tcp:", 
   18001             :         "ncalrpc:", 
   18002             : };
   18003             : 
   18004             : static const struct ndr_interface_string_array drsuapi_endpoints = {
   18005             :         .count  = 4,
   18006             :         .names  = drsuapi_endpoint_strings
   18007             : };
   18008             : 
   18009             : static const char * const drsuapi_authservice_strings[] = {
   18010             :         "ldap", 
   18011             : };
   18012             : 
   18013             : static const struct ndr_interface_string_array drsuapi_authservices = {
   18014             :         .count  = 1,
   18015             :         .names  = drsuapi_authservice_strings
   18016             : };
   18017             : 
   18018             : 
   18019             : const struct ndr_interface_table ndr_table_drsuapi = {
   18020             :         .name           = "drsuapi",
   18021             :         .syntax_id      = {
   18022             :                 {0xe3514235,0x4b06,0x11d1,{0xab,0x04},{0x00,0xc0,0x4f,0xc2,0xdc,0xd2}},
   18023             :                 NDR_DRSUAPI_VERSION
   18024             :         },
   18025             :         .helpstring     = NDR_DRSUAPI_HELPSTRING,
   18026             :         .num_calls      = 25,
   18027             :         .calls          = drsuapi_calls,
   18028             :         .num_public_structs     = 25,
   18029             :         .public_structs         = drsuapi_public_structs,
   18030             :         .endpoints      = &drsuapi_endpoints,
   18031             :         .authservices   = &drsuapi_authservices
   18032             : };
   18033             : 
   18034             : #endif /* SKIP_NDR_TABLE_drsuapi */

Generated by: LCOV version 1.14