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 abartlet/fix-coverage dd10fb34 Lines: 5100 12570 40.6 %
Date: 2021-09-23 10:06:22 Functions: 268 620 43.2 %

          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       72810 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r)
      12             : {
      13       72810 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      14       72810 :         return NDR_ERR_SUCCESS;
      15             : }
      16             : 
      17       94088 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
      18             : {
      19             :         uint32_t v;
      20       94088 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      21       94088 :         *r = v;
      22       94088 :         return NDR_ERR_SUCCESS;
      23             : }
      24             : 
      25          60 : _PUBLIC_ void ndr_print_drsuapi_DrsOptions(struct ndr_print *ndr, const char *name, uint32_t r)
      26             : {
      27          60 :         ndr_print_uint32(ndr, name, r);
      28          60 :         ndr->depth++;
      29          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_OP", DRSUAPI_DRS_ASYNC_OP, r);
      30          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GETCHG_CHECK", DRSUAPI_DRS_GETCHG_CHECK, r);
      31          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_UPDATE_NOTIFICATION", DRSUAPI_DRS_UPDATE_NOTIFICATION, r);
      32          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ADD_REF", DRSUAPI_DRS_ADD_REF, r);
      33          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_ALL", DRSUAPI_DRS_SYNC_ALL, r);
      34          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DEL_REF", DRSUAPI_DRS_DEL_REF, r);
      35          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_WRIT_REP", DRSUAPI_DRS_WRIT_REP, r);
      36          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_INIT_SYNC", DRSUAPI_DRS_INIT_SYNC, r);
      37          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_PER_SYNC", DRSUAPI_DRS_PER_SYNC, r);
      38          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_MAIL_REP", DRSUAPI_DRS_MAIL_REP, r);
      39          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_REP", DRSUAPI_DRS_ASYNC_REP, r);
      40          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_IGNORE_ERROR", DRSUAPI_DRS_IGNORE_ERROR, r);
      41          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_TWOWAY_SYNC", DRSUAPI_DRS_TWOWAY_SYNC, r);
      42          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_CRITICAL_ONLY", DRSUAPI_DRS_CRITICAL_ONLY, r);
      43          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ANC", DRSUAPI_DRS_GET_ANC, r);
      44          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_NC_SIZE", DRSUAPI_DRS_GET_NC_SIZE, r);
      45          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_LOCAL_ONLY", DRSUAPI_DRS_LOCAL_ONLY, r);
      46          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NONGC_RO_REP", DRSUAPI_DRS_NONGC_RO_REP, r);
      47          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_BYNAME", DRSUAPI_DRS_SYNC_BYNAME, r);
      48          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_OK", DRSUAPI_DRS_REF_OK, r);
      49          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_NOW", DRSUAPI_DRS_FULL_SYNC_NOW, r);
      50          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NO_SOURCE", DRSUAPI_DRS_NO_SOURCE, r);
      51          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS", DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS, r);
      52          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_PACKET", DRSUAPI_DRS_FULL_SYNC_PACKET, r);
      53          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_REQUEUE", DRSUAPI_DRS_SYNC_REQUEUE, r);
      54          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_URGENT", DRSUAPI_DRS_SYNC_URGENT, r);
      55          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_GCSPN", DRSUAPI_DRS_REF_GCSPN, r);
      56          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NO_DISCARD", DRSUAPI_DRS_NO_DISCARD, r);
      57          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NEVER_SYNCED", DRSUAPI_DRS_NEVER_SYNCED, r);
      58          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING", DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING, r);
      59          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_INIT_SYNC_NOW", DRSUAPI_DRS_INIT_SYNC_NOW, r);
      60          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_PREEMPTED", DRSUAPI_DRS_PREEMPTED, r);
      61          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_FORCED", DRSUAPI_DRS_SYNC_FORCED, r);
      62          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_AUTO_SYNC", DRSUAPI_DRS_DISABLE_AUTO_SYNC, r);
      63          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_PERIODIC_SYNC", DRSUAPI_DRS_DISABLE_PERIODIC_SYNC, r);
      64          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_USE_COMPRESSION", DRSUAPI_DRS_USE_COMPRESSION, r);
      65          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NEVER_NOTIFY", DRSUAPI_DRS_NEVER_NOTIFY, r);
      66          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_PAS", DRSUAPI_DRS_SYNC_PAS, r);
      67          60 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP", DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP, r);
      68          60 :         ndr->depth--;
      69          60 : }
      70             : 
      71        6811 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsMoreOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r)
      72             : {
      73        6811 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      74        6811 :         return NDR_ERR_SUCCESS;
      75             : }
      76             : 
      77        6811 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsMoreOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
      78             : {
      79             :         uint32_t v;
      80        6811 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      81        6811 :         *r = v;
      82        6811 :         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, int 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, int ndr_flags, uint32_t *r)
     100             : {
     101             :         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        3541 : static enum ndr_err_code ndr_push_drsuapi_SupportedExtensions(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     118             : {
     119        3650 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     120        3541 :         return NDR_ERR_SUCCESS;
     121             : }
     122             : 
     123        3429 : static enum ndr_err_code ndr_pull_drsuapi_SupportedExtensions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     124             : {
     125             :         uint32_t v;
     126        3524 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     127        3524 :         *r = v;
     128        3429 :         return NDR_ERR_SUCCESS;
     129             : }
     130             : 
     131         352 : _PUBLIC_ void ndr_print_drsuapi_SupportedExtensions(struct ndr_print *ndr, const char *name, uint32_t r)
     132             : {
     133         352 :         ndr_print_uint32(ndr, name, r);
     134         352 :         ndr->depth++;
     135         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_BASE", DRSUAPI_SUPPORTED_EXTENSION_BASE, r);
     136         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION", DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION, r);
     137         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI", DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI, r);
     138         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2", DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2, r);
     139         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS", DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS, r);
     140         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1, r);
     141         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION", DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION, r);
     142         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY, r);
     143         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE", DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE, r);
     144         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2, r);
     145         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION", DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION, r);
     146         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2, r);
     147         352 :         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         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND", DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND, r);
     149         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO", DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO, r);
     150         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION", DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION, r);
     151         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01", DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01, r);
     152         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP", DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP, r);
     153         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY", DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY, r);
     154         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3", DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3, r);
     155         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5, r);
     156         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2", DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2, r);
     157         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6, r);
     158         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS", DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS, r);
     159         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8, r);
     160         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5, r);
     161         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6, r);
     162         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3", DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3, r);
     163         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7, r);
     164         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT", DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT, r);
     165         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS", DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS, r);
     166         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10", DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10, r);
     167         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2", DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2, r);
     168         352 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3", DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3, r);
     169         352 :         ndr->depth--;
     170         352 : }
     171             : 
     172           9 : static enum ndr_err_code ndr_push_drsuapi_SupportedExtensionsExt(struct ndr_push *ndr, int 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, int ndr_flags, uint32_t *r)
     179             : {
     180             :         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, int 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             :         }
     208           0 :         return NDR_ERR_SUCCESS;
     209             : }
     210             : 
     211           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo24(struct ndr_pull *ndr, int 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             :         }
     223           0 :         return NDR_ERR_SUCCESS;
     224             : }
     225             : 
     226           0 : static void ndr_print_flags_drsuapi_DsBindInfo24(struct ndr_print *ndr, const char *name, int 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        3641 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo28(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsBindInfo28 *r)
     243             : {
     244        3641 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     245        3641 :         if (ndr_flags & NDR_SCALARS) {
     246        3641 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     247        3750 :                 NDR_CHECK(ndr_push_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, r->supported_extensions));
     248        3641 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
     249        3641 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pid));
     250        3641 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->repl_epoch));
     251        3641 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     252             :         }
     253        3532 :         if (ndr_flags & NDR_BUFFERS) {
     254             :         }
     255        3641 :         return NDR_ERR_SUCCESS;
     256             : }
     257             : 
     258        3517 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo28(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsBindInfo28 *r)
     259             : {
     260        3517 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     261        3517 :         if (ndr_flags & NDR_SCALARS) {
     262        3517 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     263        3612 :                 NDR_CHECK(ndr_pull_drsuapi_SupportedExtensions(ndr, NDR_SCALARS, &r->supported_extensions));
     264        3517 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
     265        3517 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pid));
     266        3517 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->repl_epoch));
     267        3517 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     268             :         }
     269        3422 :         if (ndr_flags & NDR_BUFFERS) {
     270             :         }
     271        3517 :         return NDR_ERR_SUCCESS;
     272             : }
     273             : 
     274           0 : static void ndr_print_flags_drsuapi_DsBindInfo28(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsBindInfo28 *r)
     275             : {
     276           0 :         ndr_print_drsuapi_DsBindInfo28(ndr, name, r);
     277           0 : }
     278             : 
     279         352 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfo28(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo28 *r)
     280             : {
     281         352 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfo28");
     282         352 :         if (r == NULL) { ndr_print_null(ndr); return; }
     283         352 :         ndr->depth++;
     284         352 :         ndr_print_drsuapi_SupportedExtensions(ndr, "supported_extensions", r->supported_extensions);
     285         352 :         ndr_print_GUID(ndr, "site_guid", &r->site_guid);
     286         352 :         ndr_print_uint32(ndr, "pid", r->pid);
     287         352 :         ndr_print_uint32(ndr, "repl_epoch", r->repl_epoch);
     288         352 :         ndr->depth--;
     289             : }
     290             : 
     291           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsBindInfo32(struct ndr_push *ndr, int 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             :         }
     305           0 :         return NDR_ERR_SUCCESS;
     306             : }
     307             : 
     308           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo32(struct ndr_pull *ndr, int 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             :         }
     322           0 :         return NDR_ERR_SUCCESS;
     323             : }
     324             : 
     325           0 : static void ndr_print_flags_drsuapi_DsBindInfo32(struct ndr_print *ndr, const char *name, int 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, int 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             :         }
     358           9 :         return NDR_ERR_SUCCESS;
     359             : }
     360             : 
     361           7 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo48(struct ndr_pull *ndr, int 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             :         }
     376           7 :         return NDR_ERR_SUCCESS;
     377             : }
     378             : 
     379           0 : static void ndr_print_flags_drsuapi_DsBindInfo48(struct ndr_print *ndr, const char *name, int 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, int 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             :         }
     414           0 :         return NDR_ERR_SUCCESS;
     415             : }
     416             : 
     417           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfo52(struct ndr_pull *ndr, int 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             :         }
     433           0 :         return NDR_ERR_SUCCESS;
     434             : }
     435             : 
     436           0 : static void ndr_print_flags_drsuapi_DsBindInfo52(struct ndr_print *ndr, const char *name, int 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, int 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 :                         uint32_t _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             :         }
     471           0 :         return NDR_ERR_SUCCESS;
     472             : }
     473             : 
     474           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsBindInfoFallBack(struct ndr_pull *ndr, int 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 :                         uint32_t _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             :         }
     489           0 :         return NDR_ERR_SUCCESS;
     490             : }
     491             : 
     492           0 : static void ndr_print_flags_drsuapi_DsBindInfoFallBack(struct ndr_print *ndr, const char *name, int 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 :                 uint32_t _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        3650 : static enum ndr_err_code ndr_push_drsuapi_DsBindInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsBindInfoCtr *r)
     512             : {
     513             :         {
     514        3650 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     515        3650 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     516        3650 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     517        3650 :                 if (ndr_flags & NDR_SCALARS) {
     518        3650 :                         NDR_CHECK(ndr_push_align(ndr, 5));
     519        3650 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
     520        3650 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
     521        3650 :                         NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->length));
     522        3650 :                         NDR_CHECK(ndr_push_drsuapi_DsBindInfo(ndr, NDR_SCALARS, &r->info));
     523        3650 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     524             :                 }
     525        3541 :                 if (ndr_flags & NDR_BUFFERS) {
     526             :                 }
     527        3650 :                 ndr->flags = _flags_save_STRUCT;
     528             :         }
     529        3650 :         return NDR_ERR_SUCCESS;
     530             : }
     531             : 
     532        3524 : static enum ndr_err_code ndr_pull_drsuapi_DsBindInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsBindInfoCtr *r)
     533             : {
     534             :         {
     535        3524 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     536        3524 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     537        3524 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     538        3524 :                 if (ndr_flags & NDR_SCALARS) {
     539        3524 :                         NDR_CHECK(ndr_pull_align(ndr, 5));
     540        3524 :                         NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->length));
     541        3524 :                         if (r->length < 1 || r->length > 10000) {
     542           0 :                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
     543             :                         }
     544        3524 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_length));
     545        3524 :                         NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->length));
     546        3524 :                         NDR_CHECK(ndr_pull_drsuapi_DsBindInfo(ndr, NDR_SCALARS, &r->info));
     547        3524 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     548             :                 }
     549        3429 :                 if (ndr_flags & NDR_BUFFERS) {
     550             :                 }
     551        3524 :                 ndr->flags = _flags_save_STRUCT;
     552             :         }
     553        3524 :         return NDR_ERR_SUCCESS;
     554             : }
     555             : 
     556         352 : _PUBLIC_ void ndr_print_drsuapi_DsBindInfoCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfoCtr *r)
     557             : {
     558         352 :         ndr_print_struct(ndr, name, "drsuapi_DsBindInfoCtr");
     559         352 :         if (r == NULL) { ndr_print_null(ndr); return; }
     560             :         {
     561         352 :                 uint32_t _flags_save_STRUCT = ndr->flags;
     562         352 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
     563         352 :                 ndr->depth++;
     564         352 :                 ndr_print_uint3264(ndr, "length", r->length);
     565         352 :                 ndr_print_uint32(ndr, "__ndr_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->length:r->__ndr_length);
     566         352 :                 ndr_print_set_switch_value(ndr, &r->info, r->length);
     567         352 :                 ndr_print_drsuapi_DsBindInfo(ndr, "info", &r->info);
     568         352 :                 ndr->depth--;
     569         352 :                 ndr->flags = _flags_save_STRUCT;
     570             :         }
     571             : }
     572             : 
     573     1519805 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier *r)
     574             : {
     575     1519805 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     576     1519805 :         if (ndr_flags & NDR_SCALARS) {
     577     1519805 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m(r->dn) + 1));
     578     1519805 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     579     1519805 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags) - 4));
     580     1519805 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
     581     1519805 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
     582     1519805 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
     583     1519805 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
     584     1519805 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
     585     1519805 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     586             :         }
     587     1519805 :         if (ndr_flags & NDR_BUFFERS) {
     588     1519805 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
     589             :         }
     590     1519803 :         return NDR_ERR_SUCCESS;
     591             : }
     592             : 
     593      504133 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier *r)
     594             : {
     595      504133 :         uint32_t size_dn_0 = 0;
     596      504133 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     597      504133 :         if (ndr_flags & NDR_SCALARS) {
     598      504133 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->dn));
     599      504133 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     600      504133 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
     601      504133 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
     602      504133 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
     603      504133 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
     604      504133 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
     605      504133 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->dn, &size_dn_0));
     606      504133 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
     607      504133 :                 if (r->dn) {
     608      504133 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->dn, r->__ndr_size_dn + 1));
     609             :                 }
     610      504133 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     611             :         }
     612      504133 :         if (ndr_flags & NDR_BUFFERS) {
     613      504133 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
     614             :         }
     615      504128 :         return NDR_ERR_SUCCESS;
     616             : }
     617             : 
     618           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaObjectIdentifier *r)
     619             : {
     620           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, name, r);
     621           0 : }
     622             : 
     623       14936 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier *r)
     624             : {
     625       14936 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier");
     626       14936 :         if (r == NULL) { ndr_print_null(ndr); return; }
     627       14936 :         ndr->depth++;
     628       14936 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags) - 4:r->__ndr_size);
     629       14936 :         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       14936 :         ndr_print_GUID(ndr, "guid", &r->guid);
     631       14936 :         ndr_print_dom_sid28(ndr, "sid", &r->sid);
     632       14936 :         ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
     633       14936 :         ndr_print_string(ndr, "dn", r->dn);
     634       14936 :         ndr->depth--;
     635             : }
     636             : 
     637     1519865 : _PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier(const struct drsuapi_DsReplicaObjectIdentifier *r, int flags)
     638             : {
     639     1519865 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier);
     640             : }
     641             : 
     642       11000 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaSyncRequest1 *r)
     643             : {
     644       11000 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     645       11000 :         if (ndr_flags & NDR_SCALARS) {
     646        5500 :                 if (r->naming_context == NULL) {
     647           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     648             :                 }
     649        5500 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     650        5500 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
     651        5500 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
     652        5500 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_dns));
     653        5500 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
     654        5500 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     655             :         }
     656       11000 :         if (ndr_flags & NDR_BUFFERS) {
     657        5500 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
     658        5500 :                 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       11000 :         return NDR_ERR_SUCCESS;
     666             : }
     667             : 
     668       11000 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaSyncRequest1 *r)
     669             : {
     670             :         uint32_t _ptr_naming_context;
     671       11000 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
     672             :         uint32_t _ptr_source_dsa_dns;
     673       11000 :         uint32_t size_source_dsa_dns_1 = 0;
     674       11000 :         uint32_t length_source_dsa_dns_1 = 0;
     675       11000 :         TALLOC_CTX *_mem_save_source_dsa_dns_0 = NULL;
     676       11000 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     677       11000 :         if (ndr_flags & NDR_SCALARS) {
     678        5500 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     679        5500 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
     680        5500 :                 if (_ptr_naming_context) {
     681        5500 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
     682             :                 } else {
     683           0 :                         r->naming_context = NULL;
     684             :                 }
     685        5500 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
     686        5500 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_dns));
     687        5500 :                 if (_ptr_source_dsa_dns) {
     688           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_dns);
     689             :                 } else {
     690        5500 :                         r->source_dsa_dns = NULL;
     691             :                 }
     692        5500 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
     693        5500 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     694             :         }
     695       11000 :         if (ndr_flags & NDR_BUFFERS) {
     696        5500 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
     697        5500 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
     698        5500 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
     699        5500 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
     700        5500 :                 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 %u should exceed array length %u", 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       11000 :         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        5500 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaSyncRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsReplicaSyncRequest *r)
     739             : {
     740             :         uint32_t level;
     741        5500 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     742        5500 :         if (ndr_flags & NDR_SCALARS) {
     743             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     744        5500 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     745        5500 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     746        5500 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
     747        5500 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     748        5500 :                 switch (level) {
     749        5500 :                         case 1: {
     750        5500 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr, NDR_SCALARS, &r->req1));
     751        5500 :                         break; }
     752             : 
     753           0 :                         default:
     754           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
     755             :                 }
     756           0 :         }
     757        5500 :         if (ndr_flags & NDR_BUFFERS) {
     758        5500 :                 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        5500 :                 switch (level) {
     763        5500 :                         case 1:
     764        5500 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaSyncRequest1(ndr, NDR_BUFFERS, &r->req1));
     765        5500 :                         break;
     766             : 
     767           0 :                         default:
     768           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
     769             :                 }
     770           0 :         }
     771        5500 :         return NDR_ERR_SUCCESS;
     772             : }
     773             : 
     774        5500 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaSyncRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsReplicaSyncRequest *r)
     775             : {
     776             :         uint32_t level;
     777             :         uint32_t _level;
     778        5500 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     779        5500 :         if (ndr_flags & NDR_SCALARS) {
     780             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     781        5500 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     782        5500 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     783        5500 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
     784        5500 :                 if (_level != level) {
     785           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
     786             :                 }
     787        5500 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     788        5500 :                 switch (level) {
     789        5500 :                         case 1: {
     790        5500 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr, NDR_SCALARS, &r->req1));
     791        5500 :                         break; }
     792             : 
     793           0 :                         default:
     794           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
     795             :                 }
     796           0 :         }
     797        5500 :         if (ndr_flags & NDR_BUFFERS) {
     798        5500 :                 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        5500 :                 switch (level) {
     803        5500 :                         case 1:
     804        5500 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaSyncRequest1(ndr, NDR_BUFFERS, &r->req1));
     805        5500 :                         break;
     806             : 
     807           0 :                         default:
     808           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
     809             :                 }
     810           0 :         }
     811        5500 :         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             :         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       94813 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaHighWaterMark(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaHighWaterMark *r)
     830             : {
     831       94813 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     832       94813 :         if (ndr_flags & NDR_SCALARS) {
     833       94813 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     834       94813 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->tmp_highest_usn));
     835       94813 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->reserved_usn));
     836       94813 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
     837       94813 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     838             :         }
     839       94713 :         if (ndr_flags & NDR_BUFFERS) {
     840             :         }
     841       94813 :         return NDR_ERR_SUCCESS;
     842             : }
     843             : 
     844      101121 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaHighWaterMark(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaHighWaterMark *r)
     845             : {
     846      101121 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     847      101121 :         if (ndr_flags & NDR_SCALARS) {
     848      101121 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     849      101121 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->tmp_highest_usn));
     850      101121 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->reserved_usn));
     851      101121 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
     852      101121 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     853             :         }
     854      101094 :         if (ndr_flags & NDR_BUFFERS) {
     855             :         }
     856      101121 :         return NDR_ERR_SUCCESS;
     857             : }
     858             : 
     859           0 : static void ndr_print_flags_drsuapi_DsReplicaHighWaterMark(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaHighWaterMark *r)
     860             : {
     861           0 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, name, r);
     862           0 : }
     863             : 
     864         270 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaHighWaterMark(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaHighWaterMark *r)
     865             : {
     866         270 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaHighWaterMark");
     867         270 :         if (r == NULL) { ndr_print_null(ndr); return; }
     868         270 :         ndr->depth++;
     869         270 :         ndr_print_hyper(ndr, "tmp_highest_usn", r->tmp_highest_usn);
     870         270 :         ndr_print_hyper(ndr, "reserved_usn", r->reserved_usn);
     871         270 :         ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
     872         270 :         ndr->depth--;
     873             : }
     874             : 
     875       14363 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaCursor *r)
     876             : {
     877       14363 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     878       14363 :         if (ndr_flags & NDR_SCALARS) {
     879       14363 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     880       14363 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
     881       14363 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
     882       14363 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     883             :         }
     884       14363 :         if (ndr_flags & NDR_BUFFERS) {
     885             :         }
     886       14363 :         return NDR_ERR_SUCCESS;
     887             : }
     888             : 
     889       12658 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaCursor *r)
     890             : {
     891       12658 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     892       12658 :         if (ndr_flags & NDR_SCALARS) {
     893       12658 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     894       12658 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
     895       12658 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
     896       12658 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     897             :         }
     898       12658 :         if (ndr_flags & NDR_BUFFERS) {
     899             :         }
     900       12658 :         return NDR_ERR_SUCCESS;
     901             : }
     902             : 
     903           0 : static void ndr_print_flags_drsuapi_DsReplicaCursor(struct ndr_print *ndr, const char *name, int 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        4971 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursorCtrEx(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaCursorCtrEx *r)
     919             : {
     920             :         uint32_t cntr_cursors_0;
     921        4971 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     922        4971 :         if (ndr_flags & NDR_SCALARS) {
     923        4971 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
     924        4971 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     925        4971 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
     926        4971 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
     927        4971 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
     928        4971 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
     929       17530 :                 for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
     930       12559 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
     931             :                 }
     932        4971 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     933             :         }
     934        4971 :         if (ndr_flags & NDR_BUFFERS) {
     935             :         }
     936        4971 :         return NDR_ERR_SUCCESS;
     937             : }
     938             : 
     939        4971 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaCursorCtrEx *r)
     940             : {
     941        4971 :         uint32_t size_cursors_0 = 0;
     942             :         uint32_t cntr_cursors_0;
     943        4971 :         TALLOC_CTX *_mem_save_cursors_0 = NULL;
     944        4971 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     945        4971 :         if (ndr_flags & NDR_SCALARS) {
     946        4971 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->cursors));
     947        4971 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     948        4971 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
     949        4971 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
     950        4971 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
     951        4971 :                 if (r->count > 1048576) {
     952           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
     953             :                 }
     954        4971 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
     955        4971 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cursors, &size_cursors_0));
     956        4971 :                 NDR_PULL_ALLOC_N(ndr, r->cursors, size_cursors_0);
     957        4971 :                 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
     958        4971 :                 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
     959       17530 :                 for (cntr_cursors_0 = 0; cntr_cursors_0 < (size_cursors_0); cntr_cursors_0++) {
     960       12559 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
     961             :                 }
     962        4971 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
     963        4971 :                 if (r->cursors) {
     964        4971 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cursors, r->count));
     965             :                 }
     966        4971 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     967             :         }
     968        4971 :         if (ndr_flags & NDR_BUFFERS) {
     969             :         }
     970        4971 :         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             :         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(%d)", "cursors", (int)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        7266 : static enum ndr_err_code ndr_push_drsuapi_DsExtendedOperation(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsExtendedOperation r)
     993             : {
     994             :         {
     995        7266 :                 uint32_t _flags_save_ENUM = ndr->flags;
     996        7266 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
     997        7266 :                 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     998        7266 :                 ndr->flags = _flags_save_ENUM;
     999             :         }
    1000        7266 :         return NDR_ERR_SUCCESS;
    1001             : }
    1002             : 
    1003        7266 : static enum ndr_err_code ndr_pull_drsuapi_DsExtendedOperation(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsExtendedOperation *r)
    1004             : {
    1005             :         uint32_t v;
    1006             :         {
    1007        7266 :                 uint32_t _flags_save_ENUM = ndr->flags;
    1008        7266 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1009        7266 :                 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1010        7266 :                 *r = v;
    1011        7266 :                 ndr->flags = _flags_save_ENUM;
    1012             :         }
    1013        7266 :         return NDR_ERR_SUCCESS;
    1014             : }
    1015             : 
    1016          60 : _PUBLIC_ void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedOperation r)
    1017             : {
    1018          60 :         const char *val = NULL;
    1019             : 
    1020             :         {
    1021          60 :                 uint32_t _flags_save_ENUM = ndr->flags;
    1022          60 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1023          60 :                 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          60 :                         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          60 :                 ndr_print_enum(ndr, name, "ENUM", val, r);
    1034          60 :                 ndr->flags = _flags_save_ENUM;
    1035             :         }
    1036          60 : }
    1037             : 
    1038       14576 : static enum ndr_err_code ndr_push_drsuapi_DsExtendedError(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsExtendedError r)
    1039             : {
    1040             :         {
    1041       14576 :                 uint32_t _flags_save_ENUM = ndr->flags;
    1042       14576 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1043       14576 :                 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1044       14576 :                 ndr->flags = _flags_save_ENUM;
    1045             :         }
    1046       14576 :         return NDR_ERR_SUCCESS;
    1047             : }
    1048             : 
    1049        7267 : static enum ndr_err_code ndr_pull_drsuapi_DsExtendedError(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsExtendedError *r)
    1050             : {
    1051             :         uint32_t v;
    1052             :         {
    1053        7267 :                 uint32_t _flags_save_ENUM = ndr->flags;
    1054        7267 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1055        7267 :                 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1056        7267 :                 *r = v;
    1057        7267 :                 ndr->flags = _flags_save_ENUM;
    1058             :         }
    1059        7266 :         return NDR_ERR_SUCCESS;
    1060             : }
    1061             : 
    1062         105 : _PUBLIC_ void ndr_print_drsuapi_DsExtendedError(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedError r)
    1063             : {
    1064         105 :         const char *val = NULL;
    1065             : 
    1066             :         {
    1067         105 :                 uint32_t _flags_save_ENUM = ndr->flags;
    1068         105 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1069         105 :                 switch (r) {
    1070          44 :                         case DRSUAPI_EXOP_ERR_NONE: val = "DRSUAPI_EXOP_ERR_NONE"; break;
    1071          60 :                         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         105 :                 ndr_print_enum(ndr, name, "ENUM", val, r);
    1089         105 :                 ndr->flags = _flags_save_ENUM;
    1090             :         }
    1091         105 : }
    1092             : 
    1093           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest5(struct ndr_push *ndr, int 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, int ndr_flags, struct drsuapi_DsGetNCChangesRequest5 *r)
    1123             : {
    1124             :         uint32_t _ptr_naming_context;
    1125           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    1126             :         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     1316116 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r)
    1195             : {
    1196     1316116 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1197     1316116 :         if (ndr_flags & NDR_SCALARS) {
    1198      658058 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1199      658058 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
    1200      658058 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->binary_oid));
    1201      658058 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1202             :         }
    1203     1316116 :         if (ndr_flags & NDR_BUFFERS) {
    1204      658058 :                 if (r->binary_oid) {
    1205      658058 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
    1206      658058 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->binary_oid, r->length));
    1207             :                 }
    1208             :         }
    1209     1312124 :         return NDR_ERR_SUCCESS;
    1210             : }
    1211             : 
    1212     3205550 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r)
    1213             : {
    1214             :         uint32_t _ptr_binary_oid;
    1215     3205550 :         uint32_t size_binary_oid_1 = 0;
    1216     3205550 :         TALLOC_CTX *_mem_save_binary_oid_0 = NULL;
    1217     3205550 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1218     3205550 :         if (ndr_flags & NDR_SCALARS) {
    1219     1602775 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1220     1602775 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
    1221     1602775 :                 if (r->length > 10000) {
    1222           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    1223             :                 }
    1224     1602775 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_oid));
    1225     1602775 :                 if (_ptr_binary_oid) {
    1226     1602775 :                         NDR_PULL_ALLOC(ndr, r->binary_oid);
    1227             :                 } else {
    1228           0 :                         r->binary_oid = NULL;
    1229             :                 }
    1230     1602775 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1231             :         }
    1232     3205550 :         if (ndr_flags & NDR_BUFFERS) {
    1233     1602775 :                 if (r->binary_oid) {
    1234     1602775 :                         _mem_save_binary_oid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1235     1602775 :                         NDR_PULL_SET_MEM_CTX(ndr, r->binary_oid, 0);
    1236     1602775 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->binary_oid));
    1237     1602775 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->binary_oid, &size_binary_oid_1));
    1238     1602775 :                         NDR_PULL_ALLOC_N(ndr, r->binary_oid, size_binary_oid_1);
    1239     1602775 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->binary_oid, size_binary_oid_1));
    1240     1602775 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_oid_0, 0);
    1241             :                 }
    1242     1602775 :                 if (r->binary_oid) {
    1243     1602775 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->binary_oid, r->length));
    1244             :                 }
    1245             :         }
    1246     3177552 :         return NDR_ERR_SUCCESS;
    1247             : }
    1248             : 
    1249     1316116 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOIDMapping *r)
    1250             : {
    1251     1316116 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1252     1316116 :         if (ndr_flags & NDR_SCALARS) {
    1253      658058 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1254      658058 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->id_prefix));
    1255      658058 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr, NDR_SCALARS, &r->oid));
    1256      658058 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1257             :         }
    1258     1316116 :         if (ndr_flags & NDR_BUFFERS) {
    1259      658058 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOID(ndr, NDR_BUFFERS, &r->oid));
    1260             :         }
    1261     1312124 :         return NDR_ERR_SUCCESS;
    1262             : }
    1263             : 
    1264     3205550 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOIDMapping *r)
    1265             : {
    1266     3205550 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1267     3205550 :         if (ndr_flags & NDR_SCALARS) {
    1268     1602775 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1269     1602775 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->id_prefix));
    1270     1602775 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr, NDR_SCALARS, &r->oid));
    1271     1602775 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1272             :         }
    1273     3205550 :         if (ndr_flags & NDR_BUFFERS) {
    1274     1602775 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOID(ndr, NDR_BUFFERS, &r->oid));
    1275             :         }
    1276     3177552 :         return NDR_ERR_SUCCESS;
    1277             : }
    1278             : 
    1279        4434 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOIDMapping(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping *r)
    1280             : {
    1281        4434 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaOIDMapping");
    1282        4434 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1283        4434 :         ndr->depth++;
    1284        4434 :         ndr_print_uint32(ndr, "id_prefix", r->id_prefix);
    1285        4434 :         ndr_print_drsuapi_DsReplicaOID(ndr, "oid", &r->oid);
    1286        4434 :         ndr->depth--;
    1287             : }
    1288             : 
    1289       45722 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
    1290             : {
    1291             :         uint32_t cntr_mappings_1;
    1292       45722 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1293       45722 :         if (ndr_flags & NDR_SCALARS) {
    1294       22861 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1295       22861 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_mappings));
    1296       22861 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->mappings));
    1297       22861 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1298             :         }
    1299       45722 :         if (ndr_flags & NDR_BUFFERS) {
    1300       22861 :                 if (r->mappings) {
    1301       13463 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_mappings));
    1302      671466 :                         for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
    1303      658058 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr, NDR_SCALARS, &r->mappings[cntr_mappings_1]));
    1304             :                         }
    1305      671466 :                         for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
    1306      658058 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping(ndr, NDR_BUFFERS, &r->mappings[cntr_mappings_1]));
    1307             :                         }
    1308             :                 }
    1309             :         }
    1310       45612 :         return NDR_ERR_SUCCESS;
    1311             : }
    1312             : 
    1313       73192 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOIDMapping_Ctr *r)
    1314             : {
    1315             :         uint32_t _ptr_mappings;
    1316       73192 :         uint32_t size_mappings_1 = 0;
    1317             :         uint32_t cntr_mappings_1;
    1318       73192 :         TALLOC_CTX *_mem_save_mappings_0 = NULL;
    1319       73192 :         TALLOC_CTX *_mem_save_mappings_1 = NULL;
    1320       73192 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1321       73192 :         if (ndr_flags & NDR_SCALARS) {
    1322       36596 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1323       36596 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_mappings));
    1324       36596 :                 if (r->num_mappings > 1048576) {
    1325           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    1326             :                 }
    1327       36596 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mappings));
    1328       36596 :                 if (_ptr_mappings) {
    1329       29635 :                         NDR_PULL_ALLOC(ndr, r->mappings);
    1330             :                 } else {
    1331        6961 :                         r->mappings = NULL;
    1332             :                 }
    1333       36596 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1334             :         }
    1335       73192 :         if (ndr_flags & NDR_BUFFERS) {
    1336       36596 :                 if (r->mappings) {
    1337       29635 :                         _mem_save_mappings_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1338       29635 :                         NDR_PULL_SET_MEM_CTX(ndr, r->mappings, 0);
    1339       29635 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->mappings));
    1340       29635 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->mappings, &size_mappings_1));
    1341       29635 :                         NDR_PULL_ALLOC_N(ndr, r->mappings, size_mappings_1);
    1342       29635 :                         _mem_save_mappings_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1343       29635 :                         NDR_PULL_SET_MEM_CTX(ndr, r->mappings, 0);
    1344     1632410 :                         for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
    1345     1602775 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr, NDR_SCALARS, &r->mappings[cntr_mappings_1]));
    1346             :                         }
    1347     1632057 :                         for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
    1348     1602775 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping(ndr, NDR_BUFFERS, &r->mappings[cntr_mappings_1]));
    1349             :                         }
    1350       29635 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mappings_1, 0);
    1351       29635 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mappings_0, 0);
    1352             :                 }
    1353       36596 :                 if (r->mappings) {
    1354       29635 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->mappings, r->num_mappings));
    1355             :                 }
    1356      438357 :                 for (cntr_mappings_1 = 0; cntr_mappings_1 < (size_mappings_1); cntr_mappings_1++) {
    1357             :                 }
    1358             :         }
    1359       72484 :         return NDR_ERR_SUCCESS;
    1360             : }
    1361             : 
    1362           0 : static void ndr_print_flags_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
    1363             : {
    1364           0 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, name, r);
    1365           0 : }
    1366             : 
    1367         165 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaOIDMapping_Ctr *r)
    1368             : {
    1369             :         uint32_t cntr_mappings_1;
    1370         165 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaOIDMapping_Ctr");
    1371         165 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1372         165 :         ndr->depth++;
    1373         165 :         ndr_print_uint32(ndr, "num_mappings", r->num_mappings);
    1374         165 :         ndr_print_ptr(ndr, "mappings", r->mappings);
    1375         165 :         ndr->depth++;
    1376         165 :         if (r->mappings) {
    1377         104 :                 ndr->print(ndr, "%s: ARRAY(%d)", "mappings", (int)r->num_mappings);
    1378         104 :                 ndr->depth++;
    1379        4538 :                 for (cntr_mappings_1 = 0; cntr_mappings_1 < (r->num_mappings); cntr_mappings_1++) {
    1380        4434 :                         ndr_print_drsuapi_DsReplicaOIDMapping(ndr, "mappings", &r->mappings[cntr_mappings_1]);
    1381             :                 }
    1382         104 :                 ndr->depth--;
    1383             :         }
    1384         165 :         ndr->depth--;
    1385         165 :         ndr->depth--;
    1386             : }
    1387             : 
    1388    35341077 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsAttributeId(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsAttributeId r)
    1389             : {
    1390             :         {
    1391    35341077 :                 uint32_t _flags_save_ENUM = ndr->flags;
    1392    35341077 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1393    35341077 :                 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1394    35341077 :                 ndr->flags = _flags_save_ENUM;
    1395             :         }
    1396    35341077 :         return NDR_ERR_SUCCESS;
    1397             : }
    1398             : 
    1399    59789512 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsAttributeId(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsAttributeId *r)
    1400             : {
    1401             :         uint32_t v;
    1402             :         {
    1403    59789512 :                 uint32_t _flags_save_ENUM = ndr->flags;
    1404    59789512 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1405    59789512 :                 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1406    59789512 :                 *r = v;
    1407    59789512 :                 ndr->flags = _flags_save_ENUM;
    1408             :         }
    1409    59789512 :         return NDR_ERR_SUCCESS;
    1410             : }
    1411             : 
    1412      229921 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeId(struct ndr_print *ndr, const char *name, enum drsuapi_DsAttributeId r)
    1413             : {
    1414      229921 :         const char *val = NULL;
    1415             : 
    1416             :         {
    1417      229921 :                 uint32_t _flags_save_ENUM = ndr->flags;
    1418      229921 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    1419      229921 :                 switch (r) {
    1420       14894 :                         case DRSUAPI_ATTID_objectClass: val = "DRSUAPI_ATTID_objectClass"; break;
    1421         307 :                         case DRSUAPI_ATTID_cn: val = "DRSUAPI_ATTID_cn"; break;
    1422           0 :                         case DRSUAPI_ATTID_ou: val = "DRSUAPI_ATTID_ou"; break;
    1423         424 :                         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       14888 :                         case DRSUAPI_ATTID_instanceType: val = "DRSUAPI_ATTID_instanceType"; break;
    1427       14888 :                         case DRSUAPI_ATTID_whenCreated: val = "DRSUAPI_ATTID_whenCreated"; break;
    1428         132 :                         case DRSUAPI_ATTID_possSuperiors: val = "DRSUAPI_ATTID_possSuperiors"; break;
    1429         446 :                         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        1056 :                         case DRSUAPI_ATTID_subClassOf: val = "DRSUAPI_ATTID_subClassOf"; break;
    1433        1056 :                         case DRSUAPI_ATTID_governsID: val = "DRSUAPI_ATTID_governsID"; break;
    1434          68 :                         case DRSUAPI_ATTID_mustContain: val = "DRSUAPI_ATTID_mustContain"; break;
    1435         212 :                         case DRSUAPI_ATTID_mayContain: val = "DRSUAPI_ATTID_mayContain"; break;
    1436        1056 :                         case DRSUAPI_ATTID_rDNAttId: val = "DRSUAPI_ATTID_rDNAttId"; break;
    1437        5904 :                         case DRSUAPI_ATTID_attributeID: val = "DRSUAPI_ATTID_attributeID"; break;
    1438        5904 :                         case DRSUAPI_ATTID_attributeSyntax: val = "DRSUAPI_ATTID_attributeSyntax"; break;
    1439        5904 :                         case DRSUAPI_ATTID_isSingleValued: val = "DRSUAPI_ATTID_isSingleValued"; break;
    1440        1228 :                         case DRSUAPI_ATTID_rangeLower: val = "DRSUAPI_ATTID_rangeLower"; break;
    1441        1636 :                         case DRSUAPI_ATTID_rangeUpper: val = "DRSUAPI_ATTID_rangeUpper"; break;
    1442           8 :                         case DRSUAPI_ATTID_dMDLocation: val = "DRSUAPI_ATTID_dMDLocation"; break;
    1443         420 :                         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       14204 :                         case DRSUAPI_ATTID_showInAdvancedViewOnly: val = "DRSUAPI_ATTID_showInAdvancedViewOnly"; break;
    1447        6948 :                         case DRSUAPI_ATTID_adminDisplayName: val = "DRSUAPI_ATTID_adminDisplayName"; break;
    1448        6948 :                         case DRSUAPI_ATTID_adminDescription: val = "DRSUAPI_ATTID_adminDescription"; break;
    1449        5904 :                         case DRSUAPI_ATTID_oMSyntax: val = "DRSUAPI_ATTID_oMSyntax"; break;
    1450       14892 :                         case DRSUAPI_ATTID_ntSecurityDescriptor: val = "DRSUAPI_ATTID_ntSecurityDescriptor"; break;
    1451        5892 :                         case DRSUAPI_ATTID_searchFlags: val = "DRSUAPI_ATTID_searchFlags"; break;
    1452          16 :                         case DRSUAPI_ATTID_auxiliaryClass: val = "DRSUAPI_ATTID_auxiliaryClass"; break;
    1453        6960 :                         case DRSUAPI_ATTID_lDAPDisplayName: val = "DRSUAPI_ATTID_lDAPDisplayName"; break;
    1454       14888 :                         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         516 :                         case DRSUAPI_ATTID_userAccountControl: val = "DRSUAPI_ATTID_userAccountControl"; break;
    1458           0 :                         case DRSUAPI_ATTID_badPwdCount: val = "DRSUAPI_ATTID_badPwdCount"; break;
    1459         516 :                         case DRSUAPI_ATTID_codePage: val = "DRSUAPI_ATTID_codePage"; break;
    1460         516 :                         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         516 :                         case DRSUAPI_ATTID_dBCSPwd: val = "DRSUAPI_ATTID_dBCSPwd"; break;
    1467           0 :                         case DRSUAPI_ATTID_scriptPath: val = "DRSUAPI_ATTID_scriptPath"; break;
    1468         516 :                         case DRSUAPI_ATTID_logonHours: val = "DRSUAPI_ATTID_logonHours"; break;
    1469           0 :                         case DRSUAPI_ATTID_userWorkstations: val = "DRSUAPI_ATTID_userWorkstations"; break;
    1470         516 :                         case DRSUAPI_ATTID_unicodePwd: val = "DRSUAPI_ATTID_unicodePwd"; break;
    1471         516 :                         case DRSUAPI_ATTID_ntPwdHistory: val = "DRSUAPI_ATTID_ntPwdHistory"; break;
    1472         516 :                         case DRSUAPI_ATTID_pwdLastSet: val = "DRSUAPI_ATTID_pwdLastSet"; break;
    1473         516 :                         case DRSUAPI_ATTID_primaryGroupID: val = "DRSUAPI_ATTID_primaryGroupID"; break;
    1474           0 :                         case DRSUAPI_ATTID_priorValue: val = "DRSUAPI_ATTID_priorValue"; break;
    1475         304 :                         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_trustAuthOutgoing: val = "DRSUAPI_ATTID_trustAuthOutgoing"; break;
    1478           0 :                         case DRSUAPI_ATTID_userParameters: val = "DRSUAPI_ATTID_userParameters"; break;
    1479           0 :                         case DRSUAPI_ATTID_profilePath: val = "DRSUAPI_ATTID_profilePath"; break;
    1480         106 :                         case DRSUAPI_ATTID_operatorCount: val = "DRSUAPI_ATTID_operatorCount"; break;
    1481         796 :                         case DRSUAPI_ATTID_objectSid: val = "DRSUAPI_ATTID_objectSid"; break;
    1482        6960 :                         case DRSUAPI_ATTID_schemaIDGUID: val = "DRSUAPI_ATTID_schemaIDGUID"; break;
    1483         158 :                         case DRSUAPI_ATTID_adminCount: val = "DRSUAPI_ATTID_adminCount"; break;
    1484         112 :                         case DRSUAPI_ATTID_comment: val = "DRSUAPI_ATTID_comment"; break;
    1485         516 :                         case DRSUAPI_ATTID_accountExpires: val = "DRSUAPI_ATTID_accountExpires"; break;
    1486         516 :                         case DRSUAPI_ATTID_lmPwdHistory: val = "DRSUAPI_ATTID_lmPwdHistory"; break;
    1487           0 :                         case DRSUAPI_ATTID_logonCount: val = "DRSUAPI_ATTID_logonCount"; break;
    1488         848 :                         case DRSUAPI_ATTID_systemPossSuperiors: val = "DRSUAPI_ATTID_systemPossSuperiors"; break;
    1489         680 :                         case DRSUAPI_ATTID_systemMayContain: val = "DRSUAPI_ATTID_systemMayContain"; break;
    1490         368 :                         case DRSUAPI_ATTID_systemMustContain: val = "DRSUAPI_ATTID_systemMustContain"; break;
    1491          28 :                         case DRSUAPI_ATTID_systemAuxiliaryClass: val = "DRSUAPI_ATTID_systemAuxiliaryClass"; break;
    1492         668 :                         case DRSUAPI_ATTID_sAMAccountName: val = "DRSUAPI_ATTID_sAMAccountName"; break;
    1493         668 :                         case DRSUAPI_ATTID_sAMAccountType: val = "DRSUAPI_ATTID_sAMAccountType"; break;
    1494          12 :                         case DRSUAPI_ATTID_options: val = "DRSUAPI_ATTID_options"; break;
    1495          20 :                         case DRSUAPI_ATTID_fSMORoleOwner: val = "DRSUAPI_ATTID_fSMORoleOwner"; break;
    1496        6628 :                         case DRSUAPI_ATTID_systemFlags: val = "DRSUAPI_ATTID_systemFlags"; break;
    1497           6 :                         case DRSUAPI_ATTID_serverReference: val = "DRSUAPI_ATTID_serverReference"; break;
    1498           0 :                         case DRSUAPI_ATTID_serverReferenceBL: val = "DRSUAPI_ATTID_serverReferenceBL"; break;
    1499           0 :                         case DRSUAPI_ATTID_nonSecurityMember: val = "DRSUAPI_ATTID_nonSecurityMember"; break;
    1500           0 :                         case DRSUAPI_ATTID_initialAuthIncoming: val = "DRSUAPI_ATTID_initialAuthIncoming"; break;
    1501           0 :                         case DRSUAPI_ATTID_initialAuthOutgoing: val = "DRSUAPI_ATTID_initialAuthOutgoing"; break;
    1502           8 :                         case DRSUAPI_ATTID_wellKnownObjects: val = "DRSUAPI_ATTID_wellKnownObjects"; break;
    1503         120 :                         case DRSUAPI_ATTID_dNSHostName: val = "DRSUAPI_ATTID_dNSHostName"; break;
    1504         848 :                         case DRSUAPI_ATTID_isMemberOfPartialAttributeSet: val = "DRSUAPI_ATTID_isMemberOfPartialAttributeSet"; break;
    1505           0 :                         case DRSUAPI_ATTID_managedBy: val = "DRSUAPI_ATTID_managedBy"; break;
    1506          92 :                         case DRSUAPI_ATTID_userPrincipalName: val = "DRSUAPI_ATTID_userPrincipalName"; break;
    1507         152 :                         case DRSUAPI_ATTID_groupType: val = "DRSUAPI_ATTID_groupType"; break;
    1508         132 :                         case DRSUAPI_ATTID_servicePrincipalName: val = "DRSUAPI_ATTID_servicePrincipalName"; break;
    1509         412 :                         case DRSUAPI_ATTID_lastKnownParent: val = "DRSUAPI_ATTID_lastKnownParent"; break;
    1510       14892 :                         case DRSUAPI_ATTID_objectCategory: val = "DRSUAPI_ATTID_objectCategory"; break;
    1511           8 :                         case DRSUAPI_ATTID_gPLink: val = "DRSUAPI_ATTID_gPLink"; break;
    1512           8 :                         case DRSUAPI_ATTID_transportAddressAttribute: val = "DRSUAPI_ATTID_transportAddressAttribute"; break;
    1513           4 :                         case DRSUAPI_ATTID_schemaInfo: val = "DRSUAPI_ATTID_schemaInfo"; break;
    1514          20 :                         case DRSUAPI_ATTID_msDS_Behavior_Version: val = "DRSUAPI_ATTID_msDS_Behavior_Version"; break;
    1515           0 :                         case DRSUAPI_ATTID_msDS_KeyVersionNumber: val = "DRSUAPI_ATTID_msDS_KeyVersionNumber"; break;
    1516           0 :                         case DRSUAPI_ATTID_msDS_NonMembers: val = "DRSUAPI_ATTID_msDS_NonMembers"; break;
    1517           0 :                         case DRSUAPI_ATTID_msDS_MembersForAzRole: val = "DRSUAPI_ATTID_msDS_MembersForAzRole"; break;
    1518           8 :                         case DRSUAPI_ATTID_msDS_HasDomainNCs: val = "DRSUAPI_ATTID_msDS_HasDomainNCs"; break;
    1519          24 :                         case DRSUAPI_ATTID_msDS_hasMasterNCs: val = "DRSUAPI_ATTID_msDS_hasMasterNCs"; break;
    1520           0 :                         case DRSUAPI_ATTID_msDS_NeverRevealGroup: val = "DRSUAPI_ATTID_msDS_NeverRevealGroup"; break;
    1521           0 :                         case DRSUAPI_ATTID_msDS_RevealOnDemandGroup: val = "DRSUAPI_ATTID_msDS_RevealOnDemandGroup"; break;
    1522           0 :                         case DRSUAPI_ATTID_msDS_HostServiceAccount: val = "DRSUAPI_ATTID_msDS_HostServiceAccount"; break;
    1523         412 :                         case DRSUAPI_ATTID_isRecycled: val = "DRSUAPI_ATTID_isRecycled"; break;
    1524           0 :                         case DRSUAPI_ATTID_INVALID: val = "DRSUAPI_ATTID_INVALID"; break;
    1525             :                 }
    1526      229921 :                 ndr_print_enum(ndr, name, "ENUM", val, r);
    1527      229921 :                 ndr->flags = _flags_save_ENUM;
    1528             :         }
    1529      229921 : }
    1530             : 
    1531        2920 : static enum ndr_err_code ndr_push_drsuapi_DsPartialAttributeSet(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsPartialAttributeSet *r)
    1532             : {
    1533             :         uint32_t cntr_attids_0;
    1534        2920 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1535        2920 :         if (ndr_flags & NDR_SCALARS) {
    1536        2920 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_attids));
    1537        2920 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1538        2920 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
    1539        2920 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    1540        2920 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attids));
    1541     3779688 :                 for (cntr_attids_0 = 0; cntr_attids_0 < (r->num_attids); cntr_attids_0++) {
    1542     3776768 :                         NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attids[cntr_attids_0]));
    1543             :                 }
    1544        2920 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1545             :         }
    1546        2920 :         if (ndr_flags & NDR_BUFFERS) {
    1547             :         }
    1548        2920 :         return NDR_ERR_SUCCESS;
    1549             : }
    1550             : 
    1551        2920 : static enum ndr_err_code ndr_pull_drsuapi_DsPartialAttributeSet(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsPartialAttributeSet *r)
    1552             : {
    1553        2920 :         uint32_t size_attids_0 = 0;
    1554             :         uint32_t cntr_attids_0;
    1555        2920 :         TALLOC_CTX *_mem_save_attids_0 = NULL;
    1556        2920 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1557        2920 :         if (ndr_flags & NDR_SCALARS) {
    1558        2920 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->attids));
    1559        2920 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1560        2920 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    1561        2920 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
    1562        2920 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attids));
    1563        2920 :                 if (r->num_attids < 1 || r->num_attids > 1048576) {
    1564           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    1565             :                 }
    1566        2920 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attids, &size_attids_0));
    1567        2920 :                 NDR_PULL_ALLOC_N(ndr, r->attids, size_attids_0);
    1568        2920 :                 _mem_save_attids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1569        2920 :                 NDR_PULL_SET_MEM_CTX(ndr, r->attids, 0);
    1570     3779688 :                 for (cntr_attids_0 = 0; cntr_attids_0 < (size_attids_0); cntr_attids_0++) {
    1571     3776768 :                         NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attids[cntr_attids_0]));
    1572             :                 }
    1573        2920 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attids_0, 0);
    1574        2920 :                 if (r->attids) {
    1575        2920 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->attids, r->num_attids));
    1576             :                 }
    1577        2920 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1578             :         }
    1579        2920 :         if (ndr_flags & NDR_BUFFERS) {
    1580             :         }
    1581        2920 :         return NDR_ERR_SUCCESS;
    1582             : }
    1583             : 
    1584           0 : _PUBLIC_ void ndr_print_drsuapi_DsPartialAttributeSet(struct ndr_print *ndr, const char *name, const struct drsuapi_DsPartialAttributeSet *r)
    1585             : {
    1586             :         uint32_t cntr_attids_0;
    1587           0 :         ndr_print_struct(ndr, name, "drsuapi_DsPartialAttributeSet");
    1588           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1589           0 :         ndr->depth++;
    1590           0 :         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version);
    1591           0 :         ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
    1592           0 :         ndr_print_uint32(ndr, "num_attids", r->num_attids);
    1593           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "attids", (int)r->num_attids);
    1594           0 :         ndr->depth++;
    1595           0 :         for (cntr_attids_0 = 0; cntr_attids_0 < (r->num_attids); cntr_attids_0++) {
    1596           0 :                 ndr_print_drsuapi_DsAttributeId(ndr, "attids", r->attids[cntr_attids_0]);
    1597             :         }
    1598           0 :         ndr->depth--;
    1599           0 :         ndr->depth--;
    1600             : }
    1601             : 
    1602         910 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesRequest8 *r)
    1603             : {
    1604         910 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1605         910 :         if (ndr_flags & NDR_SCALARS) {
    1606         455 :                 if (r->naming_context == NULL) {
    1607           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1608             :                 }
    1609         455 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    1610         455 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1611         455 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1612         455 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    1613         455 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1614         455 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    1615         455 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
    1616         455 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count));
    1617         455 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size));
    1618         455 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op));
    1619         455 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info));
    1620         455 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set));
    1621         455 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex));
    1622         455 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    1623         455 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    1624             :         }
    1625         910 :         if (ndr_flags & NDR_BUFFERS) {
    1626         455 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1627         455 :                 if (r->uptodateness_vector) {
    1628           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1629             :                 }
    1630         455 :                 if (r->partial_attribute_set) {
    1631          46 :                         NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
    1632             :                 }
    1633         455 :                 if (r->partial_attribute_set_ex) {
    1634           2 :                         NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
    1635             :                 }
    1636         455 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    1637             :         }
    1638         910 :         return NDR_ERR_SUCCESS;
    1639             : }
    1640             : 
    1641         910 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesRequest8 *r)
    1642             : {
    1643             :         uint32_t _ptr_naming_context;
    1644         910 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    1645             :         uint32_t _ptr_uptodateness_vector;
    1646         910 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    1647             :         uint32_t _ptr_partial_attribute_set;
    1648         910 :         TALLOC_CTX *_mem_save_partial_attribute_set_0 = NULL;
    1649             :         uint32_t _ptr_partial_attribute_set_ex;
    1650         910 :         TALLOC_CTX *_mem_save_partial_attribute_set_ex_0 = NULL;
    1651         910 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1652         910 :         if (ndr_flags & NDR_SCALARS) {
    1653         455 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    1654         455 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1655         455 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1656         455 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    1657         455 :                 if (_ptr_naming_context) {
    1658         455 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    1659             :                 } else {
    1660           0 :                         r->naming_context = NULL;
    1661             :                 }
    1662         455 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1663         455 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    1664         455 :                 if (_ptr_uptodateness_vector) {
    1665           0 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    1666             :                 } else {
    1667         455 :                         r->uptodateness_vector = NULL;
    1668             :                 }
    1669         455 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
    1670         455 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count));
    1671         455 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size));
    1672         455 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op));
    1673         455 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info));
    1674         455 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set));
    1675         455 :                 if (_ptr_partial_attribute_set) {
    1676          46 :                         NDR_PULL_ALLOC(ndr, r->partial_attribute_set);
    1677             :                 } else {
    1678         409 :                         r->partial_attribute_set = NULL;
    1679             :                 }
    1680         455 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set_ex));
    1681         455 :                 if (_ptr_partial_attribute_set_ex) {
    1682           2 :                         NDR_PULL_ALLOC(ndr, r->partial_attribute_set_ex);
    1683             :                 } else {
    1684         453 :                         r->partial_attribute_set_ex = NULL;
    1685             :                 }
    1686         455 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    1687         455 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    1688             :         }
    1689         910 :         if (ndr_flags & NDR_BUFFERS) {
    1690         455 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1691         455 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    1692         455 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1693         455 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    1694         455 :                 if (r->uptodateness_vector) {
    1695           0 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1696           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    1697           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1698           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    1699             :                 }
    1700         455 :                 if (r->partial_attribute_set) {
    1701          46 :                         _mem_save_partial_attribute_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1702          46 :                         NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set, 0);
    1703          46 :                         NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
    1704          46 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_0, 0);
    1705             :                 }
    1706         455 :                 if (r->partial_attribute_set_ex) {
    1707           2 :                         _mem_save_partial_attribute_set_ex_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1708           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set_ex, 0);
    1709           2 :                         NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
    1710           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_ex_0, 0);
    1711             :                 }
    1712         455 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    1713             :         }
    1714         910 :         return NDR_ERR_SUCCESS;
    1715             : }
    1716             : 
    1717           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsGetNCChangesRequest8 *r)
    1718             : {
    1719           0 :         ndr_print_drsuapi_DsGetNCChangesRequest8(ndr, name, r);
    1720           0 : }
    1721             : 
    1722          60 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest8 *r)
    1723             : {
    1724          60 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesRequest8");
    1725          60 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1726          60 :         ndr->depth++;
    1727          60 :         ndr_print_GUID(ndr, "destination_dsa_guid", &r->destination_dsa_guid);
    1728          60 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    1729          60 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    1730          60 :         ndr->depth++;
    1731          60 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    1732          60 :         ndr->depth--;
    1733          60 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
    1734          60 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    1735          60 :         ndr->depth++;
    1736          60 :         if (r->uptodateness_vector) {
    1737           0 :                 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    1738             :         }
    1739          60 :         ndr->depth--;
    1740          60 :         ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
    1741          60 :         ndr_print_uint32(ndr, "max_object_count", r->max_object_count);
    1742          60 :         ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size);
    1743          60 :         ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op);
    1744          60 :         ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info);
    1745          60 :         ndr_print_ptr(ndr, "partial_attribute_set", r->partial_attribute_set);
    1746          60 :         ndr->depth++;
    1747          60 :         if (r->partial_attribute_set) {
    1748           0 :                 ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set", r->partial_attribute_set);
    1749             :         }
    1750          60 :         ndr->depth--;
    1751          60 :         ndr_print_ptr(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
    1752          60 :         ndr->depth++;
    1753          60 :         if (r->partial_attribute_set_ex) {
    1754           0 :                 ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
    1755             :         }
    1756          60 :         ndr->depth--;
    1757          60 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
    1758          60 :         ndr->depth--;
    1759             : }
    1760             : 
    1761       13622 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest10(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesRequest10 *r)
    1762             : {
    1763       13622 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1764       13622 :         if (ndr_flags & NDR_SCALARS) {
    1765        6811 :                 if (r->naming_context == NULL) {
    1766           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1767             :                 }
    1768        6811 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    1769        6811 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1770        6811 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1771        6811 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    1772        6811 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1773        6811 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    1774        6811 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
    1775        6811 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count));
    1776        6811 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size));
    1777        6811 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op));
    1778        6811 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info));
    1779        6811 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set));
    1780        6811 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex));
    1781        6811 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    1782        6811 :                 NDR_CHECK(ndr_push_drsuapi_DrsMoreOptions(ndr, NDR_SCALARS, r->more_flags));
    1783        6811 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    1784             :         }
    1785       13622 :         if (ndr_flags & NDR_BUFFERS) {
    1786        6811 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1787        6811 :                 if (r->uptodateness_vector) {
    1788        4971 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1789             :                 }
    1790        6811 :                 if (r->partial_attribute_set) {
    1791        2872 :                         NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
    1792             :                 }
    1793        6811 :                 if (r->partial_attribute_set_ex) {
    1794           0 :                         NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
    1795             :                 }
    1796        6811 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    1797             :         }
    1798       13622 :         return NDR_ERR_SUCCESS;
    1799             : }
    1800             : 
    1801       13622 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest10(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesRequest10 *r)
    1802             : {
    1803             :         uint32_t _ptr_naming_context;
    1804       13622 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    1805             :         uint32_t _ptr_uptodateness_vector;
    1806       13622 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    1807             :         uint32_t _ptr_partial_attribute_set;
    1808       13622 :         TALLOC_CTX *_mem_save_partial_attribute_set_0 = NULL;
    1809             :         uint32_t _ptr_partial_attribute_set_ex;
    1810       13622 :         TALLOC_CTX *_mem_save_partial_attribute_set_ex_0 = NULL;
    1811       13622 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1812       13622 :         if (ndr_flags & NDR_SCALARS) {
    1813        6811 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    1814        6811 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid));
    1815        6811 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    1816        6811 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    1817        6811 :                 if (_ptr_naming_context) {
    1818        6811 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    1819             :                 } else {
    1820           0 :                         r->naming_context = NULL;
    1821             :                 }
    1822        6811 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->highwatermark));
    1823        6811 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    1824        6811 :                 if (_ptr_uptodateness_vector) {
    1825        4971 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    1826             :                 } else {
    1827        1840 :                         r->uptodateness_vector = NULL;
    1828             :                 }
    1829        6811 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
    1830        6811 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count));
    1831        6811 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size));
    1832        6811 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op));
    1833        6811 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info));
    1834        6811 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set));
    1835        6811 :                 if (_ptr_partial_attribute_set) {
    1836        2872 :                         NDR_PULL_ALLOC(ndr, r->partial_attribute_set);
    1837             :                 } else {
    1838        3939 :                         r->partial_attribute_set = NULL;
    1839             :                 }
    1840        6811 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set_ex));
    1841        6811 :                 if (_ptr_partial_attribute_set_ex) {
    1842           0 :                         NDR_PULL_ALLOC(ndr, r->partial_attribute_set_ex);
    1843             :                 } else {
    1844        6811 :                         r->partial_attribute_set_ex = NULL;
    1845             :                 }
    1846        6811 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    1847        6811 :                 NDR_CHECK(ndr_pull_drsuapi_DrsMoreOptions(ndr, NDR_SCALARS, &r->more_flags));
    1848        6811 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    1849             :         }
    1850       13622 :         if (ndr_flags & NDR_BUFFERS) {
    1851        6811 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1852        6811 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    1853        6811 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    1854        6811 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    1855        6811 :                 if (r->uptodateness_vector) {
    1856        4971 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1857        4971 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    1858        4971 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    1859        4971 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    1860             :                 }
    1861        6811 :                 if (r->partial_attribute_set) {
    1862        2872 :                         _mem_save_partial_attribute_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1863        2872 :                         NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set, 0);
    1864        2872 :                         NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set));
    1865        2872 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_0, 0);
    1866             :                 }
    1867        6811 :                 if (r->partial_attribute_set_ex) {
    1868           0 :                         _mem_save_partial_attribute_set_ex_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1869           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set_ex, 0);
    1870           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex));
    1871           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_ex_0, 0);
    1872             :                 }
    1873        6811 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    1874             :         }
    1875       13622 :         return NDR_ERR_SUCCESS;
    1876             : }
    1877             : 
    1878           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesRequest10(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsGetNCChangesRequest10 *r)
    1879             : {
    1880           0 :         ndr_print_drsuapi_DsGetNCChangesRequest10(ndr, name, r);
    1881           0 : }
    1882             : 
    1883           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest10(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest10 *r)
    1884             : {
    1885           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesRequest10");
    1886           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1887           0 :         ndr->depth++;
    1888           0 :         ndr_print_GUID(ndr, "destination_dsa_guid", &r->destination_dsa_guid);
    1889           0 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    1890           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    1891           0 :         ndr->depth++;
    1892           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    1893           0 :         ndr->depth--;
    1894           0 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "highwatermark", &r->highwatermark);
    1895           0 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    1896           0 :         ndr->depth++;
    1897           0 :         if (r->uptodateness_vector) {
    1898           0 :                 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    1899             :         }
    1900           0 :         ndr->depth--;
    1901           0 :         ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
    1902           0 :         ndr_print_uint32(ndr, "max_object_count", r->max_object_count);
    1903           0 :         ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size);
    1904           0 :         ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op);
    1905           0 :         ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info);
    1906           0 :         ndr_print_ptr(ndr, "partial_attribute_set", r->partial_attribute_set);
    1907           0 :         ndr->depth++;
    1908           0 :         if (r->partial_attribute_set) {
    1909           0 :                 ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set", r->partial_attribute_set);
    1910             :         }
    1911           0 :         ndr->depth--;
    1912           0 :         ndr_print_ptr(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
    1913           0 :         ndr->depth++;
    1914           0 :         if (r->partial_attribute_set_ex) {
    1915           0 :                 ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex);
    1916             :         }
    1917           0 :         ndr->depth--;
    1918           0 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
    1919           0 :         ndr_print_drsuapi_DrsMoreOptions(ndr, "more_flags", r->more_flags);
    1920           0 :         ndr->depth--;
    1921             : }
    1922             : 
    1923        7266 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsGetNCChangesRequest *r)
    1924             : {
    1925             :         uint32_t level;
    1926        7266 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1927        7266 :         if (ndr_flags & NDR_SCALARS) {
    1928             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1929        7266 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1930        7266 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    1931        7266 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    1932        7266 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    1933        7266 :                 switch (level) {
    1934           0 :                         case 5: {
    1935           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr, NDR_SCALARS, &r->req5));
    1936           0 :                         break; }
    1937             : 
    1938         455 :                         case 8: {
    1939         455 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr, NDR_SCALARS, &r->req8));
    1940         455 :                         break; }
    1941             : 
    1942        6811 :                         case 10: {
    1943        6811 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest10(ndr, NDR_SCALARS, &r->req10));
    1944        6811 :                         break; }
    1945             : 
    1946           0 :                         default:
    1947           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1948             :                 }
    1949           0 :         }
    1950        7266 :         if (ndr_flags & NDR_BUFFERS) {
    1951        7266 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1952             :                         /* We didn't get it above, and the token is not needed after this. */
    1953           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1954             :                 }
    1955        7266 :                 switch (level) {
    1956           0 :                         case 5:
    1957           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest5(ndr, NDR_BUFFERS, &r->req5));
    1958           0 :                         break;
    1959             : 
    1960         455 :                         case 8:
    1961         455 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest8(ndr, NDR_BUFFERS, &r->req8));
    1962         455 :                         break;
    1963             : 
    1964        6811 :                         case 10:
    1965        6811 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesRequest10(ndr, NDR_BUFFERS, &r->req10));
    1966        6811 :                         break;
    1967             : 
    1968           0 :                         default:
    1969           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    1970             :                 }
    1971           0 :         }
    1972        7266 :         return NDR_ERR_SUCCESS;
    1973             : }
    1974             : 
    1975        7266 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsGetNCChangesRequest *r)
    1976             : {
    1977             :         uint32_t level;
    1978             :         uint32_t _level;
    1979        7266 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1980        7266 :         if (ndr_flags & NDR_SCALARS) {
    1981             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1982        7266 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1983        7266 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    1984        7266 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    1985        7266 :                 if (_level != level) {
    1986           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    1987             :                 }
    1988        7266 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    1989        7266 :                 switch (level) {
    1990           0 :                         case 5: {
    1991           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr, NDR_SCALARS, &r->req5));
    1992           0 :                         break; }
    1993             : 
    1994         455 :                         case 8: {
    1995         455 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr, NDR_SCALARS, &r->req8));
    1996         455 :                         break; }
    1997             : 
    1998        6811 :                         case 10: {
    1999        6811 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest10(ndr, NDR_SCALARS, &r->req10));
    2000        6811 :                         break; }
    2001             : 
    2002           0 :                         default:
    2003           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    2004             :                 }
    2005           0 :         }
    2006        7266 :         if (ndr_flags & NDR_BUFFERS) {
    2007        7266 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2008             :                         /* We didn't get it above, and the token is not needed after this. */
    2009           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2010             :                 }
    2011        7266 :                 switch (level) {
    2012           0 :                         case 5:
    2013           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest5(ndr, NDR_BUFFERS, &r->req5));
    2014           0 :                         break;
    2015             : 
    2016         455 :                         case 8:
    2017         455 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest8(ndr, NDR_BUFFERS, &r->req8));
    2018         455 :                         break;
    2019             : 
    2020        6811 :                         case 10:
    2021        6811 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesRequest10(ndr, NDR_BUFFERS, &r->req10));
    2022        6811 :                         break;
    2023             : 
    2024           0 :                         default:
    2025           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    2026             :                 }
    2027           0 :         }
    2028        7266 :         return NDR_ERR_SUCCESS;
    2029             : }
    2030             : 
    2031          60 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesRequest *r)
    2032             : {
    2033             :         uint32_t level;
    2034          60 :         level = ndr_print_steal_switch_value(ndr, r);
    2035          60 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesRequest");
    2036          60 :         switch (level) {
    2037           0 :                 case 5:
    2038           0 :                         ndr_print_drsuapi_DsGetNCChangesRequest5(ndr, "req5", &r->req5);
    2039           0 :                 break;
    2040             : 
    2041          60 :                 case 8:
    2042          60 :                         ndr_print_drsuapi_DsGetNCChangesRequest8(ndr, "req8", &r->req8);
    2043          60 :                 break;
    2044             : 
    2045           0 :                 case 10:
    2046           0 :                         ndr_print_drsuapi_DsGetNCChangesRequest10(ndr, "req10", &r->req10);
    2047           0 :                 break;
    2048             : 
    2049           0 :                 default:
    2050           0 :                         ndr_print_bad_level(ndr, name, level);
    2051             :         }
    2052          60 : }
    2053             : 
    2054       14534 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaCursor2 *r)
    2055             : {
    2056       14534 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2057       14534 :         if (ndr_flags & NDR_SCALARS) {
    2058       14534 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2059       14534 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    2060       14534 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->highest_usn));
    2061       14534 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_sync_success));
    2062       14534 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2063             :         }
    2064       14534 :         if (ndr_flags & NDR_BUFFERS) {
    2065             :         }
    2066       14534 :         return NDR_ERR_SUCCESS;
    2067             : }
    2068             : 
    2069       23678 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaCursor2 *r)
    2070             : {
    2071       23678 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2072       23678 :         if (ndr_flags & NDR_SCALARS) {
    2073       23678 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2074       23678 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    2075       23678 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->highest_usn));
    2076       23678 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_sync_success));
    2077       23678 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2078             :         }
    2079       23678 :         if (ndr_flags & NDR_BUFFERS) {
    2080             :         }
    2081       23678 :         return NDR_ERR_SUCCESS;
    2082             : }
    2083             : 
    2084           0 : static void ndr_print_flags_drsuapi_DsReplicaCursor2(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaCursor2 *r)
    2085             : {
    2086           0 :         ndr_print_drsuapi_DsReplicaCursor2(ndr, name, r);
    2087           0 : }
    2088             : 
    2089          12 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2 *r)
    2090             : {
    2091          12 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2");
    2092          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2093          12 :         ndr->depth++;
    2094          12 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    2095          12 :         ndr_print_hyper(ndr, "highest_usn", r->highest_usn);
    2096          12 :         ndr_print_NTTIME(ndr, "last_sync_success", r->last_sync_success);
    2097          12 :         ndr->depth--;
    2098             : }
    2099             : 
    2100        5914 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2CtrEx(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaCursor2CtrEx *r)
    2101             : {
    2102             :         uint32_t cntr_cursors_0;
    2103        5914 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2104        5914 :         if (ndr_flags & NDR_SCALARS) {
    2105        5914 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2106        5914 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2107        5914 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
    2108        5914 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    2109        5914 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2110        5914 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
    2111       16510 :                 for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
    2112       10596 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
    2113             :                 }
    2114        5914 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2115             :         }
    2116        5914 :         if (ndr_flags & NDR_BUFFERS) {
    2117             :         }
    2118        5914 :         return NDR_ERR_SUCCESS;
    2119             : }
    2120             : 
    2121        2951 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaCursor2CtrEx *r)
    2122             : {
    2123        2951 :         uint32_t size_cursors_0 = 0;
    2124             :         uint32_t cntr_cursors_0;
    2125        2951 :         TALLOC_CTX *_mem_save_cursors_0 = NULL;
    2126        2951 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2127        2951 :         if (ndr_flags & NDR_SCALARS) {
    2128        2951 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->cursors));
    2129        2951 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2130        2951 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    2131        2951 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
    2132        2951 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2133        2951 :                 if (r->count > 1048576) {
    2134           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2135             :                 }
    2136        2951 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
    2137        2951 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->cursors, &size_cursors_0));
    2138        2951 :                 NDR_PULL_ALLOC_N(ndr, r->cursors, size_cursors_0);
    2139        2951 :                 _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2140        2951 :                 NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0);
    2141        8243 :                 for (cntr_cursors_0 = 0; cntr_cursors_0 < (size_cursors_0); cntr_cursors_0++) {
    2142        5292 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0]));
    2143             :                 }
    2144        2951 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_cursors_0, 0);
    2145        2951 :                 if (r->cursors) {
    2146        2951 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->cursors, r->count));
    2147             :                 }
    2148        2951 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2149             :         }
    2150        2951 :         if (ndr_flags & NDR_BUFFERS) {
    2151             :         }
    2152        2951 :         return NDR_ERR_SUCCESS;
    2153             : }
    2154             : 
    2155          12 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2CtrEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaCursor2CtrEx *r)
    2156             : {
    2157             :         uint32_t cntr_cursors_0;
    2158          12 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2CtrEx");
    2159          12 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2160          12 :         ndr->depth++;
    2161          12 :         ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->version);
    2162          12 :         ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
    2163          12 :         ndr_print_uint32(ndr, "count", r->count);
    2164          12 :         ndr_print_uint32(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
    2165          12 :         ndr->print(ndr, "%s: ARRAY(%d)", "cursors", (int)r->count);
    2166          12 :         ndr->depth++;
    2167          24 :         for (cntr_cursors_0 = 0; cntr_cursors_0 < (r->count); cntr_cursors_0++) {
    2168          12 :                 ndr_print_drsuapi_DsReplicaCursor2(ndr, "cursors", &r->cursors[cntr_cursors_0]);
    2169             :         }
    2170          12 :         ndr->depth--;
    2171          12 :         ndr->depth--;
    2172             : }
    2173             : 
    2174    32034962 : static enum ndr_err_code ndr_push_drsuapi_DsAttributeValue(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsAttributeValue *r)
    2175             : {
    2176    32034962 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2177    32034962 :         if (ndr_flags & NDR_SCALARS) {
    2178    16017481 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2179    16017481 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_DATA_BLOB(0, r->blob, 0)));
    2180    16017481 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->blob));
    2181    16017481 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2182             :         }
    2183    32034962 :         if (ndr_flags & NDR_BUFFERS) {
    2184    16017481 :                 if (r->blob) {
    2185    16017480 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->blob));
    2186             :                 }
    2187             :         }
    2188    32034930 :         return NDR_ERR_SUCCESS;
    2189             : }
    2190             : 
    2191    15729534 : static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValue(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsAttributeValue *r)
    2192             : {
    2193             :         uint32_t _ptr_blob;
    2194    15729534 :         TALLOC_CTX *_mem_save_blob_0 = NULL;
    2195    15729534 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2196    15729534 :         if (ndr_flags & NDR_SCALARS) {
    2197     7864767 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2198     7864767 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    2199     7864767 :                 if (r->__ndr_size > 26214400) {
    2200           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2201             :                 }
    2202     7864767 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_blob));
    2203     7864767 :                 if (_ptr_blob) {
    2204     7864764 :                         NDR_PULL_ALLOC(ndr, r->blob);
    2205             :                 } else {
    2206           3 :                         r->blob = NULL;
    2207             :                 }
    2208     7864767 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2209             :         }
    2210    15729534 :         if (ndr_flags & NDR_BUFFERS) {
    2211     7864767 :                 if (r->blob) {
    2212     7864764 :                         _mem_save_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2213     7864764 :                         NDR_PULL_SET_MEM_CTX(ndr, r->blob, 0);
    2214     7864764 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->blob));
    2215     7864764 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_blob_0, 0);
    2216             :                 }
    2217             :         }
    2218    15729408 :         return NDR_ERR_SUCCESS;
    2219             : }
    2220             : 
    2221      198466 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeValue(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAttributeValue *r)
    2222             : {
    2223      198466 :         ndr_print_struct(ndr, name, "drsuapi_DsAttributeValue");
    2224      198466 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2225      198466 :         ndr->depth++;
    2226      198466 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_DATA_BLOB(0, r->blob, 0):r->__ndr_size);
    2227      198466 :         ndr_print_ptr(ndr, "blob", r->blob);
    2228      198466 :         ndr->depth++;
    2229      198466 :         if (r->blob) {
    2230      198466 :                 ndr_print_DATA_BLOB(ndr, "blob", *r->blob);
    2231             :         }
    2232      198466 :         ndr->depth--;
    2233      198466 :         ndr->depth--;
    2234             : }
    2235             : 
    2236    26774334 : static enum ndr_err_code ndr_push_drsuapi_DsAttributeValueCtr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsAttributeValueCtr *r)
    2237             : {
    2238             :         uint32_t cntr_values_1;
    2239    26774334 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2240    26774334 :         if (ndr_flags & NDR_SCALARS) {
    2241    13387167 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2242    13387167 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_values));
    2243    13387167 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->values));
    2244    13387167 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2245             :         }
    2246    26774334 :         if (ndr_flags & NDR_BUFFERS) {
    2247    13387167 :                 if (r->values) {
    2248    12163963 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_values));
    2249    28149614 :                         for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
    2250    15985663 :                                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->values[cntr_values_1]));
    2251             :                         }
    2252    28149614 :                         for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
    2253    15985663 :                                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->values[cntr_values_1]));
    2254             :                         }
    2255             :                 }
    2256             :         }
    2257    26774310 :         return NDR_ERR_SUCCESS;
    2258             : }
    2259             : 
    2260    13166738 : static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValueCtr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsAttributeValueCtr *r)
    2261             : {
    2262             :         uint32_t _ptr_values;
    2263    13166738 :         uint32_t size_values_1 = 0;
    2264             :         uint32_t cntr_values_1;
    2265    13166738 :         TALLOC_CTX *_mem_save_values_0 = NULL;
    2266    13166738 :         TALLOC_CTX *_mem_save_values_1 = NULL;
    2267    13166738 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2268    13166738 :         if (ndr_flags & NDR_SCALARS) {
    2269     6583369 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2270     6583369 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_values));
    2271     6583369 :                 if (r->num_values > 10485760) {
    2272           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2273             :                 }
    2274     6583369 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
    2275     6583369 :                 if (_ptr_values) {
    2276     5973042 :                         NDR_PULL_ALLOC(ndr, r->values);
    2277             :                 } else {
    2278      610327 :                         r->values = NULL;
    2279             :                 }
    2280     6583369 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2281             :         }
    2282    13166738 :         if (ndr_flags & NDR_BUFFERS) {
    2283     6583369 :                 if (r->values) {
    2284     5973042 :                         _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2285     5973042 :                         NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
    2286     5973042 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->values));
    2287     5973042 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->values, &size_values_1));
    2288     5973042 :                         NDR_PULL_ALLOC_N(ndr, r->values, size_values_1);
    2289     5973042 :                         _mem_save_values_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2290     5973042 :                         NDR_PULL_SET_MEM_CTX(ndr, r->values, 0);
    2291    13821991 :                         for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
    2292     7848949 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->values[cntr_values_1]));
    2293             :                         }
    2294    13821944 :                         for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
    2295     7848949 :                                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->values[cntr_values_1]));
    2296             :                         }
    2297     5973042 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_1, 0);
    2298     5973042 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, 0);
    2299             :                 }
    2300     6583369 :                 if (r->values) {
    2301     5973042 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->values, r->num_values));
    2302             :                 }
    2303     6934631 :                 for (cntr_values_1 = 0; cntr_values_1 < (size_values_1); cntr_values_1++) {
    2304             :                 }
    2305             :         }
    2306    13166644 :         return NDR_ERR_SUCCESS;
    2307             : }
    2308             : 
    2309           0 : _PUBLIC_ void ndr_print_drsuapi_DsAttributeValueCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsAttributeValueCtr *r)
    2310             : {
    2311             :         uint32_t cntr_values_1;
    2312           0 :         ndr_print_struct(ndr, name, "drsuapi_DsAttributeValueCtr");
    2313           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2314           0 :         ndr->depth++;
    2315           0 :         ndr_print_uint32(ndr, "num_values", r->num_values);
    2316           0 :         ndr_print_ptr(ndr, "values", r->values);
    2317           0 :         ndr->depth++;
    2318           0 :         if (r->values) {
    2319           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "values", (int)r->num_values);
    2320           0 :                 ndr->depth++;
    2321           0 :                 for (cntr_values_1 = 0; cntr_values_1 < (r->num_values); cntr_values_1++) {
    2322           0 :                         ndr_print_drsuapi_DsAttributeValue(ndr, "values", &r->values[cntr_values_1]);
    2323             :                 }
    2324           0 :                 ndr->depth--;
    2325             :         }
    2326           0 :         ndr->depth--;
    2327           0 :         ndr->depth--;
    2328             : }
    2329             : 
    2330     1013204 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
    2331             : {
    2332     1013204 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2333     1013204 :         if (ndr_flags & NDR_SCALARS) {
    2334     1013204 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2335     1013204 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags)));
    2336     1013204 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
    2337     1013204 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
    2338     1013204 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
    2339     1013204 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
    2340     1013204 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
    2341     1013204 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2342             :         }
    2343     1013204 :         if (ndr_flags & NDR_BUFFERS) {
    2344     1013204 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
    2345             :         }
    2346     1013197 :         return NDR_ERR_SUCCESS;
    2347             : }
    2348             : 
    2349      646194 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3 *r)
    2350             : {
    2351      646194 :         uint32_t size_dn_0 = 0;
    2352      646194 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2353      646194 :         if (ndr_flags & NDR_SCALARS) {
    2354      646194 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2355      646194 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    2356      646194 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
    2357      646194 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
    2358      646194 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
    2359      646194 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
    2360      646194 :                 size_dn_0 = r->__ndr_size_dn + 1;
    2361      646194 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
    2362      646194 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2363             :         }
    2364      646194 :         if (ndr_flags & NDR_BUFFERS) {
    2365      646194 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
    2366             :         }
    2367      646192 :         return NDR_ERR_SUCCESS;
    2368             : }
    2369             : 
    2370           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
    2371             : {
    2372           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier3(ndr, name, r);
    2373           0 : }
    2374             : 
    2375           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3 *r)
    2376             : {
    2377           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier3");
    2378           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2379           0 :         ndr->depth++;
    2380           0 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags):r->__ndr_size);
    2381           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);
    2382           0 :         ndr_print_GUID(ndr, "guid", &r->guid);
    2383           0 :         ndr_print_dom_sid28(ndr, "sid", &r->sid);
    2384           0 :         ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
    2385           0 :         ndr_print_string(ndr, "dn", r->dn);
    2386           0 :         ndr->depth--;
    2387             : }
    2388             : 
    2389     1013204 : _PUBLIC_ size_t ndr_size_drsuapi_DsReplicaObjectIdentifier3(const struct drsuapi_DsReplicaObjectIdentifier3 *r, int flags)
    2390             : {
    2391     1013204 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
    2392             : }
    2393             : 
    2394        3858 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
    2395             : {
    2396        3858 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2397        3858 :         if (ndr_flags & NDR_SCALARS) {
    2398        3858 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2399        3858 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags)));
    2400        3858 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid28(&r->sid, ndr->flags)));
    2401        3858 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
    2402        3858 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS, &r->sid));
    2403        3858 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->dn)));
    2404        3858 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dn, strlen_m(r->dn) + 1, sizeof(uint16_t), CH_UTF16));
    2405        3858 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->binary.length + 4));
    2406             :                 {
    2407        3858 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2408        3858 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    2409        3858 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
    2410        3858 :                         ndr->flags = _flags_save_DATA_BLOB;
    2411             :                 }
    2412        3858 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2413             :         }
    2414        3858 :         if (ndr_flags & NDR_BUFFERS) {
    2415        3858 :                 NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
    2416             :         }
    2417        3855 :         return NDR_ERR_SUCCESS;
    2418             : }
    2419             : 
    2420        5886 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
    2421             : {
    2422        5886 :         uint32_t size_dn_0 = 0;
    2423        5886 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2424        5886 :         if (ndr_flags & NDR_SCALARS) {
    2425        5886 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2426        5886 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    2427        5886 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_sid));
    2428        5886 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
    2429        5886 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS, &r->sid));
    2430        5886 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_dn));
    2431        5886 :                 size_dn_0 = r->__ndr_size_dn + 1;
    2432        5886 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dn, size_dn_0, sizeof(uint16_t), CH_UTF16));
    2433        5886 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size_binary));
    2434             :                 {
    2435        5886 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2436        5886 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    2437        5886 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->binary));
    2438        5886 :                         ndr->flags = _flags_save_DATA_BLOB;
    2439             :                 }
    2440        5886 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2441             :         }
    2442        5886 :         if (ndr_flags & NDR_BUFFERS) {
    2443        5886 :                 NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_BUFFERS, &r->sid));
    2444             :         }
    2445        5883 :         return NDR_ERR_SUCCESS;
    2446             : }
    2447             : 
    2448           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
    2449             : {
    2450           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(ndr, name, r);
    2451           0 : }
    2452             : 
    2453           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectIdentifier3Binary *r)
    2454             : {
    2455           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectIdentifier3Binary");
    2456           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2457           0 :         ndr->depth++;
    2458           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);
    2459           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);
    2460           0 :         ndr_print_GUID(ndr, "guid", &r->guid);
    2461           0 :         ndr_print_dom_sid28(ndr, "sid", &r->sid);
    2462           0 :         ndr_print_uint32(ndr, "__ndr_size_dn", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->dn):r->__ndr_size_dn);
    2463           0 :         ndr_print_string(ndr, "dn", r->dn);
    2464           0 :         ndr_print_uint32(ndr, "__ndr_size_binary", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->binary.length + 4:r->__ndr_size_binary);
    2465             :         {
    2466           0 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    2467           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    2468           0 :                 ndr_print_DATA_BLOB(ndr, "binary", r->binary);
    2469           0 :                 ndr->flags = _flags_save_DATA_BLOB;
    2470             :         }
    2471           0 :         ndr->depth--;
    2472             : }
    2473             : 
    2474    26774333 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAttribute *r)
    2475             : {
    2476    26774333 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2477    26774333 :         if (ndr_flags & NDR_SCALARS) {
    2478    13387167 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2479    13387167 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
    2480    13387167 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr, NDR_SCALARS, &r->value_ctr));
    2481    13387167 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2482             :         }
    2483    26774333 :         if (ndr_flags & NDR_BUFFERS) {
    2484    13387167 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValueCtr(ndr, NDR_BUFFERS, &r->value_ctr));
    2485             :         }
    2486    26774310 :         return NDR_ERR_SUCCESS;
    2487             : }
    2488             : 
    2489    13166736 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAttribute *r)
    2490             : {
    2491    13166736 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2492    13166736 :         if (ndr_flags & NDR_SCALARS) {
    2493     6583369 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2494     6583369 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
    2495     6583369 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr, NDR_SCALARS, &r->value_ctr));
    2496     6583369 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2497             :         }
    2498    13166736 :         if (ndr_flags & NDR_BUFFERS) {
    2499     6583369 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValueCtr(ndr, NDR_BUFFERS, &r->value_ctr));
    2500             :         }
    2501    13166644 :         return NDR_ERR_SUCCESS;
    2502             : }
    2503             : 
    2504           2 : static void ndr_print_flags_drsuapi_DsReplicaAttribute(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaAttribute *r)
    2505             : {
    2506           2 :         ndr_print_drsuapi_DsReplicaAttribute(ndr, name, r);
    2507           2 : }
    2508             : 
    2509     1904032 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAttributeCtr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAttributeCtr *r)
    2510             : {
    2511             :         uint32_t cntr_attributes_1;
    2512     1904032 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2513     1904032 :         if (ndr_flags & NDR_SCALARS) {
    2514      952016 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2515      952016 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attributes));
    2516      952016 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->attributes));
    2517      952016 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2518             :         }
    2519     1904032 :         if (ndr_flags & NDR_BUFFERS) {
    2520      952016 :                 if (r->attributes) {
    2521      952016 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_attributes));
    2522    14339181 :                         for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
    2523    13387166 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr, NDR_SCALARS, &r->attributes[cntr_attributes_1]));
    2524             :                         }
    2525    14339181 :                         for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
    2526    13387166 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttribute(ndr, NDR_BUFFERS, &r->attributes[cntr_attributes_1]));
    2527             :                         }
    2528             :                 }
    2529             :         }
    2530     1904030 :         return NDR_ERR_SUCCESS;
    2531             : }
    2532             : 
    2533      937564 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttributeCtr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAttributeCtr *r)
    2534             : {
    2535             :         uint32_t _ptr_attributes;
    2536      937564 :         uint32_t size_attributes_1 = 0;
    2537             :         uint32_t cntr_attributes_1;
    2538      937564 :         TALLOC_CTX *_mem_save_attributes_0 = NULL;
    2539      937564 :         TALLOC_CTX *_mem_save_attributes_1 = NULL;
    2540      937564 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2541      937564 :         if (ndr_flags & NDR_SCALARS) {
    2542      468782 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2543      468782 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attributes));
    2544      468782 :                 if (r->num_attributes > 1048576) {
    2545           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2546             :                 }
    2547      468782 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attributes));
    2548      468782 :                 if (_ptr_attributes) {
    2549      468781 :                         NDR_PULL_ALLOC(ndr, r->attributes);
    2550             :                 } else {
    2551           1 :                         r->attributes = NULL;
    2552             :                 }
    2553      468782 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2554             :         }
    2555      937564 :         if (ndr_flags & NDR_BUFFERS) {
    2556      468782 :                 if (r->attributes) {
    2557      468781 :                         _mem_save_attributes_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2558      468781 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attributes, 0);
    2559      468781 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->attributes));
    2560      468781 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->attributes, &size_attributes_1));
    2561      468781 :                         NDR_PULL_ALLOC_N(ndr, r->attributes, size_attributes_1);
    2562      468781 :                         _mem_save_attributes_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2563      468781 :                         NDR_PULL_SET_MEM_CTX(ndr, r->attributes, 0);
    2564     7052148 :                         for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
    2565     6583367 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr, NDR_SCALARS, &r->attributes[cntr_attributes_1]));
    2566             :                         }
    2567     7052143 :                         for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
    2568     6583367 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttribute(ndr, NDR_BUFFERS, &r->attributes[cntr_attributes_1]));
    2569             :                         }
    2570      468781 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attributes_1, 0);
    2571      468781 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attributes_0, 0);
    2572             :                 }
    2573      468782 :                 if (r->attributes) {
    2574      468781 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->attributes, r->num_attributes));
    2575             :                 }
    2576      757555 :                 for (cntr_attributes_1 = 0; cntr_attributes_1 < (size_attributes_1); cntr_attributes_1++) {
    2577             :                 }
    2578             :         }
    2579      937552 :         return NDR_ERR_SUCCESS;
    2580             : }
    2581             : 
    2582       14592 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttributeCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttributeCtr *r)
    2583             : {
    2584             :         uint32_t cntr_attributes_1;
    2585       14592 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAttributeCtr");
    2586       14592 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2587       14592 :         ndr->depth++;
    2588       14592 :         ndr_print_uint32(ndr, "num_attributes", r->num_attributes);
    2589       14592 :         ndr_print_ptr(ndr, "attributes", r->attributes);
    2590       14592 :         ndr->depth++;
    2591       14592 :         if (r->attributes) {
    2592       14591 :                 ndr->print(ndr, "%s: ARRAY(%d)", "attributes", (int)r->num_attributes);
    2593       14591 :                 ndr->depth++;
    2594      237120 :                 for (cntr_attributes_1 = 0; cntr_attributes_1 < (r->num_attributes); cntr_attributes_1++) {
    2595      222529 :                         ndr_print_drsuapi_DsReplicaAttribute(ndr, "attributes", &r->attributes[cntr_attributes_1]);
    2596             :                 }
    2597       14591 :                 ndr->depth--;
    2598             :         }
    2599       14592 :         ndr->depth--;
    2600       14592 :         ndr->depth--;
    2601             : }
    2602             : 
    2603      952016 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    2604             : {
    2605      952016 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    2606      952016 :         return NDR_ERR_SUCCESS;
    2607             : }
    2608             : 
    2609      468782 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    2610             : {
    2611             :         uint32_t v;
    2612      468782 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    2613      468782 :         *r = v;
    2614      468782 :         return NDR_ERR_SUCCESS;
    2615             : }
    2616             : 
    2617       14592 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    2618             : {
    2619       14592 :         ndr_print_uint32(ndr, name, r);
    2620       14592 :         ndr->depth++;
    2621       14592 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER, r);
    2622       14592 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC, r);
    2623       14592 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY, r);
    2624       14592 :         ndr->depth--;
    2625       14592 : }
    2626             : 
    2627     1904032 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObject(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObject *r)
    2628             : {
    2629     1904032 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2630     1904032 :         if (ndr_flags & NDR_SCALARS) {
    2631      952016 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2632      952016 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->identifier));
    2633      952016 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, r->flags));
    2634      952016 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr));
    2635      952016 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2636             :         }
    2637     1904032 :         if (ndr_flags & NDR_BUFFERS) {
    2638      952016 :                 if (r->identifier) {
    2639      952016 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
    2640             :                 }
    2641      952016 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr, NDR_BUFFERS, &r->attribute_ctr));
    2642             :         }
    2643     1904030 :         return NDR_ERR_SUCCESS;
    2644             : }
    2645             : 
    2646      937564 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObject *r)
    2647             : {
    2648             :         uint32_t _ptr_identifier;
    2649      937564 :         TALLOC_CTX *_mem_save_identifier_0 = NULL;
    2650      937564 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2651      937564 :         if (ndr_flags & NDR_SCALARS) {
    2652      468782 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2653      468782 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_identifier));
    2654      468782 :                 if (_ptr_identifier) {
    2655      468780 :                         NDR_PULL_ALLOC(ndr, r->identifier);
    2656             :                 } else {
    2657           2 :                         r->identifier = NULL;
    2658             :                 }
    2659      468782 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, &r->flags));
    2660      468782 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr));
    2661      468782 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2662             :         }
    2663      937564 :         if (ndr_flags & NDR_BUFFERS) {
    2664      468782 :                 if (r->identifier) {
    2665      468780 :                         _mem_save_identifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2666      468780 :                         NDR_PULL_SET_MEM_CTX(ndr, r->identifier, 0);
    2667      468780 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
    2668      468780 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_identifier_0, 0);
    2669             :                 }
    2670      468782 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr, NDR_BUFFERS, &r->attribute_ctr));
    2671             :         }
    2672      937552 :         return NDR_ERR_SUCCESS;
    2673             : }
    2674             : 
    2675           0 : static void ndr_print_flags_drsuapi_DsReplicaObject(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaObject *r)
    2676             : {
    2677           0 :         ndr_print_drsuapi_DsReplicaObject(ndr, name, r);
    2678           0 : }
    2679             : 
    2680       14592 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaObject(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObject *r)
    2681             : {
    2682       14592 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaObject");
    2683       14592 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2684       14592 :         ndr->depth++;
    2685       14592 :         ndr_print_ptr(ndr, "identifier", r->identifier);
    2686       14592 :         ndr->depth++;
    2687       14592 :         if (r->identifier) {
    2688       14590 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "identifier", r->identifier);
    2689             :         }
    2690       14592 :         ndr->depth--;
    2691       14592 :         ndr_print_drsuapi_DsReplicaObjectFlags(ndr, "flags", r->flags);
    2692       14592 :         ndr_print_drsuapi_DsReplicaAttributeCtr(ndr, "attribute_ctr", &r->attribute_ctr);
    2693       14592 :         ndr->depth--;
    2694             : }
    2695             : 
    2696    13418360 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaData(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaMetaData *r)
    2697             : {
    2698    13418360 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2699    13418360 :         if (ndr_flags & NDR_SCALARS) {
    2700    13418360 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2701    13418360 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
    2702    13418360 :                 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_change_time));
    2703    13418360 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
    2704    13418360 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->originating_usn));
    2705    13418360 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2706             :         }
    2707    13418360 :         if (ndr_flags & NDR_BUFFERS) {
    2708             :         }
    2709    13418360 :         return NDR_ERR_SUCCESS;
    2710             : }
    2711             : 
    2712     6598527 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaData(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaMetaData *r)
    2713             : {
    2714     6598527 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2715     6598527 :         if (ndr_flags & NDR_SCALARS) {
    2716     6598527 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2717     6598527 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    2718     6598527 :                 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_change_time));
    2719     6598527 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->originating_invocation_id));
    2720     6598527 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->originating_usn));
    2721     6598527 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2722             :         }
    2723     6598527 :         if (ndr_flags & NDR_BUFFERS) {
    2724             :         }
    2725     6598527 :         return NDR_ERR_SUCCESS;
    2726             : }
    2727             : 
    2728      222666 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaMetaData(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaMetaData *r)
    2729             : {
    2730      222666 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaMetaData");
    2731      222666 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2732      222666 :         ndr->depth++;
    2733      222666 :         ndr_print_uint32(ndr, "version", r->version);
    2734      222666 :         ndr_print_NTTIME_1sec(ndr, "originating_change_time", r->originating_change_time);
    2735      222666 :         ndr_print_GUID(ndr, "originating_invocation_id", &r->originating_invocation_id);
    2736      222666 :         ndr_print_hyper(ndr, "originating_usn", r->originating_usn);
    2737      222666 :         ndr->depth--;
    2738             : }
    2739             : 
    2740      951952 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaMetaDataCtr(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaMetaDataCtr *r)
    2741             : {
    2742             :         uint32_t cntr_meta_data_0;
    2743      951952 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2744      951952 :         if (ndr_flags & NDR_SCALARS) {
    2745      951952 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2746      951952 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2747      951952 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2748    14338494 :                 for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (r->count); cntr_meta_data_0++) {
    2749    13386542 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data[cntr_meta_data_0]));
    2750             :                 }
    2751      951952 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2752             :         }
    2753      951952 :         if (ndr_flags & NDR_BUFFERS) {
    2754             :         }
    2755      951952 :         return NDR_ERR_SUCCESS;
    2756             : }
    2757             : 
    2758      468715 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaMetaDataCtr *r)
    2759             : {
    2760      468715 :         uint32_t size_meta_data_0 = 0;
    2761             :         uint32_t cntr_meta_data_0;
    2762      468715 :         TALLOC_CTX *_mem_save_meta_data_0 = NULL;
    2763      468715 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2764      468715 :         if (ndr_flags & NDR_SCALARS) {
    2765      468715 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->meta_data));
    2766      468715 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2767      468715 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2768      468715 :                 if (r->count > 1048576) {
    2769           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2770             :                 }
    2771      468715 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->meta_data, &size_meta_data_0));
    2772      468715 :                 NDR_PULL_ALLOC_N(ndr, r->meta_data, size_meta_data_0);
    2773      468715 :                 _mem_save_meta_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2774      468715 :                 NDR_PULL_SET_MEM_CTX(ndr, r->meta_data, 0);
    2775     7051424 :                 for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (size_meta_data_0); cntr_meta_data_0++) {
    2776     6582709 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data[cntr_meta_data_0]));
    2777             :                 }
    2778      468715 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_meta_data_0, 0);
    2779      468715 :                 if (r->meta_data) {
    2780      468715 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->meta_data, r->count));
    2781             :                 }
    2782      468715 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2783             :         }
    2784      468713 :         if (ndr_flags & NDR_BUFFERS) {
    2785             :         }
    2786      468715 :         return NDR_ERR_SUCCESS;
    2787             : }
    2788             : 
    2789           0 : static void ndr_print_flags_drsuapi_DsReplicaMetaDataCtr(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaMetaDataCtr *r)
    2790             : {
    2791           0 :         ndr_print_drsuapi_DsReplicaMetaDataCtr(ndr, name, r);
    2792           0 : }
    2793             : 
    2794       14588 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaMetaDataCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaMetaDataCtr *r)
    2795             : {
    2796             :         uint32_t cntr_meta_data_0;
    2797       14588 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaMetaDataCtr");
    2798       14588 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2799       14588 :         ndr->depth++;
    2800       14588 :         ndr_print_uint32(ndr, "count", r->count);
    2801       14588 :         ndr->print(ndr, "%s: ARRAY(%d)", "meta_data", (int)r->count);
    2802       14588 :         ndr->depth++;
    2803      237072 :         for (cntr_meta_data_0 = 0; cntr_meta_data_0 < (r->count); cntr_meta_data_0++) {
    2804      222484 :                 ndr_print_drsuapi_DsReplicaMetaData(ndr, "meta_data", &r->meta_data[cntr_meta_data_0]);
    2805             :         }
    2806       14588 :         ndr->depth--;
    2807       14588 :         ndr->depth--;
    2808             : }
    2809             : 
    2810      951952 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItemEx(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObjectListItemEx *r)
    2811             : {
    2812      951952 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2813      951952 :         if (ndr_flags & NDR_SCALARS) {
    2814      951952 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2815      951952 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->next_object));
    2816      951952 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
    2817      951952 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_nc_prefix));
    2818      951952 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->parent_object_guid));
    2819      951952 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->meta_data_ctr));
    2820      951952 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2821             :         }
    2822      951952 :         if (ndr_flags & NDR_BUFFERS) {
    2823      951952 :                 if (r->next_object) {
    2824      944244 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
    2825             :                 }
    2826      951952 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
    2827      951952 :                 if (r->parent_object_guid) {
    2828      950698 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->parent_object_guid));
    2829             :                 }
    2830      951952 :                 if (r->meta_data_ctr) {
    2831      951952 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaDataCtr(ndr, NDR_SCALARS, r->meta_data_ctr));
    2832             :                 }
    2833             :         }
    2834      951952 :         return NDR_ERR_SUCCESS;
    2835             : }
    2836             : 
    2837      468715 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItemEx(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObjectListItemEx *r)
    2838             : {
    2839             :         uint32_t _ptr_next_object;
    2840      468715 :         TALLOC_CTX *_mem_save_next_object_0 = NULL;
    2841             :         uint32_t _ptr_parent_object_guid;
    2842      468715 :         TALLOC_CTX *_mem_save_parent_object_guid_0 = NULL;
    2843             :         uint32_t _ptr_meta_data_ctr;
    2844      468715 :         TALLOC_CTX *_mem_save_meta_data_ctr_0 = NULL;
    2845      468715 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2846      468715 :         if (ndr_flags & NDR_SCALARS) {
    2847      468715 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2848      468715 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next_object));
    2849      468715 :                 if (_ptr_next_object) {
    2850      464882 :                         NDR_PULL_ALLOC(ndr, r->next_object);
    2851             :                 } else {
    2852        3833 :                         r->next_object = NULL;
    2853             :                 }
    2854      468715 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object));
    2855      468715 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_nc_prefix));
    2856      468715 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parent_object_guid));
    2857      468715 :                 if (_ptr_parent_object_guid) {
    2858      468093 :                         NDR_PULL_ALLOC(ndr, r->parent_object_guid);
    2859             :                 } else {
    2860         622 :                         r->parent_object_guid = NULL;
    2861             :                 }
    2862      468715 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_meta_data_ctr));
    2863      468715 :                 if (_ptr_meta_data_ctr) {
    2864      468715 :                         NDR_PULL_ALLOC(ndr, r->meta_data_ctr);
    2865             :                 } else {
    2866           0 :                         r->meta_data_ctr = NULL;
    2867             :                 }
    2868      468715 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2869             :         }
    2870      468715 :         if (ndr_flags & NDR_BUFFERS) {
    2871      468715 :                 if (r->next_object) {
    2872      464882 :                         _mem_save_next_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2873      464882 :                         NDR_PULL_SET_MEM_CTX(ndr, r->next_object, 0);
    2874      464882 :                         NDR_RECURSION_CHECK(ndr, 20000);
    2875      464882 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->next_object));
    2876      464882 :                         NDR_RECURSION_UNWIND(ndr);
    2877      464882 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_object_0, 0);
    2878             :                 }
    2879      468715 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_BUFFERS, &r->object));
    2880      468715 :                 if (r->parent_object_guid) {
    2881      468093 :                         _mem_save_parent_object_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2882      468093 :                         NDR_PULL_SET_MEM_CTX(ndr, r->parent_object_guid, 0);
    2883      468093 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->parent_object_guid));
    2884      468093 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parent_object_guid_0, 0);
    2885             :                 }
    2886      468715 :                 if (r->meta_data_ctr) {
    2887      468715 :                         _mem_save_meta_data_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2888      468715 :                         NDR_PULL_SET_MEM_CTX(ndr, r->meta_data_ctr, 0);
    2889      468715 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaDataCtr(ndr, NDR_SCALARS, r->meta_data_ctr));
    2890      468715 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_meta_data_ctr_0, 0);
    2891             :                 }
    2892             :         }
    2893      468713 :         return NDR_ERR_SUCCESS;
    2894             : }
    2895             : 
    2896           0 : static void ndr_print_flags_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaObjectListItemEx *r)
    2897             : {
    2898           0 :         ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, name, r);
    2899           0 : }
    2900             : 
    2901           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1 *r)
    2902             : {
    2903           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2904           0 :         if (ndr_flags & NDR_SCALARS) {
    2905           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    2906           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
    2907           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    2908           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->naming_context));
    2909           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
    2910           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
    2911           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    2912           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    2913           0 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret));
    2914           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count));
    2915           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55));
    2916           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object));
    2917           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data));
    2918           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    2919             :         }
    2920           0 :         if (ndr_flags & NDR_BUFFERS) {
    2921           0 :                 if (r->naming_context) {
    2922           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    2923             :                 }
    2924           0 :                 if (r->uptodateness_vector) {
    2925           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    2926             :                 }
    2927           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    2928           0 :                 if (r->first_object) {
    2929           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
    2930             :                 }
    2931             :         }
    2932           0 :         return NDR_ERR_SUCCESS;
    2933             : }
    2934             : 
    2935           2 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1 *r)
    2936             : {
    2937             :         uint32_t _ptr_naming_context;
    2938           2 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    2939             :         uint32_t _ptr_uptodateness_vector;
    2940           2 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    2941             :         uint32_t _ptr_first_object;
    2942           2 :         TALLOC_CTX *_mem_save_first_object_0 = NULL;
    2943           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2944           2 :         if (ndr_flags & NDR_SCALARS) {
    2945           1 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    2946           1 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
    2947           1 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    2948           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_naming_context));
    2949           1 :                 if (_ptr_naming_context) {
    2950           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    2951             :                 } else {
    2952           1 :                         r->naming_context = NULL;
    2953             :                 }
    2954           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
    2955           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
    2956           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    2957           1 :                 if (_ptr_uptodateness_vector) {
    2958           0 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    2959             :                 } else {
    2960           1 :                         r->uptodateness_vector = NULL;
    2961             :                 }
    2962           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    2963           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr, NDR_SCALARS, &r->extended_ret));
    2964           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_count));
    2965           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    2966           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_object));
    2967           1 :                 if (_ptr_first_object) {
    2968           1 :                         NDR_PULL_ALLOC(ndr, r->first_object);
    2969             :                 } else {
    2970           0 :                         r->first_object = NULL;
    2971             :                 }
    2972           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data));
    2973           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    2974             :         }
    2975           2 :         if (ndr_flags & NDR_BUFFERS) {
    2976           1 :                 if (r->naming_context) {
    2977           0 :                         _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2978           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    2979           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    2980           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    2981             :                 }
    2982           1 :                 if (r->uptodateness_vector) {
    2983           0 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2984           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    2985           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    2986           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    2987             :                 }
    2988           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    2989           1 :                 if (r->first_object) {
    2990           1 :                         _mem_save_first_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2991           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->first_object, 0);
    2992           1 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
    2993           1 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_first_object_0, 0);
    2994             :                 }
    2995             :         }
    2996           0 :         return NDR_ERR_SUCCESS;
    2997             : }
    2998             : 
    2999           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsGetNCChangesCtr1 *r)
    3000             : {
    3001           0 :         ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, name, r);
    3002           0 : }
    3003             : 
    3004           1 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1 *r)
    3005             : {
    3006           1 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr1");
    3007           1 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3008           1 :         ndr->depth++;
    3009           1 :         ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
    3010           1 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    3011           1 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    3012           1 :         ndr->depth++;
    3013           1 :         if (r->naming_context) {
    3014           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    3015             :         }
    3016           1 :         ndr->depth--;
    3017           1 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "old_highwatermark", &r->old_highwatermark);
    3018           1 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "new_highwatermark", &r->new_highwatermark);
    3019           1 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    3020           1 :         ndr->depth++;
    3021           1 :         if (r->uptodateness_vector) {
    3022           0 :                 ndr_print_drsuapi_DsReplicaCursorCtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    3023             :         }
    3024           1 :         ndr->depth--;
    3025           1 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
    3026           1 :         ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret);
    3027           1 :         ndr_print_uint32(ndr, "object_count", r->object_count);
    3028           1 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55:r->__ndr_size);
    3029           1 :         ndr_print_ptr(ndr, "first_object", r->first_object);
    3030           1 :         ndr->depth++;
    3031           1 :         if (r->first_object) {
    3032           1 :                 ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "first_object", r->first_object);
    3033             :         }
    3034           1 :         ndr->depth--;
    3035           1 :         ndr_print_uint32(ndr, "more_data", r->more_data);
    3036           1 :         ndr->depth--;
    3037             : }
    3038             : 
    3039           0 : _PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr1(const struct drsuapi_DsGetNCChangesCtr1 *r, int flags)
    3040             : {
    3041           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1);
    3042             : }
    3043             : 
    3044       31818 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsLinkedAttributeFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    3045             : {
    3046       31818 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    3047       31818 :         return NDR_ERR_SUCCESS;
    3048             : }
    3049             : 
    3050       15818 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsLinkedAttributeFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    3051             : {
    3052             :         uint32_t v;
    3053       15818 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    3054       15818 :         *r = v;
    3055       15818 :         return NDR_ERR_SUCCESS;
    3056             : }
    3057             : 
    3058         182 : _PUBLIC_ void ndr_print_drsuapi_DsLinkedAttributeFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    3059             : {
    3060         182 :         ndr_print_uint32(ndr, name, r);
    3061         182 :         ndr->depth++;
    3062         182 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE", DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE, r);
    3063         182 :         ndr->depth--;
    3064         182 : }
    3065             : 
    3066       63636 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaLinkedAttribute(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaLinkedAttribute *r)
    3067             : {
    3068       63636 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3069       63636 :         if (ndr_flags & NDR_SCALARS) {
    3070       31818 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    3071       31818 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->identifier));
    3072       31818 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attid));
    3073       31818 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->value));
    3074       31818 :                 NDR_CHECK(ndr_push_drsuapi_DsLinkedAttributeFlags(ndr, NDR_SCALARS, r->flags));
    3075       31818 :                 NDR_CHECK(ndr_push_NTTIME_1sec(ndr, NDR_SCALARS, r->originating_add_time));
    3076       31818 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data));
    3077       31818 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    3078             :         }
    3079       63636 :         if (ndr_flags & NDR_BUFFERS) {
    3080       31818 :                 if (r->identifier) {
    3081       31818 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
    3082             :                 }
    3083       31818 :                 NDR_CHECK(ndr_push_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->value));
    3084             :         }
    3085       63636 :         return NDR_ERR_SUCCESS;
    3086             : }
    3087             : 
    3088       31636 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaLinkedAttribute(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaLinkedAttribute *r)
    3089             : {
    3090             :         uint32_t _ptr_identifier;
    3091       31636 :         TALLOC_CTX *_mem_save_identifier_0 = NULL;
    3092       31636 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3093       31636 :         if (ndr_flags & NDR_SCALARS) {
    3094       15818 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    3095       15818 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_identifier));
    3096       15818 :                 if (_ptr_identifier) {
    3097       15818 :                         NDR_PULL_ALLOC(ndr, r->identifier);
    3098             :                 } else {
    3099           0 :                         r->identifier = NULL;
    3100             :                 }
    3101       15818 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attid));
    3102       15818 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_SCALARS, &r->value));
    3103       15818 :                 NDR_CHECK(ndr_pull_drsuapi_DsLinkedAttributeFlags(ndr, NDR_SCALARS, &r->flags));
    3104       15818 :                 NDR_CHECK(ndr_pull_NTTIME_1sec(ndr, NDR_SCALARS, &r->originating_add_time));
    3105       15818 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaMetaData(ndr, NDR_SCALARS, &r->meta_data));
    3106       15818 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    3107             :         }
    3108       31636 :         if (ndr_flags & NDR_BUFFERS) {
    3109       15818 :                 if (r->identifier) {
    3110       15818 :                         _mem_save_identifier_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3111       15818 :                         NDR_PULL_SET_MEM_CTX(ndr, r->identifier, 0);
    3112       15818 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->identifier));
    3113       15818 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_identifier_0, 0);
    3114             :                 }
    3115       15818 :                 NDR_CHECK(ndr_pull_drsuapi_DsAttributeValue(ndr, NDR_BUFFERS, &r->value));
    3116             :         }
    3117       31636 :         return NDR_ERR_SUCCESS;
    3118             : }
    3119             : 
    3120           0 : static void ndr_print_flags_drsuapi_DsReplicaLinkedAttribute(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsReplicaLinkedAttribute *r)
    3121             : {
    3122           0 :         ndr_print_drsuapi_DsReplicaLinkedAttribute(ndr, name, r);
    3123           0 : }
    3124             : 
    3125         182 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaLinkedAttribute(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaLinkedAttribute *r)
    3126             : {
    3127         182 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaLinkedAttribute");
    3128         182 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3129         182 :         ndr->depth++;
    3130         182 :         ndr_print_ptr(ndr, "identifier", r->identifier);
    3131         182 :         ndr->depth++;
    3132         182 :         if (r->identifier) {
    3133         182 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "identifier", r->identifier);
    3134             :         }
    3135         182 :         ndr->depth--;
    3136         182 :         ndr_print_drsuapi_DsAttributeId(ndr, "attid", r->attid);
    3137         182 :         ndr_print_drsuapi_DsAttributeValue(ndr, "value", &r->value);
    3138         182 :         ndr_print_drsuapi_DsLinkedAttributeFlags(ndr, "flags", r->flags);
    3139         182 :         ndr_print_NTTIME_1sec(ndr, "originating_add_time", r->originating_add_time);
    3140         182 :         ndr_print_drsuapi_DsReplicaMetaData(ndr, "meta_data", &r->meta_data);
    3141         182 :         ndr->depth--;
    3142             : }
    3143             : 
    3144       21864 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6 *r)
    3145             : {
    3146             :         uint32_t cntr_linked_attributes_1;
    3147       21864 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3148       21864 :         if (ndr_flags & NDR_SCALARS) {
    3149       14576 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    3150       14576 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
    3151       14576 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    3152       14576 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->naming_context));
    3153       14576 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
    3154       14576 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
    3155       14576 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector));
    3156       14576 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    3157       14576 :                 NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret));
    3158       14576 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count));
    3159       14576 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55));
    3160       14576 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object));
    3161       14576 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data));
    3162       14576 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_object_count));
    3163       14576 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_linked_attributes_count));
    3164       14576 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linked_attributes_count));
    3165       14576 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->linked_attributes));
    3166       14576 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->drs_error));
    3167       14576 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    3168             :         }
    3169       21864 :         if (ndr_flags & NDR_BUFFERS) {
    3170       14576 :                 if (r->naming_context) {
    3171        9700 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    3172             :                 }
    3173       14576 :                 if (r->uptodateness_vector) {
    3174        5914 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2CtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    3175             :                 }
    3176       14576 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    3177       14576 :                 if (r->first_object) {
    3178        7708 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
    3179             :                 }
    3180       14576 :                 if (r->linked_attributes) {
    3181       14576 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->linked_attributes_count));
    3182       46394 :                         for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
    3183       31818 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_SCALARS, &r->linked_attributes[cntr_linked_attributes_1]));
    3184             :                         }
    3185       46394 :                         for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
    3186       31818 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_BUFFERS, &r->linked_attributes[cntr_linked_attributes_1]));
    3187             :                         }
    3188             :                 }
    3189             :         }
    3190       21864 :         return NDR_ERR_SUCCESS;
    3191             : }
    3192             : 
    3193       14532 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6 *r)
    3194             : {
    3195             :         uint32_t _ptr_naming_context;
    3196       14532 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    3197             :         uint32_t _ptr_uptodateness_vector;
    3198       14532 :         TALLOC_CTX *_mem_save_uptodateness_vector_0 = NULL;
    3199             :         uint32_t _ptr_first_object;
    3200       14532 :         TALLOC_CTX *_mem_save_first_object_0 = NULL;
    3201             :         uint32_t _ptr_linked_attributes;
    3202       14532 :         uint32_t size_linked_attributes_1 = 0;
    3203             :         uint32_t cntr_linked_attributes_1;
    3204       14532 :         TALLOC_CTX *_mem_save_linked_attributes_0 = NULL;
    3205       14532 :         TALLOC_CTX *_mem_save_linked_attributes_1 = NULL;
    3206       14532 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3207       14532 :         if (ndr_flags & NDR_SCALARS) {
    3208        7266 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    3209        7266 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_guid));
    3210        7266 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dsa_invocation_id));
    3211        7266 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_naming_context));
    3212        7266 :                 if (_ptr_naming_context) {
    3213        4828 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    3214             :                 } else {
    3215        2438 :                         r->naming_context = NULL;
    3216             :                 }
    3217        7266 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->old_highwatermark));
    3218        7266 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark));
    3219        7266 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_uptodateness_vector));
    3220        7266 :                 if (_ptr_uptodateness_vector) {
    3221        2951 :                         NDR_PULL_ALLOC(ndr, r->uptodateness_vector);
    3222             :                 } else {
    3223        4315 :                         r->uptodateness_vector = NULL;
    3224             :                 }
    3225        7266 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr));
    3226        7266 :                 NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr, NDR_SCALARS, &r->extended_ret));
    3227        7266 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_count));
    3228        7266 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
    3229        7266 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_object));
    3230        7266 :                 if (_ptr_first_object) {
    3231        3832 :                         NDR_PULL_ALLOC(ndr, r->first_object);
    3232             :                 } else {
    3233        3434 :                         r->first_object = NULL;
    3234             :                 }
    3235        7266 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data));
    3236        7266 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_object_count));
    3237        7266 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_linked_attributes_count));
    3238        7266 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linked_attributes_count));
    3239        7266 :                 if (r->linked_attributes_count > 1048576) {
    3240           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    3241             :                 }
    3242        7266 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_linked_attributes));
    3243        7266 :                 if (_ptr_linked_attributes) {
    3244        7266 :                         NDR_PULL_ALLOC(ndr, r->linked_attributes);
    3245             :                 } else {
    3246           0 :                         r->linked_attributes = NULL;
    3247             :                 }
    3248        7266 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->drs_error));
    3249        7266 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    3250             :         }
    3251       14532 :         if (ndr_flags & NDR_BUFFERS) {
    3252        7266 :                 if (r->naming_context) {
    3253        4828 :                         _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3254        4828 :                         NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    3255        4828 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    3256        4828 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    3257             :                 }
    3258        7266 :                 if (r->uptodateness_vector) {
    3259        2951 :                         _mem_save_uptodateness_vector_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3260        2951 :                         NDR_PULL_SET_MEM_CTX(ndr, r->uptodateness_vector, 0);
    3261        2951 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursor2CtrEx(ndr, NDR_SCALARS, r->uptodateness_vector));
    3262        2951 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0);
    3263             :                 }
    3264        7266 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr));
    3265        7266 :                 if (r->first_object) {
    3266        3832 :                         _mem_save_first_object_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3267        3832 :                         NDR_PULL_SET_MEM_CTX(ndr, r->first_object, 0);
    3268        3832 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectListItemEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->first_object));
    3269        3832 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_first_object_0, 0);
    3270             :                 }
    3271        7266 :                 if (r->linked_attributes) {
    3272        7266 :                         _mem_save_linked_attributes_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3273        7266 :                         NDR_PULL_SET_MEM_CTX(ndr, r->linked_attributes, 0);
    3274        7266 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->linked_attributes));
    3275        7266 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->linked_attributes, &size_linked_attributes_1));
    3276        7266 :                         NDR_PULL_ALLOC_N(ndr, r->linked_attributes, size_linked_attributes_1);
    3277        7266 :                         _mem_save_linked_attributes_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3278        7266 :                         NDR_PULL_SET_MEM_CTX(ndr, r->linked_attributes, 0);
    3279       23084 :                         for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
    3280       15818 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_SCALARS, &r->linked_attributes[cntr_linked_attributes_1]));
    3281             :                         }
    3282       23084 :                         for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
    3283       15818 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaLinkedAttribute(ndr, NDR_BUFFERS, &r->linked_attributes[cntr_linked_attributes_1]));
    3284             :                         }
    3285        7266 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_linked_attributes_1, 0);
    3286        7266 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_linked_attributes_0, 0);
    3287             :                 }
    3288        7266 :                 if (r->linked_attributes) {
    3289        7266 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->linked_attributes, r->linked_attributes_count));
    3290             :                 }
    3291        7514 :                 for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (size_linked_attributes_1); cntr_linked_attributes_1++) {
    3292             :                 }
    3293             :         }
    3294       14532 :         return NDR_ERR_SUCCESS;
    3295             : }
    3296             : 
    3297           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsGetNCChangesCtr6 *r)
    3298             : {
    3299           0 :         ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, name, r);
    3300           0 : }
    3301             : 
    3302         104 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6 *r)
    3303             : {
    3304             :         uint32_t cntr_linked_attributes_1;
    3305         104 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr6");
    3306         104 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3307         104 :         ndr->depth++;
    3308         104 :         ndr_print_GUID(ndr, "source_dsa_guid", &r->source_dsa_guid);
    3309         104 :         ndr_print_GUID(ndr, "source_dsa_invocation_id", &r->source_dsa_invocation_id);
    3310         104 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    3311         104 :         ndr->depth++;
    3312         104 :         if (r->naming_context) {
    3313         104 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    3314             :         }
    3315         104 :         ndr->depth--;
    3316         104 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "old_highwatermark", &r->old_highwatermark);
    3317         104 :         ndr_print_drsuapi_DsReplicaHighWaterMark(ndr, "new_highwatermark", &r->new_highwatermark);
    3318         104 :         ndr_print_ptr(ndr, "uptodateness_vector", r->uptodateness_vector);
    3319         104 :         ndr->depth++;
    3320         104 :         if (r->uptodateness_vector) {
    3321          12 :                 ndr_print_drsuapi_DsReplicaCursor2CtrEx(ndr, "uptodateness_vector", r->uptodateness_vector);
    3322             :         }
    3323         104 :         ndr->depth--;
    3324         104 :         ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr);
    3325         104 :         ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret);
    3326         104 :         ndr_print_uint32(ndr, "object_count", r->object_count);
    3327         104 :         ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55:r->__ndr_size);
    3328         104 :         ndr_print_ptr(ndr, "first_object", r->first_object);
    3329         104 :         ndr->depth++;
    3330         104 :         if (r->first_object) {
    3331         104 :                 ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "first_object", r->first_object);
    3332             :         }
    3333         104 :         ndr->depth--;
    3334         104 :         ndr_print_uint32(ndr, "more_data", r->more_data);
    3335         104 :         ndr_print_uint32(ndr, "nc_object_count", r->nc_object_count);
    3336         104 :         ndr_print_uint32(ndr, "nc_linked_attributes_count", r->nc_linked_attributes_count);
    3337         104 :         ndr_print_uint32(ndr, "linked_attributes_count", r->linked_attributes_count);
    3338         104 :         ndr_print_ptr(ndr, "linked_attributes", r->linked_attributes);
    3339         104 :         ndr->depth++;
    3340         104 :         if (r->linked_attributes) {
    3341         104 :                 ndr->print(ndr, "%s: ARRAY(%d)", "linked_attributes", (int)r->linked_attributes_count);
    3342         104 :                 ndr->depth++;
    3343         286 :                 for (cntr_linked_attributes_1 = 0; cntr_linked_attributes_1 < (r->linked_attributes_count); cntr_linked_attributes_1++) {
    3344         182 :                         ndr_print_drsuapi_DsReplicaLinkedAttribute(ndr, "linked_attributes", &r->linked_attributes[cntr_linked_attributes_1]);
    3345             :                 }
    3346         104 :                 ndr->depth--;
    3347             :         }
    3348         104 :         ndr->depth--;
    3349         104 :         ndr_print_WERROR(ndr, "drs_error", r->drs_error);
    3350         104 :         ndr->depth--;
    3351             : }
    3352             : 
    3353       14576 : _PUBLIC_ size_t ndr_size_drsuapi_DsGetNCChangesCtr6(const struct drsuapi_DsGetNCChangesCtr6 *r, int flags)
    3354             : {
    3355       14576 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6);
    3356             : }
    3357             : 
    3358           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr1TS *r)
    3359             : {
    3360           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3361           0 :         if (ndr_flags & NDR_SCALARS) {
    3362           0 :                 NDR_CHECK(ndr_push_align(ndr, 1));
    3363             :                 {
    3364             :                         struct ndr_push *_ndr_ctr1;
    3365           0 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1));
    3366           0 :                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1));
    3367           0 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1));
    3368             :                 }
    3369           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    3370             :         }
    3371           0 :         if (ndr_flags & NDR_BUFFERS) {
    3372             :         }
    3373           0 :         return NDR_ERR_SUCCESS;
    3374             : }
    3375             : 
    3376           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr1TS *r)
    3377             : {
    3378           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3379           0 :         if (ndr_flags & NDR_SCALARS) {
    3380           0 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
    3381             :                 {
    3382             :                         struct ndr_pull *_ndr_ctr1;
    3383           0 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 0xFFFFFC01, -1));
    3384           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1, NDR_SCALARS|NDR_BUFFERS, &r->ctr1));
    3385           0 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 0xFFFFFC01, -1));
    3386             :                 }
    3387           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    3388             :         }
    3389           0 :         if (ndr_flags & NDR_BUFFERS) {
    3390             :         }
    3391           0 :         return NDR_ERR_SUCCESS;
    3392             : }
    3393             : 
    3394           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsGetNCChangesCtr1TS *r)
    3395             : {
    3396           0 :         ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, name, r);
    3397           0 : }
    3398             : 
    3399           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr1TS *r)
    3400             : {
    3401           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr1TS");
    3402           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3403           0 :         ndr->depth++;
    3404           0 :         ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", &r->ctr1);
    3405           0 :         ndr->depth--;
    3406             : }
    3407             : 
    3408           0 : _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6TS(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr6TS *r)
    3409             : {
    3410           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3411           0 :         if (ndr_flags & NDR_SCALARS) {
    3412           0 :                 NDR_CHECK(ndr_push_align(ndr, 1));
    3413             :                 {
    3414             :                         struct ndr_push *_ndr_ctr6;
    3415           0 :                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1));
    3416           0 :                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6));
    3417           0 :                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1));
    3418             :                 }
    3419           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
    3420             :         }
    3421           0 :         if (ndr_flags & NDR_BUFFERS) {
    3422             :         }
    3423           0 :         return NDR_ERR_SUCCESS;
    3424             : }
    3425             : 
    3426           0 : _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6TS(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr6TS *r)
    3427             : {
    3428           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3429           0 :         if (ndr_flags & NDR_SCALARS) {
    3430           0 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
    3431             :                 {
    3432             :                         struct ndr_pull *_ndr_ctr6;
    3433           0 :                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 0xFFFFFC01, -1));
    3434           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6, NDR_SCALARS|NDR_BUFFERS, &r->ctr6));
    3435           0 :                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 0xFFFFFC01, -1));
    3436             :                 }
    3437           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
    3438             :         }
    3439           0 :         if (ndr_flags & NDR_BUFFERS) {
    3440             :         }
    3441           0 :         return NDR_ERR_SUCCESS;
    3442             : }
    3443             : 
    3444           0 : static void ndr_print_flags_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, int unused, const struct drsuapi_DsGetNCChangesCtr6TS *r)
    3445             : {
    3446           0 :         ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, name, r);
    3447           0 : }
    3448             : 
    3449           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6TS(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr6TS *r)
    3450             : {
    3451           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr6TS");
    3452           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3453           0 :         ndr->depth++;
    3454           0 :         ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", &r->ctr6);
    3455           0 :         ndr->depth--;
    3456             : }
    3457             : 
    3458           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
    3459             : {
    3460             :         uint32_t _ptr_ts;
    3461           0 :         TALLOC_CTX *_mem_save_ts_0 = NULL;
    3462           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3463           0 :         if (ndr_flags & NDR_SCALARS) {
    3464           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3465           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
    3466           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
    3467           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
    3468           0 :                 if (_ptr_ts) {
    3469           0 :                         NDR_PULL_ALLOC(ndr, r->ts);
    3470             :                 } else {
    3471           0 :                         r->ts = NULL;
    3472             :                 }
    3473           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3474             :         }
    3475           0 :         if (ndr_flags & NDR_BUFFERS) {
    3476           0 :                 if (r->ts) {
    3477           0 :                         _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3478           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
    3479             :                         {
    3480             :                                 struct ndr_pull *_ndr_ts;
    3481           0 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
    3482             :                                 {
    3483             :                                         struct ndr_pull *_ndr_ts_compressed;
    3484           0 :                                         NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length, r->compressed_length));
    3485           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
    3486           0 :                                         NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
    3487             :                                 }
    3488           0 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
    3489             :                         }
    3490           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
    3491             :                 }
    3492             :         }
    3493           0 :         return NDR_ERR_SUCCESS;
    3494             : }
    3495             : 
    3496           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
    3497             : {
    3498           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr1");
    3499           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3500           0 :         ndr->depth++;
    3501           0 :         ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
    3502           0 :         ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
    3503           0 :         ndr_print_ptr(ndr, "ts", r->ts);
    3504           0 :         ndr->depth++;
    3505           0 :         if (r->ts) {
    3506           0 :                 ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts);
    3507             :         }
    3508           0 :         ndr->depth--;
    3509           0 :         ndr->depth--;
    3510             : }
    3511             : 
    3512           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
    3513             : {
    3514             :         uint32_t _ptr_ts;
    3515           0 :         TALLOC_CTX *_mem_save_ts_0 = NULL;
    3516           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3517           0 :         if (ndr_flags & NDR_SCALARS) {
    3518           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3519           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
    3520           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
    3521           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
    3522           0 :                 if (_ptr_ts) {
    3523           0 :                         NDR_PULL_ALLOC(ndr, r->ts);
    3524             :                 } else {
    3525           0 :                         r->ts = NULL;
    3526             :                 }
    3527           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3528             :         }
    3529           0 :         if (ndr_flags & NDR_BUFFERS) {
    3530           0 :                 if (r->ts) {
    3531           0 :                         _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3532           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
    3533             :                         {
    3534             :                                 struct ndr_pull *_ndr_ts;
    3535           0 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
    3536             :                                 {
    3537             :                                         struct ndr_pull *_ndr_ts_compressed;
    3538           0 :                                         NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length, r->compressed_length));
    3539           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
    3540           0 :                                         NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, r->decompressed_length));
    3541             :                                 }
    3542           0 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
    3543             :                         }
    3544           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
    3545             :                 }
    3546             :         }
    3547           0 :         return NDR_ERR_SUCCESS;
    3548             : }
    3549             : 
    3550           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
    3551             : {
    3552           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesMSZIPCtr6");
    3553           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3554           0 :         ndr->depth++;
    3555           0 :         ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
    3556           0 :         ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
    3557           0 :         ndr_print_ptr(ndr, "ts", r->ts);
    3558           0 :         ndr->depth++;
    3559           0 :         if (r->ts) {
    3560           0 :                 ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts);
    3561             :         }
    3562           0 :         ndr->depth--;
    3563           0 :         ndr->depth--;
    3564             : }
    3565             : 
    3566           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesXPRESSCtr1 *r)
    3567             : {
    3568             :         uint32_t _ptr_ts;
    3569           0 :         TALLOC_CTX *_mem_save_ts_0 = NULL;
    3570           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3571           0 :         if (ndr_flags & NDR_SCALARS) {
    3572           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3573           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
    3574           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
    3575           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
    3576           0 :                 if (_ptr_ts) {
    3577           0 :                         NDR_PULL_ALLOC(ndr, r->ts);
    3578             :                 } else {
    3579           0 :                         r->ts = NULL;
    3580             :                 }
    3581           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3582             :         }
    3583           0 :         if (ndr_flags & NDR_BUFFERS) {
    3584           0 :                 if (r->ts) {
    3585           0 :                         _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3586           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
    3587             :                         {
    3588             :                                 struct ndr_pull *_ndr_ts;
    3589           0 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
    3590             :                                 {
    3591             :                                         struct ndr_pull *_ndr_ts_compressed;
    3592           0 :                                         NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length, r->compressed_length));
    3593           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
    3594           0 :                                         NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
    3595             :                                 }
    3596           0 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
    3597             :                         }
    3598           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
    3599             :                 }
    3600             :         }
    3601           0 :         return NDR_ERR_SUCCESS;
    3602             : }
    3603             : 
    3604           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r)
    3605             : {
    3606           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesXPRESSCtr1");
    3607           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3608           0 :         ndr->depth++;
    3609           0 :         ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
    3610           0 :         ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
    3611           0 :         ndr_print_ptr(ndr, "ts", r->ts);
    3612           0 :         ndr->depth++;
    3613           0 :         if (r->ts) {
    3614           0 :                 ndr_print_drsuapi_DsGetNCChangesCtr1TS(ndr, "ts", r->ts);
    3615             :         }
    3616           0 :         ndr->depth--;
    3617           0 :         ndr->depth--;
    3618             : }
    3619             : 
    3620           2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesXPRESSCtr6 *r)
    3621             : {
    3622             :         uint32_t _ptr_ts;
    3623           2 :         TALLOC_CTX *_mem_save_ts_0 = NULL;
    3624           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3625           2 :         if (ndr_flags & NDR_SCALARS) {
    3626           1 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3627           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length));
    3628           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length));
    3629           1 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ts));
    3630           1 :                 if (_ptr_ts) {
    3631           1 :                         NDR_PULL_ALLOC(ndr, r->ts);
    3632             :                 } else {
    3633           0 :                         r->ts = NULL;
    3634             :                 }
    3635           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3636             :         }
    3637           2 :         if (ndr_flags & NDR_BUFFERS) {
    3638           1 :                 if (r->ts) {
    3639           1 :                         _mem_save_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3640           1 :                         NDR_PULL_SET_MEM_CTX(ndr, r->ts, 0);
    3641             :                         {
    3642             :                                 struct ndr_pull *_ndr_ts;
    3643           2 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ts, 4, r->compressed_length));
    3644             :                                 {
    3645             :                                         struct ndr_pull *_ndr_ts_compressed;
    3646           2 :                                         NDR_CHECK(ndr_pull_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length, r->compressed_length));
    3647           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
    3648           0 :                                         NDR_CHECK(ndr_pull_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length));
    3649             :                                 }
    3650           0 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ts, 4, r->compressed_length));
    3651             :                         }
    3652           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ts_0, 0);
    3653             :                 }
    3654             :         }
    3655           0 :         return NDR_ERR_SUCCESS;
    3656             : }
    3657             : 
    3658           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r)
    3659             : {
    3660           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesXPRESSCtr6");
    3661           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3662           0 :         ndr->depth++;
    3663           0 :         ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length);
    3664           0 :         ndr_print_uint32(ndr, "compressed_length", r->compressed_length);
    3665           0 :         ndr_print_ptr(ndr, "ts", r->ts);
    3666           0 :         ndr->depth++;
    3667           0 :         if (r->ts) {
    3668           0 :                 ndr_print_drsuapi_DsGetNCChangesCtr6TS(ndr, "ts", r->ts);
    3669             :         }
    3670           0 :         ndr->depth--;
    3671           0 :         ndr->depth--;
    3672             : }
    3673             : 
    3674           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCompressionType(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsGetNCChangesCompressionType r)
    3675             : {
    3676           0 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    3677           0 :         return NDR_ERR_SUCCESS;
    3678             : }
    3679             : 
    3680           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCompressionType(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsGetNCChangesCompressionType *r)
    3681             : {
    3682             :         uint16_t v;
    3683           1 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    3684           1 :         *r = v;
    3685           0 :         return NDR_ERR_SUCCESS;
    3686             : }
    3687             : 
    3688           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCompressionType(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetNCChangesCompressionType r)
    3689             : {
    3690           0 :         const char *val = NULL;
    3691             : 
    3692           0 :         switch (r) {
    3693           0 :                 case DRSUAPI_COMPRESSION_TYPE_MSZIP: val = "DRSUAPI_COMPRESSION_TYPE_MSZIP"; break;
    3694           0 :                 case DRSUAPI_COMPRESSION_TYPE_XPRESS: val = "DRSUAPI_COMPRESSION_TYPE_XPRESS"; break;
    3695             :         }
    3696           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    3697           0 : }
    3698             : 
    3699           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsGetNCChangesCompressedCtr *r)
    3700             : {
    3701             :         uint32_t level;
    3702             :         {
    3703           0 :                 uint32_t _flags_save_UNION = ndr->flags;
    3704           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    3705           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3706           0 :                 if (ndr_flags & NDR_SCALARS) {
    3707             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3708           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3709           0 :                         NDR_CHECK(ndr_push_union_align(ndr, 5));
    3710           0 :                         switch (level) {
    3711           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
    3712           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
    3713           0 :                                 break; }
    3714             : 
    3715           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
    3716           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_SCALARS, &r->mszip6));
    3717           0 :                                 break; }
    3718             : 
    3719           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16): {
    3720           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(ndr, NDR_SCALARS, &r->xpress1));
    3721           0 :                                 break; }
    3722             : 
    3723           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16): {
    3724           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(ndr, NDR_SCALARS, &r->xpress6));
    3725           0 :                                 break; }
    3726             : 
    3727           0 :                                 default:
    3728           0 :                                         return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    3729             :                         }
    3730           0 :                 }
    3731           0 :                 if (ndr_flags & NDR_BUFFERS) {
    3732           0 :                         if (!(ndr_flags & NDR_SCALARS)) {
    3733             :                                 /* We didn't get it above, and the token is not needed after this. */
    3734           0 :                                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3735             :                         }
    3736           0 :                         switch (level) {
    3737           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3738           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
    3739           0 :                                 break;
    3740             : 
    3741           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3742           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_BUFFERS, &r->mszip6));
    3743           0 :                                 break;
    3744             : 
    3745           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
    3746           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(ndr, NDR_BUFFERS, &r->xpress1));
    3747           0 :                                 break;
    3748             : 
    3749           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
    3750           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(ndr, NDR_BUFFERS, &r->xpress6));
    3751           0 :                                 break;
    3752             : 
    3753           0 :                                 default:
    3754           0 :                                         return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    3755             :                         }
    3756           0 :                 }
    3757           0 :                 ndr->flags = _flags_save_UNION;
    3758             :         }
    3759           0 :         return NDR_ERR_SUCCESS;
    3760             : }
    3761             : 
    3762           2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsGetNCChangesCompressedCtr *r)
    3763             : {
    3764             :         uint32_t level;
    3765             :         {
    3766           2 :                 uint32_t _flags_save_UNION = ndr->flags;
    3767           2 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    3768           2 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3769           2 :                 if (ndr_flags & NDR_SCALARS) {
    3770             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3771           1 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3772           1 :                         NDR_CHECK(ndr_pull_union_align(ndr, 5));
    3773           1 :                         switch (level) {
    3774           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
    3775           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
    3776           0 :                                 break; }
    3777             : 
    3778           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16): {
    3779           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_SCALARS, &r->mszip6));
    3780           0 :                                 break; }
    3781             : 
    3782           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16): {
    3783           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(ndr, NDR_SCALARS, &r->xpress1));
    3784           0 :                                 break; }
    3785             : 
    3786           1 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16): {
    3787           1 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(ndr, NDR_SCALARS, &r->xpress6));
    3788           0 :                                 break; }
    3789             : 
    3790           0 :                                 default:
    3791           0 :                                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    3792             :                         }
    3793           1 :                 }
    3794           2 :                 if (ndr_flags & NDR_BUFFERS) {
    3795           1 :                         if (!(ndr_flags & NDR_SCALARS)) {
    3796             :                                 /* We didn't get it above, and the token is not needed after this. */
    3797           1 :                                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3798             :                         }
    3799           1 :                         switch (level) {
    3800           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3801           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
    3802           0 :                                 break;
    3803             : 
    3804           0 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3805           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, NDR_BUFFERS, &r->mszip6));
    3806           0 :                                 break;
    3807             : 
    3808           0 :                                 case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
    3809           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(ndr, NDR_BUFFERS, &r->xpress1));
    3810           0 :                                 break;
    3811             : 
    3812           1 :                                 case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
    3813           1 :                                         NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(ndr, NDR_BUFFERS, &r->xpress6));
    3814           0 :                                 break;
    3815             : 
    3816           0 :                                 default:
    3817           0 :                                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    3818             :                         }
    3819           1 :                 }
    3820           1 :                 ndr->flags = _flags_save_UNION;
    3821             :         }
    3822           1 :         return NDR_ERR_SUCCESS;
    3823             : }
    3824             : 
    3825           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCompressedCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCompressedCtr *r)
    3826             : {
    3827             :         uint32_t level;
    3828             :         {
    3829           0 :                 uint32_t _flags_save_UNION = ndr->flags;
    3830           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    3831           0 :                 level = ndr_print_steal_switch_value(ndr, r);
    3832           0 :                 ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesCompressedCtr");
    3833           0 :                 switch (level) {
    3834           0 :                         case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3835           0 :                                 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, "mszip1", &r->mszip1);
    3836           0 :                         break;
    3837             : 
    3838           0 :                         case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
    3839           0 :                                 ndr_print_drsuapi_DsGetNCChangesMSZIPCtr6(ndr, "mszip6", &r->mszip6);
    3840           0 :                         break;
    3841             : 
    3842           0 :                         case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
    3843           0 :                                 ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(ndr, "xpress1", &r->xpress1);
    3844           0 :                         break;
    3845             : 
    3846           0 :                         case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
    3847           0 :                                 ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(ndr, "xpress6", &r->xpress6);
    3848           0 :                         break;
    3849             : 
    3850           0 :                         default:
    3851           0 :                                 ndr_print_bad_level(ndr, name, level);
    3852             :                 }
    3853           0 :                 ndr->flags = _flags_save_UNION;
    3854             :         }
    3855           0 : }
    3856             : 
    3857           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr2(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr2 *r)
    3858             : {
    3859           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3860           0 :         if (ndr_flags & NDR_SCALARS) {
    3861           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3862           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
    3863           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3864             :         }
    3865           0 :         if (ndr_flags & NDR_BUFFERS) {
    3866           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
    3867             :         }
    3868           0 :         return NDR_ERR_SUCCESS;
    3869             : }
    3870             : 
    3871           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr2(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr2 *r)
    3872             : {
    3873           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3874           0 :         if (ndr_flags & NDR_SCALARS) {
    3875           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3876           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_SCALARS, &r->mszip1));
    3877           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3878             :         }
    3879           0 :         if (ndr_flags & NDR_BUFFERS) {
    3880           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, NDR_BUFFERS, &r->mszip1));
    3881             :         }
    3882           0 :         return NDR_ERR_SUCCESS;
    3883             : }
    3884             : 
    3885           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr2 *r)
    3886             : {
    3887           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr2");
    3888           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3889           0 :         ndr->depth++;
    3890           0 :         ndr_print_drsuapi_DsGetNCChangesMSZIPCtr1(ndr, "mszip1", &r->mszip1);
    3891           0 :         ndr->depth--;
    3892             : }
    3893             : 
    3894           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr7(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesCtr7 *r)
    3895             : {
    3896           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3897           0 :         if (ndr_flags & NDR_SCALARS) {
    3898           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3899           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
    3900           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressionType(ndr, NDR_SCALARS, r->type));
    3901           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
    3902           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr));
    3903           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3904             :         }
    3905           0 :         if (ndr_flags & NDR_BUFFERS) {
    3906           0 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
    3907           0 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr));
    3908             :         }
    3909           0 :         return NDR_ERR_SUCCESS;
    3910             : }
    3911             : 
    3912           2 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr7(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesCtr7 *r)
    3913             : {
    3914           2 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3915           2 :         if (ndr_flags & NDR_SCALARS) {
    3916           1 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3917           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
    3918           1 :                 if (r->level > 6) {
    3919           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    3920             :                 }
    3921           2 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressionType(ndr, NDR_SCALARS, &r->type));
    3922           1 :                 if (r->type < 2 || r->type > 3) {
    3923           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    3924             :                 }
    3925           1 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
    3926           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_SCALARS, &r->ctr));
    3927           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3928             :         }
    3929           2 :         if (ndr_flags & NDR_BUFFERS) {
    3930           1 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16)));
    3931           1 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCompressedCtr(ndr, NDR_BUFFERS, &r->ctr));
    3932             :         }
    3933           0 :         return NDR_ERR_SUCCESS;
    3934             : }
    3935             : 
    3936           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr7(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesCtr7 *r)
    3937             : {
    3938           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNCChangesCtr7");
    3939           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3940           0 :         ndr->depth++;
    3941           0 :         ndr_print_uint32(ndr, "level", r->level);
    3942           0 :         ndr_print_drsuapi_DsGetNCChangesCompressionType(ndr, "type", r->type);
    3943           0 :         ndr_print_set_switch_value(ndr, &r->ctr, r->level | (r->type << 16));
    3944           0 :         ndr_print_drsuapi_DsGetNCChangesCompressedCtr(ndr, "ctr", &r->ctr);
    3945           0 :         ndr->depth--;
    3946             : }
    3947             : 
    3948        7288 : static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsGetNCChangesCtr *r)
    3949             : {
    3950             :         uint32_t level;
    3951        7288 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3952        7288 :         if (ndr_flags & NDR_SCALARS) {
    3953             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3954        7288 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3955        7288 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    3956        7288 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    3957        7288 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    3958        7288 :                 switch (level) {
    3959           0 :                         case 1: {
    3960           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr, NDR_SCALARS, &r->ctr1));
    3961           0 :                         break; }
    3962             : 
    3963           0 :                         case 2: {
    3964           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr, NDR_SCALARS, &r->ctr2));
    3965           0 :                         break; }
    3966             : 
    3967        7288 :                         case 6: {
    3968        7288 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr, NDR_SCALARS, &r->ctr6));
    3969        7288 :                         break; }
    3970             : 
    3971           0 :                         case 7: {
    3972           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr, NDR_SCALARS, &r->ctr7));
    3973           0 :                         break; }
    3974             : 
    3975           0 :                         default:
    3976           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    3977             :                 }
    3978           0 :         }
    3979        7288 :         if (ndr_flags & NDR_BUFFERS) {
    3980        7288 :                 if (!(ndr_flags & NDR_SCALARS)) {
    3981             :                         /* We didn't get it above, and the token is not needed after this. */
    3982           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3983             :                 }
    3984        7288 :                 switch (level) {
    3985           0 :                         case 1:
    3986           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    3987           0 :                         break;
    3988             : 
    3989           0 :                         case 2:
    3990           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr2(ndr, NDR_BUFFERS, &r->ctr2));
    3991           0 :                         break;
    3992             : 
    3993        7288 :                         case 6:
    3994        7288 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(ndr, NDR_BUFFERS, &r->ctr6));
    3995        7288 :                         break;
    3996             : 
    3997           0 :                         case 7:
    3998           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr7(ndr, NDR_BUFFERS, &r->ctr7));
    3999           0 :                         break;
    4000             : 
    4001           0 :                         default:
    4002           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4003             :                 }
    4004           0 :         }
    4005        7288 :         return NDR_ERR_SUCCESS;
    4006             : }
    4007             : 
    4008        7268 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsGetNCChangesCtr *r)
    4009             : {
    4010             :         uint32_t level;
    4011             :         uint32_t _level;
    4012        7268 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4013        7268 :         if (ndr_flags & NDR_SCALARS) {
    4014             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4015        7268 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4016        7268 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    4017        7268 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4018        7268 :                 if (_level != level) {
    4019           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    4020             :                 }
    4021        7268 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    4022        7268 :                 switch (level) {
    4023           1 :                         case 1: {
    4024           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr, NDR_SCALARS, &r->ctr1));
    4025           0 :                         break; }
    4026             : 
    4027           0 :                         case 2: {
    4028           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr, NDR_SCALARS, &r->ctr2));
    4029           0 :                         break; }
    4030             : 
    4031        7266 :                         case 6: {
    4032        7266 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr, NDR_SCALARS, &r->ctr6));
    4033        7266 :                         break; }
    4034             : 
    4035           1 :                         case 7: {
    4036           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr, NDR_SCALARS, &r->ctr7));
    4037           0 :                         break; }
    4038             : 
    4039           0 :                         default:
    4040           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4041             :                 }
    4042           0 :         }
    4043        7268 :         if (ndr_flags & NDR_BUFFERS) {
    4044        7268 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4045             :                         /* We didn't get it above, and the token is not needed after this. */
    4046           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4047             :                 }
    4048        7268 :                 switch (level) {
    4049           1 :                         case 1:
    4050           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    4051           0 :                         break;
    4052             : 
    4053           0 :                         case 2:
    4054           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr2(ndr, NDR_BUFFERS, &r->ctr2));
    4055           0 :                         break;
    4056             : 
    4057        7266 :                         case 6:
    4058        7266 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(ndr, NDR_BUFFERS, &r->ctr6));
    4059        7266 :                         break;
    4060             : 
    4061           1 :                         case 7:
    4062           1 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr7(ndr, NDR_BUFFERS, &r->ctr7));
    4063           0 :                         break;
    4064             : 
    4065           0 :                         default:
    4066           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4067             :                 }
    4068           0 :         }
    4069        7266 :         return NDR_ERR_SUCCESS;
    4070             : }
    4071             : 
    4072         105 : _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesCtr *r)
    4073             : {
    4074             :         uint32_t level;
    4075         105 :         level = ndr_print_steal_switch_value(ndr, r);
    4076         105 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetNCChangesCtr");
    4077         105 :         switch (level) {
    4078           1 :                 case 1:
    4079           1 :                         ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", &r->ctr1);
    4080           1 :                 break;
    4081             : 
    4082           0 :                 case 2:
    4083           0 :                         ndr_print_drsuapi_DsGetNCChangesCtr2(ndr, "ctr2", &r->ctr2);
    4084           0 :                 break;
    4085             : 
    4086         104 :                 case 6:
    4087         104 :                         ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", &r->ctr6);
    4088         104 :                 break;
    4089             : 
    4090           0 :                 case 7:
    4091           0 :                         ndr_print_drsuapi_DsGetNCChangesCtr7(ndr, "ctr7", &r->ctr7);
    4092           0 :                 break;
    4093             : 
    4094           0 :                 default:
    4095           0 :                         ndr_print_bad_level(ndr, name, level);
    4096             :         }
    4097         105 : }
    4098             : 
    4099        3880 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
    4100             : {
    4101        3880 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4102        3880 :         if (ndr_flags & NDR_SCALARS) {
    4103        1940 :                 if (r->naming_context == NULL) {
    4104           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4105             :                 }
    4106        1940 :                 if (r->dest_dsa_dns_name == NULL) {
    4107           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4108             :                 }
    4109        1940 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4110        1940 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4111        1940 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->dest_dsa_dns_name */
    4112        1940 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->dest_dsa_guid));
    4113        1940 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4114        1940 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4115             :         }
    4116        3880 :         if (ndr_flags & NDR_BUFFERS) {
    4117        1940 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4118        1940 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dest_dsa_dns_name, CH_DOS)));
    4119        1940 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4120        1940 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dest_dsa_dns_name, CH_DOS)));
    4121        1940 :                 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));
    4122             :         }
    4123        3880 :         return NDR_ERR_SUCCESS;
    4124             : }
    4125             : 
    4126        3880 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
    4127             : {
    4128             :         uint32_t _ptr_naming_context;
    4129        3880 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4130             :         uint32_t _ptr_dest_dsa_dns_name;
    4131        3880 :         uint32_t size_dest_dsa_dns_name_1 = 0;
    4132        3880 :         uint32_t length_dest_dsa_dns_name_1 = 0;
    4133        3880 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4134        3880 :         if (ndr_flags & NDR_SCALARS) {
    4135        1940 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4136        1940 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4137        1940 :                 if (_ptr_naming_context) {
    4138        1940 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4139             :                 } else {
    4140           0 :                         r->naming_context = NULL;
    4141             :                 }
    4142        1940 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_dest_dsa_dns_name));
    4143        1940 :                 if (_ptr_dest_dsa_dns_name) {
    4144        1940 :                         NDR_PULL_ALLOC(ndr, r->dest_dsa_dns_name);
    4145             :                 } else {
    4146           0 :                         r->dest_dsa_dns_name = NULL;
    4147             :                 }
    4148        1940 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->dest_dsa_guid));
    4149        1940 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4150        1940 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4151             :         }
    4152        3880 :         if (ndr_flags & NDR_BUFFERS) {
    4153        1940 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4154        1940 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4155        1940 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4156        1940 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4157        1940 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->dest_dsa_dns_name));
    4158        1940 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->dest_dsa_dns_name));
    4159        1940 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dest_dsa_dns_name, &size_dest_dsa_dns_name_1));
    4160        1940 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dest_dsa_dns_name, &length_dest_dsa_dns_name_1));
    4161        1940 :                 if (length_dest_dsa_dns_name_1 > size_dest_dsa_dns_name_1) {
    4162           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dest_dsa_dns_name_1, length_dest_dsa_dns_name_1);
    4163             :                 }
    4164        1940 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_dest_dsa_dns_name_1, sizeof(uint8_t)));
    4165        1940 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dest_dsa_dns_name, length_dest_dsa_dns_name_1, sizeof(uint8_t), CH_DOS));
    4166             :         }
    4167        3880 :         return NDR_ERR_SUCCESS;
    4168             : }
    4169             : 
    4170           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaUpdateRefsRequest1 *r)
    4171             : {
    4172           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaUpdateRefsRequest1");
    4173           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4174           0 :         ndr->depth++;
    4175           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4176           0 :         ndr->depth++;
    4177           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4178           0 :         ndr->depth--;
    4179           0 :         ndr_print_ptr(ndr, "dest_dsa_dns_name", r->dest_dsa_dns_name);
    4180           0 :         ndr->depth++;
    4181           0 :         ndr_print_string(ndr, "dest_dsa_dns_name", r->dest_dsa_dns_name);
    4182           0 :         ndr->depth--;
    4183           0 :         ndr_print_GUID(ndr, "dest_dsa_guid", &r->dest_dsa_guid);
    4184           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4185           0 :         ndr->depth--;
    4186             : }
    4187             : 
    4188        1940 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsReplicaUpdateRefsRequest *r)
    4189             : {
    4190             :         uint32_t level;
    4191        1940 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4192        1940 :         if (ndr_flags & NDR_SCALARS) {
    4193             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4194        1940 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4195        1940 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4196        1940 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    4197        1940 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4198        1940 :                 switch (level) {
    4199        1940 :                         case 1: {
    4200        1940 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_SCALARS, &r->req1));
    4201        1940 :                         break; }
    4202             : 
    4203           0 :                         default:
    4204           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4205             :                 }
    4206           0 :         }
    4207        1940 :         if (ndr_flags & NDR_BUFFERS) {
    4208        1940 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4209             :                         /* We didn't get it above, and the token is not needed after this. */
    4210           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4211             :                 }
    4212        1940 :                 switch (level) {
    4213        1940 :                         case 1:
    4214        1940 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_BUFFERS, &r->req1));
    4215        1940 :                         break;
    4216             : 
    4217           0 :                         default:
    4218           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4219             :                 }
    4220           0 :         }
    4221        1940 :         return NDR_ERR_SUCCESS;
    4222             : }
    4223             : 
    4224        1940 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsReplicaUpdateRefsRequest *r)
    4225             : {
    4226             :         uint32_t level;
    4227             :         uint32_t _level;
    4228        1940 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4229        1940 :         if (ndr_flags & NDR_SCALARS) {
    4230             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4231        1940 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4232        1940 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4233        1940 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4234        1940 :                 if (_level != level) {
    4235           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    4236             :                 }
    4237        1940 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4238        1940 :                 switch (level) {
    4239        1940 :                         case 1: {
    4240        1940 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_SCALARS, &r->req1));
    4241        1940 :                         break; }
    4242             : 
    4243           0 :                         default:
    4244           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4245             :                 }
    4246           0 :         }
    4247        1940 :         if (ndr_flags & NDR_BUFFERS) {
    4248        1940 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4249             :                         /* We didn't get it above, and the token is not needed after this. */
    4250           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4251             :                 }
    4252        1940 :                 switch (level) {
    4253        1940 :                         case 1:
    4254        1940 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaUpdateRefsRequest1(ndr, NDR_BUFFERS, &r->req1));
    4255        1940 :                         break;
    4256             : 
    4257           0 :                         default:
    4258           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4259             :                 }
    4260           0 :         }
    4261        1940 :         return NDR_ERR_SUCCESS;
    4262             : }
    4263             : 
    4264           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaUpdateRefsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaUpdateRefsRequest *r)
    4265             : {
    4266             :         uint32_t level;
    4267           0 :         level = ndr_print_steal_switch_value(ndr, r);
    4268           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaUpdateRefsRequest");
    4269           0 :         switch (level) {
    4270           0 :                 case 1:
    4271           0 :                         ndr_print_drsuapi_DsReplicaUpdateRefsRequest1(ndr, "req1", &r->req1);
    4272           0 :                 break;
    4273             : 
    4274           0 :                 default:
    4275           0 :                         ndr_print_bad_level(ndr, name, level);
    4276             :         }
    4277           0 : }
    4278             : 
    4279           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAddRequest1 *r)
    4280             : {
    4281           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4282           0 :         if (ndr_flags & NDR_SCALARS) {
    4283           0 :                 if (r->naming_context == NULL) {
    4284           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4285             :                 }
    4286           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4287           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4288           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
    4289           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
    4290           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4291           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4292             :         }
    4293           0 :         if (ndr_flags & NDR_BUFFERS) {
    4294           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4295           0 :                 if (r->source_dsa_address) {
    4296           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
    4297           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4298           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
    4299           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));
    4300             :                 }
    4301             :         }
    4302           0 :         return NDR_ERR_SUCCESS;
    4303             : }
    4304             : 
    4305           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAddRequest1 *r)
    4306             : {
    4307             :         uint32_t _ptr_naming_context;
    4308           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4309             :         uint32_t _ptr_source_dsa_address;
    4310           0 :         uint32_t size_source_dsa_address_1 = 0;
    4311           0 :         uint32_t length_source_dsa_address_1 = 0;
    4312           0 :         TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
    4313           0 :         uint32_t size_schedule_0 = 0;
    4314           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4315           0 :         if (ndr_flags & NDR_SCALARS) {
    4316           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4317           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4318           0 :                 if (_ptr_naming_context) {
    4319           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4320             :                 } else {
    4321           0 :                         r->naming_context = NULL;
    4322             :                 }
    4323           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
    4324           0 :                 if (_ptr_source_dsa_address) {
    4325           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_address);
    4326             :                 } else {
    4327           0 :                         r->source_dsa_address = NULL;
    4328             :                 }
    4329           0 :                 size_schedule_0 = 84;
    4330           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
    4331           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4332           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4333             :         }
    4334           0 :         if (ndr_flags & NDR_BUFFERS) {
    4335           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4336           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4337           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4338           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4339           0 :                 if (r->source_dsa_address) {
    4340           0 :                         _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4341           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
    4342           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
    4343           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
    4344           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
    4345           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
    4346           0 :                         if (length_source_dsa_address_1 > size_source_dsa_address_1) {
    4347           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_source_dsa_address_1, length_source_dsa_address_1);
    4348             :                         }
    4349           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint16_t)));
    4350           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint16_t), CH_UTF16));
    4351           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
    4352             :                 }
    4353             :         }
    4354           0 :         return NDR_ERR_SUCCESS;
    4355             : }
    4356             : 
    4357           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest1 *r)
    4358             : {
    4359           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAddRequest1");
    4360           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4361           0 :         ndr->depth++;
    4362           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4363           0 :         ndr->depth++;
    4364           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4365           0 :         ndr->depth--;
    4366           0 :         ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
    4367           0 :         ndr->depth++;
    4368           0 :         if (r->source_dsa_address) {
    4369           0 :                 ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
    4370             :         }
    4371           0 :         ndr->depth--;
    4372           0 :         ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
    4373           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4374           0 :         ndr->depth--;
    4375             : }
    4376             : 
    4377           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest2(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaAddRequest2 *r)
    4378             : {
    4379           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4380           0 :         if (ndr_flags & NDR_SCALARS) {
    4381           0 :                 if (r->naming_context == NULL) {
    4382           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4383             :                 }
    4384           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4385           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4386           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_dn));
    4387           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport_dn));
    4388           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
    4389           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
    4390           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4391           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4392             :         }
    4393           0 :         if (ndr_flags & NDR_BUFFERS) {
    4394           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4395           0 :                 if (r->source_dsa_dn) {
    4396           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->source_dsa_dn));
    4397             :                 }
    4398           0 :                 if (r->transport_dn) {
    4399           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->transport_dn));
    4400             :                 }
    4401           0 :                 if (r->source_dsa_address) {
    4402           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
    4403           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4404           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF16)));
    4405           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));
    4406             :                 }
    4407             :         }
    4408           0 :         return NDR_ERR_SUCCESS;
    4409             : }
    4410             : 
    4411           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest2(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAddRequest2 *r)
    4412             : {
    4413             :         uint32_t _ptr_naming_context;
    4414           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4415             :         uint32_t _ptr_source_dsa_dn;
    4416           0 :         TALLOC_CTX *_mem_save_source_dsa_dn_0 = NULL;
    4417             :         uint32_t _ptr_transport_dn;
    4418           0 :         TALLOC_CTX *_mem_save_transport_dn_0 = NULL;
    4419             :         uint32_t _ptr_source_dsa_address;
    4420           0 :         uint32_t size_source_dsa_address_1 = 0;
    4421           0 :         uint32_t length_source_dsa_address_1 = 0;
    4422           0 :         TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
    4423           0 :         uint32_t size_schedule_0 = 0;
    4424           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4425           0 :         if (ndr_flags & NDR_SCALARS) {
    4426           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4427           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4428           0 :                 if (_ptr_naming_context) {
    4429           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4430             :                 } else {
    4431           0 :                         r->naming_context = NULL;
    4432             :                 }
    4433           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_dn));
    4434           0 :                 if (_ptr_source_dsa_dn) {
    4435           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_dn);
    4436             :                 } else {
    4437           0 :                         r->source_dsa_dn = NULL;
    4438             :                 }
    4439           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport_dn));
    4440           0 :                 if (_ptr_transport_dn) {
    4441           0 :                         NDR_PULL_ALLOC(ndr, r->transport_dn);
    4442             :                 } else {
    4443           0 :                         r->transport_dn = NULL;
    4444             :                 }
    4445           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
    4446           0 :                 if (_ptr_source_dsa_address) {
    4447           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_address);
    4448             :                 } else {
    4449           0 :                         r->source_dsa_address = NULL;
    4450             :                 }
    4451           0 :                 size_schedule_0 = 84;
    4452           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
    4453           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4454           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4455             :         }
    4456           0 :         if (ndr_flags & NDR_BUFFERS) {
    4457           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4458           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4459           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4460           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4461           0 :                 if (r->source_dsa_dn) {
    4462           0 :                         _mem_save_source_dsa_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4463           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_dn, 0);
    4464           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->source_dsa_dn));
    4465           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_dn_0, 0);
    4466             :                 }
    4467           0 :                 if (r->transport_dn) {
    4468           0 :                         _mem_save_transport_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4469           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->transport_dn, 0);
    4470           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->transport_dn));
    4471           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_dn_0, 0);
    4472             :                 }
    4473           0 :                 if (r->source_dsa_address) {
    4474           0 :                         _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4475           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
    4476           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
    4477           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
    4478           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
    4479           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
    4480           0 :                         if (length_source_dsa_address_1 > size_source_dsa_address_1) {
    4481           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_source_dsa_address_1, length_source_dsa_address_1);
    4482             :                         }
    4483           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint16_t)));
    4484           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint16_t), CH_UTF16));
    4485           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
    4486             :                 }
    4487             :         }
    4488           0 :         return NDR_ERR_SUCCESS;
    4489             : }
    4490             : 
    4491           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest2(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAddRequest2 *r)
    4492             : {
    4493           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaAddRequest2");
    4494           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4495           0 :         ndr->depth++;
    4496           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4497           0 :         ndr->depth++;
    4498           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4499           0 :         ndr->depth--;
    4500           0 :         ndr_print_ptr(ndr, "source_dsa_dn", r->source_dsa_dn);
    4501           0 :         ndr->depth++;
    4502           0 :         if (r->source_dsa_dn) {
    4503           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "source_dsa_dn", r->source_dsa_dn);
    4504             :         }
    4505           0 :         ndr->depth--;
    4506           0 :         ndr_print_ptr(ndr, "transport_dn", r->transport_dn);
    4507           0 :         ndr->depth++;
    4508           0 :         if (r->transport_dn) {
    4509           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "transport_dn", r->transport_dn);
    4510             :         }
    4511           0 :         ndr->depth--;
    4512           0 :         ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
    4513           0 :         ndr->depth++;
    4514           0 :         if (r->source_dsa_address) {
    4515           0 :                 ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
    4516             :         }
    4517           0 :         ndr->depth--;
    4518           0 :         ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
    4519           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4520           0 :         ndr->depth--;
    4521             : }
    4522             : 
    4523           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaAddRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsReplicaAddRequest *r)
    4524             : {
    4525             :         uint32_t level;
    4526           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4527           0 :         if (ndr_flags & NDR_SCALARS) {
    4528             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4529           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4530           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4531           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    4532           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4533           0 :                 switch (level) {
    4534           0 :                         case 1: {
    4535           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1));
    4536           0 :                         break; }
    4537             : 
    4538           0 :                         case 2: {
    4539           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr, NDR_SCALARS, &r->req2));
    4540           0 :                         break; }
    4541             : 
    4542           0 :                         default:
    4543           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4544             :                 }
    4545           0 :         }
    4546           0 :         if (ndr_flags & NDR_BUFFERS) {
    4547           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4548             :                         /* We didn't get it above, and the token is not needed after this. */
    4549           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4550             :                 }
    4551           0 :                 switch (level) {
    4552           0 :                         case 1:
    4553           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest1(ndr, NDR_BUFFERS, &r->req1));
    4554           0 :                         break;
    4555             : 
    4556           0 :                         case 2:
    4557           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaAddRequest2(ndr, NDR_BUFFERS, &r->req2));
    4558           0 :                         break;
    4559             : 
    4560           0 :                         default:
    4561           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4562             :                 }
    4563           0 :         }
    4564           0 :         return NDR_ERR_SUCCESS;
    4565             : }
    4566             : 
    4567           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAddRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsReplicaAddRequest *r)
    4568             : {
    4569             :         uint32_t level;
    4570             :         uint32_t _level;
    4571           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4572           0 :         if (ndr_flags & NDR_SCALARS) {
    4573             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4574           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4575           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4576           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4577           0 :                 if (_level != level) {
    4578           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    4579             :                 }
    4580           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4581           0 :                 switch (level) {
    4582           0 :                         case 1: {
    4583           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_SCALARS, &r->req1));
    4584           0 :                         break; }
    4585             : 
    4586           0 :                         case 2: {
    4587           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr, NDR_SCALARS, &r->req2));
    4588           0 :                         break; }
    4589             : 
    4590           0 :                         default:
    4591           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4592             :                 }
    4593           0 :         }
    4594           0 :         if (ndr_flags & NDR_BUFFERS) {
    4595           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4596             :                         /* We didn't get it above, and the token is not needed after this. */
    4597           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4598             :                 }
    4599           0 :                 switch (level) {
    4600           0 :                         case 1:
    4601           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest1(ndr, NDR_BUFFERS, &r->req1));
    4602           0 :                         break;
    4603             : 
    4604           0 :                         case 2:
    4605           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaAddRequest2(ndr, NDR_BUFFERS, &r->req2));
    4606           0 :                         break;
    4607             : 
    4608           0 :                         default:
    4609           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4610             :                 }
    4611           0 :         }
    4612           0 :         return NDR_ERR_SUCCESS;
    4613             : }
    4614             : 
    4615           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaAddRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaAddRequest *r)
    4616             : {
    4617             :         uint32_t level;
    4618           0 :         level = ndr_print_steal_switch_value(ndr, r);
    4619           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaAddRequest");
    4620           0 :         switch (level) {
    4621           0 :                 case 1:
    4622           0 :                         ndr_print_drsuapi_DsReplicaAddRequest1(ndr, "req1", &r->req1);
    4623           0 :                 break;
    4624             : 
    4625           0 :                 case 2:
    4626           0 :                         ndr_print_drsuapi_DsReplicaAddRequest2(ndr, "req2", &r->req2);
    4627           0 :                 break;
    4628             : 
    4629           0 :                 default:
    4630           0 :                         ndr_print_bad_level(ndr, name, level);
    4631             :         }
    4632           0 : }
    4633             : 
    4634           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaDelRequest1 *r)
    4635             : {
    4636           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4637           0 :         if (ndr_flags & NDR_SCALARS) {
    4638           0 :                 if (r->naming_context == NULL) {
    4639           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4640             :                 }
    4641           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4642           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4643           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dsa_address));
    4644           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4645           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4646             :         }
    4647           0 :         if (ndr_flags & NDR_BUFFERS) {
    4648           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4649           0 :                 if (r->source_dsa_address) {
    4650           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF8)));
    4651           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4652           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dsa_address, CH_UTF8)));
    4653           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));
    4654             :                 }
    4655             :         }
    4656           0 :         return NDR_ERR_SUCCESS;
    4657             : }
    4658             : 
    4659           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaDelRequest1 *r)
    4660             : {
    4661             :         uint32_t _ptr_naming_context;
    4662           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4663             :         uint32_t _ptr_source_dsa_address;
    4664           0 :         uint32_t size_source_dsa_address_1 = 0;
    4665           0 :         uint32_t length_source_dsa_address_1 = 0;
    4666           0 :         TALLOC_CTX *_mem_save_source_dsa_address_0 = NULL;
    4667           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4668           0 :         if (ndr_flags & NDR_SCALARS) {
    4669           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4670           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4671           0 :                 if (_ptr_naming_context) {
    4672           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4673             :                 } else {
    4674           0 :                         r->naming_context = NULL;
    4675             :                 }
    4676           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dsa_address));
    4677           0 :                 if (_ptr_source_dsa_address) {
    4678           0 :                         NDR_PULL_ALLOC(ndr, r->source_dsa_address);
    4679             :                 } else {
    4680           0 :                         r->source_dsa_address = NULL;
    4681             :                 }
    4682           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4683           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4684             :         }
    4685           0 :         if (ndr_flags & NDR_BUFFERS) {
    4686           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4687           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4688           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4689           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4690           0 :                 if (r->source_dsa_address) {
    4691           0 :                         _mem_save_source_dsa_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4692           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dsa_address, 0);
    4693           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dsa_address));
    4694           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dsa_address));
    4695           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dsa_address, &size_source_dsa_address_1));
    4696           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dsa_address, &length_source_dsa_address_1));
    4697           0 :                         if (length_source_dsa_address_1 > size_source_dsa_address_1) {
    4698           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_source_dsa_address_1, length_source_dsa_address_1);
    4699             :                         }
    4700           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dsa_address_1, sizeof(uint8_t)));
    4701           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dsa_address, length_source_dsa_address_1, sizeof(uint8_t), CH_UTF8));
    4702           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dsa_address_0, 0);
    4703             :                 }
    4704             :         }
    4705           0 :         return NDR_ERR_SUCCESS;
    4706             : }
    4707             : 
    4708           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaDelRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaDelRequest1 *r)
    4709             : {
    4710           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaDelRequest1");
    4711           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4712           0 :         ndr->depth++;
    4713           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4714           0 :         ndr->depth++;
    4715           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4716           0 :         ndr->depth--;
    4717           0 :         ndr_print_ptr(ndr, "source_dsa_address", r->source_dsa_address);
    4718           0 :         ndr->depth++;
    4719           0 :         if (r->source_dsa_address) {
    4720           0 :                 ndr_print_string(ndr, "source_dsa_address", r->source_dsa_address);
    4721             :         }
    4722           0 :         ndr->depth--;
    4723           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4724           0 :         ndr->depth--;
    4725             : }
    4726             : 
    4727           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaDelRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsReplicaDelRequest *r)
    4728             : {
    4729             :         uint32_t level;
    4730           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4731           0 :         if (ndr_flags & NDR_SCALARS) {
    4732             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4733           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4734           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4735           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    4736           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4737           0 :                 switch (level) {
    4738           0 :                         case 1: {
    4739           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1));
    4740           0 :                         break; }
    4741             : 
    4742           0 :                         default:
    4743           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4744             :                 }
    4745           0 :         }
    4746           0 :         if (ndr_flags & NDR_BUFFERS) {
    4747           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4748             :                         /* We didn't get it above, and the token is not needed after this. */
    4749           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4750             :                 }
    4751           0 :                 switch (level) {
    4752           0 :                         case 1:
    4753           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaDelRequest1(ndr, NDR_BUFFERS, &r->req1));
    4754           0 :                         break;
    4755             : 
    4756           0 :                         default:
    4757           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4758             :                 }
    4759           0 :         }
    4760           0 :         return NDR_ERR_SUCCESS;
    4761             : }
    4762             : 
    4763           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaDelRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsReplicaDelRequest *r)
    4764             : {
    4765             :         uint32_t level;
    4766             :         uint32_t _level;
    4767           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4768           0 :         if (ndr_flags & NDR_SCALARS) {
    4769             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4770           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4771           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4772           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4773           0 :                 if (_level != level) {
    4774           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    4775             :                 }
    4776           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4777           0 :                 switch (level) {
    4778           0 :                         case 1: {
    4779           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_SCALARS, &r->req1));
    4780           0 :                         break; }
    4781             : 
    4782           0 :                         default:
    4783           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4784             :                 }
    4785           0 :         }
    4786           0 :         if (ndr_flags & NDR_BUFFERS) {
    4787           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4788             :                         /* We didn't get it above, and the token is not needed after this. */
    4789           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4790             :                 }
    4791           0 :                 switch (level) {
    4792           0 :                         case 1:
    4793           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaDelRequest1(ndr, NDR_BUFFERS, &r->req1));
    4794           0 :                         break;
    4795             : 
    4796           0 :                         default:
    4797           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4798             :                 }
    4799           0 :         }
    4800           0 :         return NDR_ERR_SUCCESS;
    4801             : }
    4802             : 
    4803           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaDelRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaDelRequest *r)
    4804             : {
    4805             :         uint32_t level;
    4806           0 :         level = ndr_print_steal_switch_value(ndr, r);
    4807           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaDelRequest");
    4808           0 :         switch (level) {
    4809           0 :                 case 1:
    4810           0 :                         ndr_print_drsuapi_DsReplicaDelRequest1(ndr, "req1", &r->req1);
    4811           0 :                 break;
    4812             : 
    4813           0 :                 default:
    4814           0 :                         ndr_print_bad_level(ndr, name, level);
    4815             :         }
    4816           0 : }
    4817             : 
    4818           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaModRequest1 *r)
    4819             : {
    4820           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4821           0 :         if (ndr_flags & NDR_SCALARS) {
    4822           0 :                 if (r->naming_context == NULL) {
    4823           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    4824             :                 }
    4825           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4826           0 :                 NDR_CHECK(ndr_push_ref_ptr(ndr)); /* r->naming_context */
    4827           0 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->source_dra));
    4828           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->source_dra_address));
    4829           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->schedule, 84));
    4830           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->replica_flags));
    4831           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->modify_fields));
    4832           0 :                 NDR_CHECK(ndr_push_drsuapi_DrsOptions(ndr, NDR_SCALARS, r->options));
    4833           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4834             :         }
    4835           0 :         if (ndr_flags & NDR_BUFFERS) {
    4836           0 :                 NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4837           0 :                 if (r->source_dra_address) {
    4838           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dra_address, CH_UTF16)));
    4839           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4840           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->source_dra_address, CH_UTF16)));
    4841           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));
    4842             :                 }
    4843             :         }
    4844           0 :         return NDR_ERR_SUCCESS;
    4845             : }
    4846             : 
    4847           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaModRequest1 *r)
    4848             : {
    4849             :         uint32_t _ptr_naming_context;
    4850           0 :         TALLOC_CTX *_mem_save_naming_context_0 = NULL;
    4851             :         uint32_t _ptr_source_dra_address;
    4852           0 :         uint32_t size_source_dra_address_1 = 0;
    4853           0 :         uint32_t length_source_dra_address_1 = 0;
    4854           0 :         TALLOC_CTX *_mem_save_source_dra_address_0 = NULL;
    4855           0 :         uint32_t size_schedule_0 = 0;
    4856           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4857           0 :         if (ndr_flags & NDR_SCALARS) {
    4858           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4859           0 :                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_naming_context));
    4860           0 :                 if (_ptr_naming_context) {
    4861           0 :                         NDR_PULL_ALLOC(ndr, r->naming_context);
    4862             :                 } else {
    4863           0 :                         r->naming_context = NULL;
    4864             :                 }
    4865           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->source_dra));
    4866           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_source_dra_address));
    4867           0 :                 if (_ptr_source_dra_address) {
    4868           0 :                         NDR_PULL_ALLOC(ndr, r->source_dra_address);
    4869             :                 } else {
    4870           0 :                         r->source_dra_address = NULL;
    4871             :                 }
    4872           0 :                 size_schedule_0 = 84;
    4873           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->schedule, size_schedule_0));
    4874           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->replica_flags));
    4875           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->modify_fields));
    4876           0 :                 NDR_CHECK(ndr_pull_drsuapi_DrsOptions(ndr, NDR_SCALARS, &r->options));
    4877           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4878             :         }
    4879           0 :         if (ndr_flags & NDR_BUFFERS) {
    4880           0 :                 _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4881           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->naming_context, 0);
    4882           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context));
    4883           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_naming_context_0, 0);
    4884           0 :                 if (r->source_dra_address) {
    4885           0 :                         _mem_save_source_dra_address_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4886           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->source_dra_address, 0);
    4887           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->source_dra_address));
    4888           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->source_dra_address));
    4889           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->source_dra_address, &size_source_dra_address_1));
    4890           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->source_dra_address, &length_source_dra_address_1));
    4891           0 :                         if (length_source_dra_address_1 > size_source_dra_address_1) {
    4892           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_source_dra_address_1, length_source_dra_address_1);
    4893             :                         }
    4894           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_source_dra_address_1, sizeof(uint16_t)));
    4895           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->source_dra_address, length_source_dra_address_1, sizeof(uint16_t), CH_UTF16));
    4896           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_source_dra_address_0, 0);
    4897             :                 }
    4898             :         }
    4899           0 :         return NDR_ERR_SUCCESS;
    4900             : }
    4901             : 
    4902           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaModRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaModRequest1 *r)
    4903             : {
    4904           0 :         ndr_print_struct(ndr, name, "drsuapi_DsReplicaModRequest1");
    4905           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4906           0 :         ndr->depth++;
    4907           0 :         ndr_print_ptr(ndr, "naming_context", r->naming_context);
    4908           0 :         ndr->depth++;
    4909           0 :         ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "naming_context", r->naming_context);
    4910           0 :         ndr->depth--;
    4911           0 :         ndr_print_GUID(ndr, "source_dra", &r->source_dra);
    4912           0 :         ndr_print_ptr(ndr, "source_dra_address", r->source_dra_address);
    4913           0 :         ndr->depth++;
    4914           0 :         if (r->source_dra_address) {
    4915           0 :                 ndr_print_string(ndr, "source_dra_address", r->source_dra_address);
    4916             :         }
    4917           0 :         ndr->depth--;
    4918           0 :         ndr_print_array_uint8(ndr, "schedule", r->schedule, 84);
    4919           0 :         ndr_print_drsuapi_DrsOptions(ndr, "replica_flags", r->replica_flags);
    4920           0 :         ndr_print_uint32(ndr, "modify_fields", r->modify_fields);
    4921           0 :         ndr_print_drsuapi_DrsOptions(ndr, "options", r->options);
    4922           0 :         ndr->depth--;
    4923             : }
    4924             : 
    4925           0 : static enum ndr_err_code ndr_push_drsuapi_DsReplicaModRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsReplicaModRequest *r)
    4926             : {
    4927             :         uint32_t level;
    4928           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4929           0 :         if (ndr_flags & NDR_SCALARS) {
    4930             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4931           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4932           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4933           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    4934           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    4935           0 :                 switch (level) {
    4936           0 :                         case 1: {
    4937           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1));
    4938           0 :                         break; }
    4939             : 
    4940           0 :                         default:
    4941           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4942             :                 }
    4943           0 :         }
    4944           0 :         if (ndr_flags & NDR_BUFFERS) {
    4945           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4946             :                         /* We didn't get it above, and the token is not needed after this. */
    4947           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    4948             :                 }
    4949           0 :                 switch (level) {
    4950           0 :                         case 1:
    4951           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsReplicaModRequest1(ndr, NDR_BUFFERS, &r->req1));
    4952           0 :                         break;
    4953             : 
    4954           0 :                         default:
    4955           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    4956             :                 }
    4957           0 :         }
    4958           0 :         return NDR_ERR_SUCCESS;
    4959             : }
    4960             : 
    4961           0 : static enum ndr_err_code ndr_pull_drsuapi_DsReplicaModRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsReplicaModRequest *r)
    4962             : {
    4963             :         uint32_t level;
    4964             :         uint32_t _level;
    4965           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4966           0 :         if (ndr_flags & NDR_SCALARS) {
    4967             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    4968           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4969           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4970           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    4971           0 :                 if (_level != level) {
    4972           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    4973             :                 }
    4974           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    4975           0 :                 switch (level) {
    4976           0 :                         case 1: {
    4977           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_SCALARS, &r->req1));
    4978           0 :                         break; }
    4979             : 
    4980           0 :                         default:
    4981           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4982             :                 }
    4983           0 :         }
    4984           0 :         if (ndr_flags & NDR_BUFFERS) {
    4985           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    4986             :                         /* We didn't get it above, and the token is not needed after this. */
    4987           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    4988             :                 }
    4989           0 :                 switch (level) {
    4990           0 :                         case 1:
    4991           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsReplicaModRequest1(ndr, NDR_BUFFERS, &r->req1));
    4992           0 :                         break;
    4993             : 
    4994           0 :                         default:
    4995           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    4996             :                 }
    4997           0 :         }
    4998           0 :         return NDR_ERR_SUCCESS;
    4999             : }
    5000             : 
    5001           0 : _PUBLIC_ void ndr_print_drsuapi_DsReplicaModRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsReplicaModRequest *r)
    5002             : {
    5003             :         uint32_t level;
    5004           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5005           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsReplicaModRequest");
    5006           0 :         switch (level) {
    5007           0 :                 case 1:
    5008           0 :                         ndr_print_drsuapi_DsReplicaModRequest1(ndr, "req1", &r->req1);
    5009           0 :                 break;
    5010             : 
    5011           0 :                 default:
    5012           0 :                         ndr_print_bad_level(ndr, name, level);
    5013             :         }
    5014           0 : }
    5015             : 
    5016           0 : static enum ndr_err_code ndr_push_drsuapi_DsMembershipType(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsMembershipType r)
    5017             : {
    5018           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    5019           0 :         return NDR_ERR_SUCCESS;
    5020             : }
    5021             : 
    5022           0 : static enum ndr_err_code ndr_pull_drsuapi_DsMembershipType(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsMembershipType *r)
    5023             : {
    5024             :         uint32_t v;
    5025           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    5026           0 :         *r = v;
    5027           0 :         return NDR_ERR_SUCCESS;
    5028             : }
    5029             : 
    5030           0 : _PUBLIC_ void ndr_print_drsuapi_DsMembershipType(struct ndr_print *ndr, const char *name, enum drsuapi_DsMembershipType r)
    5031             : {
    5032           0 :         const char *val = NULL;
    5033             : 
    5034           0 :         switch (r) {
    5035           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS"; break;
    5036           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS"; break;
    5037           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS"; break;
    5038           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2"; break;
    5039           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS"; break;
    5040           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS"; break;
    5041           0 :                 case DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2: val = "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2"; break;
    5042             :         }
    5043           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    5044           0 : }
    5045             : 
    5046           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetMembershipsCtr1 *r)
    5047             : {
    5048             :         uint32_t cntr_info_array_1;
    5049             :         uint32_t cntr_group_attrs_1;
    5050             :         uint32_t cntr_sids_1;
    5051           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5052           0 :         if (ndr_flags & NDR_SCALARS) {
    5053           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5054           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
    5055           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_memberships));
    5056           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
    5057           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array));
    5058           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->group_attrs));
    5059           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
    5060           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5061             :         }
    5062           0 :         if (ndr_flags & NDR_BUFFERS) {
    5063           0 :                 if (r->info_array) {
    5064           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_memberships));
    5065           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
    5066           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array[cntr_info_array_1]));
    5067             :                         }
    5068           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
    5069           0 :                                 if (r->info_array[cntr_info_array_1]) {
    5070           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
    5071             :                                 }
    5072             :                         }
    5073             :                 }
    5074           0 :                 if (r->group_attrs) {
    5075           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_memberships));
    5076           0 :                         for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (r->num_memberships); cntr_group_attrs_1++) {
    5077           0 :                                 NDR_CHECK(ndr_push_security_GroupAttrs(ndr, NDR_SCALARS, r->group_attrs[cntr_group_attrs_1]));
    5078             :                         }
    5079             :                 }
    5080           0 :                 if (r->sids) {
    5081           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_sids));
    5082           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    5083           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids[cntr_sids_1]));
    5084             :                         }
    5085           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    5086           0 :                                 if (r->sids[cntr_sids_1]) {
    5087           0 :                                         NDR_CHECK(ndr_push_dom_sid28(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids[cntr_sids_1]));
    5088             :                                 }
    5089             :                         }
    5090             :                 }
    5091             :         }
    5092           0 :         return NDR_ERR_SUCCESS;
    5093             : }
    5094             : 
    5095           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetMembershipsCtr1 *r)
    5096             : {
    5097             :         uint32_t _ptr_info_array;
    5098           0 :         uint32_t size_info_array_1 = 0;
    5099             :         uint32_t cntr_info_array_1;
    5100           0 :         TALLOC_CTX *_mem_save_info_array_0 = NULL;
    5101           0 :         TALLOC_CTX *_mem_save_info_array_1 = NULL;
    5102           0 :         TALLOC_CTX *_mem_save_info_array_2 = NULL;
    5103             :         uint32_t _ptr_group_attrs;
    5104           0 :         uint32_t size_group_attrs_1 = 0;
    5105             :         uint32_t cntr_group_attrs_1;
    5106           0 :         TALLOC_CTX *_mem_save_group_attrs_0 = NULL;
    5107           0 :         TALLOC_CTX *_mem_save_group_attrs_1 = NULL;
    5108             :         uint32_t _ptr_sids;
    5109           0 :         uint32_t size_sids_1 = 0;
    5110             :         uint32_t cntr_sids_1;
    5111           0 :         TALLOC_CTX *_mem_save_sids_0 = NULL;
    5112           0 :         TALLOC_CTX *_mem_save_sids_1 = NULL;
    5113           0 :         TALLOC_CTX *_mem_save_sids_2 = NULL;
    5114           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5115           0 :         if (ndr_flags & NDR_SCALARS) {
    5116           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5117           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
    5118           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_memberships));
    5119           0 :                 if (r->num_memberships > 10000) {
    5120           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5121             :                 }
    5122           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
    5123           0 :                 if (r->num_sids > 10000) {
    5124           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5125             :                 }
    5126           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
    5127           0 :                 if (_ptr_info_array) {
    5128           0 :                         NDR_PULL_ALLOC(ndr, r->info_array);
    5129             :                 } else {
    5130           0 :                         r->info_array = NULL;
    5131             :                 }
    5132           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_attrs));
    5133           0 :                 if (_ptr_group_attrs) {
    5134           0 :                         NDR_PULL_ALLOC(ndr, r->group_attrs);
    5135             :                 } else {
    5136           0 :                         r->group_attrs = NULL;
    5137             :                 }
    5138           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    5139           0 :                 if (_ptr_sids) {
    5140           0 :                         NDR_PULL_ALLOC(ndr, r->sids);
    5141             :                 } else {
    5142           0 :                         r->sids = NULL;
    5143             :                 }
    5144           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5145             :         }
    5146           0 :         if (ndr_flags & NDR_BUFFERS) {
    5147           0 :                 if (r->info_array) {
    5148           0 :                         _mem_save_info_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5149           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
    5150           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->info_array));
    5151           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->info_array, &size_info_array_1));
    5152           0 :                         NDR_PULL_ALLOC_N(ndr, r->info_array, size_info_array_1);
    5153           0 :                         _mem_save_info_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5154           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
    5155           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5156           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
    5157           0 :                                 if (_ptr_info_array) {
    5158           0 :                                         NDR_PULL_ALLOC(ndr, r->info_array[cntr_info_array_1]);
    5159             :                                 } else {
    5160           0 :                                         r->info_array[cntr_info_array_1] = NULL;
    5161             :                                 }
    5162             :                         }
    5163           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5164           0 :                                 if (r->info_array[cntr_info_array_1]) {
    5165           0 :                                         _mem_save_info_array_2 = NDR_PULL_GET_MEM_CTX(ndr);
    5166           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array[cntr_info_array_1], 0);
    5167           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
    5168           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_2, 0);
    5169             :                                 }
    5170             :                         }
    5171           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_1, 0);
    5172           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_0, 0);
    5173             :                 }
    5174           0 :                 if (r->group_attrs) {
    5175           0 :                         _mem_save_group_attrs_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5176           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->group_attrs, 0);
    5177           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->group_attrs));
    5178           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->group_attrs, &size_group_attrs_1));
    5179           0 :                         NDR_PULL_ALLOC_N(ndr, r->group_attrs, size_group_attrs_1);
    5180           0 :                         _mem_save_group_attrs_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5181           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->group_attrs, 0);
    5182           0 :                         for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (size_group_attrs_1); cntr_group_attrs_1++) {
    5183           0 :                                 NDR_CHECK(ndr_pull_security_GroupAttrs(ndr, NDR_SCALARS, &r->group_attrs[cntr_group_attrs_1]));
    5184             :                         }
    5185           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_attrs_1, 0);
    5186           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_attrs_0, 0);
    5187             :                 }
    5188           0 :                 if (r->sids) {
    5189           0 :                         _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5190           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    5191           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
    5192           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->sids, &size_sids_1));
    5193           0 :                         NDR_PULL_ALLOC_N(ndr, r->sids, size_sids_1);
    5194           0 :                         _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5195           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
    5196           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5197           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
    5198           0 :                                 if (_ptr_sids) {
    5199           0 :                                         NDR_PULL_ALLOC(ndr, r->sids[cntr_sids_1]);
    5200             :                                 } else {
    5201           0 :                                         r->sids[cntr_sids_1] = NULL;
    5202             :                                 }
    5203             :                         }
    5204           0 :                         for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5205           0 :                                 if (r->sids[cntr_sids_1]) {
    5206           0 :                                         _mem_save_sids_2 = NDR_PULL_GET_MEM_CTX(ndr);
    5207           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->sids[cntr_sids_1], 0);
    5208           0 :                                         NDR_CHECK(ndr_pull_dom_sid28(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids[cntr_sids_1]));
    5209           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_2, 0);
    5210             :                                 }
    5211             :                         }
    5212           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
    5213           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
    5214             :                 }
    5215           0 :                 if (r->info_array) {
    5216           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->info_array, r->num_memberships));
    5217             :                 }
    5218           0 :                 for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5219             :                 }
    5220           0 :                 if (r->group_attrs) {
    5221           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->group_attrs, r->num_memberships));
    5222             :                 }
    5223           0 :                 if (r->sids) {
    5224           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
    5225             :                 }
    5226           0 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (size_sids_1); cntr_sids_1++) {
    5227             :                 }
    5228             :         }
    5229           0 :         return NDR_ERR_SUCCESS;
    5230             : }
    5231             : 
    5232           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsCtr1 *r)
    5233             : {
    5234             :         uint32_t cntr_info_array_1;
    5235             :         uint32_t cntr_group_attrs_1;
    5236             :         uint32_t cntr_sids_1;
    5237           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetMembershipsCtr1");
    5238           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5239           0 :         ndr->depth++;
    5240           0 :         ndr_print_NTSTATUS(ndr, "status", r->status);
    5241           0 :         ndr_print_uint32(ndr, "num_memberships", r->num_memberships);
    5242           0 :         ndr_print_uint32(ndr, "num_sids", r->num_sids);
    5243           0 :         ndr_print_ptr(ndr, "info_array", r->info_array);
    5244           0 :         ndr->depth++;
    5245           0 :         if (r->info_array) {
    5246           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "info_array", (int)r->num_memberships);
    5247           0 :                 ndr->depth++;
    5248           0 :                 for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->num_memberships); cntr_info_array_1++) {
    5249           0 :                         ndr_print_ptr(ndr, "info_array", r->info_array[cntr_info_array_1]);
    5250           0 :                         ndr->depth++;
    5251           0 :                         if (r->info_array[cntr_info_array_1]) {
    5252           0 :                                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "info_array", r->info_array[cntr_info_array_1]);
    5253             :                         }
    5254           0 :                         ndr->depth--;
    5255             :                 }
    5256           0 :                 ndr->depth--;
    5257             :         }
    5258           0 :         ndr->depth--;
    5259           0 :         ndr_print_ptr(ndr, "group_attrs", r->group_attrs);
    5260           0 :         ndr->depth++;
    5261           0 :         if (r->group_attrs) {
    5262           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "group_attrs", (int)r->num_memberships);
    5263           0 :                 ndr->depth++;
    5264           0 :                 for (cntr_group_attrs_1 = 0; cntr_group_attrs_1 < (r->num_memberships); cntr_group_attrs_1++) {
    5265           0 :                         ndr_print_security_GroupAttrs(ndr, "group_attrs", r->group_attrs[cntr_group_attrs_1]);
    5266             :                 }
    5267           0 :                 ndr->depth--;
    5268             :         }
    5269           0 :         ndr->depth--;
    5270           0 :         ndr_print_ptr(ndr, "sids", r->sids);
    5271           0 :         ndr->depth++;
    5272           0 :         if (r->sids) {
    5273           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "sids", (int)r->num_sids);
    5274           0 :                 ndr->depth++;
    5275           0 :                 for (cntr_sids_1 = 0; cntr_sids_1 < (r->num_sids); cntr_sids_1++) {
    5276           0 :                         ndr_print_ptr(ndr, "sids", r->sids[cntr_sids_1]);
    5277           0 :                         ndr->depth++;
    5278           0 :                         if (r->sids[cntr_sids_1]) {
    5279           0 :                                 ndr_print_dom_sid28(ndr, "sids", r->sids[cntr_sids_1]);
    5280             :                         }
    5281           0 :                         ndr->depth--;
    5282             :                 }
    5283           0 :                 ndr->depth--;
    5284             :         }
    5285           0 :         ndr->depth--;
    5286           0 :         ndr->depth--;
    5287             : }
    5288             : 
    5289           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsCtr(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsGetMembershipsCtr *r)
    5290             : {
    5291             :         uint32_t level;
    5292           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5293           0 :         if (ndr_flags & NDR_SCALARS) {
    5294             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5295           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5296           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5297           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5298           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5299           0 :                 switch (level) {
    5300           0 :                         case 1: {
    5301           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
    5302           0 :                         break; }
    5303             : 
    5304           0 :                         default:
    5305           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    5306             :                 }
    5307           0 :         }
    5308           0 :         if (ndr_flags & NDR_BUFFERS) {
    5309           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5310             :                         /* We didn't get it above, and the token is not needed after this. */
    5311           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5312             :                 }
    5313           0 :                 switch (level) {
    5314           0 :                         case 1:
    5315           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    5316           0 :                         break;
    5317             : 
    5318           0 :                         default:
    5319           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    5320             :                 }
    5321           0 :         }
    5322           0 :         return NDR_ERR_SUCCESS;
    5323             : }
    5324             : 
    5325           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsGetMembershipsCtr *r)
    5326             : {
    5327             :         uint32_t level;
    5328             :         uint32_t _level;
    5329           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5330           0 :         if (ndr_flags & NDR_SCALARS) {
    5331             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5332           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5333           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5334           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    5335           0 :                 if (_level != level) {
    5336           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    5337             :                 }
    5338           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5339           0 :                 switch (level) {
    5340           0 :                         case 1: {
    5341           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_SCALARS, &r->ctr1));
    5342           0 :                         break; }
    5343             : 
    5344           0 :                         default:
    5345           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    5346             :                 }
    5347           0 :         }
    5348           0 :         if (ndr_flags & NDR_BUFFERS) {
    5349           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5350             :                         /* We didn't get it above, and the token is not needed after this. */
    5351           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5352             :                 }
    5353           0 :                 switch (level) {
    5354           0 :                         case 1:
    5355           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsCtr1(ndr, NDR_BUFFERS, &r->ctr1));
    5356           0 :                         break;
    5357             : 
    5358           0 :                         default:
    5359           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    5360             :                 }
    5361           0 :         }
    5362           0 :         return NDR_ERR_SUCCESS;
    5363             : }
    5364             : 
    5365           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsCtr *r)
    5366             : {
    5367             :         uint32_t level;
    5368           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5369           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetMembershipsCtr");
    5370           0 :         switch (level) {
    5371           0 :                 case 1:
    5372           0 :                         ndr_print_drsuapi_DsGetMembershipsCtr1(ndr, "ctr1", &r->ctr1);
    5373           0 :                 break;
    5374             : 
    5375           0 :                 default:
    5376           0 :                         ndr_print_bad_level(ndr, name, level);
    5377             :         }
    5378           0 : }
    5379             : 
    5380           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetMembershipsRequest1 *r)
    5381             : {
    5382             :         uint32_t cntr_info_array_1;
    5383           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5384           0 :         if (ndr_flags & NDR_SCALARS) {
    5385           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5386           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5387           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array));
    5388           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
    5389           0 :                 NDR_CHECK(ndr_push_drsuapi_DsMembershipType(ndr, NDR_SCALARS, r->type));
    5390           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    5391           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5392             :         }
    5393           0 :         if (ndr_flags & NDR_BUFFERS) {
    5394           0 :                 if (r->info_array) {
    5395           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5396           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
    5397           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info_array[cntr_info_array_1]));
    5398             :                         }
    5399           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
    5400           0 :                                 if (r->info_array[cntr_info_array_1]) {
    5401           0 :                                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
    5402             :                                 }
    5403             :                         }
    5404             :                 }
    5405           0 :                 if (r->domain) {
    5406           0 :                         NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
    5407             :                 }
    5408             :         }
    5409           0 :         return NDR_ERR_SUCCESS;
    5410             : }
    5411             : 
    5412           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetMembershipsRequest1 *r)
    5413             : {
    5414             :         uint32_t _ptr_info_array;
    5415           0 :         uint32_t size_info_array_1 = 0;
    5416             :         uint32_t cntr_info_array_1;
    5417           0 :         TALLOC_CTX *_mem_save_info_array_0 = NULL;
    5418           0 :         TALLOC_CTX *_mem_save_info_array_1 = NULL;
    5419           0 :         TALLOC_CTX *_mem_save_info_array_2 = NULL;
    5420             :         uint32_t _ptr_domain;
    5421           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
    5422           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5423           0 :         if (ndr_flags & NDR_SCALARS) {
    5424           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5425           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5426           0 :                 if (r->count < 1 || r->count > 10000) {
    5427           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5428             :                 }
    5429           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
    5430           0 :                 if (_ptr_info_array) {
    5431           0 :                         NDR_PULL_ALLOC(ndr, r->info_array);
    5432             :                 } else {
    5433           0 :                         r->info_array = NULL;
    5434             :                 }
    5435           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
    5436           0 :                 NDR_CHECK(ndr_pull_drsuapi_DsMembershipType(ndr, NDR_SCALARS, &r->type));
    5437           0 :                 if (r->type < 1 || r->type > 7) {
    5438           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5439             :                 }
    5440           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    5441           0 :                 if (_ptr_domain) {
    5442           0 :                         NDR_PULL_ALLOC(ndr, r->domain);
    5443             :                 } else {
    5444           0 :                         r->domain = NULL;
    5445             :                 }
    5446           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5447             :         }
    5448           0 :         if (ndr_flags & NDR_BUFFERS) {
    5449           0 :                 if (r->info_array) {
    5450           0 :                         _mem_save_info_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5451           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
    5452           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->info_array));
    5453           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->info_array, &size_info_array_1));
    5454           0 :                         NDR_PULL_ALLOC_N(ndr, r->info_array, size_info_array_1);
    5455           0 :                         _mem_save_info_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5456           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array, 0);
    5457           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5458           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
    5459           0 :                                 if (_ptr_info_array) {
    5460           0 :                                         NDR_PULL_ALLOC(ndr, r->info_array[cntr_info_array_1]);
    5461             :                                 } else {
    5462           0 :                                         r->info_array[cntr_info_array_1] = NULL;
    5463             :                                 }
    5464             :                         }
    5465           0 :                         for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5466           0 :                                 if (r->info_array[cntr_info_array_1]) {
    5467           0 :                                         _mem_save_info_array_2 = NDR_PULL_GET_MEM_CTX(ndr);
    5468           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info_array[cntr_info_array_1], 0);
    5469           0 :                                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->info_array[cntr_info_array_1]));
    5470           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_2, 0);
    5471             :                                 }
    5472             :                         }
    5473           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_1, 0);
    5474           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_array_0, 0);
    5475             :                 }
    5476           0 :                 if (r->domain) {
    5477           0 :                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5478           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    5479           0 :                         NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->domain));
    5480           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    5481             :                 }
    5482           0 :                 if (r->info_array) {
    5483           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->info_array, r->count));
    5484             :                 }
    5485           0 :                 for (cntr_info_array_1 = 0; cntr_info_array_1 < (size_info_array_1); cntr_info_array_1++) {
    5486             :                 }
    5487             :         }
    5488           0 :         return NDR_ERR_SUCCESS;
    5489             : }
    5490             : 
    5491           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetMembershipsRequest1 *r)
    5492             : {
    5493             :         uint32_t cntr_info_array_1;
    5494           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetMembershipsRequest1");
    5495           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5496           0 :         ndr->depth++;
    5497           0 :         ndr_print_uint32(ndr, "count", r->count);
    5498           0 :         ndr_print_ptr(ndr, "info_array", r->info_array);
    5499           0 :         ndr->depth++;
    5500           0 :         if (r->info_array) {
    5501           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "info_array", (int)r->count);
    5502           0 :                 ndr->depth++;
    5503           0 :                 for (cntr_info_array_1 = 0; cntr_info_array_1 < (r->count); cntr_info_array_1++) {
    5504           0 :                         ndr_print_ptr(ndr, "info_array", r->info_array[cntr_info_array_1]);
    5505           0 :                         ndr->depth++;
    5506           0 :                         if (r->info_array[cntr_info_array_1]) {
    5507           0 :                                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "info_array", r->info_array[cntr_info_array_1]);
    5508             :                         }
    5509           0 :                         ndr->depth--;
    5510             :                 }
    5511           0 :                 ndr->depth--;
    5512             :         }
    5513           0 :         ndr->depth--;
    5514           0 :         ndr_print_uint32(ndr, "flags", r->flags);
    5515           0 :         ndr_print_drsuapi_DsMembershipType(ndr, "type", r->type);
    5516           0 :         ndr_print_ptr(ndr, "domain", r->domain);
    5517           0 :         ndr->depth++;
    5518           0 :         if (r->domain) {
    5519           0 :                 ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "domain", r->domain);
    5520             :         }
    5521           0 :         ndr->depth--;
    5522           0 :         ndr->depth--;
    5523             : }
    5524             : 
    5525           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetMembershipsRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsGetMembershipsRequest *r)
    5526             : {
    5527             :         uint32_t level;
    5528           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5529           0 :         if (ndr_flags & NDR_SCALARS) {
    5530             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5531           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5532           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5533           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5534           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5535           0 :                 switch (level) {
    5536           0 :                         case 1: {
    5537           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS, &r->req1));
    5538           0 :                         break; }
    5539             : 
    5540           0 :                         default:
    5541           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    5542             :                 }
    5543           0 :         }
    5544           0 :         if (ndr_flags & NDR_BUFFERS) {
    5545           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5546             :                         /* We didn't get it above, and the token is not needed after this. */
    5547           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5548             :                 }
    5549           0 :                 switch (level) {
    5550           0 :                         case 1:
    5551           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetMembershipsRequest1(ndr, NDR_BUFFERS, &r->req1));
    5552           0 :                         break;
    5553             : 
    5554           0 :                         default:
    5555           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    5556             :                 }
    5557           0 :         }
    5558           0 :         return NDR_ERR_SUCCESS;
    5559             : }
    5560             : 
    5561           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsGetMembershipsRequest *r)
    5562             : {
    5563             :         uint32_t level;
    5564             :         uint32_t _level;
    5565           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5566           0 :         if (ndr_flags & NDR_SCALARS) {
    5567             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5568           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5569           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5570           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    5571           0 :                 if (_level != level) {
    5572           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    5573             :                 }
    5574           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5575           0 :                 switch (level) {
    5576           0 :                         case 1: {
    5577           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_SCALARS, &r->req1));
    5578           0 :                         break; }
    5579             : 
    5580           0 :                         default:
    5581           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    5582             :                 }
    5583           0 :         }
    5584           0 :         if (ndr_flags & NDR_BUFFERS) {
    5585           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5586             :                         /* We didn't get it above, and the token is not needed after this. */
    5587           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5588             :                 }
    5589           0 :                 switch (level) {
    5590           0 :                         case 1:
    5591           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetMembershipsRequest1(ndr, NDR_BUFFERS, &r->req1));
    5592           0 :                         break;
    5593             : 
    5594           0 :                         default:
    5595           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    5596             :                 }
    5597           0 :         }
    5598           0 :         return NDR_ERR_SUCCESS;
    5599             : }
    5600             : 
    5601           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetMembershipsRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetMembershipsRequest *r)
    5602             : {
    5603             :         uint32_t level;
    5604           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5605           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetMembershipsRequest");
    5606           0 :         switch (level) {
    5607           0 :                 case 1:
    5608           0 :                         ndr_print_drsuapi_DsGetMembershipsRequest1(ndr, "req1", &r->req1);
    5609           0 :                 break;
    5610             : 
    5611           0 :                 default:
    5612           0 :                         ndr_print_bad_level(ndr, name, level);
    5613             :         }
    5614           0 : }
    5615             : 
    5616           4 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    5617             : {
    5618           4 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    5619           4 :         return NDR_ERR_SUCCESS;
    5620             : }
    5621             : 
    5622           4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    5623             : {
    5624             :         uint32_t v;
    5625           4 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    5626           4 :         *r = v;
    5627           4 :         return NDR_ERR_SUCCESS;
    5628             : }
    5629             : 
    5630           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    5631             : {
    5632           0 :         ndr_print_uint32(ndr, name, r);
    5633           0 :         ndr->depth++;
    5634           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG", DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG, r);
    5635           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS", DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS, r);
    5636           0 :         ndr->depth--;
    5637           0 : }
    5638             : 
    5639           8 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
    5640             : {
    5641           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5642           8 :         if (ndr_flags & NDR_SCALARS) {
    5643           4 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5644           4 :                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogFlags(ndr, NDR_SCALARS, r->flags));
    5645           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->preferred_maximum_length));
    5646           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->restart_length));
    5647           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->restart_data));
    5648           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5649             :         }
    5650           8 :         if (ndr_flags & NDR_BUFFERS) {
    5651           4 :                 if (r->restart_data) {
    5652           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->restart_length));
    5653           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->restart_data, r->restart_length));
    5654             :                 }
    5655             :         }
    5656           8 :         return NDR_ERR_SUCCESS;
    5657             : }
    5658             : 
    5659           8 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
    5660             : {
    5661             :         uint32_t _ptr_restart_data;
    5662           8 :         uint32_t size_restart_data_1 = 0;
    5663           8 :         TALLOC_CTX *_mem_save_restart_data_0 = NULL;
    5664           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5665           8 :         if (ndr_flags & NDR_SCALARS) {
    5666           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5667           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogFlags(ndr, NDR_SCALARS, &r->flags));
    5668           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->preferred_maximum_length));
    5669           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->restart_length));
    5670           4 :                 if (r->restart_length > 10485760) {
    5671           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5672             :                 }
    5673           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_restart_data));
    5674           4 :                 if (_ptr_restart_data) {
    5675           0 :                         NDR_PULL_ALLOC(ndr, r->restart_data);
    5676             :                 } else {
    5677           4 :                         r->restart_data = NULL;
    5678             :                 }
    5679           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5680             :         }
    5681           8 :         if (ndr_flags & NDR_BUFFERS) {
    5682           4 :                 if (r->restart_data) {
    5683           0 :                         _mem_save_restart_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5684           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->restart_data, 0);
    5685           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->restart_data));
    5686           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->restart_data, &size_restart_data_1));
    5687           0 :                         NDR_PULL_ALLOC_N(ndr, r->restart_data, size_restart_data_1);
    5688           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->restart_data, size_restart_data_1));
    5689           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_restart_data_0, 0);
    5690             :                 }
    5691           4 :                 if (r->restart_data) {
    5692           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->restart_data, r->restart_length));
    5693             :                 }
    5694             :         }
    5695           8 :         return NDR_ERR_SUCCESS;
    5696             : }
    5697             : 
    5698           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNT4ChangeLogRequest1 *r)
    5699             : {
    5700           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNT4ChangeLogRequest1");
    5701           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5702           0 :         ndr->depth++;
    5703           0 :         ndr_print_drsuapi_DsGetNT4ChangeLogFlags(ndr, "flags", r->flags);
    5704           0 :         ndr_print_uint32(ndr, "preferred_maximum_length", r->preferred_maximum_length);
    5705           0 :         ndr_print_uint32(ndr, "restart_length", r->restart_length);
    5706           0 :         ndr_print_ptr(ndr, "restart_data", r->restart_data);
    5707           0 :         ndr->depth++;
    5708           0 :         if (r->restart_data) {
    5709           0 :                 ndr_print_array_uint8(ndr, "restart_data", r->restart_data, r->restart_length);
    5710             :         }
    5711           0 :         ndr->depth--;
    5712           0 :         ndr->depth--;
    5713             : }
    5714             : 
    5715           4 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsGetNT4ChangeLogRequest *r)
    5716             : {
    5717             :         uint32_t level;
    5718           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5719           4 :         if (ndr_flags & NDR_SCALARS) {
    5720             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5721           4 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5722           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5723           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5724           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5725           4 :                 switch (level) {
    5726           4 :                         case 1: {
    5727           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_SCALARS, &r->req1));
    5728           4 :                         break; }
    5729             : 
    5730           0 :                         default:
    5731           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    5732             :                 }
    5733           0 :         }
    5734           4 :         if (ndr_flags & NDR_BUFFERS) {
    5735           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5736             :                         /* We didn't get it above, and the token is not needed after this. */
    5737           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5738             :                 }
    5739           4 :                 switch (level) {
    5740           4 :                         case 1:
    5741           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_BUFFERS, &r->req1));
    5742           4 :                         break;
    5743             : 
    5744           0 :                         default:
    5745           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    5746             :                 }
    5747           0 :         }
    5748           4 :         return NDR_ERR_SUCCESS;
    5749             : }
    5750             : 
    5751           4 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsGetNT4ChangeLogRequest *r)
    5752             : {
    5753             :         uint32_t level;
    5754             :         uint32_t _level;
    5755           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5756           4 :         if (ndr_flags & NDR_SCALARS) {
    5757             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5758           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5759           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5760           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    5761           4 :                 if (_level != level) {
    5762           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    5763             :                 }
    5764           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5765           4 :                 switch (level) {
    5766           4 :                         case 1: {
    5767           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_SCALARS, &r->req1));
    5768           4 :                         break; }
    5769             : 
    5770           0 :                         default:
    5771           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    5772             :                 }
    5773           0 :         }
    5774           4 :         if (ndr_flags & NDR_BUFFERS) {
    5775           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5776             :                         /* We didn't get it above, and the token is not needed after this. */
    5777           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5778             :                 }
    5779           4 :                 switch (level) {
    5780           4 :                         case 1:
    5781           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(ndr, NDR_BUFFERS, &r->req1));
    5782           4 :                         break;
    5783             : 
    5784           0 :                         default:
    5785           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    5786             :                 }
    5787           0 :         }
    5788           4 :         return NDR_ERR_SUCCESS;
    5789             : }
    5790             : 
    5791           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNT4ChangeLogRequest *r)
    5792             : {
    5793             :         uint32_t level;
    5794           0 :         level = ndr_print_steal_switch_value(ndr, r);
    5795           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetNT4ChangeLogRequest");
    5796           0 :         switch (level) {
    5797           0 :                 case 1:
    5798           0 :                         ndr_print_drsuapi_DsGetNT4ChangeLogRequest1(ndr, "req1", &r->req1);
    5799           0 :                 break;
    5800             : 
    5801           0 :                 default:
    5802           0 :                         ndr_print_bad_level(ndr, name, level);
    5803             :         }
    5804           0 : }
    5805             : 
    5806           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
    5807             : {
    5808           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5809           0 :         if (ndr_flags & NDR_SCALARS) {
    5810           0 :                 NDR_CHECK(ndr_push_align(ndr, 8));
    5811           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->restart_length));
    5812           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->log_length));
    5813           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->sam_serial_number));
    5814           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->sam_creation_time));
    5815           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->builtin_serial_number));
    5816           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->builtin_creation_time));
    5817           0 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->lsa_serial_number));
    5818           0 :                 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->lsa_creation_time));
    5819           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
    5820           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->restart_data));
    5821           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->log_data));
    5822           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
    5823             :         }
    5824           0 :         if (ndr_flags & NDR_BUFFERS) {
    5825           0 :                 if (r->restart_data) {
    5826           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->restart_length));
    5827           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->restart_data, r->restart_length));
    5828             :                 }
    5829           0 :                 if (r->log_data) {
    5830           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->log_length));
    5831           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->log_data, r->log_length));
    5832             :                 }
    5833             :         }
    5834           0 :         return NDR_ERR_SUCCESS;
    5835             : }
    5836             : 
    5837           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
    5838             : {
    5839             :         uint32_t _ptr_restart_data;
    5840           0 :         uint32_t size_restart_data_1 = 0;
    5841           0 :         TALLOC_CTX *_mem_save_restart_data_0 = NULL;
    5842             :         uint32_t _ptr_log_data;
    5843           0 :         uint32_t size_log_data_1 = 0;
    5844           0 :         TALLOC_CTX *_mem_save_log_data_0 = NULL;
    5845           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5846           0 :         if (ndr_flags & NDR_SCALARS) {
    5847           0 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
    5848           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->restart_length));
    5849           0 :                 if (r->restart_length > 10485760) {
    5850           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5851             :                 }
    5852           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->log_length));
    5853           0 :                 if (r->log_length > 10485760) {
    5854           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5855             :                 }
    5856           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->sam_serial_number));
    5857           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->sam_creation_time));
    5858           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->builtin_serial_number));
    5859           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->builtin_creation_time));
    5860           0 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->lsa_serial_number));
    5861           0 :                 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->lsa_creation_time));
    5862           0 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
    5863           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_restart_data));
    5864           0 :                 if (_ptr_restart_data) {
    5865           0 :                         NDR_PULL_ALLOC(ndr, r->restart_data);
    5866             :                 } else {
    5867           0 :                         r->restart_data = NULL;
    5868             :                 }
    5869           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_log_data));
    5870           0 :                 if (_ptr_log_data) {
    5871           0 :                         NDR_PULL_ALLOC(ndr, r->log_data);
    5872             :                 } else {
    5873           0 :                         r->log_data = NULL;
    5874             :                 }
    5875           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
    5876             :         }
    5877           0 :         if (ndr_flags & NDR_BUFFERS) {
    5878           0 :                 if (r->restart_data) {
    5879           0 :                         _mem_save_restart_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5880           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->restart_data, 0);
    5881           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->restart_data));
    5882           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->restart_data, &size_restart_data_1));
    5883           0 :                         NDR_PULL_ALLOC_N(ndr, r->restart_data, size_restart_data_1);
    5884           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->restart_data, size_restart_data_1));
    5885           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_restart_data_0, 0);
    5886             :                 }
    5887           0 :                 if (r->log_data) {
    5888           0 :                         _mem_save_log_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5889           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->log_data, 0);
    5890           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->log_data));
    5891           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->log_data, &size_log_data_1));
    5892           0 :                         NDR_PULL_ALLOC_N(ndr, r->log_data, size_log_data_1);
    5893           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->log_data, size_log_data_1));
    5894           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_log_data_0, 0);
    5895             :                 }
    5896           0 :                 if (r->restart_data) {
    5897           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->restart_data, r->restart_length));
    5898             :                 }
    5899           0 :                 if (r->log_data) {
    5900           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->log_data, r->log_length));
    5901             :                 }
    5902             :         }
    5903           0 :         return NDR_ERR_SUCCESS;
    5904             : }
    5905             : 
    5906           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNT4ChangeLogInfo1 *r)
    5907             : {
    5908           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetNT4ChangeLogInfo1");
    5909           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5910           0 :         ndr->depth++;
    5911           0 :         ndr_print_uint32(ndr, "restart_length", r->restart_length);
    5912           0 :         ndr_print_uint32(ndr, "log_length", r->log_length);
    5913           0 :         ndr_print_hyper(ndr, "sam_serial_number", r->sam_serial_number);
    5914           0 :         ndr_print_NTTIME(ndr, "sam_creation_time", r->sam_creation_time);
    5915           0 :         ndr_print_hyper(ndr, "builtin_serial_number", r->builtin_serial_number);
    5916           0 :         ndr_print_NTTIME(ndr, "builtin_creation_time", r->builtin_creation_time);
    5917           0 :         ndr_print_hyper(ndr, "lsa_serial_number", r->lsa_serial_number);
    5918           0 :         ndr_print_NTTIME(ndr, "lsa_creation_time", r->lsa_creation_time);
    5919           0 :         ndr_print_NTSTATUS(ndr, "status", r->status);
    5920           0 :         ndr_print_ptr(ndr, "restart_data", r->restart_data);
    5921           0 :         ndr->depth++;
    5922           0 :         if (r->restart_data) {
    5923           0 :                 ndr_print_array_uint8(ndr, "restart_data", r->restart_data, r->restart_length);
    5924             :         }
    5925           0 :         ndr->depth--;
    5926           0 :         ndr_print_ptr(ndr, "log_data", r->log_data);
    5927           0 :         ndr->depth++;
    5928           0 :         if (r->log_data) {
    5929           0 :                 ndr_print_array_uint8(ndr, "log_data", r->log_data, r->log_length);
    5930             :         }
    5931           0 :         ndr->depth--;
    5932           0 :         ndr->depth--;
    5933             : }
    5934             : 
    5935           0 : static enum ndr_err_code ndr_push_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsGetNT4ChangeLogInfo *r)
    5936             : {
    5937             :         uint32_t level;
    5938           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5939           0 :         if (ndr_flags & NDR_SCALARS) {
    5940             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5941           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5942           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    5943           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5944           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
    5945           0 :                 switch (level) {
    5946           0 :                         case 1: {
    5947           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_SCALARS, &r->info1));
    5948           0 :                         break; }
    5949             : 
    5950           0 :                         default:
    5951           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    5952             :                 }
    5953           0 :         }
    5954           0 :         if (ndr_flags & NDR_BUFFERS) {
    5955           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5956             :                         /* We didn't get it above, and the token is not needed after this. */
    5957           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5958             :                 }
    5959           0 :                 switch (level) {
    5960           0 :                         case 1:
    5961           0 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_BUFFERS, &r->info1));
    5962           0 :                         break;
    5963             : 
    5964           0 :                         default:
    5965           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    5966             :                 }
    5967           0 :         }
    5968           0 :         return NDR_ERR_SUCCESS;
    5969             : }
    5970             : 
    5971           0 : static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsGetNT4ChangeLogInfo *r)
    5972             : {
    5973             :         uint32_t level;
    5974             :         uint32_t _level;
    5975           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5976           0 :         if (ndr_flags & NDR_SCALARS) {
    5977             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5978           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5979           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    5980           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    5981           0 :                 if (_level != level) {
    5982           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    5983             :                 }
    5984           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
    5985           0 :                 switch (level) {
    5986           0 :                         case 1: {
    5987           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_SCALARS, &r->info1));
    5988           0 :                         break; }
    5989             : 
    5990           0 :                         default:
    5991           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    5992             :                 }
    5993           0 :         }
    5994           0 :         if (ndr_flags & NDR_BUFFERS) {
    5995           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    5996             :                         /* We didn't get it above, and the token is not needed after this. */
    5997           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5998             :                 }
    5999           0 :                 switch (level) {
    6000           0 :                         case 1:
    6001           0 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(ndr, NDR_BUFFERS, &r->info1));
    6002           0 :                         break;
    6003             : 
    6004           0 :                         default:
    6005           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    6006             :                 }
    6007           0 :         }
    6008           0 :         return NDR_ERR_SUCCESS;
    6009             : }
    6010             : 
    6011           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetNT4ChangeLogInfo(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNT4ChangeLogInfo *r)
    6012             : {
    6013             :         uint32_t level;
    6014           0 :         level = ndr_print_steal_switch_value(ndr, r);
    6015           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetNT4ChangeLogInfo");
    6016           0 :         switch (level) {
    6017           0 :                 case 1:
    6018           0 :                         ndr_print_drsuapi_DsGetNT4ChangeLogInfo1(ndr, "info1", &r->info1);
    6019           0 :                 break;
    6020             : 
    6021           0 :                 default:
    6022           0 :                         ndr_print_bad_level(ndr, name, level);
    6023             :         }
    6024           0 : }
    6025             : 
    6026        1688 : static enum ndr_err_code ndr_push_drsuapi_DsNameStatus(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsNameStatus r)
    6027             : {
    6028        1904 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6029        1688 :         return NDR_ERR_SUCCESS;
    6030             : }
    6031             : 
    6032        1480 : static enum ndr_err_code ndr_pull_drsuapi_DsNameStatus(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsNameStatus *r)
    6033             : {
    6034             :         uint32_t v;
    6035        1660 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6036        1660 :         *r = v;
    6037        1480 :         return NDR_ERR_SUCCESS;
    6038             : }
    6039             : 
    6040         488 : _PUBLIC_ void ndr_print_drsuapi_DsNameStatus(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameStatus r)
    6041             : {
    6042         488 :         const char *val = NULL;
    6043             : 
    6044         488 :         switch (r) {
    6045         488 :                 case DRSUAPI_DS_NAME_STATUS_OK: val = "DRSUAPI_DS_NAME_STATUS_OK"; break;
    6046           0 :                 case DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR: val = "DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR"; break;
    6047           0 :                 case DRSUAPI_DS_NAME_STATUS_NOT_FOUND: val = "DRSUAPI_DS_NAME_STATUS_NOT_FOUND"; break;
    6048           0 :                 case DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE: val = "DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE"; break;
    6049           0 :                 case DRSUAPI_DS_NAME_STATUS_NO_MAPPING: val = "DRSUAPI_DS_NAME_STATUS_NO_MAPPING"; break;
    6050           0 :                 case DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY: val = "DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY"; break;
    6051           0 :                 case DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING: val = "DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING"; break;
    6052           0 :                 case DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL: val = "DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL"; break;
    6053             :         }
    6054         488 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6055         488 : }
    6056             : 
    6057        1480 : static enum ndr_err_code ndr_push_drsuapi_DsNameFlags(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsNameFlags r)
    6058             : {
    6059        1660 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6060        1480 :         return NDR_ERR_SUCCESS;
    6061             : }
    6062             : 
    6063        1480 : static enum ndr_err_code ndr_pull_drsuapi_DsNameFlags(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsNameFlags *r)
    6064             : {
    6065             :         uint32_t v;
    6066        1660 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6067        1660 :         *r = v;
    6068        1480 :         return NDR_ERR_SUCCESS;
    6069             : }
    6070             : 
    6071           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameFlags(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameFlags r)
    6072             : {
    6073           0 :         const char *val = NULL;
    6074             : 
    6075           0 :         switch (r) {
    6076           0 :                 case DRSUAPI_DS_NAME_FLAG_NO_FLAGS: val = "DRSUAPI_DS_NAME_FLAG_NO_FLAGS"; break;
    6077           0 :                 case DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY: val = "DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY"; break;
    6078           0 :                 case DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC: val = "DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC"; break;
    6079           0 :                 case DRSUAPI_DS_NAME_FLAG_GCVERIFY: val = "DRSUAPI_DS_NAME_FLAG_GCVERIFY"; break;
    6080           0 :                 case DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL: val = "DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL"; break;
    6081             :         }
    6082           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6083           0 : }
    6084             : 
    6085        2960 : static enum ndr_err_code ndr_push_drsuapi_DsNameFormat(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsNameFormat r)
    6086             : {
    6087        3320 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6088        2960 :         return NDR_ERR_SUCCESS;
    6089             : }
    6090             : 
    6091        2960 : static enum ndr_err_code ndr_pull_drsuapi_DsNameFormat(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsNameFormat *r)
    6092             : {
    6093             :         uint32_t v;
    6094        3320 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6095        3320 :         *r = v;
    6096        2960 :         return NDR_ERR_SUCCESS;
    6097             : }
    6098             : 
    6099           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameFormat(struct ndr_print *ndr, const char *name, enum drsuapi_DsNameFormat r)
    6100             : {
    6101           0 :         const char *val = NULL;
    6102             : 
    6103           0 :         switch (r) {
    6104           0 :                 case DRSUAPI_DS_NAME_FORMAT_UNKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UNKNOWN"; break;
    6105           0 :                 case DRSUAPI_DS_NAME_FORMAT_FQDN_1779: val = "DRSUAPI_DS_NAME_FORMAT_FQDN_1779"; break;
    6106           0 :                 case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT"; break;
    6107           0 :                 case DRSUAPI_DS_NAME_FORMAT_DISPLAY: val = "DRSUAPI_DS_NAME_FORMAT_DISPLAY"; break;
    6108           0 :                 case DRSUAPI_DS_NAME_FORMAT_GUID: val = "DRSUAPI_DS_NAME_FORMAT_GUID"; break;
    6109           0 :                 case DRSUAPI_DS_NAME_FORMAT_CANONICAL: val = "DRSUAPI_DS_NAME_FORMAT_CANONICAL"; break;
    6110           0 :                 case DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL: val = "DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL"; break;
    6111           0 :                 case DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX: val = "DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX"; break;
    6112           0 :                 case DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL: val = "DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL"; break;
    6113           0 :                 case DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY: val = "DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY"; break;
    6114           0 :                 case DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN: val = "DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN"; break;
    6115           0 :                 case DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID: val = "DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID"; break;
    6116           0 :                 case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX"; break;
    6117           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS"; break;
    6118           0 :                 case DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON: val = "DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON"; break;
    6119           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE"; break;
    6120           0 :                 case DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME: val = "DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME"; break;
    6121           0 :                 case DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME: val = "DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME"; break;
    6122           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_NCS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_NCS"; break;
    6123           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS: val = "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS"; break;
    6124           0 :                 case DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID: val = "DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID"; break;
    6125           0 :                 case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN"; break;
    6126           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_ROLES: val = "DRSUAPI_DS_NAME_FORMAT_LIST_ROLES"; break;
    6127           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER: val = "DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER"; break;
    6128           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE"; break;
    6129           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE"; break;
    6130           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE"; break;
    6131           0 :                 case DRSUAPI_DS_NAME_FORMAT_LIST_SITES: val = "DRSUAPI_DS_NAME_FORMAT_LIST_SITES"; break;
    6132             :         }
    6133           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6134           0 : }
    6135             : 
    6136        3344 : static enum ndr_err_code ndr_push_drsuapi_DsNameString(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsNameString *r)
    6137             : {
    6138        3344 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6139        3344 :         if (ndr_flags & NDR_SCALARS) {
    6140        1672 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6141        1672 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->str));
    6142        1672 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6143             :         }
    6144        3344 :         if (ndr_flags & NDR_BUFFERS) {
    6145        1672 :                 if (r->str) {
    6146        1672 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str, CH_UTF16)));
    6147        1672 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6148        1672 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->str, CH_UTF16)));
    6149        1672 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->str, ndr_charset_length(r->str, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6150             :                 }
    6151             :         }
    6152        2984 :         return NDR_ERR_SUCCESS;
    6153             : }
    6154             : 
    6155        3344 : static enum ndr_err_code ndr_pull_drsuapi_DsNameString(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsNameString *r)
    6156             : {
    6157             :         uint32_t _ptr_str;
    6158        3344 :         uint32_t size_str_1 = 0;
    6159        3344 :         uint32_t length_str_1 = 0;
    6160        3344 :         TALLOC_CTX *_mem_save_str_0 = NULL;
    6161        3344 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6162        3344 :         if (ndr_flags & NDR_SCALARS) {
    6163        1672 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6164        1672 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_str));
    6165        1672 :                 if (_ptr_str) {
    6166        1672 :                         NDR_PULL_ALLOC(ndr, r->str);
    6167             :                 } else {
    6168           0 :                         r->str = NULL;
    6169             :                 }
    6170        1672 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6171             :         }
    6172        3344 :         if (ndr_flags & NDR_BUFFERS) {
    6173        1672 :                 if (r->str) {
    6174        1672 :                         _mem_save_str_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6175        1672 :                         NDR_PULL_SET_MEM_CTX(ndr, r->str, 0);
    6176        1672 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->str));
    6177        1672 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->str));
    6178        1672 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->str, &size_str_1));
    6179        1672 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->str, &length_str_1));
    6180        1672 :                         if (length_str_1 > size_str_1) {
    6181           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_str_1, length_str_1);
    6182             :                         }
    6183        1672 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_str_1, sizeof(uint16_t)));
    6184        1672 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->str, length_str_1, sizeof(uint16_t), CH_UTF16));
    6185        1672 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_str_0, 0);
    6186             :                 }
    6187             :         }
    6188        2984 :         return NDR_ERR_SUCCESS;
    6189             : }
    6190             : 
    6191           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameString(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameString *r)
    6192             : {
    6193           0 :         ndr_print_struct(ndr, name, "drsuapi_DsNameString");
    6194           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6195           0 :         ndr->depth++;
    6196           0 :         ndr_print_ptr(ndr, "str", r->str);
    6197           0 :         ndr->depth++;
    6198           0 :         if (r->str) {
    6199           0 :                 ndr_print_string(ndr, "str", r->str);
    6200             :         }
    6201           0 :         ndr->depth--;
    6202           0 :         ndr->depth--;
    6203             : }
    6204             : 
    6205        3320 : static enum ndr_err_code ndr_push_drsuapi_DsNameRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsNameRequest1 *r)
    6206             : {
    6207             :         uint32_t cntr_names_1;
    6208        3320 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6209        3320 :         if (ndr_flags & NDR_SCALARS) {
    6210        1660 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6211        1660 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->codepage));
    6212        1660 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->language));
    6213        1840 :                 NDR_CHECK(ndr_push_drsuapi_DsNameFlags(ndr, NDR_SCALARS, r->format_flags));
    6214        1840 :                 NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr, NDR_SCALARS, r->format_offered));
    6215        1840 :                 NDR_CHECK(ndr_push_drsuapi_DsNameFormat(ndr, NDR_SCALARS, r->format_desired));
    6216        1660 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    6217        1660 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
    6218        1660 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6219             :         }
    6220        3320 :         if (ndr_flags & NDR_BUFFERS) {
    6221        1660 :                 if (r->names) {
    6222        1660 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    6223        3140 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    6224        1660 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    6225             :                         }
    6226        3140 :                         for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    6227        1660 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    6228             :                         }
    6229             :                 }
    6230             :         }
    6231        2960 :         return NDR_ERR_SUCCESS;
    6232             : }
    6233             : 
    6234        3320 : static enum ndr_err_code ndr_pull_drsuapi_DsNameRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsNameRequest1 *r)
    6235             : {
    6236             :         uint32_t _ptr_names;
    6237        3320 :         uint32_t size_names_1 = 0;
    6238             :         uint32_t cntr_names_1;
    6239        3320 :         TALLOC_CTX *_mem_save_names_0 = NULL;
    6240        3320 :         TALLOC_CTX *_mem_save_names_1 = NULL;
    6241        3320 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6242        3320 :         if (ndr_flags & NDR_SCALARS) {
    6243        1660 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6244        1660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->codepage));
    6245        1660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->language));
    6246        1840 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameFlags(ndr, NDR_SCALARS, &r->format_flags));
    6247        1840 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr, NDR_SCALARS, &r->format_offered));
    6248        1840 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameFormat(ndr, NDR_SCALARS, &r->format_desired));
    6249        1660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    6250        1660 :                 if (r->count < 1 || r->count > 10000) {
    6251           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    6252             :                 }
    6253        1660 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
    6254        1660 :                 if (_ptr_names) {
    6255        1660 :                         NDR_PULL_ALLOC(ndr, r->names);
    6256             :                 } else {
    6257           0 :                         r->names = NULL;
    6258             :                 }
    6259        1660 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6260             :         }
    6261        3320 :         if (ndr_flags & NDR_BUFFERS) {
    6262        1660 :                 if (r->names) {
    6263        1660 :                         _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6264        1660 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    6265        1660 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
    6266        1660 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->names, &size_names_1));
    6267        1660 :                         NDR_PULL_ALLOC_N(ndr, r->names, size_names_1);
    6268        1660 :                         _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    6269        1660 :                         NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
    6270        3320 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    6271        1660 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
    6272             :                         }
    6273        3140 :                         for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    6274        1660 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
    6275             :                         }
    6276        1660 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
    6277        1660 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
    6278             :                 }
    6279        1660 :                 if (r->names) {
    6280        1660 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
    6281             :                 }
    6282        1912 :                 for (cntr_names_1 = 0; cntr_names_1 < (size_names_1); cntr_names_1++) {
    6283             :                 }
    6284             :         }
    6285        2960 :         return NDR_ERR_SUCCESS;
    6286             : }
    6287             : 
    6288           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameRequest1 *r)
    6289             : {
    6290             :         uint32_t cntr_names_1;
    6291           0 :         ndr_print_struct(ndr, name, "drsuapi_DsNameRequest1");
    6292           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6293           0 :         ndr->depth++;
    6294           0 :         ndr_print_uint32(ndr, "codepage", r->codepage);
    6295           0 :         ndr_print_uint32(ndr, "language", r->language);
    6296           0 :         ndr_print_drsuapi_DsNameFlags(ndr, "format_flags", r->format_flags);
    6297           0 :         ndr_print_drsuapi_DsNameFormat(ndr, "format_offered", r->format_offered);
    6298           0 :         ndr_print_drsuapi_DsNameFormat(ndr, "format_desired", r->format_desired);
    6299           0 :         ndr_print_uint32(ndr, "count", r->count);
    6300           0 :         ndr_print_ptr(ndr, "names", r->names);
    6301           0 :         ndr->depth++;
    6302           0 :         if (r->names) {
    6303           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "names", (int)r->count);
    6304           0 :                 ndr->depth++;
    6305           0 :                 for (cntr_names_1 = 0; cntr_names_1 < (r->count); cntr_names_1++) {
    6306           0 :                         ndr_print_drsuapi_DsNameString(ndr, "names", &r->names[cntr_names_1]);
    6307             :                 }
    6308           0 :                 ndr->depth--;
    6309             :         }
    6310           0 :         ndr->depth--;
    6311           0 :         ndr->depth--;
    6312             : }
    6313             : 
    6314        1660 : static enum ndr_err_code ndr_push_drsuapi_DsNameRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsNameRequest *r)
    6315             : {
    6316             :         uint32_t level;
    6317        1660 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6318        1660 :         if (ndr_flags & NDR_SCALARS) {
    6319             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6320        1660 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6321        1660 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6322        1660 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6323        1660 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6324        1660 :                 switch (level) {
    6325        1660 :                         case 1: {
    6326        1660 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr, NDR_SCALARS, &r->req1));
    6327        1480 :                         break; }
    6328             : 
    6329           0 :                         default:
    6330           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    6331             :                 }
    6332           0 :         }
    6333        1660 :         if (ndr_flags & NDR_BUFFERS) {
    6334        1660 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6335             :                         /* We didn't get it above, and the token is not needed after this. */
    6336           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6337             :                 }
    6338        1660 :                 switch (level) {
    6339        1660 :                         case 1:
    6340        1660 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameRequest1(ndr, NDR_BUFFERS, &r->req1));
    6341        1480 :                         break;
    6342             : 
    6343           0 :                         default:
    6344           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    6345             :                 }
    6346           0 :         }
    6347        1480 :         return NDR_ERR_SUCCESS;
    6348             : }
    6349             : 
    6350        1660 : static enum ndr_err_code ndr_pull_drsuapi_DsNameRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsNameRequest *r)
    6351             : {
    6352             :         uint32_t level;
    6353             :         uint32_t _level;
    6354        1660 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6355        1660 :         if (ndr_flags & NDR_SCALARS) {
    6356             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6357        1660 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6358        1660 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6359        1660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6360        1660 :                 if (_level != level) {
    6361           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    6362             :                 }
    6363        1660 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6364        1660 :                 switch (level) {
    6365        1660 :                         case 1: {
    6366        1660 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr, NDR_SCALARS, &r->req1));
    6367        1480 :                         break; }
    6368             : 
    6369           0 :                         default:
    6370           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    6371             :                 }
    6372           0 :         }
    6373        1660 :         if (ndr_flags & NDR_BUFFERS) {
    6374        1660 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6375             :                         /* We didn't get it above, and the token is not needed after this. */
    6376           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6377             :                 }
    6378        1660 :                 switch (level) {
    6379        1660 :                         case 1:
    6380        1660 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameRequest1(ndr, NDR_BUFFERS, &r->req1));
    6381        1480 :                         break;
    6382             : 
    6383           0 :                         default:
    6384           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    6385             :                 }
    6386           0 :         }
    6387        1480 :         return NDR_ERR_SUCCESS;
    6388             : }
    6389             : 
    6390           0 : _PUBLIC_ void ndr_print_drsuapi_DsNameRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsNameRequest *r)
    6391             : {
    6392             :         uint32_t level;
    6393           0 :         level = ndr_print_steal_switch_value(ndr, r);
    6394           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsNameRequest");
    6395           0 :         switch (level) {
    6396           0 :                 case 1:
    6397           0 :                         ndr_print_drsuapi_DsNameRequest1(ndr, "req1", &r->req1);
    6398           0 :                 break;
    6399             : 
    6400           0 :                 default:
    6401           0 :                         ndr_print_bad_level(ndr, name, level);
    6402             :         }
    6403           0 : }
    6404             : 
    6405        3808 : static enum ndr_err_code ndr_push_drsuapi_DsNameInfo1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsNameInfo1 *r)
    6406             : {
    6407        3808 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6408        3808 :         if (ndr_flags & NDR_SCALARS) {
    6409        1904 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6410        2120 :                 NDR_CHECK(ndr_push_drsuapi_DsNameStatus(ndr, NDR_SCALARS, r->status));
    6411        1904 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_domain_name));
    6412        1904 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->result_name));
    6413        1904 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6414             :         }
    6415        3808 :         if (ndr_flags & NDR_BUFFERS) {
    6416        1904 :                 if (r->dns_domain_name) {
    6417        1821 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_name, CH_UTF16)));
    6418        1821 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6419        1821 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_domain_name, CH_UTF16)));
    6420        1821 :                         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));
    6421             :                 }
    6422        1904 :                 if (r->result_name) {
    6423        1763 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->result_name, CH_UTF16)));
    6424        1763 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6425        1763 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->result_name, CH_UTF16)));
    6426        1763 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->result_name, ndr_charset_length(r->result_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6427             :                 }
    6428             :         }
    6429        3376 :         return NDR_ERR_SUCCESS;
    6430             : }
    6431             : 
    6432        3320 : static enum ndr_err_code ndr_pull_drsuapi_DsNameInfo1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsNameInfo1 *r)
    6433             : {
    6434             :         uint32_t _ptr_dns_domain_name;
    6435        3320 :         uint32_t size_dns_domain_name_1 = 0;
    6436        3320 :         uint32_t length_dns_domain_name_1 = 0;
    6437        3320 :         TALLOC_CTX *_mem_save_dns_domain_name_0 = NULL;
    6438             :         uint32_t _ptr_result_name;
    6439        3320 :         uint32_t size_result_name_1 = 0;
    6440        3320 :         uint32_t length_result_name_1 = 0;
    6441        3320 :         TALLOC_CTX *_mem_save_result_name_0 = NULL;
    6442        3320 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6443        3320 :         if (ndr_flags & NDR_SCALARS) {
    6444        1660 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6445        1840 :                 NDR_CHECK(ndr_pull_drsuapi_DsNameStatus(ndr, NDR_SCALARS, &r->status));
    6446        1660 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_domain_name));
    6447        1660 :                 if (_ptr_dns_domain_name) {
    6448        1577 :                         NDR_PULL_ALLOC(ndr, r->dns_domain_name);
    6449             :                 } else {
    6450          83 :                         r->dns_domain_name = NULL;
    6451             :                 }
    6452        1660 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_result_name));
    6453        1660 :                 if (_ptr_result_name) {
    6454        1519 :                         NDR_PULL_ALLOC(ndr, r->result_name);
    6455             :                 } else {
    6456         141 :                         r->result_name = NULL;
    6457             :                 }
    6458        1660 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6459             :         }
    6460        3320 :         if (ndr_flags & NDR_BUFFERS) {
    6461        1660 :                 if (r->dns_domain_name) {
    6462        1577 :                         _mem_save_dns_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6463        1577 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_domain_name, 0);
    6464        1577 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_domain_name));
    6465        1577 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_domain_name));
    6466        1577 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_domain_name, &size_dns_domain_name_1));
    6467        1577 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_domain_name, &length_dns_domain_name_1));
    6468        1577 :                         if (length_dns_domain_name_1 > size_dns_domain_name_1) {
    6469           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_domain_name_1, length_dns_domain_name_1);
    6470             :                         }
    6471        1577 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_domain_name_1, sizeof(uint16_t)));
    6472        1577 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_domain_name, length_dns_domain_name_1, sizeof(uint16_t), CH_UTF16));
    6473        1577 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_domain_name_0, 0);
    6474             :                 }
    6475        1660 :                 if (r->result_name) {
    6476        1519 :                         _mem_save_result_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6477        1519 :                         NDR_PULL_SET_MEM_CTX(ndr, r->result_name, 0);
    6478        1519 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->result_name));
    6479        1519 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->result_name));
    6480        1519 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->result_name, &size_result_name_1));
    6481        1519 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->result_name, &length_result_name_1));
    6482        1519 :                         if (length_result_name_1 > size_result_name_1) {
    6483           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_result_name_1, length_result_name_1);
    6484             :                         }
    6485        1519 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_result_name_1, sizeof(uint16_t)));
    6486        1519 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->result_name, length_result_name_1, sizeof(uint16_t), CH_UTF16));
    6487        1519 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_result_name_0, 0);
    6488             :                 }
    6489             :         }
    6490        2960 :         return NDR_ERR_SUCCESS;
    6491             : }
    6492             : 
    6493         488 : _PUBLIC_ void ndr_print_drsuapi_DsNameInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameInfo1 *r)
    6494             : {
    6495         488 :         ndr_print_struct(ndr, name, "drsuapi_DsNameInfo1");
    6496         488 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6497         488 :         ndr->depth++;
    6498         488 :         ndr_print_drsuapi_DsNameStatus(ndr, "status", r->status);
    6499         488 :         ndr_print_ptr(ndr, "dns_domain_name", r->dns_domain_name);
    6500         488 :         ndr->depth++;
    6501         488 :         if (r->dns_domain_name) {
    6502         488 :                 ndr_print_string(ndr, "dns_domain_name", r->dns_domain_name);
    6503             :         }
    6504         488 :         ndr->depth--;
    6505         488 :         ndr_print_ptr(ndr, "result_name", r->result_name);
    6506         488 :         ndr->depth++;
    6507         488 :         if (r->result_name) {
    6508         488 :                 ndr_print_string(ndr, "result_name", r->result_name);
    6509             :         }
    6510         488 :         ndr->depth--;
    6511         488 :         ndr->depth--;
    6512             : }
    6513             : 
    6514        1904 : static enum ndr_err_code ndr_push_drsuapi_DsNameCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsNameCtr1 *r)
    6515             : {
    6516             :         uint32_t cntr_array_1;
    6517        1904 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6518        1904 :         if (ndr_flags & NDR_SCALARS) {
    6519        1904 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6520        1904 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    6521        1904 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    6522        1904 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6523             :         }
    6524        1904 :         if (ndr_flags & NDR_BUFFERS) {
    6525        1904 :                 if (r->array) {
    6526        1904 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    6527        3592 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    6528        1904 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    6529             :                         }
    6530        3592 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    6531        1904 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    6532             :                         }
    6533             :                 }
    6534             :         }
    6535        1688 :         return NDR_ERR_SUCCESS;
    6536             : }
    6537             : 
    6538        1660 : static enum ndr_err_code ndr_pull_drsuapi_DsNameCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsNameCtr1 *r)
    6539             : {
    6540             :         uint32_t _ptr_array;
    6541        1660 :         uint32_t size_array_1 = 0;
    6542             :         uint32_t cntr_array_1;
    6543        1660 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    6544        1660 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    6545        1660 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6546        1660 :         if (ndr_flags & NDR_SCALARS) {
    6547        1660 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6548        1660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    6549        1660 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    6550        1660 :                 if (_ptr_array) {
    6551        1660 :                         NDR_PULL_ALLOC(ndr, r->array);
    6552             :                 } else {
    6553           0 :                         r->array = NULL;
    6554             :                 }
    6555        1660 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6556             :         }
    6557        1660 :         if (ndr_flags & NDR_BUFFERS) {
    6558        1660 :                 if (r->array) {
    6559        1660 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6560        1660 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    6561        1660 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    6562        1660 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    6563        1660 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    6564        1660 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    6565        1660 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    6566        3320 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    6567        1660 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    6568             :                         }
    6569        3140 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    6570        1660 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    6571             :                         }
    6572        1660 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    6573        1660 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    6574             :                 }
    6575        1660 :                 if (r->array) {
    6576        1660 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    6577             :                 }
    6578        1912 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    6579             :                 }
    6580             :         }
    6581        1480 :         return NDR_ERR_SUCCESS;
    6582             : }
    6583             : 
    6584         488 : _PUBLIC_ void ndr_print_drsuapi_DsNameCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsNameCtr1 *r)
    6585             : {
    6586             :         uint32_t cntr_array_1;
    6587         488 :         ndr_print_struct(ndr, name, "drsuapi_DsNameCtr1");
    6588         488 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6589         488 :         ndr->depth++;
    6590         488 :         ndr_print_uint32(ndr, "count", r->count);
    6591         488 :         ndr_print_ptr(ndr, "array", r->array);
    6592         488 :         ndr->depth++;
    6593         488 :         if (r->array) {
    6594         488 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    6595         488 :                 ndr->depth++;
    6596         976 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    6597         488 :                         ndr_print_drsuapi_DsNameInfo1(ndr, "array", &r->array[cntr_array_1]);
    6598             :                 }
    6599         488 :                 ndr->depth--;
    6600             :         }
    6601         488 :         ndr->depth--;
    6602         488 :         ndr->depth--;
    6603             : }
    6604             : 
    6605        1904 : static enum ndr_err_code ndr_push_drsuapi_DsNameCtr(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsNameCtr *r)
    6606             : {
    6607             :         uint32_t level;
    6608        1904 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6609        1904 :         if (ndr_flags & NDR_SCALARS) {
    6610             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6611        1904 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6612        1904 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6613        1904 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6614        1904 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6615        1904 :                 switch (level) {
    6616        1904 :                         case 1: {
    6617        1904 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
    6618        1688 :                         break; }
    6619             : 
    6620           0 :                         default:
    6621           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    6622             :                 }
    6623           0 :         }
    6624        1904 :         if (ndr_flags & NDR_BUFFERS) {
    6625        1904 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6626             :                         /* We didn't get it above, and the token is not needed after this. */
    6627           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6628             :                 }
    6629        1904 :                 switch (level) {
    6630        1904 :                         case 1:
    6631        1904 :                                 if (r->ctr1) {
    6632        1904 :                                         NDR_CHECK(ndr_push_drsuapi_DsNameCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    6633             :                                 }
    6634        1688 :                         break;
    6635             : 
    6636           0 :                         default:
    6637           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    6638             :                 }
    6639           0 :         }
    6640        1688 :         return NDR_ERR_SUCCESS;
    6641             : }
    6642             : 
    6643        1660 : static enum ndr_err_code ndr_pull_drsuapi_DsNameCtr(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsNameCtr *r)
    6644             : {
    6645             :         uint32_t level;
    6646             :         uint32_t _level;
    6647        1660 :         TALLOC_CTX *_mem_save_ctr1_0 = NULL;
    6648             :         uint32_t _ptr_ctr1;
    6649        1660 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6650        1660 :         if (ndr_flags & NDR_SCALARS) {
    6651             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6652        1660 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6653        1660 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6654        1660 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6655        1660 :                 if (_level != level) {
    6656           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    6657             :                 }
    6658        1660 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6659        1660 :                 switch (level) {
    6660        1660 :                         case 1: {
    6661        1660 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
    6662        1660 :                                 if (_ptr_ctr1) {
    6663        1660 :                                         NDR_PULL_ALLOC(ndr, r->ctr1);
    6664             :                                 } else {
    6665           0 :                                         r->ctr1 = NULL;
    6666             :                                 }
    6667        1480 :                         break; }
    6668             : 
    6669           0 :                         default:
    6670           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    6671             :                 }
    6672           0 :         }
    6673        1660 :         if (ndr_flags & NDR_BUFFERS) {
    6674        1660 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6675             :                         /* We didn't get it above, and the token is not needed after this. */
    6676           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6677             :                 }
    6678        1660 :                 switch (level) {
    6679        1660 :                         case 1:
    6680        1660 :                                 if (r->ctr1) {
    6681        1660 :                                         _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6682        1660 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
    6683        1660 :                                         NDR_CHECK(ndr_pull_drsuapi_DsNameCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    6684        1660 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
    6685             :                                 }
    6686        1480 :                         break;
    6687             : 
    6688           0 :                         default:
    6689           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    6690             :                 }
    6691           0 :         }
    6692        1480 :         return NDR_ERR_SUCCESS;
    6693             : }
    6694             : 
    6695         488 : _PUBLIC_ void ndr_print_drsuapi_DsNameCtr(struct ndr_print *ndr, const char *name, const union drsuapi_DsNameCtr *r)
    6696             : {
    6697             :         uint32_t level;
    6698         488 :         level = ndr_print_steal_switch_value(ndr, r);
    6699         488 :         ndr_print_union(ndr, name, level, "drsuapi_DsNameCtr");
    6700         488 :         switch (level) {
    6701         488 :                 case 1:
    6702         488 :                         ndr_print_ptr(ndr, "ctr1", r->ctr1);
    6703         488 :                         ndr->depth++;
    6704         488 :                         if (r->ctr1) {
    6705         488 :                                 ndr_print_drsuapi_DsNameCtr1(ndr, "ctr1", r->ctr1);
    6706             :                         }
    6707         488 :                         ndr->depth--;
    6708         488 :                 break;
    6709             : 
    6710           0 :                 default:
    6711           0 :                         ndr_print_bad_level(ndr, name, level);
    6712             :         }
    6713         488 : }
    6714             : 
    6715           4 : static enum ndr_err_code ndr_push_drsuapi_DsSpnOperation(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsSpnOperation r)
    6716             : {
    6717           4 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6718           4 :         return NDR_ERR_SUCCESS;
    6719             : }
    6720             : 
    6721           4 : static enum ndr_err_code ndr_pull_drsuapi_DsSpnOperation(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsSpnOperation *r)
    6722             : {
    6723             :         uint32_t v;
    6724           4 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6725           4 :         *r = v;
    6726           4 :         return NDR_ERR_SUCCESS;
    6727             : }
    6728             : 
    6729           0 : _PUBLIC_ void ndr_print_drsuapi_DsSpnOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsSpnOperation r)
    6730             : {
    6731           0 :         const char *val = NULL;
    6732             : 
    6733           0 :         switch (r) {
    6734           0 :                 case DRSUAPI_DS_SPN_OPERATION_ADD: val = "DRSUAPI_DS_SPN_OPERATION_ADD"; break;
    6735           0 :                 case DRSUAPI_DS_SPN_OPERATION_REPLACE: val = "DRSUAPI_DS_SPN_OPERATION_REPLACE"; break;
    6736           0 :                 case DRSUAPI_DS_SPN_OPERATION_DELETE: val = "DRSUAPI_DS_SPN_OPERATION_DELETE"; break;
    6737             :         }
    6738           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6739           0 : }
    6740             : 
    6741           8 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsWriteAccountSpnRequest1 *r)
    6742             : {
    6743             :         uint32_t cntr_spn_names_1;
    6744           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6745           8 :         if (ndr_flags & NDR_SCALARS) {
    6746           4 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6747           4 :                 NDR_CHECK(ndr_push_drsuapi_DsSpnOperation(ndr, NDR_SCALARS, r->operation));
    6748           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
    6749           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_dn));
    6750           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    6751           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->spn_names));
    6752           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6753             :         }
    6754           8 :         if (ndr_flags & NDR_BUFFERS) {
    6755           4 :                 if (r->object_dn) {
    6756           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
    6757           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6758           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->object_dn, CH_UTF16)));
    6759           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));
    6760             :                 }
    6761           4 :                 if (r->spn_names) {
    6762           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    6763          16 :                         for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
    6764          12 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->spn_names[cntr_spn_names_1]));
    6765             :                         }
    6766          16 :                         for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
    6767          12 :                                 NDR_CHECK(ndr_push_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->spn_names[cntr_spn_names_1]));
    6768             :                         }
    6769             :                 }
    6770             :         }
    6771           8 :         return NDR_ERR_SUCCESS;
    6772             : }
    6773             : 
    6774           8 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsWriteAccountSpnRequest1 *r)
    6775             : {
    6776             :         uint32_t _ptr_object_dn;
    6777           8 :         uint32_t size_object_dn_1 = 0;
    6778           8 :         uint32_t length_object_dn_1 = 0;
    6779           8 :         TALLOC_CTX *_mem_save_object_dn_0 = NULL;
    6780             :         uint32_t _ptr_spn_names;
    6781           8 :         uint32_t size_spn_names_1 = 0;
    6782             :         uint32_t cntr_spn_names_1;
    6783           8 :         TALLOC_CTX *_mem_save_spn_names_0 = NULL;
    6784           8 :         TALLOC_CTX *_mem_save_spn_names_1 = NULL;
    6785           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6786           8 :         if (ndr_flags & NDR_SCALARS) {
    6787           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6788           4 :                 NDR_CHECK(ndr_pull_drsuapi_DsSpnOperation(ndr, NDR_SCALARS, &r->operation));
    6789           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
    6790           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_dn));
    6791           4 :                 if (_ptr_object_dn) {
    6792           4 :                         NDR_PULL_ALLOC(ndr, r->object_dn);
    6793             :                 } else {
    6794           0 :                         r->object_dn = NULL;
    6795             :                 }
    6796           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    6797           4 :                 if (r->count > 10000) {
    6798           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    6799             :                 }
    6800           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_spn_names));
    6801           4 :                 if (_ptr_spn_names) {
    6802           4 :                         NDR_PULL_ALLOC(ndr, r->spn_names);
    6803             :                 } else {
    6804           0 :                         r->spn_names = NULL;
    6805             :                 }
    6806           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6807             :         }
    6808           8 :         if (ndr_flags & NDR_BUFFERS) {
    6809           4 :                 if (r->object_dn) {
    6810           4 :                         _mem_save_object_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6811           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->object_dn, 0);
    6812           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->object_dn));
    6813           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->object_dn));
    6814           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->object_dn, &size_object_dn_1));
    6815           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->object_dn, &length_object_dn_1));
    6816           4 :                         if (length_object_dn_1 > size_object_dn_1) {
    6817           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_object_dn_1, length_object_dn_1);
    6818             :                         }
    6819           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_object_dn_1, sizeof(uint16_t)));
    6820           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_dn, length_object_dn_1, sizeof(uint16_t), CH_UTF16));
    6821           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_dn_0, 0);
    6822             :                 }
    6823           4 :                 if (r->spn_names) {
    6824           4 :                         _mem_save_spn_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6825           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->spn_names, 0);
    6826           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->spn_names));
    6827           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->spn_names, &size_spn_names_1));
    6828           4 :                         NDR_PULL_ALLOC_N(ndr, r->spn_names, size_spn_names_1);
    6829           4 :                         _mem_save_spn_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
    6830           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->spn_names, 0);
    6831          16 :                         for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
    6832          12 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_SCALARS, &r->spn_names[cntr_spn_names_1]));
    6833             :                         }
    6834          16 :                         for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
    6835          12 :                                 NDR_CHECK(ndr_pull_drsuapi_DsNameString(ndr, NDR_BUFFERS, &r->spn_names[cntr_spn_names_1]));
    6836             :                         }
    6837           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_spn_names_1, 0);
    6838           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_spn_names_0, 0);
    6839             :                 }
    6840           4 :                 if (r->spn_names) {
    6841           4 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->spn_names, r->count));
    6842             :                 }
    6843           4 :                 for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (size_spn_names_1); cntr_spn_names_1++) {
    6844             :                 }
    6845             :         }
    6846           8 :         return NDR_ERR_SUCCESS;
    6847             : }
    6848             : 
    6849           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsWriteAccountSpnRequest1 *r)
    6850             : {
    6851             :         uint32_t cntr_spn_names_1;
    6852           0 :         ndr_print_struct(ndr, name, "drsuapi_DsWriteAccountSpnRequest1");
    6853           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6854           0 :         ndr->depth++;
    6855           0 :         ndr_print_drsuapi_DsSpnOperation(ndr, "operation", r->operation);
    6856           0 :         ndr_print_uint32(ndr, "unknown1", r->unknown1);
    6857           0 :         ndr_print_ptr(ndr, "object_dn", r->object_dn);
    6858           0 :         ndr->depth++;
    6859           0 :         if (r->object_dn) {
    6860           0 :                 ndr_print_string(ndr, "object_dn", r->object_dn);
    6861             :         }
    6862           0 :         ndr->depth--;
    6863           0 :         ndr_print_uint32(ndr, "count", r->count);
    6864           0 :         ndr_print_ptr(ndr, "spn_names", r->spn_names);
    6865           0 :         ndr->depth++;
    6866           0 :         if (r->spn_names) {
    6867           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "spn_names", (int)r->count);
    6868           0 :                 ndr->depth++;
    6869           0 :                 for (cntr_spn_names_1 = 0; cntr_spn_names_1 < (r->count); cntr_spn_names_1++) {
    6870           0 :                         ndr_print_drsuapi_DsNameString(ndr, "spn_names", &r->spn_names[cntr_spn_names_1]);
    6871             :                 }
    6872           0 :                 ndr->depth--;
    6873             :         }
    6874           0 :         ndr->depth--;
    6875           0 :         ndr->depth--;
    6876             : }
    6877             : 
    6878           4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsWriteAccountSpnRequest *r)
    6879             : {
    6880             :         uint32_t level;
    6881           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6882           4 :         if (ndr_flags & NDR_SCALARS) {
    6883             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6884           4 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6885           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6886           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6887           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6888           4 :                 switch (level) {
    6889           4 :                         case 1: {
    6890           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_SCALARS, &r->req1));
    6891           4 :                         break; }
    6892             : 
    6893           0 :                         default:
    6894           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    6895             :                 }
    6896           0 :         }
    6897           4 :         if (ndr_flags & NDR_BUFFERS) {
    6898           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6899             :                         /* We didn't get it above, and the token is not needed after this. */
    6900           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6901             :                 }
    6902           4 :                 switch (level) {
    6903           4 :                         case 1:
    6904           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_BUFFERS, &r->req1));
    6905           4 :                         break;
    6906             : 
    6907           0 :                         default:
    6908           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    6909             :                 }
    6910           0 :         }
    6911           4 :         return NDR_ERR_SUCCESS;
    6912             : }
    6913             : 
    6914           4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsWriteAccountSpnRequest *r)
    6915             : {
    6916             :         uint32_t level;
    6917             :         uint32_t _level;
    6918           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6919           4 :         if (ndr_flags & NDR_SCALARS) {
    6920             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6921           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6922           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6923           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6924           4 :                 if (_level != level) {
    6925           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    6926             :                 }
    6927           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6928           4 :                 switch (level) {
    6929           4 :                         case 1: {
    6930           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_SCALARS, &r->req1));
    6931           4 :                         break; }
    6932             : 
    6933           0 :                         default:
    6934           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    6935             :                 }
    6936           0 :         }
    6937           4 :         if (ndr_flags & NDR_BUFFERS) {
    6938           4 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6939             :                         /* We didn't get it above, and the token is not needed after this. */
    6940           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6941             :                 }
    6942           4 :                 switch (level) {
    6943           4 :                         case 1:
    6944           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnRequest1(ndr, NDR_BUFFERS, &r->req1));
    6945           4 :                         break;
    6946             : 
    6947           0 :                         default:
    6948           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    6949             :                 }
    6950           0 :         }
    6951           4 :         return NDR_ERR_SUCCESS;
    6952             : }
    6953             : 
    6954           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsWriteAccountSpnRequest *r)
    6955             : {
    6956             :         uint32_t level;
    6957           0 :         level = ndr_print_steal_switch_value(ndr, r);
    6958           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsWriteAccountSpnRequest");
    6959           0 :         switch (level) {
    6960           0 :                 case 1:
    6961           0 :                         ndr_print_drsuapi_DsWriteAccountSpnRequest1(ndr, "req1", &r->req1);
    6962           0 :                 break;
    6963             : 
    6964           0 :                 default:
    6965           0 :                         ndr_print_bad_level(ndr, name, level);
    6966             :         }
    6967           0 : }
    6968             : 
    6969           4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnResult1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsWriteAccountSpnResult1 *r)
    6970             : {
    6971           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6972           4 :         if (ndr_flags & NDR_SCALARS) {
    6973           4 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    6974           4 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
    6975           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    6976             :         }
    6977           4 :         if (ndr_flags & NDR_BUFFERS) {
    6978             :         }
    6979           4 :         return NDR_ERR_SUCCESS;
    6980             : }
    6981             : 
    6982           4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnResult1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsWriteAccountSpnResult1 *r)
    6983             : {
    6984           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6985           4 :         if (ndr_flags & NDR_SCALARS) {
    6986           4 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    6987           4 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
    6988           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    6989             :         }
    6990           4 :         if (ndr_flags & NDR_BUFFERS) {
    6991             :         }
    6992           4 :         return NDR_ERR_SUCCESS;
    6993             : }
    6994             : 
    6995           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnResult1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsWriteAccountSpnResult1 *r)
    6996             : {
    6997           0 :         ndr_print_struct(ndr, name, "drsuapi_DsWriteAccountSpnResult1");
    6998           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6999           0 :         ndr->depth++;
    7000           0 :         ndr_print_WERROR(ndr, "status", r->status);
    7001           0 :         ndr->depth--;
    7002             : }
    7003             : 
    7004           4 : static enum ndr_err_code ndr_push_drsuapi_DsWriteAccountSpnResult(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsWriteAccountSpnResult *r)
    7005             : {
    7006             :         uint32_t level;
    7007           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7008           4 :         if (ndr_flags & NDR_SCALARS) {
    7009             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7010           4 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7011           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7012           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7013           4 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7014           4 :                 switch (level) {
    7015           4 :                         case 1: {
    7016           4 :                                 NDR_CHECK(ndr_push_drsuapi_DsWriteAccountSpnResult1(ndr, NDR_SCALARS, &r->res1));
    7017           4 :                         break; }
    7018             : 
    7019           0 :                         default:
    7020           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7021             :                 }
    7022           0 :         }
    7023           4 :         if (ndr_flags & NDR_BUFFERS) {
    7024           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7025             :                         /* We didn't get it above, and the token is not needed after this. */
    7026           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7027             :                 }
    7028           0 :                 switch (level) {
    7029           0 :                         case 1:
    7030           0 :                         break;
    7031             : 
    7032           0 :                         default:
    7033           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7034             :                 }
    7035           4 :         }
    7036           4 :         return NDR_ERR_SUCCESS;
    7037             : }
    7038             : 
    7039           4 : static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnResult(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsWriteAccountSpnResult *r)
    7040             : {
    7041             :         uint32_t level;
    7042             :         uint32_t _level;
    7043           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7044           4 :         if (ndr_flags & NDR_SCALARS) {
    7045             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7046           4 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7047           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7048           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7049           4 :                 if (_level != level) {
    7050           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    7051             :                 }
    7052           4 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7053           4 :                 switch (level) {
    7054           4 :                         case 1: {
    7055           4 :                                 NDR_CHECK(ndr_pull_drsuapi_DsWriteAccountSpnResult1(ndr, NDR_SCALARS, &r->res1));
    7056           4 :                         break; }
    7057             : 
    7058           0 :                         default:
    7059           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7060             :                 }
    7061           0 :         }
    7062           4 :         if (ndr_flags & NDR_BUFFERS) {
    7063           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7064             :                         /* We didn't get it above, and the token is not needed after this. */
    7065           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7066             :                 }
    7067           0 :                 switch (level) {
    7068           0 :                         case 1:
    7069           0 :                         break;
    7070             : 
    7071           0 :                         default:
    7072           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7073             :                 }
    7074           4 :         }
    7075           4 :         return NDR_ERR_SUCCESS;
    7076             : }
    7077             : 
    7078           0 : _PUBLIC_ void ndr_print_drsuapi_DsWriteAccountSpnResult(struct ndr_print *ndr, const char *name, const union drsuapi_DsWriteAccountSpnResult *r)
    7079             : {
    7080             :         uint32_t level;
    7081           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7082           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsWriteAccountSpnResult");
    7083           0 :         switch (level) {
    7084           0 :                 case 1:
    7085           0 :                         ndr_print_drsuapi_DsWriteAccountSpnResult1(ndr, "res1", &r->res1);
    7086           0 :                 break;
    7087             : 
    7088           0 :                 default:
    7089           0 :                         ndr_print_bad_level(ndr, name, level);
    7090             :         }
    7091           0 : }
    7092             : 
    7093          14 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsRemoveDSServerRequest1 *r)
    7094             : {
    7095          14 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7096          14 :         if (ndr_flags & NDR_SCALARS) {
    7097           7 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7098           7 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
    7099           7 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_dn));
    7100           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->commit));
    7101           7 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7102             :         }
    7103          14 :         if (ndr_flags & NDR_BUFFERS) {
    7104           7 :                 if (r->server_dn) {
    7105           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7106           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7107           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7108           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));
    7109             :                 }
    7110           7 :                 if (r->domain_dn) {
    7111           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_dn, CH_UTF16)));
    7112           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7113           7 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_dn, CH_UTF16)));
    7114           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));
    7115             :                 }
    7116             :         }
    7117          14 :         return NDR_ERR_SUCCESS;
    7118             : }
    7119             : 
    7120          14 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsRemoveDSServerRequest1 *r)
    7121             : {
    7122             :         uint32_t _ptr_server_dn;
    7123          14 :         uint32_t size_server_dn_1 = 0;
    7124          14 :         uint32_t length_server_dn_1 = 0;
    7125          14 :         TALLOC_CTX *_mem_save_server_dn_0 = NULL;
    7126             :         uint32_t _ptr_domain_dn;
    7127          14 :         uint32_t size_domain_dn_1 = 0;
    7128          14 :         uint32_t length_domain_dn_1 = 0;
    7129          14 :         TALLOC_CTX *_mem_save_domain_dn_0 = NULL;
    7130          14 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7131          14 :         if (ndr_flags & NDR_SCALARS) {
    7132           7 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7133           7 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
    7134           7 :                 if (_ptr_server_dn) {
    7135           7 :                         NDR_PULL_ALLOC(ndr, r->server_dn);
    7136             :                 } else {
    7137           0 :                         r->server_dn = NULL;
    7138             :                 }
    7139           7 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_dn));
    7140           7 :                 if (_ptr_domain_dn) {
    7141           7 :                         NDR_PULL_ALLOC(ndr, r->domain_dn);
    7142             :                 } else {
    7143           0 :                         r->domain_dn = NULL;
    7144             :                 }
    7145           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->commit));
    7146           7 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7147             :         }
    7148          14 :         if (ndr_flags & NDR_BUFFERS) {
    7149           7 :                 if (r->server_dn) {
    7150           7 :                         _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7151           7 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
    7152           7 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
    7153           7 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
    7154           7 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
    7155           7 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
    7156           7 :                         if (length_server_dn_1 > size_server_dn_1) {
    7157           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_dn_1, length_server_dn_1);
    7158             :                         }
    7159           7 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
    7160           7 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
    7161           7 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
    7162             :                 }
    7163           7 :                 if (r->domain_dn) {
    7164           7 :                         _mem_save_domain_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7165           7 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_dn, 0);
    7166           7 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_dn));
    7167           7 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_dn));
    7168           7 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_dn, &size_domain_dn_1));
    7169           7 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_dn, &length_domain_dn_1));
    7170           7 :                         if (length_domain_dn_1 > size_domain_dn_1) {
    7171           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_dn_1, length_domain_dn_1);
    7172             :                         }
    7173           7 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_dn_1, sizeof(uint16_t)));
    7174           7 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_dn, length_domain_dn_1, sizeof(uint16_t), CH_UTF16));
    7175           7 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_dn_0, 0);
    7176             :                 }
    7177             :         }
    7178          14 :         return NDR_ERR_SUCCESS;
    7179             : }
    7180             : 
    7181           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsRemoveDSServerRequest1 *r)
    7182             : {
    7183           0 :         ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServerRequest1");
    7184           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7185           0 :         ndr->depth++;
    7186           0 :         ndr_print_ptr(ndr, "server_dn", r->server_dn);
    7187           0 :         ndr->depth++;
    7188           0 :         if (r->server_dn) {
    7189           0 :                 ndr_print_string(ndr, "server_dn", r->server_dn);
    7190             :         }
    7191           0 :         ndr->depth--;
    7192           0 :         ndr_print_ptr(ndr, "domain_dn", r->domain_dn);
    7193           0 :         ndr->depth++;
    7194           0 :         if (r->domain_dn) {
    7195           0 :                 ndr_print_string(ndr, "domain_dn", r->domain_dn);
    7196             :         }
    7197           0 :         ndr->depth--;
    7198           0 :         ndr_print_uint32(ndr, "commit", r->commit);
    7199           0 :         ndr->depth--;
    7200             : }
    7201             : 
    7202           7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsRemoveDSServerRequest *r)
    7203             : {
    7204             :         uint32_t level;
    7205           7 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7206           7 :         if (ndr_flags & NDR_SCALARS) {
    7207             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7208           7 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7209           7 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7210           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7211           7 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7212           7 :                 switch (level) {
    7213           7 :                         case 1: {
    7214           7 :                                 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_SCALARS, &r->req1));
    7215           7 :                         break; }
    7216             : 
    7217           0 :                         default:
    7218           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7219             :                 }
    7220           0 :         }
    7221           7 :         if (ndr_flags & NDR_BUFFERS) {
    7222           7 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7223             :                         /* We didn't get it above, and the token is not needed after this. */
    7224           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7225             :                 }
    7226           7 :                 switch (level) {
    7227           7 :                         case 1:
    7228           7 :                                 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_BUFFERS, &r->req1));
    7229           7 :                         break;
    7230             : 
    7231           0 :                         default:
    7232           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7233             :                 }
    7234           0 :         }
    7235           7 :         return NDR_ERR_SUCCESS;
    7236             : }
    7237             : 
    7238           7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsRemoveDSServerRequest *r)
    7239             : {
    7240             :         uint32_t level;
    7241             :         uint32_t _level;
    7242           7 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7243           7 :         if (ndr_flags & NDR_SCALARS) {
    7244             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7245           7 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7246           7 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7247           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7248           7 :                 if (_level != level) {
    7249           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    7250             :                 }
    7251           7 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7252           7 :                 switch (level) {
    7253           7 :                         case 1: {
    7254           7 :                                 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_SCALARS, &r->req1));
    7255           7 :                         break; }
    7256             : 
    7257           0 :                         default:
    7258           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7259             :                 }
    7260           0 :         }
    7261           7 :         if (ndr_flags & NDR_BUFFERS) {
    7262           7 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7263             :                         /* We didn't get it above, and the token is not needed after this. */
    7264           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7265             :                 }
    7266           7 :                 switch (level) {
    7267           7 :                         case 1:
    7268           7 :                                 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerRequest1(ndr, NDR_BUFFERS, &r->req1));
    7269           7 :                         break;
    7270             : 
    7271           0 :                         default:
    7272           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7273             :                 }
    7274           0 :         }
    7275           7 :         return NDR_ERR_SUCCESS;
    7276             : }
    7277             : 
    7278           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsRemoveDSServerRequest *r)
    7279             : {
    7280             :         uint32_t level;
    7281           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7282           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsRemoveDSServerRequest");
    7283           0 :         switch (level) {
    7284           0 :                 case 1:
    7285           0 :                         ndr_print_drsuapi_DsRemoveDSServerRequest1(ndr, "req1", &r->req1);
    7286           0 :                 break;
    7287             : 
    7288           0 :                 default:
    7289           0 :                         ndr_print_bad_level(ndr, name, level);
    7290             :         }
    7291           0 : }
    7292             : 
    7293           7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsRemoveDSServerResult1 *r)
    7294             : {
    7295           7 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7296           7 :         if (ndr_flags & NDR_SCALARS) {
    7297           7 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7298           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->last_dc_in_domain));
    7299           7 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    7300             :         }
    7301           7 :         if (ndr_flags & NDR_BUFFERS) {
    7302             :         }
    7303           7 :         return NDR_ERR_SUCCESS;
    7304             : }
    7305             : 
    7306           7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsRemoveDSServerResult1 *r)
    7307             : {
    7308           7 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7309           7 :         if (ndr_flags & NDR_SCALARS) {
    7310           7 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7311           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->last_dc_in_domain));
    7312           7 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    7313             :         }
    7314           7 :         if (ndr_flags & NDR_BUFFERS) {
    7315             :         }
    7316           7 :         return NDR_ERR_SUCCESS;
    7317             : }
    7318             : 
    7319           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerResult1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsRemoveDSServerResult1 *r)
    7320             : {
    7321           0 :         ndr_print_struct(ndr, name, "drsuapi_DsRemoveDSServerResult1");
    7322           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7323           0 :         ndr->depth++;
    7324           0 :         ndr_print_uint32(ndr, "last_dc_in_domain", r->last_dc_in_domain);
    7325           0 :         ndr->depth--;
    7326             : }
    7327             : 
    7328           7 : static enum ndr_err_code ndr_push_drsuapi_DsRemoveDSServerResult(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsRemoveDSServerResult *r)
    7329             : {
    7330             :         uint32_t level;
    7331           7 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7332           7 :         if (ndr_flags & NDR_SCALARS) {
    7333             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7334           7 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7335           7 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7336           7 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7337           7 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
    7338           7 :                 switch (level) {
    7339           7 :                         case 1: {
    7340           7 :                                 NDR_CHECK(ndr_push_drsuapi_DsRemoveDSServerResult1(ndr, NDR_SCALARS, &r->res1));
    7341           7 :                         break; }
    7342             : 
    7343           0 :                         default:
    7344           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7345             :                 }
    7346           0 :         }
    7347           7 :         if (ndr_flags & NDR_BUFFERS) {
    7348           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7349             :                         /* We didn't get it above, and the token is not needed after this. */
    7350           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7351             :                 }
    7352           0 :                 switch (level) {
    7353           0 :                         case 1:
    7354           0 :                         break;
    7355             : 
    7356           0 :                         default:
    7357           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7358             :                 }
    7359           5 :         }
    7360           7 :         return NDR_ERR_SUCCESS;
    7361             : }
    7362             : 
    7363           7 : static enum ndr_err_code ndr_pull_drsuapi_DsRemoveDSServerResult(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsRemoveDSServerResult *r)
    7364             : {
    7365             :         uint32_t level;
    7366             :         uint32_t _level;
    7367           7 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7368           7 :         if (ndr_flags & NDR_SCALARS) {
    7369             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7370           7 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7371           7 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7372           7 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7373           7 :                 if (_level != level) {
    7374           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    7375             :                 }
    7376           7 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
    7377           7 :                 switch (level) {
    7378           7 :                         case 1: {
    7379           7 :                                 NDR_CHECK(ndr_pull_drsuapi_DsRemoveDSServerResult1(ndr, NDR_SCALARS, &r->res1));
    7380           7 :                         break; }
    7381             : 
    7382           0 :                         default:
    7383           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7384             :                 }
    7385           0 :         }
    7386           7 :         if (ndr_flags & NDR_BUFFERS) {
    7387           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7388             :                         /* We didn't get it above, and the token is not needed after this. */
    7389           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7390             :                 }
    7391           0 :                 switch (level) {
    7392           0 :                         case 1:
    7393           0 :                         break;
    7394             : 
    7395           0 :                         default:
    7396           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7397             :                 }
    7398           5 :         }
    7399           7 :         return NDR_ERR_SUCCESS;
    7400             : }
    7401             : 
    7402           0 : _PUBLIC_ void ndr_print_drsuapi_DsRemoveDSServerResult(struct ndr_print *ndr, const char *name, const union drsuapi_DsRemoveDSServerResult *r)
    7403             : {
    7404             :         uint32_t level;
    7405           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7406           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsRemoveDSServerResult");
    7407           0 :         switch (level) {
    7408           0 :                 case 1:
    7409           0 :                         ndr_print_drsuapi_DsRemoveDSServerResult1(ndr, "res1", &r->res1);
    7410           0 :                 break;
    7411             : 
    7412           0 :                 default:
    7413           0 :                         ndr_print_bad_level(ndr, name, level);
    7414             :         }
    7415           0 : }
    7416             : 
    7417          18 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtrLevels(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsGetDCInfoCtrLevels r)
    7418             : {
    7419          18 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    7420          18 :         return NDR_ERR_SUCCESS;
    7421             : }
    7422             : 
    7423          12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtrLevels(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsGetDCInfoCtrLevels *r)
    7424             : {
    7425             :         uint32_t v;
    7426          12 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    7427          12 :         *r = v;
    7428          12 :         return NDR_ERR_SUCCESS;
    7429             : }
    7430             : 
    7431           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtrLevels(struct ndr_print *ndr, const char *name, enum drsuapi_DsGetDCInfoCtrLevels r)
    7432             : {
    7433           0 :         const char *val = NULL;
    7434             : 
    7435           0 :         switch (r) {
    7436           0 :                 case DRSUAPI_DC_INFO_CTR_1: val = "DRSUAPI_DC_INFO_CTR_1"; break;
    7437           0 :                 case DRSUAPI_DC_INFO_CTR_2: val = "DRSUAPI_DC_INFO_CTR_2"; break;
    7438           0 :                 case DRSUAPI_DC_INFO_CTR_3: val = "DRSUAPI_DC_INFO_CTR_3"; break;
    7439           0 :                 case DRSUAPI_DC_CONNECTION_CTR_01: val = "DRSUAPI_DC_CONNECTION_CTR_01"; break;
    7440             :         }
    7441           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    7442           0 : }
    7443             : 
    7444          12 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoRequest1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetDCInfoRequest1 *r)
    7445             : {
    7446          12 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7447          12 :         if (ndr_flags & NDR_SCALARS) {
    7448           6 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7449           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain_name));
    7450           6 :                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, r->level));
    7451           6 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7452             :         }
    7453          12 :         if (ndr_flags & NDR_BUFFERS) {
    7454           6 :                 if (r->domain_name) {
    7455           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
    7456           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7457           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain_name, CH_UTF16)));
    7458           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));
    7459             :                 }
    7460             :         }
    7461          12 :         return NDR_ERR_SUCCESS;
    7462             : }
    7463             : 
    7464          12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoRequest1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetDCInfoRequest1 *r)
    7465             : {
    7466             :         uint32_t _ptr_domain_name;
    7467          12 :         uint32_t size_domain_name_1 = 0;
    7468          12 :         uint32_t length_domain_name_1 = 0;
    7469          12 :         TALLOC_CTX *_mem_save_domain_name_0 = NULL;
    7470          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7471          12 :         if (ndr_flags & NDR_SCALARS) {
    7472           6 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7473           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain_name));
    7474           6 :                 if (_ptr_domain_name) {
    7475           6 :                         NDR_PULL_ALLOC(ndr, r->domain_name);
    7476             :                 } else {
    7477           0 :                         r->domain_name = NULL;
    7478             :                 }
    7479           6 :                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoCtrLevels(ndr, NDR_SCALARS, &r->level));
    7480           6 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7481             :         }
    7482          12 :         if (ndr_flags & NDR_BUFFERS) {
    7483           6 :                 if (r->domain_name) {
    7484           6 :                         _mem_save_domain_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7485           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain_name, 0);
    7486           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain_name));
    7487           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain_name));
    7488           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain_name, &size_domain_name_1));
    7489           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain_name, &length_domain_name_1));
    7490           6 :                         if (length_domain_name_1 > size_domain_name_1) {
    7491           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_name_1, length_domain_name_1);
    7492             :                         }
    7493           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_name_1, sizeof(uint16_t)));
    7494           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain_name, length_domain_name_1, sizeof(uint16_t), CH_UTF16));
    7495           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_name_0, 0);
    7496             :                 }
    7497             :         }
    7498          12 :         return NDR_ERR_SUCCESS;
    7499             : }
    7500             : 
    7501           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoRequest1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoRequest1 *r)
    7502             : {
    7503           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoRequest1");
    7504           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7505           0 :         ndr->depth++;
    7506           0 :         ndr_print_ptr(ndr, "domain_name", r->domain_name);
    7507           0 :         ndr->depth++;
    7508           0 :         if (r->domain_name) {
    7509           0 :                 ndr_print_string(ndr, "domain_name", r->domain_name);
    7510             :         }
    7511           0 :         ndr->depth--;
    7512           0 :         ndr_print_drsuapi_DsGetDCInfoCtrLevels(ndr, "level", r->level);
    7513           0 :         ndr->depth--;
    7514             : }
    7515             : 
    7516           6 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoRequest(struct ndr_push *ndr, int ndr_flags, const union drsuapi_DsGetDCInfoRequest *r)
    7517             : {
    7518             :         uint32_t level;
    7519           6 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7520           6 :         if (ndr_flags & NDR_SCALARS) {
    7521             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7522           6 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7523           6 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7524           6 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7525           6 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7526           6 :                 switch (level) {
    7527           6 :                         case 1: {
    7528           6 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr, NDR_SCALARS, &r->req1));
    7529           6 :                         break; }
    7530             : 
    7531           0 :                         default:
    7532           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7533             :                 }
    7534           0 :         }
    7535           6 :         if (ndr_flags & NDR_BUFFERS) {
    7536           6 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7537             :                         /* We didn't get it above, and the token is not needed after this. */
    7538           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7539             :                 }
    7540           6 :                 switch (level) {
    7541           6 :                         case 1:
    7542           6 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
    7543           6 :                         break;
    7544             : 
    7545           0 :                         default:
    7546           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
    7547             :                 }
    7548           0 :         }
    7549           6 :         return NDR_ERR_SUCCESS;
    7550             : }
    7551             : 
    7552           6 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoRequest(struct ndr_pull *ndr, int ndr_flags, union drsuapi_DsGetDCInfoRequest *r)
    7553             : {
    7554             :         uint32_t level;
    7555             :         uint32_t _level;
    7556           6 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7557           6 :         if (ndr_flags & NDR_SCALARS) {
    7558             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7559           6 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7560           6 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7561           6 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7562           6 :                 if (_level != level) {
    7563           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    7564             :                 }
    7565           6 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7566           6 :                 switch (level) {
    7567           6 :                         case 1: {
    7568           6 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr, NDR_SCALARS, &r->req1));
    7569           6 :                         break; }
    7570             : 
    7571           0 :                         default:
    7572           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7573             :                 }
    7574           0 :         }
    7575           6 :         if (ndr_flags & NDR_BUFFERS) {
    7576           6 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7577             :                         /* We didn't get it above, and the token is not needed after this. */
    7578           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7579             :                 }
    7580           6 :                 switch (level) {
    7581           6 :                         case 1:
    7582           6 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfoRequest1(ndr, NDR_BUFFERS, &r->req1));
    7583           6 :                         break;
    7584             : 
    7585           0 :                         default:
    7586           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
    7587             :                 }
    7588           0 :         }
    7589           6 :         return NDR_ERR_SUCCESS;
    7590             : }
    7591             : 
    7592           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetDCInfoRequest *r)
    7593             : {
    7594             :         uint32_t level;
    7595           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7596           0 :         ndr_print_union(ndr, name, level, "drsuapi_DsGetDCInfoRequest");
    7597           0 :         switch (level) {
    7598           0 :                 case 1:
    7599           0 :                         ndr_print_drsuapi_DsGetDCInfoRequest1(ndr, "req1", &r->req1);
    7600           0 :                 break;
    7601             : 
    7602           0 :                 default:
    7603           0 :                         ndr_print_bad_level(ndr, name, level);
    7604             :         }
    7605           0 : }
    7606             : 
    7607          12 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetDCInfo1 *r)
    7608             : {
    7609          12 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7610          12 :         if (ndr_flags & NDR_SCALARS) {
    7611           6 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7612           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
    7613           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
    7614           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_name));
    7615           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_dn));
    7616           6 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
    7617           6 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc));
    7618           6 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled));
    7619           6 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7620             :         }
    7621          12 :         if (ndr_flags & NDR_BUFFERS) {
    7622           6 :                 if (r->netbios_name) {
    7623           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    7624           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7625           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    7626           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));
    7627             :                 }
    7628           6 :                 if (r->dns_name) {
    7629           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    7630           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7631           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    7632           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));
    7633             :                 }
    7634           6 :                 if (r->site_name) {
    7635           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    7636           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7637           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    7638           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));
    7639             :                 }
    7640           6 :                 if (r->computer_dn) {
    7641           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    7642           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7643           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    7644           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));
    7645             :                 }
    7646           6 :                 if (r->server_dn) {
    7647           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7648           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7649           6 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7650           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));
    7651             :                 }
    7652             :         }
    7653          12 :         return NDR_ERR_SUCCESS;
    7654             : }
    7655             : 
    7656          12 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetDCInfo1 *r)
    7657             : {
    7658             :         uint32_t _ptr_netbios_name;
    7659          12 :         uint32_t size_netbios_name_1 = 0;
    7660          12 :         uint32_t length_netbios_name_1 = 0;
    7661          12 :         TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
    7662             :         uint32_t _ptr_dns_name;
    7663          12 :         uint32_t size_dns_name_1 = 0;
    7664          12 :         uint32_t length_dns_name_1 = 0;
    7665          12 :         TALLOC_CTX *_mem_save_dns_name_0 = NULL;
    7666             :         uint32_t _ptr_site_name;
    7667          12 :         uint32_t size_site_name_1 = 0;
    7668          12 :         uint32_t length_site_name_1 = 0;
    7669          12 :         TALLOC_CTX *_mem_save_site_name_0 = NULL;
    7670             :         uint32_t _ptr_computer_dn;
    7671          12 :         uint32_t size_computer_dn_1 = 0;
    7672          12 :         uint32_t length_computer_dn_1 = 0;
    7673          12 :         TALLOC_CTX *_mem_save_computer_dn_0 = NULL;
    7674             :         uint32_t _ptr_server_dn;
    7675          12 :         uint32_t size_server_dn_1 = 0;
    7676          12 :         uint32_t length_server_dn_1 = 0;
    7677          12 :         TALLOC_CTX *_mem_save_server_dn_0 = NULL;
    7678          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7679          12 :         if (ndr_flags & NDR_SCALARS) {
    7680           6 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7681           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
    7682           6 :                 if (_ptr_netbios_name) {
    7683           6 :                         NDR_PULL_ALLOC(ndr, r->netbios_name);
    7684             :                 } else {
    7685           0 :                         r->netbios_name = NULL;
    7686             :                 }
    7687           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
    7688           6 :                 if (_ptr_dns_name) {
    7689           6 :                         NDR_PULL_ALLOC(ndr, r->dns_name);
    7690             :                 } else {
    7691           0 :                         r->dns_name = NULL;
    7692             :                 }
    7693           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
    7694           6 :                 if (_ptr_site_name) {
    7695           6 :                         NDR_PULL_ALLOC(ndr, r->site_name);
    7696             :                 } else {
    7697           0 :                         r->site_name = NULL;
    7698             :                 }
    7699           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_dn));
    7700           6 :                 if (_ptr_computer_dn) {
    7701           6 :                         NDR_PULL_ALLOC(ndr, r->computer_dn);
    7702             :                 } else {
    7703           0 :                         r->computer_dn = NULL;
    7704             :                 }
    7705           6 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
    7706           6 :                 if (_ptr_server_dn) {
    7707           6 :                         NDR_PULL_ALLOC(ndr, r->server_dn);
    7708             :                 } else {
    7709           0 :                         r->server_dn = NULL;
    7710             :                 }
    7711           6 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc));
    7712           6 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled));
    7713           6 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7714             :         }
    7715          12 :         if (ndr_flags & NDR_BUFFERS) {
    7716           6 :                 if (r->netbios_name) {
    7717           6 :                         _mem_save_netbios_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7718           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->netbios_name, 0);
    7719           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->netbios_name));
    7720           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->netbios_name));
    7721           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->netbios_name, &size_netbios_name_1));
    7722           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->netbios_name, &length_netbios_name_1));
    7723           6 :                         if (length_netbios_name_1 > size_netbios_name_1) {
    7724           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_netbios_name_1, length_netbios_name_1);
    7725             :                         }
    7726           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_netbios_name_1, sizeof(uint16_t)));
    7727           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->netbios_name, length_netbios_name_1, sizeof(uint16_t), CH_UTF16));
    7728           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_netbios_name_0, 0);
    7729             :                 }
    7730           6 :                 if (r->dns_name) {
    7731           6 :                         _mem_save_dns_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7732           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->dns_name, 0);
    7733           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->dns_name));
    7734           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->dns_name));
    7735           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dns_name, &size_dns_name_1));
    7736           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dns_name, &length_dns_name_1));
    7737           6 :                         if (length_dns_name_1 > size_dns_name_1) {
    7738           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_name_1, length_dns_name_1);
    7739             :                         }
    7740           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_name_1, sizeof(uint16_t)));
    7741           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dns_name, length_dns_name_1, sizeof(uint16_t), CH_UTF16));
    7742           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dns_name_0, 0);
    7743             :                 }
    7744           6 :                 if (r->site_name) {
    7745           6 :                         _mem_save_site_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7746           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->site_name, 0);
    7747           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->site_name));
    7748           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->site_name));
    7749           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->site_name, &size_site_name_1));
    7750           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->site_name, &length_site_name_1));
    7751           6 :                         if (length_site_name_1 > size_site_name_1) {
    7752           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_site_name_1, length_site_name_1);
    7753             :                         }
    7754           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_site_name_1, sizeof(uint16_t)));
    7755           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->site_name, length_site_name_1, sizeof(uint16_t), CH_UTF16));
    7756           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_site_name_0, 0);
    7757             :                 }
    7758           6 :                 if (r->computer_dn) {
    7759           6 :                         _mem_save_computer_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7760           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->computer_dn, 0);
    7761           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_dn));
    7762           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_dn));
    7763           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->computer_dn, &size_computer_dn_1));
    7764           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->computer_dn, &length_computer_dn_1));
    7765           6 :                         if (length_computer_dn_1 > size_computer_dn_1) {
    7766           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_dn_1, length_computer_dn_1);
    7767             :                         }
    7768           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_dn_1, sizeof(uint16_t)));
    7769           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_dn, length_computer_dn_1, sizeof(uint16_t), CH_UTF16));
    7770           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_dn_0, 0);
    7771             :                 }
    7772           6 :                 if (r->server_dn) {
    7773           6 :                         _mem_save_server_dn_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7774           6 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_dn, 0);
    7775           6 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_dn));
    7776           6 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_dn));
    7777           6 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_dn, &size_server_dn_1));
    7778           6 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_dn, &length_server_dn_1));
    7779           6 :                         if (length_server_dn_1 > size_server_dn_1) {
    7780           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_dn_1, length_server_dn_1);
    7781             :                         }
    7782           6 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_dn_1, sizeof(uint16_t)));
    7783           6 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_dn, length_server_dn_1, sizeof(uint16_t), CH_UTF16));
    7784           6 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_dn_0, 0);
    7785             :                 }
    7786             :         }
    7787          12 :         return NDR_ERR_SUCCESS;
    7788             : }
    7789             : 
    7790           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfo1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfo1 *r)
    7791             : {
    7792           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfo1");
    7793           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7794           0 :         ndr->depth++;
    7795           0 :         ndr_print_ptr(ndr, "netbios_name", r->netbios_name);
    7796           0 :         ndr->depth++;
    7797           0 :         if (r->netbios_name) {
    7798           0 :                 ndr_print_string(ndr, "netbios_name", r->netbios_name);
    7799             :         }
    7800           0 :         ndr->depth--;
    7801           0 :         ndr_print_ptr(ndr, "dns_name", r->dns_name);
    7802           0 :         ndr->depth++;
    7803           0 :         if (r->dns_name) {
    7804           0 :                 ndr_print_string(ndr, "dns_name", r->dns_name);
    7805             :         }
    7806           0 :         ndr->depth--;
    7807           0 :         ndr_print_ptr(ndr, "site_name", r->site_name);
    7808           0 :         ndr->depth++;
    7809           0 :         if (r->site_name) {
    7810           0 :                 ndr_print_string(ndr, "site_name", r->site_name);
    7811             :         }
    7812           0 :         ndr->depth--;
    7813           0 :         ndr_print_ptr(ndr, "computer_dn", r->computer_dn);
    7814           0 :         ndr->depth++;
    7815           0 :         if (r->computer_dn) {
    7816           0 :                 ndr_print_string(ndr, "computer_dn", r->computer_dn);
    7817             :         }
    7818           0 :         ndr->depth--;
    7819           0 :         ndr_print_ptr(ndr, "server_dn", r->server_dn);
    7820           0 :         ndr->depth++;
    7821           0 :         if (r->server_dn) {
    7822           0 :                 ndr_print_string(ndr, "server_dn", r->server_dn);
    7823             :         }
    7824           0 :         ndr->depth--;
    7825           0 :         ndr_print_uint32(ndr, "is_pdc", r->is_pdc);
    7826           0 :         ndr_print_uint32(ndr, "is_enabled", r->is_enabled);
    7827           0 :         ndr->depth--;
    7828             : }
    7829             : 
    7830           6 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfoCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetDCInfoCtr1 *r)
    7831             : {
    7832             :         uint32_t cntr_array_1;
    7833           6 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7834           6 :         if (ndr_flags & NDR_SCALARS) {
    7835           3 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7836           3 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    7837           3 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    7838           3 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7839             :         }
    7840           6 :         if (ndr_flags & NDR_BUFFERS) {
    7841           3 :                 if (r->array) {
    7842           3 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    7843           9 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    7844           6 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    7845             :                         }
    7846           9 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    7847           6 :                                 NDR_CHECK(ndr_push_drsuapi_DsGetDCInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    7848             :                         }
    7849             :                 }
    7850             :         }
    7851           6 :         return NDR_ERR_SUCCESS;
    7852             : }
    7853             : 
    7854           6 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetDCInfoCtr1 *r)
    7855             : {
    7856             :         uint32_t _ptr_array;
    7857           6 :         uint32_t size_array_1 = 0;
    7858             :         uint32_t cntr_array_1;
    7859           6 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    7860           6 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    7861           6 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7862           6 :         if (ndr_flags & NDR_SCALARS) {
    7863           3 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7864           3 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    7865           3 :                 if (r->count > 10000) {
    7866           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    7867             :                 }
    7868           3 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    7869           3 :                 if (_ptr_array) {
    7870           3 :                         NDR_PULL_ALLOC(ndr, r->array);
    7871             :                 } else {
    7872           0 :                         r->array = NULL;
    7873             :                 }
    7874           3 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7875             :         }
    7876           6 :         if (ndr_flags & NDR_BUFFERS) {
    7877           3 :                 if (r->array) {
    7878           3 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7879           3 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    7880           3 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    7881           3 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    7882           3 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    7883           3 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    7884           3 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    7885           9 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    7886           6 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    7887             :                         }
    7888           9 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    7889           6 :                                 NDR_CHECK(ndr_pull_drsuapi_DsGetDCInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    7890             :                         }
    7891           3 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    7892           3 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    7893             :                 }
    7894           3 :                 if (r->array) {
    7895           3 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    7896             :                 }
    7897           3 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    7898             :                 }
    7899             :         }
    7900           6 :         return NDR_ERR_SUCCESS;
    7901             : }
    7902             : 
    7903           0 : _PUBLIC_ void ndr_print_drsuapi_DsGetDCInfoCtr1(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetDCInfoCtr1 *r)
    7904             : {
    7905             :         uint32_t cntr_array_1;
    7906           0 :         ndr_print_struct(ndr, name, "drsuapi_DsGetDCInfoCtr1");
    7907           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7908           0 :         ndr->depth++;
    7909           0 :         ndr_print_uint32(ndr, "count", r->count);
    7910           0 :         ndr_print_ptr(ndr, "array", r->array);
    7911           0 :         ndr->depth++;
    7912           0 :         if (r->array) {
    7913           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    7914           0 :                 ndr->depth++;
    7915           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    7916           0 :                         ndr_print_drsuapi_DsGetDCInfo1(ndr, "array", &r->array[cntr_array_1]);
    7917             :                 }
    7918           0 :                 ndr->depth--;
    7919             :         }
    7920           0 :         ndr->depth--;
    7921           0 :         ndr->depth--;
    7922             : }
    7923             : 
    7924           8 : static enum ndr_err_code ndr_push_drsuapi_DsGetDCInfo2(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetDCInfo2 *r)
    7925             : {
    7926           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7927           8 :         if (ndr_flags & NDR_SCALARS) {
    7928           4 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7929           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->netbios_name));
    7930           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dns_name));
    7931           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_name));
    7932           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->site_dn));
    7933           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->computer_dn));
    7934           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_dn));
    7935           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ntds_dn));
    7936           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_pdc));
    7937           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_enabled));
    7938           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_gc));
    7939           4 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->site_guid));
    7940           4 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->computer_guid));
    7941           4 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->server_guid));
    7942           4 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
    7943           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7944             :         }
    7945           8 :         if (ndr_flags & NDR_BUFFERS) {
    7946           4 :                 if (r->netbios_name) {
    7947           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    7948           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7949           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->netbios_name, CH_UTF16)));
    7950           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));
    7951             :                 }
    7952           4 :                 if (r->dns_name) {
    7953           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    7954           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7955           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dns_name, CH_UTF16)));
    7956           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));
    7957             :                 }
    7958           4 :                 if (r->site_name) {
    7959           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    7960           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7961           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_name, CH_UTF16)));
    7962           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));
    7963             :                 }
    7964           4 :                 if (r->site_dn) {
    7965           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
    7966           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7967           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->site_dn, CH_UTF16)));
    7968           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));
    7969             :                 }
    7970           4 :                 if (r->computer_dn) {
    7971           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    7972           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7973           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->computer_dn, CH_UTF16)));
    7974           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));
    7975             :                 }
    7976           4 :                 if (r->server_dn) {
    7977           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7978           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7979           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_dn, CH_UTF16)));
    7980           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));
    7981             :                 }
    7982           4 :                 if (r->ntds_dn) {
    7983           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
    7984           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7985           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ntds_dn, CH_UTF16)));
    7986           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));
    7987             :                 }
    7988             :         }
    7989           8 :         return NDR_ERR_SUCCESS;
    7990             : }
    7991             : 
    7992           8 : static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfo2(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetDCInfo2 *r)
    7993             : {
    7994             :         uint32_t _ptr_netbios_name;
    7995           8 :         uint32_t size_netbios_name_1 = 0;
    7996           8 :         uint32_t length_netbios_name_1 = 0;
    7997           8 :         TALLOC_CTX *_mem_save_netbios_name_0 = NULL;
    7998             :         uint32_t _ptr_dns_name;
    7999           8 :         uint32_t size_dns_name_1 = 0;
    8000           8 :         uint32_t length_dns_name_1 = 0;
    8001           8 :         TALLOC_CTX *_mem_save_dns_name_0 = NULL;
    8002             :         uint32_t _ptr_site_name;
    8003           8 :         uint32_t size_site_name_1 = 0;
    8004           8 :         uint32_t length_site_name_1 = 0;
    8005           8 :         TALLOC_CTX *_mem_save_site_name_0 = NULL;
    8006             :         uint32_t _ptr_site_dn;
    8007           8 :         uint32_t size_site_dn_1 = 0;
    8008           8 :         uint32_t length_site_dn_1 = 0;
    8009           8 :         TALLOC_CTX *_mem_save_site_dn_0 = NULL;
    8010             :         uint32_t _ptr_computer_dn;
    8011           8 :         uint32_t size_computer_dn_1 = 0;
    8012           8 :         uint32_t length_computer_dn_1 = 0;
    8013           8 :         TALLOC_CTX *_mem_save_computer_dn_0 = NULL;
    8014             :         uint32_t _ptr_server_dn;
    8015           8 :         uint32_t size_server_dn_1 = 0;
    8016           8 :         uint32_t length_server_dn_1 = 0;
    8017           8 :         TALLOC_CTX *_mem_save_server_dn_0 = NULL;
    8018             :         uint32_t _ptr_ntds_dn;
    8019           8 :         uint32_t size_ntds_dn_1 = 0;
    8020           8 :         uint32_t length_ntds_dn_1 = 0;
    8021           8 :         TALLOC_CTX *_mem_save_ntds_dn_0 = NULL;
    8022           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8023           8 :         if (ndr_flags & NDR_SCALARS) {
    8024           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8025           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_netbios_name));
    8026           4 :                 if (_ptr_netbios_name) {
    8027           4 :                         NDR_PULL_ALLOC(ndr, r->netbios_name);
    8028             :                 } else {
    8029           0 :                         r->netbios_name = NULL;
    8030             :                 }
    8031           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dns_name));
    8032           4 :                 if (_ptr_dns_name) {
    8033           4 :                         NDR_PULL_ALLOC(ndr, r->dns_name);
    8034             :                 } else {
    8035           0 :                         r->dns_name = NULL;
    8036             :                 }
    8037           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_name));
    8038           4 :                 if (_ptr_site_name) {
    8039           4 :                         NDR_PULL_ALLOC(ndr, r->site_name);
    8040             :                 } else {
    8041           0 :                         r->site_name = NULL;
    8042             :                 }
    8043           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_site_dn));
    8044           4 :                 if (_ptr_site_dn) {
    8045           4 :                         NDR_PULL_ALLOC(ndr, r->site_dn);
    8046             :                 } else {
    8047           0 :                         r->site_dn = NULL;
    8048             :                 }
    8049           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_dn));
    8050           4 :                 if (_ptr_computer_dn) {
    8051           4 :                         NDR_PULL_ALLOC(ndr, r->computer_dn);
    8052             :                 } else {
    8053           0 :                         r->computer_dn = NULL;
    8054             :                 }
    8055           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_dn));
    8056           4 :                 if (_ptr_server_dn) {
    8057           4 :                         NDR_PULL_ALLOC(ndr, r->server_dn);
    8058             :                 } else {
    8059           0 :                         r->server_dn = NULL;
    8060             :                 }
    8061           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ntds_dn));
    8062           4 :                 if (_ptr_ntds_dn) {
    8063           2 :                         NDR_PULL_ALLOC(ndr, r->ntds_dn);
    8064             :                 } else {
    8065           2 :                         r->ntds_dn = NULL;
    8066             :                 }
    8067           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_pdc));
    8068           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_enabled));
    8069           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_gc));
    8070           4 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->site_guid));
    8071           4 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->computer_guid));
    8072           4 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->server_guid));
    8073           4 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ntds_guid));
    8074           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));