LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_srvsvc.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 5728 15186 37.7 %
Date: 2021-09-23 10:06:22 Functions: 226 584 38.7 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_srvsvc.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_misc.h"
       7             : #include "librpc/gen_ndr/ndr_security.h"
       8             : #include "librpc/gen_ndr/ndr_svcctl.h"
       9           0 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo0 *r)
      10             : {
      11           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      12           0 :         if (ndr_flags & NDR_SCALARS) {
      13           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      14           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
      15           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
      16             :         }
      17           0 :         if (ndr_flags & NDR_BUFFERS) {
      18           0 :                 if (r->device) {
      19           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
      20           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      21           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
      22           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
      23             :                 }
      24             :         }
      25           0 :         return NDR_ERR_SUCCESS;
      26             : }
      27             : 
      28           0 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo0 *r)
      29             : {
      30             :         uint32_t _ptr_device;
      31           0 :         uint32_t size_device_1 = 0;
      32           0 :         uint32_t length_device_1 = 0;
      33           0 :         TALLOC_CTX *_mem_save_device_0 = NULL;
      34           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      35           0 :         if (ndr_flags & NDR_SCALARS) {
      36           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
      37           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
      38           0 :                 if (_ptr_device) {
      39           0 :                         NDR_PULL_ALLOC(ndr, r->device);
      40             :                 } else {
      41           0 :                         r->device = NULL;
      42             :                 }
      43           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
      44             :         }
      45           0 :         if (ndr_flags & NDR_BUFFERS) {
      46           0 :                 if (r->device) {
      47           0 :                         _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
      48           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
      49           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
      50           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
      51           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->device, &size_device_1));
      52           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->device, &length_device_1));
      53           0 :                         if (length_device_1 > size_device_1) {
      54           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
      55             :                         }
      56           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
      57           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
      58           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
      59             :                 }
      60             :         }
      61           0 :         return NDR_ERR_SUCCESS;
      62             : }
      63             : 
      64           0 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r)
      65             : {
      66           0 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo0");
      67           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
      68           0 :         ndr->depth++;
      69           0 :         ndr_print_ptr(ndr, "device", r->device);
      70           0 :         ndr->depth++;
      71           0 :         if (r->device) {
      72           0 :                 ndr_print_string(ndr, "device", r->device);
      73             :         }
      74           0 :         ndr->depth--;
      75           0 :         ndr->depth--;
      76             : }
      77             : 
      78          13 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr0 *r)
      79             : {
      80             :         uint32_t cntr_array_1;
      81          13 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      82          13 :         if (ndr_flags & NDR_SCALARS) {
      83          13 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      84          13 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
      85          13 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
      86          13 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
      87             :         }
      88          13 :         if (ndr_flags & NDR_BUFFERS) {
      89          13 :                 if (r->array) {
      90           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
      91           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
      92           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
      93             :                         }
      94           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
      95           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
      96             :                         }
      97             :                 }
      98             :         }
      99          13 :         return NDR_ERR_SUCCESS;
     100             : }
     101             : 
     102          12 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr0 *r)
     103             : {
     104             :         uint32_t _ptr_array;
     105          12 :         uint32_t size_array_1 = 0;
     106             :         uint32_t cntr_array_1;
     107          12 :         TALLOC_CTX *_mem_save_array_0 = NULL;
     108          12 :         TALLOC_CTX *_mem_save_array_1 = NULL;
     109          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     110          12 :         if (ndr_flags & NDR_SCALARS) {
     111          12 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     112          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
     113          12 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
     114          12 :                 if (_ptr_array) {
     115           0 :                         NDR_PULL_ALLOC(ndr, r->array);
     116             :                 } else {
     117          12 :                         r->array = NULL;
     118             :                 }
     119          12 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     120             :         }
     121          12 :         if (ndr_flags & NDR_BUFFERS) {
     122          12 :                 if (r->array) {
     123           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
     124           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
     125           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
     126           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
     127           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
     128           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
     129           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
     130           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     131           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
     132             :                         }
     133           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     134           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
     135             :                         }
     136           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
     137           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
     138             :                 }
     139          12 :                 if (r->array) {
     140           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
     141             :                 }
     142          12 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     143             :                 }
     144             :         }
     145          12 :         return NDR_ERR_SUCCESS;
     146             : }
     147             : 
     148           2 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r)
     149             : {
     150             :         uint32_t cntr_array_1;
     151           2 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr0");
     152           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
     153           2 :         ndr->depth++;
     154           2 :         ndr_print_uint32(ndr, "count", r->count);
     155           2 :         ndr_print_ptr(ndr, "array", r->array);
     156           2 :         ndr->depth++;
     157           2 :         if (r->array) {
     158           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
     159           0 :                 ndr->depth++;
     160           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
     161           0 :                         ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
     162             :                 }
     163           0 :                 ndr->depth--;
     164             :         }
     165           2 :         ndr->depth--;
     166           2 :         ndr->depth--;
     167             : }
     168             : 
     169           0 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
     170             : {
     171           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     172           0 :         if (ndr_flags & NDR_SCALARS) {
     173           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     174           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
     175           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
     176           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
     177           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
     178           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     179             :         }
     180           0 :         if (ndr_flags & NDR_BUFFERS) {
     181           0 :                 if (r->device) {
     182           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
     183           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     184           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
     185           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     186             :                 }
     187           0 :                 if (r->user) {
     188           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
     189           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     190           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
     191           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     192             :                 }
     193             :         }
     194           0 :         return NDR_ERR_SUCCESS;
     195             : }
     196             : 
     197           0 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
     198             : {
     199             :         uint32_t _ptr_device;
     200           0 :         uint32_t size_device_1 = 0;
     201           0 :         uint32_t length_device_1 = 0;
     202           0 :         TALLOC_CTX *_mem_save_device_0 = NULL;
     203             :         uint32_t _ptr_user;
     204           0 :         uint32_t size_user_1 = 0;
     205           0 :         uint32_t length_user_1 = 0;
     206           0 :         TALLOC_CTX *_mem_save_user_0 = NULL;
     207           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     208           0 :         if (ndr_flags & NDR_SCALARS) {
     209           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     210           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
     211           0 :                 if (_ptr_device) {
     212           0 :                         NDR_PULL_ALLOC(ndr, r->device);
     213             :                 } else {
     214           0 :                         r->device = NULL;
     215             :                 }
     216           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
     217           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
     218           0 :                 if (_ptr_user) {
     219           0 :                         NDR_PULL_ALLOC(ndr, r->user);
     220             :                 } else {
     221           0 :                         r->user = NULL;
     222             :                 }
     223           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
     224           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     225             :         }
     226           0 :         if (ndr_flags & NDR_BUFFERS) {
     227           0 :                 if (r->device) {
     228           0 :                         _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
     229           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
     230           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
     231           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
     232           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->device, &size_device_1));
     233           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->device, &length_device_1));
     234           0 :                         if (length_device_1 > size_device_1) {
     235           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
     236             :                         }
     237           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
     238           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
     239           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
     240             :                 }
     241           0 :                 if (r->user) {
     242           0 :                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
     243           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
     244           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
     245           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
     246           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
     247           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
     248           0 :                         if (length_user_1 > size_user_1) {
     249           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
     250             :                         }
     251           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
     252           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
     253           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
     254             :                 }
     255             :         }
     256           0 :         return NDR_ERR_SUCCESS;
     257             : }
     258             : 
     259           0 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r)
     260             : {
     261           0 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo1");
     262           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     263           0 :         ndr->depth++;
     264           0 :         ndr_print_ptr(ndr, "device", r->device);
     265           0 :         ndr->depth++;
     266           0 :         if (r->device) {
     267           0 :                 ndr_print_string(ndr, "device", r->device);
     268             :         }
     269           0 :         ndr->depth--;
     270           0 :         ndr_print_uint32(ndr, "status", r->status);
     271           0 :         ndr_print_ptr(ndr, "user", r->user);
     272           0 :         ndr->depth++;
     273           0 :         if (r->user) {
     274           0 :                 ndr_print_string(ndr, "user", r->user);
     275             :         }
     276           0 :         ndr->depth--;
     277           0 :         ndr_print_uint32(ndr, "time", r->time);
     278           0 :         ndr->depth--;
     279             : }
     280             : 
     281           9 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
     282             : {
     283             :         uint32_t cntr_array_1;
     284           9 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     285           9 :         if (ndr_flags & NDR_SCALARS) {
     286           9 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     287           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
     288           9 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
     289           9 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     290             :         }
     291           9 :         if (ndr_flags & NDR_BUFFERS) {
     292           9 :                 if (r->array) {
     293           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
     294           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
     295           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
     296             :                         }
     297           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
     298           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
     299             :                         }
     300             :                 }
     301             :         }
     302           9 :         return NDR_ERR_SUCCESS;
     303             : }
     304             : 
     305           8 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
     306             : {
     307             :         uint32_t _ptr_array;
     308           8 :         uint32_t size_array_1 = 0;
     309             :         uint32_t cntr_array_1;
     310           8 :         TALLOC_CTX *_mem_save_array_0 = NULL;
     311           8 :         TALLOC_CTX *_mem_save_array_1 = NULL;
     312           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     313           8 :         if (ndr_flags & NDR_SCALARS) {
     314           8 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     315           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
     316           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
     317           8 :                 if (_ptr_array) {
     318           0 :                         NDR_PULL_ALLOC(ndr, r->array);
     319             :                 } else {
     320           8 :                         r->array = NULL;
     321             :                 }
     322           8 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     323             :         }
     324           8 :         if (ndr_flags & NDR_BUFFERS) {
     325           8 :                 if (r->array) {
     326           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
     327           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
     328           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
     329           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
     330           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
     331           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
     332           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
     333           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     334           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
     335             :                         }
     336           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     337           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
     338             :                         }
     339           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
     340           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
     341             :                 }
     342           8 :                 if (r->array) {
     343           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
     344             :                 }
     345           8 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     346             :                 }
     347             :         }
     348           8 :         return NDR_ERR_SUCCESS;
     349             : }
     350             : 
     351           2 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r)
     352             : {
     353             :         uint32_t cntr_array_1;
     354           2 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr1");
     355           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
     356           2 :         ndr->depth++;
     357           2 :         ndr_print_uint32(ndr, "count", r->count);
     358           2 :         ndr_print_ptr(ndr, "array", r->array);
     359           2 :         ndr->depth++;
     360           2 :         if (r->array) {
     361           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
     362           0 :                 ndr->depth++;
     363           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
     364           0 :                         ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
     365             :                 }
     366           0 :                 ndr->depth--;
     367             :         }
     368           2 :         ndr->depth--;
     369           2 :         ndr->depth--;
     370             : }
     371             : 
     372           0 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
     373             : {
     374             :         uint32_t level;
     375           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     376           0 :         if (ndr_flags & NDR_SCALARS) {
     377             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     378           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     379           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     380           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
     381           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     382           0 :                 switch (level) {
     383           0 :                         case 0: {
     384           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
     385           0 :                         break; }
     386             : 
     387           0 :                         case 1: {
     388           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
     389           0 :                         break; }
     390             : 
     391           0 :                         default: {
     392           0 :                         break; }
     393             : 
     394             :                 }
     395           0 :         }
     396           0 :         if (ndr_flags & NDR_BUFFERS) {
     397           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     398             :                         /* We didn't get it above, and the token is not needed after this. */
     399           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     400             :                 }
     401           0 :                 switch (level) {
     402           0 :                         case 0:
     403           0 :                                 if (r->info0) {
     404           0 :                                         NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
     405             :                                 }
     406           0 :                         break;
     407             : 
     408           0 :                         case 1:
     409           0 :                                 if (r->info1) {
     410           0 :                                         NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
     411             :                                 }
     412           0 :                         break;
     413             : 
     414           0 :                         default:
     415           0 :                         break;
     416             : 
     417             :                 }
     418           0 :         }
     419           0 :         return NDR_ERR_SUCCESS;
     420             : }
     421             : 
     422           0 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
     423             : {
     424             :         uint32_t level;
     425             :         uint32_t _level;
     426           0 :         TALLOC_CTX *_mem_save_info0_0 = NULL;
     427             :         uint32_t _ptr_info0;
     428           0 :         TALLOC_CTX *_mem_save_info1_0 = NULL;
     429             :         uint32_t _ptr_info1;
     430           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     431           0 :         if (ndr_flags & NDR_SCALARS) {
     432             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     433           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     434           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     435           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
     436           0 :                 if (_level != level) {
     437           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
     438             :                 }
     439           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     440           0 :                 switch (level) {
     441           0 :                         case 0: {
     442           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
     443           0 :                                 if (_ptr_info0) {
     444           0 :                                         NDR_PULL_ALLOC(ndr, r->info0);
     445             :                                 } else {
     446           0 :                                         r->info0 = NULL;
     447             :                                 }
     448           0 :                         break; }
     449             : 
     450           0 :                         case 1: {
     451           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
     452           0 :                                 if (_ptr_info1) {
     453           0 :                                         NDR_PULL_ALLOC(ndr, r->info1);
     454             :                                 } else {
     455           0 :                                         r->info1 = NULL;
     456             :                                 }
     457           0 :                         break; }
     458             : 
     459           0 :                         default: {
     460           0 :                         break; }
     461             : 
     462             :                 }
     463           0 :         }
     464           0 :         if (ndr_flags & NDR_BUFFERS) {
     465           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     466             :                         /* We didn't get it above, and the token is not needed after this. */
     467           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     468             :                 }
     469           0 :                 switch (level) {
     470           0 :                         case 0:
     471           0 :                                 if (r->info0) {
     472           0 :                                         _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
     473           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
     474           0 :                                         NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
     475           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
     476             :                                 }
     477           0 :                         break;
     478             : 
     479           0 :                         case 1:
     480           0 :                                 if (r->info1) {
     481           0 :                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
     482           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
     483           0 :                                         NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
     484           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
     485             :                                 }
     486           0 :                         break;
     487             : 
     488           0 :                         default:
     489           0 :                         break;
     490             : 
     491             :                 }
     492           0 :         }
     493           0 :         return NDR_ERR_SUCCESS;
     494             : }
     495             : 
     496           0 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r)
     497             : {
     498             :         uint32_t level;
     499           0 :         level = ndr_print_steal_switch_value(ndr, r);
     500           0 :         ndr_print_union(ndr, name, level, "srvsvc_NetCharDevInfo");
     501           0 :         switch (level) {
     502           0 :                 case 0:
     503           0 :                         ndr_print_ptr(ndr, "info0", r->info0);
     504           0 :                         ndr->depth++;
     505           0 :                         if (r->info0) {
     506           0 :                                 ndr_print_srvsvc_NetCharDevInfo0(ndr, "info0", r->info0);
     507             :                         }
     508           0 :                         ndr->depth--;
     509           0 :                 break;
     510             : 
     511           0 :                 case 1:
     512           0 :                         ndr_print_ptr(ndr, "info1", r->info1);
     513           0 :                         ndr->depth++;
     514           0 :                         if (r->info1) {
     515           0 :                                 ndr_print_srvsvc_NetCharDevInfo1(ndr, "info1", r->info1);
     516             :                         }
     517           0 :                         ndr->depth--;
     518           0 :                 break;
     519             : 
     520           0 :                 default:
     521           0 :                 break;
     522             : 
     523             :         }
     524           0 : }
     525             : 
     526          44 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
     527             : {
     528             :         uint32_t level;
     529          44 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     530          44 :         if (ndr_flags & NDR_SCALARS) {
     531             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     532          22 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     533          22 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     534          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
     535          22 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
     536          22 :                 switch (level) {
     537          13 :                         case 0: {
     538          13 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
     539          13 :                         break; }
     540             : 
     541           9 :                         case 1: {
     542           9 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
     543           9 :                         break; }
     544             : 
     545           0 :                         default: {
     546           0 :                         break; }
     547             : 
     548             :                 }
     549          20 :         }
     550          44 :         if (ndr_flags & NDR_BUFFERS) {
     551          22 :                 if (!(ndr_flags & NDR_SCALARS)) {
     552             :                         /* We didn't get it above, and the token is not needed after this. */
     553          22 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     554             :                 }
     555          22 :                 switch (level) {
     556          13 :                         case 0:
     557          13 :                                 if (r->ctr0) {
     558          13 :                                         NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
     559             :                                 }
     560          13 :                         break;
     561             : 
     562           9 :                         case 1:
     563           9 :                                 if (r->ctr1) {
     564           9 :                                         NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
     565             :                                 }
     566           9 :                         break;
     567             : 
     568           0 :                         default:
     569           0 :                         break;
     570             : 
     571             :                 }
     572          20 :         }
     573          44 :         return NDR_ERR_SUCCESS;
     574             : }
     575             : 
     576          40 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
     577             : {
     578             :         uint32_t level;
     579             :         uint32_t _level;
     580          40 :         TALLOC_CTX *_mem_save_ctr0_0 = NULL;
     581             :         uint32_t _ptr_ctr0;
     582          40 :         TALLOC_CTX *_mem_save_ctr1_0 = NULL;
     583             :         uint32_t _ptr_ctr1;
     584          40 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     585          40 :         if (ndr_flags & NDR_SCALARS) {
     586             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     587          20 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     588          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     589          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
     590          20 :                 if (_level != level) {
     591           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
     592             :                 }
     593          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
     594          20 :                 switch (level) {
     595          12 :                         case 0: {
     596          12 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
     597          12 :                                 if (_ptr_ctr0) {
     598          12 :                                         NDR_PULL_ALLOC(ndr, r->ctr0);
     599             :                                 } else {
     600           0 :                                         r->ctr0 = NULL;
     601             :                                 }
     602          12 :                         break; }
     603             : 
     604           8 :                         case 1: {
     605           8 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
     606           8 :                                 if (_ptr_ctr1) {
     607           8 :                                         NDR_PULL_ALLOC(ndr, r->ctr1);
     608             :                                 } else {
     609           0 :                                         r->ctr1 = NULL;
     610             :                                 }
     611           8 :                         break; }
     612             : 
     613           0 :                         default: {
     614           0 :                         break; }
     615             : 
     616             :                 }
     617          18 :         }
     618          40 :         if (ndr_flags & NDR_BUFFERS) {
     619          20 :                 if (!(ndr_flags & NDR_SCALARS)) {
     620             :                         /* We didn't get it above, and the token is not needed after this. */
     621          20 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     622             :                 }
     623          20 :                 switch (level) {
     624          12 :                         case 0:
     625          12 :                                 if (r->ctr0) {
     626          12 :                                         _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
     627          12 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
     628          12 :                                         NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
     629          12 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
     630             :                                 }
     631          12 :                         break;
     632             : 
     633           8 :                         case 1:
     634           8 :                                 if (r->ctr1) {
     635           8 :                                         _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
     636           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
     637           8 :                                         NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
     638           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
     639             :                                 }
     640           8 :                         break;
     641             : 
     642           0 :                         default:
     643           0 :                         break;
     644             : 
     645             :                 }
     646          18 :         }
     647          40 :         return NDR_ERR_SUCCESS;
     648             : }
     649             : 
     650           4 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r)
     651             : {
     652             :         uint32_t level;
     653           4 :         level = ndr_print_steal_switch_value(ndr, r);
     654           4 :         ndr_print_union(ndr, name, level, "srvsvc_NetCharDevCtr");
     655           4 :         switch (level) {
     656           2 :                 case 0:
     657           2 :                         ndr_print_ptr(ndr, "ctr0", r->ctr0);
     658           2 :                         ndr->depth++;
     659           2 :                         if (r->ctr0) {
     660           2 :                                 ndr_print_srvsvc_NetCharDevCtr0(ndr, "ctr0", r->ctr0);
     661             :                         }
     662           2 :                         ndr->depth--;
     663           2 :                 break;
     664             : 
     665           2 :                 case 1:
     666           2 :                         ndr_print_ptr(ndr, "ctr1", r->ctr1);
     667           2 :                         ndr->depth++;
     668           2 :                         if (r->ctr1) {
     669           2 :                                 ndr_print_srvsvc_NetCharDevCtr1(ndr, "ctr1", r->ctr1);
     670             :                         }
     671           2 :                         ndr->depth--;
     672           2 :                 break;
     673             : 
     674           0 :                 default:
     675           0 :                 break;
     676             : 
     677             :         }
     678           4 : }
     679             : 
     680          22 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfoCtr *r)
     681             : {
     682          22 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     683          22 :         if (ndr_flags & NDR_SCALARS) {
     684          22 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     685          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
     686          22 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
     687          22 :                 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr));
     688          22 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     689             :         }
     690          22 :         if (ndr_flags & NDR_BUFFERS) {
     691          22 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
     692          22 :                 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr));
     693             :         }
     694          22 :         return NDR_ERR_SUCCESS;
     695             : }
     696             : 
     697          20 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfoCtr *r)
     698             : {
     699          20 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     700          20 :         if (ndr_flags & NDR_SCALARS) {
     701          20 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     702          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
     703          20 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
     704          20 :                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr));
     705          20 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     706             :         }
     707          20 :         if (ndr_flags & NDR_BUFFERS) {
     708          20 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
     709          20 :                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr));
     710             :         }
     711          20 :         return NDR_ERR_SUCCESS;
     712             : }
     713             : 
     714           4 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfoCtr *r)
     715             : {
     716           4 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfoCtr");
     717           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     718           4 :         ndr->depth++;
     719           4 :         ndr_print_uint32(ndr, "level", r->level);
     720           4 :         ndr_print_set_switch_value(ndr, &r->ctr, r->level);
     721           4 :         ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", &r->ctr);
     722           4 :         ndr->depth--;
     723             : }
     724             : 
     725           0 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
     726             : {
     727           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     728           0 :         if (ndr_flags & NDR_SCALARS) {
     729           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     730           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
     731           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     732             :         }
     733           0 :         if (ndr_flags & NDR_BUFFERS) {
     734           0 :                 if (r->device) {
     735           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
     736           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     737           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
     738           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     739             :                 }
     740             :         }
     741           0 :         return NDR_ERR_SUCCESS;
     742             : }
     743             : 
     744           0 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
     745             : {
     746             :         uint32_t _ptr_device;
     747           0 :         uint32_t size_device_1 = 0;
     748           0 :         uint32_t length_device_1 = 0;
     749           0 :         TALLOC_CTX *_mem_save_device_0 = NULL;
     750           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     751           0 :         if (ndr_flags & NDR_SCALARS) {
     752           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     753           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
     754           0 :                 if (_ptr_device) {
     755           0 :                         NDR_PULL_ALLOC(ndr, r->device);
     756             :                 } else {
     757           0 :                         r->device = NULL;
     758             :                 }
     759           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     760             :         }
     761           0 :         if (ndr_flags & NDR_BUFFERS) {
     762           0 :                 if (r->device) {
     763           0 :                         _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
     764           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
     765           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
     766           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
     767           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->device, &size_device_1));
     768           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->device, &length_device_1));
     769           0 :                         if (length_device_1 > size_device_1) {
     770           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
     771             :                         }
     772           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
     773           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
     774           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
     775             :                 }
     776             :         }
     777           0 :         return NDR_ERR_SUCCESS;
     778             : }
     779             : 
     780           0 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r)
     781             : {
     782           0 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo0");
     783           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     784           0 :         ndr->depth++;
     785           0 :         ndr_print_ptr(ndr, "device", r->device);
     786           0 :         ndr->depth++;
     787           0 :         if (r->device) {
     788           0 :                 ndr_print_string(ndr, "device", r->device);
     789             :         }
     790           0 :         ndr->depth--;
     791           0 :         ndr->depth--;
     792             : }
     793             : 
     794          13 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
     795             : {
     796             :         uint32_t cntr_array_1;
     797          13 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     798          13 :         if (ndr_flags & NDR_SCALARS) {
     799          13 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     800          13 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
     801          13 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
     802          13 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     803             :         }
     804          13 :         if (ndr_flags & NDR_BUFFERS) {
     805          13 :                 if (r->array) {
     806           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
     807           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
     808           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
     809             :                         }
     810           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
     811           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
     812             :                         }
     813             :                 }
     814             :         }
     815          13 :         return NDR_ERR_SUCCESS;
     816             : }
     817             : 
     818          12 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
     819             : {
     820             :         uint32_t _ptr_array;
     821          12 :         uint32_t size_array_1 = 0;
     822             :         uint32_t cntr_array_1;
     823          12 :         TALLOC_CTX *_mem_save_array_0 = NULL;
     824          12 :         TALLOC_CTX *_mem_save_array_1 = NULL;
     825          12 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     826          12 :         if (ndr_flags & NDR_SCALARS) {
     827          12 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     828          12 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
     829          12 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
     830          12 :                 if (_ptr_array) {
     831           0 :                         NDR_PULL_ALLOC(ndr, r->array);
     832             :                 } else {
     833          12 :                         r->array = NULL;
     834             :                 }
     835          12 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     836             :         }
     837          12 :         if (ndr_flags & NDR_BUFFERS) {
     838          12 :                 if (r->array) {
     839           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
     840           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
     841           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
     842           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
     843           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
     844           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
     845           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
     846           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     847           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
     848             :                         }
     849           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     850           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
     851             :                         }
     852           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
     853           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
     854             :                 }
     855          12 :                 if (r->array) {
     856           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
     857             :                 }
     858          12 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
     859             :                 }
     860             :         }
     861          12 :         return NDR_ERR_SUCCESS;
     862             : }
     863             : 
     864           2 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r)
     865             : {
     866             :         uint32_t cntr_array_1;
     867           2 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr0");
     868           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
     869           2 :         ndr->depth++;
     870           2 :         ndr_print_uint32(ndr, "count", r->count);
     871           2 :         ndr_print_ptr(ndr, "array", r->array);
     872           2 :         ndr->depth++;
     873           2 :         if (r->array) {
     874           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
     875           0 :                 ndr->depth++;
     876           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
     877           0 :                         ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
     878             :                 }
     879           0 :                 ndr->depth--;
     880             :         }
     881           2 :         ndr->depth--;
     882           2 :         ndr->depth--;
     883             : }
     884             : 
     885           0 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
     886             : {
     887           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     888           0 :         if (ndr_flags & NDR_SCALARS) {
     889           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     890           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
     891           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
     892           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devices));
     893           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
     894           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ahead));
     895           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     896             :         }
     897           0 :         if (ndr_flags & NDR_BUFFERS) {
     898           0 :                 if (r->device) {
     899           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
     900           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     901           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
     902           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     903             :                 }
     904           0 :                 if (r->devices) {
     905           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
     906           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     907           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
     908           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devices, ndr_charset_length(r->devices, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     909             :                 }
     910             :         }
     911           0 :         return NDR_ERR_SUCCESS;
     912             : }
     913             : 
     914           0 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
     915             : {
     916             :         uint32_t _ptr_device;
     917           0 :         uint32_t size_device_1 = 0;
     918           0 :         uint32_t length_device_1 = 0;
     919           0 :         TALLOC_CTX *_mem_save_device_0 = NULL;
     920             :         uint32_t _ptr_devices;
     921           0 :         uint32_t size_devices_1 = 0;
     922           0 :         uint32_t length_devices_1 = 0;
     923           0 :         TALLOC_CTX *_mem_save_devices_0 = NULL;
     924           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     925           0 :         if (ndr_flags & NDR_SCALARS) {
     926           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     927           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
     928           0 :                 if (_ptr_device) {
     929           0 :                         NDR_PULL_ALLOC(ndr, r->device);
     930             :                 } else {
     931           0 :                         r->device = NULL;
     932             :                 }
     933           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
     934           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devices));
     935           0 :                 if (_ptr_devices) {
     936           0 :                         NDR_PULL_ALLOC(ndr, r->devices);
     937             :                 } else {
     938           0 :                         r->devices = NULL;
     939             :                 }
     940           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
     941           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ahead));
     942           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     943             :         }
     944           0 :         if (ndr_flags & NDR_BUFFERS) {
     945           0 :                 if (r->device) {
     946           0 :                         _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
     947           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
     948           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
     949           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
     950           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->device, &size_device_1));
     951           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->device, &length_device_1));
     952           0 :                         if (length_device_1 > size_device_1) {
     953           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
     954             :                         }
     955           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
     956           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
     957           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
     958             :                 }
     959           0 :                 if (r->devices) {
     960           0 :                         _mem_save_devices_0 = NDR_PULL_GET_MEM_CTX(ndr);
     961           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->devices, 0);
     962           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->devices));
     963           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->devices));
     964           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->devices, &size_devices_1));
     965           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->devices, &length_devices_1));
     966           0 :                         if (length_devices_1 > size_devices_1) {
     967           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_devices_1, length_devices_1);
     968             :                         }
     969           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_devices_1, sizeof(uint16_t)));
     970           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devices, length_devices_1, sizeof(uint16_t), CH_UTF16));
     971           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devices_0, 0);
     972             :                 }
     973             :         }
     974           0 :         return NDR_ERR_SUCCESS;
     975             : }
     976             : 
     977           0 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r)
     978             : {
     979           0 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo1");
     980           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     981           0 :         ndr->depth++;
     982           0 :         ndr_print_ptr(ndr, "device", r->device);
     983           0 :         ndr->depth++;
     984           0 :         if (r->device) {
     985           0 :                 ndr_print_string(ndr, "device", r->device);
     986             :         }
     987           0 :         ndr->depth--;
     988           0 :         ndr_print_uint32(ndr, "priority", r->priority);
     989           0 :         ndr_print_ptr(ndr, "devices", r->devices);
     990           0 :         ndr->depth++;
     991           0 :         if (r->devices) {
     992           0 :                 ndr_print_string(ndr, "devices", r->devices);
     993             :         }
     994           0 :         ndr->depth--;
     995           0 :         ndr_print_uint32(ndr, "users", r->users);
     996           0 :         ndr_print_uint32(ndr, "num_ahead", r->num_ahead);
     997           0 :         ndr->depth--;
     998             : }
     999             : 
    1000           9 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
    1001             : {
    1002             :         uint32_t cntr_array_1;
    1003           9 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1004           9 :         if (ndr_flags & NDR_SCALARS) {
    1005           9 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1006           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    1007           9 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    1008           9 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1009             :         }
    1010           9 :         if (ndr_flags & NDR_BUFFERS) {
    1011           9 :                 if (r->array) {
    1012           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    1013           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    1014           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    1015             :                         }
    1016           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    1017           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    1018             :                         }
    1019             :                 }
    1020             :         }
    1021           9 :         return NDR_ERR_SUCCESS;
    1022             : }
    1023             : 
    1024           8 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
    1025             : {
    1026             :         uint32_t _ptr_array;
    1027           8 :         uint32_t size_array_1 = 0;
    1028             :         uint32_t cntr_array_1;
    1029           8 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    1030           8 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    1031           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1032           8 :         if (ndr_flags & NDR_SCALARS) {
    1033           8 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1034           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    1035           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    1036           8 :                 if (_ptr_array) {
    1037           0 :                         NDR_PULL_ALLOC(ndr, r->array);
    1038             :                 } else {
    1039           8 :                         r->array = NULL;
    1040             :                 }
    1041           8 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1042             :         }
    1043           8 :         if (ndr_flags & NDR_BUFFERS) {
    1044           8 :                 if (r->array) {
    1045           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1046           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    1047           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    1048           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    1049           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    1050           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1051           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    1052           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    1053           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    1054             :                         }
    1055           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    1056           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    1057             :                         }
    1058           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    1059           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    1060             :                 }
    1061           8 :                 if (r->array) {
    1062           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    1063             :                 }
    1064           8 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    1065             :                 }
    1066             :         }
    1067           8 :         return NDR_ERR_SUCCESS;
    1068             : }
    1069             : 
    1070           2 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r)
    1071             : {
    1072             :         uint32_t cntr_array_1;
    1073           2 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr1");
    1074           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1075           2 :         ndr->depth++;
    1076           2 :         ndr_print_uint32(ndr, "count", r->count);
    1077           2 :         ndr_print_ptr(ndr, "array", r->array);
    1078           2 :         ndr->depth++;
    1079           2 :         if (r->array) {
    1080           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    1081           0 :                 ndr->depth++;
    1082           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    1083           0 :                         ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
    1084             :                 }
    1085           0 :                 ndr->depth--;
    1086             :         }
    1087           2 :         ndr->depth--;
    1088           2 :         ndr->depth--;
    1089             : }
    1090             : 
    1091           0 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
    1092             : {
    1093             :         uint32_t level;
    1094           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1095           0 :         if (ndr_flags & NDR_SCALARS) {
    1096             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1097           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1098           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    1099           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    1100           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    1101           0 :                 switch (level) {
    1102           0 :                         case 0: {
    1103           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
    1104           0 :                         break; }
    1105             : 
    1106           0 :                         case 1: {
    1107           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
    1108           0 :                         break; }
    1109             : 
    1110           0 :                         default: {
    1111           0 :                         break; }
    1112             : 
    1113             :                 }
    1114           0 :         }
    1115           0 :         if (ndr_flags & NDR_BUFFERS) {
    1116           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1117             :                         /* We didn't get it above, and the token is not needed after this. */
    1118           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1119             :                 }
    1120           0 :                 switch (level) {
    1121           0 :                         case 0:
    1122           0 :                                 if (r->info0) {
    1123           0 :                                         NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
    1124             :                                 }
    1125           0 :                         break;
    1126             : 
    1127           0 :                         case 1:
    1128           0 :                                 if (r->info1) {
    1129           0 :                                         NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
    1130             :                                 }
    1131           0 :                         break;
    1132             : 
    1133           0 :                         default:
    1134           0 :                         break;
    1135             : 
    1136             :                 }
    1137           0 :         }
    1138           0 :         return NDR_ERR_SUCCESS;
    1139             : }
    1140             : 
    1141           0 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
    1142             : {
    1143             :         uint32_t level;
    1144             :         uint32_t _level;
    1145           0 :         TALLOC_CTX *_mem_save_info0_0 = NULL;
    1146             :         uint32_t _ptr_info0;
    1147           0 :         TALLOC_CTX *_mem_save_info1_0 = NULL;
    1148             :         uint32_t _ptr_info1;
    1149           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1150           0 :         if (ndr_flags & NDR_SCALARS) {
    1151             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1152           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1153           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    1154           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    1155           0 :                 if (_level != level) {
    1156           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    1157             :                 }
    1158           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    1159           0 :                 switch (level) {
    1160           0 :                         case 0: {
    1161           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
    1162           0 :                                 if (_ptr_info0) {
    1163           0 :                                         NDR_PULL_ALLOC(ndr, r->info0);
    1164             :                                 } else {
    1165           0 :                                         r->info0 = NULL;
    1166             :                                 }
    1167           0 :                         break; }
    1168             : 
    1169           0 :                         case 1: {
    1170           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
    1171           0 :                                 if (_ptr_info1) {
    1172           0 :                                         NDR_PULL_ALLOC(ndr, r->info1);
    1173             :                                 } else {
    1174           0 :                                         r->info1 = NULL;
    1175             :                                 }
    1176           0 :                         break; }
    1177             : 
    1178           0 :                         default: {
    1179           0 :                         break; }
    1180             : 
    1181             :                 }
    1182           0 :         }
    1183           0 :         if (ndr_flags & NDR_BUFFERS) {
    1184           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1185             :                         /* We didn't get it above, and the token is not needed after this. */
    1186           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1187             :                 }
    1188           0 :                 switch (level) {
    1189           0 :                         case 0:
    1190           0 :                                 if (r->info0) {
    1191           0 :                                         _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1192           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
    1193           0 :                                         NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
    1194           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
    1195             :                                 }
    1196           0 :                         break;
    1197             : 
    1198           0 :                         case 1:
    1199           0 :                                 if (r->info1) {
    1200           0 :                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1201           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
    1202           0 :                                         NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
    1203           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
    1204             :                                 }
    1205           0 :                         break;
    1206             : 
    1207           0 :                         default:
    1208           0 :                         break;
    1209             : 
    1210             :                 }
    1211           0 :         }
    1212           0 :         return NDR_ERR_SUCCESS;
    1213             : }
    1214             : 
    1215           0 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r)
    1216             : {
    1217             :         uint32_t level;
    1218           0 :         level = ndr_print_steal_switch_value(ndr, r);
    1219           0 :         ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQInfo");
    1220           0 :         switch (level) {
    1221           0 :                 case 0:
    1222           0 :                         ndr_print_ptr(ndr, "info0", r->info0);
    1223           0 :                         ndr->depth++;
    1224           0 :                         if (r->info0) {
    1225           0 :                                 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "info0", r->info0);
    1226             :                         }
    1227           0 :                         ndr->depth--;
    1228           0 :                 break;
    1229             : 
    1230           0 :                 case 1:
    1231           0 :                         ndr_print_ptr(ndr, "info1", r->info1);
    1232           0 :                         ndr->depth++;
    1233           0 :                         if (r->info1) {
    1234           0 :                                 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "info1", r->info1);
    1235             :                         }
    1236           0 :                         ndr->depth--;
    1237           0 :                 break;
    1238             : 
    1239           0 :                 default:
    1240           0 :                 break;
    1241             : 
    1242             :         }
    1243           0 : }
    1244             : 
    1245          44 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
    1246             : {
    1247             :         uint32_t level;
    1248          44 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1249          44 :         if (ndr_flags & NDR_SCALARS) {
    1250             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1251          22 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1252          22 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    1253          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    1254          22 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    1255          22 :                 switch (level) {
    1256          13 :                         case 0: {
    1257          13 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
    1258          13 :                         break; }
    1259             : 
    1260           9 :                         case 1: {
    1261           9 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
    1262           9 :                         break; }
    1263             : 
    1264           0 :                         default: {
    1265           0 :                         break; }
    1266             : 
    1267             :                 }
    1268          20 :         }
    1269          44 :         if (ndr_flags & NDR_BUFFERS) {
    1270          22 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1271             :                         /* We didn't get it above, and the token is not needed after this. */
    1272          22 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1273             :                 }
    1274          22 :                 switch (level) {
    1275          13 :                         case 0:
    1276          13 :                                 if (r->ctr0) {
    1277          13 :                                         NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
    1278             :                                 }
    1279          13 :                         break;
    1280             : 
    1281           9 :                         case 1:
    1282           9 :                                 if (r->ctr1) {
    1283           9 :                                         NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    1284             :                                 }
    1285           9 :                         break;
    1286             : 
    1287           0 :                         default:
    1288           0 :                         break;
    1289             : 
    1290             :                 }
    1291          20 :         }
    1292          44 :         return NDR_ERR_SUCCESS;
    1293             : }
    1294             : 
    1295          40 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
    1296             : {
    1297             :         uint32_t level;
    1298             :         uint32_t _level;
    1299          40 :         TALLOC_CTX *_mem_save_ctr0_0 = NULL;
    1300             :         uint32_t _ptr_ctr0;
    1301          40 :         TALLOC_CTX *_mem_save_ctr1_0 = NULL;
    1302             :         uint32_t _ptr_ctr1;
    1303          40 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1304          40 :         if (ndr_flags & NDR_SCALARS) {
    1305             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1306          20 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1307          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    1308          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    1309          20 :                 if (_level != level) {
    1310           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    1311             :                 }
    1312          20 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    1313          20 :                 switch (level) {
    1314          12 :                         case 0: {
    1315          12 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
    1316          12 :                                 if (_ptr_ctr0) {
    1317          12 :                                         NDR_PULL_ALLOC(ndr, r->ctr0);
    1318             :                                 } else {
    1319           0 :                                         r->ctr0 = NULL;
    1320             :                                 }
    1321          12 :                         break; }
    1322             : 
    1323           8 :                         case 1: {
    1324           8 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
    1325           8 :                                 if (_ptr_ctr1) {
    1326           8 :                                         NDR_PULL_ALLOC(ndr, r->ctr1);
    1327             :                                 } else {
    1328           0 :                                         r->ctr1 = NULL;
    1329             :                                 }
    1330           8 :                         break; }
    1331             : 
    1332           0 :                         default: {
    1333           0 :                         break; }
    1334             : 
    1335             :                 }
    1336          18 :         }
    1337          40 :         if (ndr_flags & NDR_BUFFERS) {
    1338          20 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1339             :                         /* We didn't get it above, and the token is not needed after this. */
    1340          20 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1341             :                 }
    1342          20 :                 switch (level) {
    1343          12 :                         case 0:
    1344          12 :                                 if (r->ctr0) {
    1345          12 :                                         _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1346          12 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
    1347          12 :                                         NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
    1348          12 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
    1349             :                                 }
    1350          12 :                         break;
    1351             : 
    1352           8 :                         case 1:
    1353           8 :                                 if (r->ctr1) {
    1354           8 :                                         _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1355           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
    1356           8 :                                         NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    1357           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
    1358             :                                 }
    1359           8 :                         break;
    1360             : 
    1361           0 :                         default:
    1362           0 :                         break;
    1363             : 
    1364             :                 }
    1365          18 :         }
    1366          40 :         return NDR_ERR_SUCCESS;
    1367             : }
    1368             : 
    1369           4 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r)
    1370             : {
    1371             :         uint32_t level;
    1372           4 :         level = ndr_print_steal_switch_value(ndr, r);
    1373           4 :         ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQCtr");
    1374           4 :         switch (level) {
    1375           2 :                 case 0:
    1376           2 :                         ndr_print_ptr(ndr, "ctr0", r->ctr0);
    1377           2 :                         ndr->depth++;
    1378           2 :                         if (r->ctr0) {
    1379           2 :                                 ndr_print_srvsvc_NetCharDevQCtr0(ndr, "ctr0", r->ctr0);
    1380             :                         }
    1381           2 :                         ndr->depth--;
    1382           2 :                 break;
    1383             : 
    1384           2 :                 case 1:
    1385           2 :                         ndr_print_ptr(ndr, "ctr1", r->ctr1);
    1386           2 :                         ndr->depth++;
    1387           2 :                         if (r->ctr1) {
    1388           2 :                                 ndr_print_srvsvc_NetCharDevQCtr1(ndr, "ctr1", r->ctr1);
    1389             :                         }
    1390           2 :                         ndr->depth--;
    1391           2 :                 break;
    1392             : 
    1393           0 :                 default:
    1394           0 :                 break;
    1395             : 
    1396             :         }
    1397           4 : }
    1398             : 
    1399          22 : static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfoCtr *r)
    1400             : {
    1401          22 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1402          22 :         if (ndr_flags & NDR_SCALARS) {
    1403          22 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1404          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
    1405          22 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    1406          22 :                 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr));
    1407          22 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1408             :         }
    1409          22 :         if (ndr_flags & NDR_BUFFERS) {
    1410          22 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    1411          22 :                 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr));
    1412             :         }
    1413          22 :         return NDR_ERR_SUCCESS;
    1414             : }
    1415             : 
    1416          20 : static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfoCtr *r)
    1417             : {
    1418          20 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1419          20 :         if (ndr_flags & NDR_SCALARS) {
    1420          20 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1421          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
    1422          20 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    1423          20 :                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr));
    1424          20 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1425             :         }
    1426          20 :         if (ndr_flags & NDR_BUFFERS) {
    1427          20 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    1428          20 :                 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr));
    1429             :         }
    1430          20 :         return NDR_ERR_SUCCESS;
    1431             : }
    1432             : 
    1433           4 : _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfoCtr *r)
    1434             : {
    1435           4 :         ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfoCtr");
    1436           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1437           4 :         ndr->depth++;
    1438           4 :         ndr_print_uint32(ndr, "level", r->level);
    1439           4 :         ndr_print_set_switch_value(ndr, &r->ctr, r->level);
    1440           4 :         ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", &r->ctr);
    1441           4 :         ndr->depth--;
    1442             : }
    1443             : 
    1444           4 : static enum ndr_err_code ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
    1445             : {
    1446           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1447           4 :         if (ndr_flags & NDR_SCALARS) {
    1448           4 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1449           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
    1450           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1451             :         }
    1452           4 :         if (ndr_flags & NDR_BUFFERS) {
    1453             :         }
    1454           4 :         return NDR_ERR_SUCCESS;
    1455             : }
    1456             : 
    1457           4 : static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
    1458             : {
    1459           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1460           4 :         if (ndr_flags & NDR_SCALARS) {
    1461           4 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1462           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
    1463           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1464             :         }
    1465           4 :         if (ndr_flags & NDR_BUFFERS) {
    1466             :         }
    1467           4 :         return NDR_ERR_SUCCESS;
    1468             : }
    1469             : 
    1470           0 : _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r)
    1471             : {
    1472           0 :         ndr_print_struct(ndr, name, "srvsvc_NetConnInfo0");
    1473           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1474           0 :         ndr->depth++;
    1475           0 :         ndr_print_uint32(ndr, "conn_id", r->conn_id);
    1476           0 :         ndr->depth--;
    1477             : }
    1478             : 
    1479          17 : static enum ndr_err_code ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
    1480             : {
    1481             :         uint32_t cntr_array_1;
    1482          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1483          17 :         if (ndr_flags & NDR_SCALARS) {
    1484          17 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1485          17 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    1486          17 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    1487          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1488             :         }
    1489          17 :         if (ndr_flags & NDR_BUFFERS) {
    1490          17 :                 if (r->array) {
    1491           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    1492           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    1493           4 :                                 NDR_CHECK(ndr_push_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    1494             :                         }
    1495             :                 }
    1496             :         }
    1497          17 :         return NDR_ERR_SUCCESS;
    1498             : }
    1499             : 
    1500          16 : static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
    1501             : {
    1502             :         uint32_t _ptr_array;
    1503          16 :         uint32_t size_array_1 = 0;
    1504             :         uint32_t cntr_array_1;
    1505          16 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    1506          16 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    1507          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1508          16 :         if (ndr_flags & NDR_SCALARS) {
    1509          16 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1510          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    1511          16 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    1512          16 :                 if (_ptr_array) {
    1513           4 :                         NDR_PULL_ALLOC(ndr, r->array);
    1514             :                 } else {
    1515          12 :                         r->array = NULL;
    1516             :                 }
    1517          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1518             :         }
    1519          16 :         if (ndr_flags & NDR_BUFFERS) {
    1520          16 :                 if (r->array) {
    1521           4 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1522           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    1523           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    1524           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    1525           4 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    1526           4 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1527           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    1528           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    1529           4 :                                 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    1530             :                         }
    1531           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    1532           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    1533             :                 }
    1534          16 :                 if (r->array) {
    1535           4 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
    1536             :                 }
    1537             :         }
    1538          16 :         return NDR_ERR_SUCCESS;
    1539             : }
    1540             : 
    1541           2 : _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r)
    1542             : {
    1543             :         uint32_t cntr_array_1;
    1544           2 :         ndr_print_struct(ndr, name, "srvsvc_NetConnCtr0");
    1545           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1546           2 :         ndr->depth++;
    1547           2 :         ndr_print_uint32(ndr, "count", r->count);
    1548           2 :         ndr_print_ptr(ndr, "array", r->array);
    1549           2 :         ndr->depth++;
    1550           2 :         if (r->array) {
    1551           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    1552           0 :                 ndr->depth++;
    1553           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    1554           0 :                         ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
    1555             :                 }
    1556           0 :                 ndr->depth--;
    1557             :         }
    1558           2 :         ndr->depth--;
    1559           2 :         ndr->depth--;
    1560             : }
    1561             : 
    1562           8 : static enum ndr_err_code ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
    1563             : {
    1564           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1565           8 :         if (ndr_flags & NDR_SCALARS) {
    1566           4 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1567           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
    1568           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_type));
    1569           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
    1570           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
    1571           4 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_time));
    1572           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    1573           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
    1574           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1575             :         }
    1576           8 :         if (ndr_flags & NDR_BUFFERS) {
    1577           4 :                 if (r->user) {
    1578           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    1579           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    1580           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    1581           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    1582             :                 }
    1583           4 :                 if (r->share) {
    1584           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
    1585           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    1586           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
    1587           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    1588             :                 }
    1589             :         }
    1590           8 :         return NDR_ERR_SUCCESS;
    1591             : }
    1592             : 
    1593           8 : static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
    1594             : {
    1595             :         uint32_t _ptr_user;
    1596           8 :         uint32_t size_user_1 = 0;
    1597           8 :         uint32_t length_user_1 = 0;
    1598           8 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    1599             :         uint32_t _ptr_share;
    1600           8 :         uint32_t size_share_1 = 0;
    1601           8 :         uint32_t length_share_1 = 0;
    1602           8 :         TALLOC_CTX *_mem_save_share_0 = NULL;
    1603           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1604           8 :         if (ndr_flags & NDR_SCALARS) {
    1605           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1606           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
    1607           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_type));
    1608           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
    1609           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
    1610           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_time));
    1611           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    1612           4 :                 if (_ptr_user) {
    1613           4 :                         NDR_PULL_ALLOC(ndr, r->user);
    1614             :                 } else {
    1615           0 :                         r->user = NULL;
    1616             :                 }
    1617           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
    1618           4 :                 if (_ptr_share) {
    1619           4 :                         NDR_PULL_ALLOC(ndr, r->share);
    1620             :                 } else {
    1621           0 :                         r->share = NULL;
    1622             :                 }
    1623           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1624             :         }
    1625           8 :         if (ndr_flags & NDR_BUFFERS) {
    1626           4 :                 if (r->user) {
    1627           4 :                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1628           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    1629           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
    1630           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
    1631           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
    1632           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
    1633           4 :                         if (length_user_1 > size_user_1) {
    1634           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
    1635             :                         }
    1636           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
    1637           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
    1638           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    1639             :                 }
    1640           4 :                 if (r->share) {
    1641           4 :                         _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1642           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
    1643           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
    1644           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
    1645           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->share, &size_share_1));
    1646           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->share, &length_share_1));
    1647           4 :                         if (length_share_1 > size_share_1) {
    1648           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
    1649             :                         }
    1650           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
    1651           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, length_share_1, sizeof(uint16_t), CH_UTF16));
    1652           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
    1653             :                 }
    1654             :         }
    1655           8 :         return NDR_ERR_SUCCESS;
    1656             : }
    1657             : 
    1658           0 : _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r)
    1659             : {
    1660           0 :         ndr_print_struct(ndr, name, "srvsvc_NetConnInfo1");
    1661           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1662           0 :         ndr->depth++;
    1663           0 :         ndr_print_uint32(ndr, "conn_id", r->conn_id);
    1664           0 :         ndr_print_uint32(ndr, "conn_type", r->conn_type);
    1665           0 :         ndr_print_uint32(ndr, "num_open", r->num_open);
    1666           0 :         ndr_print_uint32(ndr, "num_users", r->num_users);
    1667           0 :         ndr_print_uint32(ndr, "conn_time", r->conn_time);
    1668           0 :         ndr_print_ptr(ndr, "user", r->user);
    1669           0 :         ndr->depth++;
    1670           0 :         if (r->user) {
    1671           0 :                 ndr_print_string(ndr, "user", r->user);
    1672             :         }
    1673           0 :         ndr->depth--;
    1674           0 :         ndr_print_ptr(ndr, "share", r->share);
    1675           0 :         ndr->depth++;
    1676           0 :         if (r->share) {
    1677           0 :                 ndr_print_string(ndr, "share", r->share);
    1678             :         }
    1679           0 :         ndr->depth--;
    1680           0 :         ndr->depth--;
    1681             : }
    1682             : 
    1683          17 : static enum ndr_err_code ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
    1684             : {
    1685             :         uint32_t cntr_array_1;
    1686          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1687          17 :         if (ndr_flags & NDR_SCALARS) {
    1688          17 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1689          17 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    1690          17 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    1691          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1692             :         }
    1693          17 :         if (ndr_flags & NDR_BUFFERS) {
    1694          17 :                 if (r->array) {
    1695           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    1696           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    1697           4 :                                 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    1698             :                         }
    1699           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    1700           4 :                                 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    1701             :                         }
    1702             :                 }
    1703             :         }
    1704          17 :         return NDR_ERR_SUCCESS;
    1705             : }
    1706             : 
    1707          16 : static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
    1708             : {
    1709             :         uint32_t _ptr_array;
    1710          16 :         uint32_t size_array_1 = 0;
    1711             :         uint32_t cntr_array_1;
    1712          16 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    1713          16 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    1714          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1715          16 :         if (ndr_flags & NDR_SCALARS) {
    1716          16 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1717          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    1718          16 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    1719          16 :                 if (_ptr_array) {
    1720           4 :                         NDR_PULL_ALLOC(ndr, r->array);
    1721             :                 } else {
    1722          12 :                         r->array = NULL;
    1723             :                 }
    1724          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1725             :         }
    1726          16 :         if (ndr_flags & NDR_BUFFERS) {
    1727          16 :                 if (r->array) {
    1728           4 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1729           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    1730           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    1731           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    1732           4 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    1733           4 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1734           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    1735           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    1736           4 :                                 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    1737             :                         }
    1738           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    1739           4 :                                 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    1740             :                         }
    1741           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    1742           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    1743             :                 }
    1744          16 :                 if (r->array) {
    1745           4 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    1746             :                 }
    1747          18 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    1748             :                 }
    1749             :         }
    1750          16 :         return NDR_ERR_SUCCESS;
    1751             : }
    1752             : 
    1753           2 : _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r)
    1754             : {
    1755             :         uint32_t cntr_array_1;
    1756           2 :         ndr_print_struct(ndr, name, "srvsvc_NetConnCtr1");
    1757           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1758           2 :         ndr->depth++;
    1759           2 :         ndr_print_uint32(ndr, "count", r->count);
    1760           2 :         ndr_print_ptr(ndr, "array", r->array);
    1761           2 :         ndr->depth++;
    1762           2 :         if (r->array) {
    1763           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    1764           0 :                 ndr->depth++;
    1765           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    1766           0 :                         ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
    1767             :                 }
    1768           0 :                 ndr->depth--;
    1769             :         }
    1770           2 :         ndr->depth--;
    1771           2 :         ndr->depth--;
    1772             : }
    1773             : 
    1774          68 : static enum ndr_err_code ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
    1775             : {
    1776             :         uint32_t level;
    1777          68 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1778          68 :         if (ndr_flags & NDR_SCALARS) {
    1779             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1780          34 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1781          34 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    1782          34 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    1783          34 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    1784          34 :                 switch (level) {
    1785          17 :                         case 0: {
    1786          17 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
    1787          17 :                         break; }
    1788             : 
    1789          17 :                         case 1: {
    1790          17 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
    1791          17 :                         break; }
    1792             : 
    1793           0 :                         default: {
    1794           0 :                         break; }
    1795             : 
    1796             :                 }
    1797          26 :         }
    1798          68 :         if (ndr_flags & NDR_BUFFERS) {
    1799          34 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1800             :                         /* We didn't get it above, and the token is not needed after this. */
    1801          34 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    1802             :                 }
    1803          34 :                 switch (level) {
    1804          17 :                         case 0:
    1805          17 :                                 if (r->ctr0) {
    1806          17 :                                         NDR_CHECK(ndr_push_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
    1807             :                                 }
    1808          17 :                         break;
    1809             : 
    1810          17 :                         case 1:
    1811          17 :                                 if (r->ctr1) {
    1812          17 :                                         NDR_CHECK(ndr_push_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    1813             :                                 }
    1814          17 :                         break;
    1815             : 
    1816           0 :                         default:
    1817           0 :                         break;
    1818             : 
    1819             :                 }
    1820          26 :         }
    1821          68 :         return NDR_ERR_SUCCESS;
    1822             : }
    1823             : 
    1824          64 : static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
    1825             : {
    1826             :         uint32_t level;
    1827             :         uint32_t _level;
    1828          64 :         TALLOC_CTX *_mem_save_ctr0_0 = NULL;
    1829             :         uint32_t _ptr_ctr0;
    1830          64 :         TALLOC_CTX *_mem_save_ctr1_0 = NULL;
    1831             :         uint32_t _ptr_ctr1;
    1832          64 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1833          64 :         if (ndr_flags & NDR_SCALARS) {
    1834             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    1835          32 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1836          32 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    1837          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    1838          32 :                 if (_level != level) {
    1839           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    1840             :                 }
    1841          32 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    1842          32 :                 switch (level) {
    1843          16 :                         case 0: {
    1844          16 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
    1845          16 :                                 if (_ptr_ctr0) {
    1846          16 :                                         NDR_PULL_ALLOC(ndr, r->ctr0);
    1847             :                                 } else {
    1848           0 :                                         r->ctr0 = NULL;
    1849             :                                 }
    1850          16 :                         break; }
    1851             : 
    1852          16 :                         case 1: {
    1853          16 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
    1854          16 :                                 if (_ptr_ctr1) {
    1855          16 :                                         NDR_PULL_ALLOC(ndr, r->ctr1);
    1856             :                                 } else {
    1857           0 :                                         r->ctr1 = NULL;
    1858             :                                 }
    1859          16 :                         break; }
    1860             : 
    1861           0 :                         default: {
    1862           0 :                         break; }
    1863             : 
    1864             :                 }
    1865          24 :         }
    1866          64 :         if (ndr_flags & NDR_BUFFERS) {
    1867          32 :                 if (!(ndr_flags & NDR_SCALARS)) {
    1868             :                         /* We didn't get it above, and the token is not needed after this. */
    1869          32 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    1870             :                 }
    1871          32 :                 switch (level) {
    1872          16 :                         case 0:
    1873          16 :                                 if (r->ctr0) {
    1874          16 :                                         _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1875          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
    1876          16 :                                         NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
    1877          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
    1878             :                                 }
    1879          16 :                         break;
    1880             : 
    1881          16 :                         case 1:
    1882          16 :                                 if (r->ctr1) {
    1883          16 :                                         _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1884          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
    1885          16 :                                         NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    1886          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
    1887             :                                 }
    1888          16 :                         break;
    1889             : 
    1890           0 :                         default:
    1891           0 :                         break;
    1892             : 
    1893             :                 }
    1894          24 :         }
    1895          64 :         return NDR_ERR_SUCCESS;
    1896             : }
    1897             : 
    1898           4 : _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r)
    1899             : {
    1900             :         uint32_t level;
    1901           4 :         level = ndr_print_steal_switch_value(ndr, r);
    1902           4 :         ndr_print_union(ndr, name, level, "srvsvc_NetConnCtr");
    1903           4 :         switch (level) {
    1904           2 :                 case 0:
    1905           2 :                         ndr_print_ptr(ndr, "ctr0", r->ctr0);
    1906           2 :                         ndr->depth++;
    1907           2 :                         if (r->ctr0) {
    1908           2 :                                 ndr_print_srvsvc_NetConnCtr0(ndr, "ctr0", r->ctr0);
    1909             :                         }
    1910           2 :                         ndr->depth--;
    1911           2 :                 break;
    1912             : 
    1913           2 :                 case 1:
    1914           2 :                         ndr_print_ptr(ndr, "ctr1", r->ctr1);
    1915           2 :                         ndr->depth++;
    1916           2 :                         if (r->ctr1) {
    1917           2 :                                 ndr_print_srvsvc_NetConnCtr1(ndr, "ctr1", r->ctr1);
    1918             :                         }
    1919           2 :                         ndr->depth--;
    1920           2 :                 break;
    1921             : 
    1922           0 :                 default:
    1923           0 :                 break;
    1924             : 
    1925             :         }
    1926           4 : }
    1927             : 
    1928          34 : static enum ndr_err_code ndr_push_srvsvc_NetConnInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfoCtr *r)
    1929             : {
    1930          34 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1931          34 :         if (ndr_flags & NDR_SCALARS) {
    1932          34 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1933          34 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
    1934          34 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    1935          34 :                 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
    1936          34 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1937             :         }
    1938          34 :         if (ndr_flags & NDR_BUFFERS) {
    1939          34 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    1940          34 :                 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
    1941             :         }
    1942          34 :         return NDR_ERR_SUCCESS;
    1943             : }
    1944             : 
    1945          32 : static enum ndr_err_code ndr_pull_srvsvc_NetConnInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfoCtr *r)
    1946             : {
    1947          32 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1948          32 :         if (ndr_flags & NDR_SCALARS) {
    1949          32 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1950          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
    1951          32 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    1952          32 :                 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
    1953          32 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1954             :         }
    1955          32 :         if (ndr_flags & NDR_BUFFERS) {
    1956          32 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    1957          32 :                 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
    1958             :         }
    1959          32 :         return NDR_ERR_SUCCESS;
    1960             : }
    1961             : 
    1962           4 : _PUBLIC_ void ndr_print_srvsvc_NetConnInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfoCtr *r)
    1963             : {
    1964           4 :         ndr_print_struct(ndr, name, "srvsvc_NetConnInfoCtr");
    1965           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1966           4 :         ndr->depth++;
    1967           4 :         ndr_print_uint32(ndr, "level", r->level);
    1968           4 :         ndr_print_set_switch_value(ndr, &r->ctr, r->level);
    1969           4 :         ndr_print_srvsvc_NetConnCtr(ndr, "ctr", &r->ctr);
    1970           4 :         ndr->depth--;
    1971             : }
    1972             : 
    1973           0 : static enum ndr_err_code ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
    1974             : {
    1975           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1976           0 :         if (ndr_flags & NDR_SCALARS) {
    1977           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1978           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
    1979           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1980             :         }
    1981           0 :         if (ndr_flags & NDR_BUFFERS) {
    1982             :         }
    1983           0 :         return NDR_ERR_SUCCESS;
    1984             : }
    1985             : 
    1986           0 : static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
    1987             : {
    1988           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1989           0 :         if (ndr_flags & NDR_SCALARS) {
    1990           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1991           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
    1992           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1993             :         }
    1994           0 :         if (ndr_flags & NDR_BUFFERS) {
    1995             :         }
    1996           0 :         return NDR_ERR_SUCCESS;
    1997             : }
    1998             : 
    1999           0 : _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r)
    2000             : {
    2001           0 :         ndr_print_struct(ndr, name, "srvsvc_NetFileInfo2");
    2002           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2003           0 :         ndr->depth++;
    2004           0 :         ndr_print_uint32(ndr, "fid", r->fid);
    2005           0 :         ndr->depth--;
    2006             : }
    2007             : 
    2008          17 : static enum ndr_err_code ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
    2009             : {
    2010             :         uint32_t cntr_array_1;
    2011          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2012          17 :         if (ndr_flags & NDR_SCALARS) {
    2013          17 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2014          17 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2015          17 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    2016          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2017             :         }
    2018          17 :         if (ndr_flags & NDR_BUFFERS) {
    2019          17 :                 if (r->array) {
    2020           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2021           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2022           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    2023             :                         }
    2024             :                 }
    2025             :         }
    2026          17 :         return NDR_ERR_SUCCESS;
    2027             : }
    2028             : 
    2029          16 : static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
    2030             : {
    2031             :         uint32_t _ptr_array;
    2032          16 :         uint32_t size_array_1 = 0;
    2033             :         uint32_t cntr_array_1;
    2034          16 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    2035          16 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    2036          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2037          16 :         if (ndr_flags & NDR_SCALARS) {
    2038          16 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2039          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2040          16 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    2041          16 :                 if (_ptr_array) {
    2042           0 :                         NDR_PULL_ALLOC(ndr, r->array);
    2043             :                 } else {
    2044          16 :                         r->array = NULL;
    2045             :                 }
    2046          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2047             :         }
    2048          16 :         if (ndr_flags & NDR_BUFFERS) {
    2049          16 :                 if (r->array) {
    2050           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2051           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    2052           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    2053           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    2054           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    2055           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2056           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    2057           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2058           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    2059             :                         }
    2060           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    2061           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    2062             :                 }
    2063          16 :                 if (r->array) {
    2064           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
    2065             :                 }
    2066             :         }
    2067          16 :         return NDR_ERR_SUCCESS;
    2068             : }
    2069             : 
    2070           2 : _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r)
    2071             : {
    2072             :         uint32_t cntr_array_1;
    2073           2 :         ndr_print_struct(ndr, name, "srvsvc_NetFileCtr2");
    2074           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2075           2 :         ndr->depth++;
    2076           2 :         ndr_print_uint32(ndr, "count", r->count);
    2077           2 :         ndr_print_ptr(ndr, "array", r->array);
    2078           2 :         ndr->depth++;
    2079           2 :         if (r->array) {
    2080           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    2081           0 :                 ndr->depth++;
    2082           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2083           0 :                         ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
    2084             :                 }
    2085           0 :                 ndr->depth--;
    2086             :         }
    2087           2 :         ndr->depth--;
    2088           2 :         ndr->depth--;
    2089             : }
    2090             : 
    2091           4 : static enum ndr_err_code ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
    2092             : {
    2093           4 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2094           4 :         if (ndr_flags & NDR_SCALARS) {
    2095           2 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2096           2 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
    2097           2 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
    2098           2 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_locks));
    2099           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
    2100           2 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    2101           2 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2102             :         }
    2103           4 :         if (ndr_flags & NDR_BUFFERS) {
    2104           2 :                 if (r->path) {
    2105           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
    2106           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    2107           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
    2108           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    2109             :                 }
    2110           2 :                 if (r->user) {
    2111           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    2112           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    2113           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    2114           2 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    2115             :                 }
    2116             :         }
    2117           4 :         return NDR_ERR_SUCCESS;
    2118             : }
    2119             : 
    2120           4 : static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
    2121             : {
    2122             :         uint32_t _ptr_path;
    2123           4 :         uint32_t size_path_1 = 0;
    2124           4 :         uint32_t length_path_1 = 0;
    2125           4 :         TALLOC_CTX *_mem_save_path_0 = NULL;
    2126             :         uint32_t _ptr_user;
    2127           4 :         uint32_t size_user_1 = 0;
    2128           4 :         uint32_t length_user_1 = 0;
    2129           4 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    2130           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2131           4 :         if (ndr_flags & NDR_SCALARS) {
    2132           2 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2133           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
    2134           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
    2135           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_locks));
    2136           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
    2137           2 :                 if (_ptr_path) {
    2138           2 :                         NDR_PULL_ALLOC(ndr, r->path);
    2139             :                 } else {
    2140           0 :                         r->path = NULL;
    2141             :                 }
    2142           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    2143           2 :                 if (_ptr_user) {
    2144           2 :                         NDR_PULL_ALLOC(ndr, r->user);
    2145             :                 } else {
    2146           0 :                         r->user = NULL;
    2147             :                 }
    2148           2 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2149             :         }
    2150           4 :         if (ndr_flags & NDR_BUFFERS) {
    2151           2 :                 if (r->path) {
    2152           2 :                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2153           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
    2154           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
    2155           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
    2156           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->path, &size_path_1));
    2157           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->path, &length_path_1));
    2158           2 :                         if (length_path_1 > size_path_1) {
    2159           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
    2160             :                         }
    2161           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
    2162           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
    2163           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
    2164             :                 }
    2165           2 :                 if (r->user) {
    2166           2 :                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2167           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    2168           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
    2169           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
    2170           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
    2171           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
    2172           2 :                         if (length_user_1 > size_user_1) {
    2173           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
    2174             :                         }
    2175           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
    2176           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
    2177           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    2178             :                 }
    2179             :         }
    2180           4 :         return NDR_ERR_SUCCESS;
    2181             : }
    2182             : 
    2183           0 : _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r)
    2184             : {
    2185           0 :         ndr_print_struct(ndr, name, "srvsvc_NetFileInfo3");
    2186           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2187           0 :         ndr->depth++;
    2188           0 :         ndr_print_uint32(ndr, "fid", r->fid);
    2189           0 :         ndr_print_uint32(ndr, "permissions", r->permissions);
    2190           0 :         ndr_print_uint32(ndr, "num_locks", r->num_locks);
    2191           0 :         ndr_print_ptr(ndr, "path", r->path);
    2192           0 :         ndr->depth++;
    2193           0 :         if (r->path) {
    2194           0 :                 ndr_print_string(ndr, "path", r->path);
    2195             :         }
    2196           0 :         ndr->depth--;
    2197           0 :         ndr_print_ptr(ndr, "user", r->user);
    2198           0 :         ndr->depth++;
    2199           0 :         if (r->user) {
    2200           0 :                 ndr_print_string(ndr, "user", r->user);
    2201             :         }
    2202           0 :         ndr->depth--;
    2203           0 :         ndr->depth--;
    2204             : }
    2205             : 
    2206          21 : static enum ndr_err_code ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
    2207             : {
    2208             :         uint32_t cntr_array_1;
    2209          21 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2210          21 :         if (ndr_flags & NDR_SCALARS) {
    2211          21 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2212          21 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2213          21 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    2214          21 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2215             :         }
    2216          21 :         if (ndr_flags & NDR_BUFFERS) {
    2217          21 :                 if (r->array) {
    2218           2 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2219           4 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2220           2 :                                 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    2221             :                         }
    2222           4 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2223           2 :                                 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    2224             :                         }
    2225             :                 }
    2226             :         }
    2227          21 :         return NDR_ERR_SUCCESS;
    2228             : }
    2229             : 
    2230          20 : static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
    2231             : {
    2232             :         uint32_t _ptr_array;
    2233          20 :         uint32_t size_array_1 = 0;
    2234             :         uint32_t cntr_array_1;
    2235          20 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    2236          20 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    2237          20 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2238          20 :         if (ndr_flags & NDR_SCALARS) {
    2239          20 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2240          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2241          20 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    2242          20 :                 if (_ptr_array) {
    2243           2 :                         NDR_PULL_ALLOC(ndr, r->array);
    2244             :                 } else {
    2245          18 :                         r->array = NULL;
    2246             :                 }
    2247          20 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2248             :         }
    2249          20 :         if (ndr_flags & NDR_BUFFERS) {
    2250          20 :                 if (r->array) {
    2251           2 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2252           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    2253           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    2254           2 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    2255           2 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    2256           2 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2257           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    2258           4 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2259           2 :                                 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    2260             :                         }
    2261           4 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2262           2 :                                 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    2263             :                         }
    2264           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    2265           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    2266             :                 }
    2267          20 :                 if (r->array) {
    2268           2 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    2269             :                 }
    2270          20 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2271             :                 }
    2272             :         }
    2273          20 :         return NDR_ERR_SUCCESS;
    2274             : }
    2275             : 
    2276           2 : _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r)
    2277             : {
    2278             :         uint32_t cntr_array_1;
    2279           2 :         ndr_print_struct(ndr, name, "srvsvc_NetFileCtr3");
    2280           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2281           2 :         ndr->depth++;
    2282           2 :         ndr_print_uint32(ndr, "count", r->count);
    2283           2 :         ndr_print_ptr(ndr, "array", r->array);
    2284           2 :         ndr->depth++;
    2285           2 :         if (r->array) {
    2286           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    2287           0 :                 ndr->depth++;
    2288           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2289           0 :                         ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
    2290             :                 }
    2291           0 :                 ndr->depth--;
    2292             :         }
    2293           2 :         ndr->depth--;
    2294           2 :         ndr->depth--;
    2295             : }
    2296             : 
    2297           0 : static enum ndr_err_code ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
    2298             : {
    2299             :         uint32_t level;
    2300           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2301           0 :         if (ndr_flags & NDR_SCALARS) {
    2302             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    2303           0 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    2304           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    2305           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    2306           0 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    2307           0 :                 switch (level) {
    2308           0 :                         case 2: {
    2309           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
    2310           0 :                         break; }
    2311             : 
    2312           0 :                         case 3: {
    2313           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
    2314           0 :                         break; }
    2315             : 
    2316           0 :                         default: {
    2317           0 :                         break; }
    2318             : 
    2319             :                 }
    2320           0 :         }
    2321           0 :         if (ndr_flags & NDR_BUFFERS) {
    2322           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2323             :                         /* We didn't get it above, and the token is not needed after this. */
    2324           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    2325             :                 }
    2326           0 :                 switch (level) {
    2327           0 :                         case 2:
    2328           0 :                                 if (r->info2) {
    2329           0 :                                         NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
    2330             :                                 }
    2331           0 :                         break;
    2332             : 
    2333           0 :                         case 3:
    2334           0 :                                 if (r->info3) {
    2335           0 :                                         NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
    2336             :                                 }
    2337           0 :                         break;
    2338             : 
    2339           0 :                         default:
    2340           0 :                         break;
    2341             : 
    2342             :                 }
    2343           0 :         }
    2344           0 :         return NDR_ERR_SUCCESS;
    2345             : }
    2346             : 
    2347           0 : static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
    2348             : {
    2349             :         uint32_t level;
    2350             :         uint32_t _level;
    2351           0 :         TALLOC_CTX *_mem_save_info2_0 = NULL;
    2352             :         uint32_t _ptr_info2;
    2353           0 :         TALLOC_CTX *_mem_save_info3_0 = NULL;
    2354             :         uint32_t _ptr_info3;
    2355           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2356           0 :         if (ndr_flags & NDR_SCALARS) {
    2357             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    2358           0 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2359           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    2360           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    2361           0 :                 if (_level != level) {
    2362           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    2363             :                 }
    2364           0 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    2365           0 :                 switch (level) {
    2366           0 :                         case 2: {
    2367           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
    2368           0 :                                 if (_ptr_info2) {
    2369           0 :                                         NDR_PULL_ALLOC(ndr, r->info2);
    2370             :                                 } else {
    2371           0 :                                         r->info2 = NULL;
    2372             :                                 }
    2373           0 :                         break; }
    2374             : 
    2375           0 :                         case 3: {
    2376           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
    2377           0 :                                 if (_ptr_info3) {
    2378           0 :                                         NDR_PULL_ALLOC(ndr, r->info3);
    2379             :                                 } else {
    2380           0 :                                         r->info3 = NULL;
    2381             :                                 }
    2382           0 :                         break; }
    2383             : 
    2384           0 :                         default: {
    2385           0 :                         break; }
    2386             : 
    2387             :                 }
    2388           0 :         }
    2389           0 :         if (ndr_flags & NDR_BUFFERS) {
    2390           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2391             :                         /* We didn't get it above, and the token is not needed after this. */
    2392           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2393             :                 }
    2394           0 :                 switch (level) {
    2395           0 :                         case 2:
    2396           0 :                                 if (r->info2) {
    2397           0 :                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2398           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
    2399           0 :                                         NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
    2400           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
    2401             :                                 }
    2402           0 :                         break;
    2403             : 
    2404           0 :                         case 3:
    2405           0 :                                 if (r->info3) {
    2406           0 :                                         _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2407           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
    2408           0 :                                         NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
    2409           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
    2410             :                                 }
    2411           0 :                         break;
    2412             : 
    2413           0 :                         default:
    2414           0 :                         break;
    2415             : 
    2416             :                 }
    2417           0 :         }
    2418           0 :         return NDR_ERR_SUCCESS;
    2419             : }
    2420             : 
    2421           0 : _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r)
    2422             : {
    2423             :         uint32_t level;
    2424           0 :         level = ndr_print_steal_switch_value(ndr, r);
    2425           0 :         ndr_print_union(ndr, name, level, "srvsvc_NetFileInfo");
    2426           0 :         switch (level) {
    2427           0 :                 case 2:
    2428           0 :                         ndr_print_ptr(ndr, "info2", r->info2);
    2429           0 :                         ndr->depth++;
    2430           0 :                         if (r->info2) {
    2431           0 :                                 ndr_print_srvsvc_NetFileInfo2(ndr, "info2", r->info2);
    2432             :                         }
    2433           0 :                         ndr->depth--;
    2434           0 :                 break;
    2435             : 
    2436           0 :                 case 3:
    2437           0 :                         ndr_print_ptr(ndr, "info3", r->info3);
    2438           0 :                         ndr->depth++;
    2439           0 :                         if (r->info3) {
    2440           0 :                                 ndr_print_srvsvc_NetFileInfo3(ndr, "info3", r->info3);
    2441             :                         }
    2442           0 :                         ndr->depth--;
    2443           0 :                 break;
    2444             : 
    2445           0 :                 default:
    2446           0 :                 break;
    2447             : 
    2448             :         }
    2449           0 : }
    2450             : 
    2451          76 : static enum ndr_err_code ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
    2452             : {
    2453             :         uint32_t level;
    2454          76 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2455          76 :         if (ndr_flags & NDR_SCALARS) {
    2456             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    2457          38 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    2458          38 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    2459          38 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    2460          38 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    2461          38 :                 switch (level) {
    2462          17 :                         case 2: {
    2463          17 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
    2464          17 :                         break; }
    2465             : 
    2466          21 :                         case 3: {
    2467          21 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
    2468          21 :                         break; }
    2469             : 
    2470           0 :                         default: {
    2471           0 :                         break; }
    2472             : 
    2473             :                 }
    2474          30 :         }
    2475          76 :         if (ndr_flags & NDR_BUFFERS) {
    2476          38 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2477             :                         /* We didn't get it above, and the token is not needed after this. */
    2478          38 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    2479             :                 }
    2480          38 :                 switch (level) {
    2481          17 :                         case 2:
    2482          17 :                                 if (r->ctr2) {
    2483          17 :                                         NDR_CHECK(ndr_push_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
    2484             :                                 }
    2485          17 :                         break;
    2486             : 
    2487          21 :                         case 3:
    2488          21 :                                 if (r->ctr3) {
    2489          21 :                                         NDR_CHECK(ndr_push_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
    2490             :                                 }
    2491          21 :                         break;
    2492             : 
    2493           0 :                         default:
    2494           0 :                         break;
    2495             : 
    2496             :                 }
    2497          30 :         }
    2498          76 :         return NDR_ERR_SUCCESS;
    2499             : }
    2500             : 
    2501          72 : static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
    2502             : {
    2503             :         uint32_t level;
    2504             :         uint32_t _level;
    2505          72 :         TALLOC_CTX *_mem_save_ctr2_0 = NULL;
    2506             :         uint32_t _ptr_ctr2;
    2507          72 :         TALLOC_CTX *_mem_save_ctr3_0 = NULL;
    2508             :         uint32_t _ptr_ctr3;
    2509          72 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2510          72 :         if (ndr_flags & NDR_SCALARS) {
    2511             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    2512          36 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2513          36 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    2514          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    2515          36 :                 if (_level != level) {
    2516           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    2517             :                 }
    2518          36 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    2519          36 :                 switch (level) {
    2520          16 :                         case 2: {
    2521          16 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
    2522          16 :                                 if (_ptr_ctr2) {
    2523          16 :                                         NDR_PULL_ALLOC(ndr, r->ctr2);
    2524             :                                 } else {
    2525           0 :                                         r->ctr2 = NULL;
    2526             :                                 }
    2527          16 :                         break; }
    2528             : 
    2529          20 :                         case 3: {
    2530          20 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
    2531          20 :                                 if (_ptr_ctr3) {
    2532          20 :                                         NDR_PULL_ALLOC(ndr, r->ctr3);
    2533             :                                 } else {
    2534           0 :                                         r->ctr3 = NULL;
    2535             :                                 }
    2536          20 :                         break; }
    2537             : 
    2538           0 :                         default: {
    2539           0 :                         break; }
    2540             : 
    2541             :                 }
    2542          28 :         }
    2543          72 :         if (ndr_flags & NDR_BUFFERS) {
    2544          36 :                 if (!(ndr_flags & NDR_SCALARS)) {
    2545             :                         /* We didn't get it above, and the token is not needed after this. */
    2546          36 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    2547             :                 }
    2548          36 :                 switch (level) {
    2549          16 :                         case 2:
    2550          16 :                                 if (r->ctr2) {
    2551          16 :                                         _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2552          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
    2553          16 :                                         NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
    2554          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
    2555             :                                 }
    2556          16 :                         break;
    2557             : 
    2558          20 :                         case 3:
    2559          20 :                                 if (r->ctr3) {
    2560          20 :                                         _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2561          20 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
    2562          20 :                                         NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
    2563          20 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
    2564             :                                 }
    2565          20 :                         break;
    2566             : 
    2567           0 :                         default:
    2568           0 :                         break;
    2569             : 
    2570             :                 }
    2571          28 :         }
    2572          72 :         return NDR_ERR_SUCCESS;
    2573             : }
    2574             : 
    2575           4 : _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r)
    2576             : {
    2577             :         uint32_t level;
    2578           4 :         level = ndr_print_steal_switch_value(ndr, r);
    2579           4 :         ndr_print_union(ndr, name, level, "srvsvc_NetFileCtr");
    2580           4 :         switch (level) {
    2581           2 :                 case 2:
    2582           2 :                         ndr_print_ptr(ndr, "ctr2", r->ctr2);
    2583           2 :                         ndr->depth++;
    2584           2 :                         if (r->ctr2) {
    2585           2 :                                 ndr_print_srvsvc_NetFileCtr2(ndr, "ctr2", r->ctr2);
    2586             :                         }
    2587           2 :                         ndr->depth--;
    2588           2 :                 break;
    2589             : 
    2590           2 :                 case 3:
    2591           2 :                         ndr_print_ptr(ndr, "ctr3", r->ctr3);
    2592           2 :                         ndr->depth++;
    2593           2 :                         if (r->ctr3) {
    2594           2 :                                 ndr_print_srvsvc_NetFileCtr3(ndr, "ctr3", r->ctr3);
    2595             :                         }
    2596           2 :                         ndr->depth--;
    2597           2 :                 break;
    2598             : 
    2599           0 :                 default:
    2600           0 :                 break;
    2601             : 
    2602             :         }
    2603           4 : }
    2604             : 
    2605          38 : static enum ndr_err_code ndr_push_srvsvc_NetFileInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfoCtr *r)
    2606             : {
    2607          38 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2608          38 :         if (ndr_flags & NDR_SCALARS) {
    2609          38 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2610          38 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
    2611          38 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    2612          38 :                 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
    2613          38 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2614             :         }
    2615          38 :         if (ndr_flags & NDR_BUFFERS) {
    2616          38 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    2617          38 :                 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
    2618             :         }
    2619          38 :         return NDR_ERR_SUCCESS;
    2620             : }
    2621             : 
    2622          36 : static enum ndr_err_code ndr_pull_srvsvc_NetFileInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfoCtr *r)
    2623             : {
    2624          36 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2625          36 :         if (ndr_flags & NDR_SCALARS) {
    2626          36 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2627          36 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
    2628          36 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    2629          36 :                 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
    2630          36 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2631             :         }
    2632          36 :         if (ndr_flags & NDR_BUFFERS) {
    2633          36 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    2634          36 :                 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
    2635             :         }
    2636          36 :         return NDR_ERR_SUCCESS;
    2637             : }
    2638             : 
    2639           4 : _PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r)
    2640             : {
    2641           4 :         ndr_print_struct(ndr, name, "srvsvc_NetFileInfoCtr");
    2642           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2643           4 :         ndr->depth++;
    2644           4 :         ndr_print_uint32(ndr, "level", r->level);
    2645           4 :         ndr_print_set_switch_value(ndr, &r->ctr, r->level);
    2646           4 :         ndr_print_srvsvc_NetFileCtr(ndr, "ctr", &r->ctr);
    2647           4 :         ndr->depth--;
    2648             : }
    2649             : 
    2650           8 : static enum ndr_err_code ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
    2651             : {
    2652           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2653           8 :         if (ndr_flags & NDR_SCALARS) {
    2654           4 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2655           4 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
    2656           4 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2657             :         }
    2658           8 :         if (ndr_flags & NDR_BUFFERS) {
    2659           4 :                 if (r->client) {
    2660           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    2661           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    2662           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    2663           4 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    2664             :                 }
    2665             :         }
    2666           8 :         return NDR_ERR_SUCCESS;
    2667             : }
    2668             : 
    2669           8 : static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
    2670             : {
    2671             :         uint32_t _ptr_client;
    2672           8 :         uint32_t size_client_1 = 0;
    2673           8 :         uint32_t length_client_1 = 0;
    2674           8 :         TALLOC_CTX *_mem_save_client_0 = NULL;
    2675           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2676           8 :         if (ndr_flags & NDR_SCALARS) {
    2677           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2678           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
    2679           4 :                 if (_ptr_client) {
    2680           4 :                         NDR_PULL_ALLOC(ndr, r->client);
    2681             :                 } else {
    2682           0 :                         r->client = NULL;
    2683             :                 }
    2684           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2685             :         }
    2686           8 :         if (ndr_flags & NDR_BUFFERS) {
    2687           4 :                 if (r->client) {
    2688           4 :                         _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2689           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
    2690           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
    2691           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
    2692           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client, &size_client_1));
    2693           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client, &length_client_1));
    2694           4 :                         if (length_client_1 > size_client_1) {
    2695           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
    2696             :                         }
    2697           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
    2698           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
    2699           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
    2700             :                 }
    2701             :         }
    2702           8 :         return NDR_ERR_SUCCESS;
    2703             : }
    2704             : 
    2705           0 : _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r)
    2706             : {
    2707           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSessInfo0");
    2708           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2709           0 :         ndr->depth++;
    2710           0 :         ndr_print_ptr(ndr, "client", r->client);
    2711           0 :         ndr->depth++;
    2712           0 :         if (r->client) {
    2713           0 :                 ndr_print_string(ndr, "client", r->client);
    2714             :         }
    2715           0 :         ndr->depth--;
    2716           0 :         ndr->depth--;
    2717             : }
    2718             : 
    2719          17 : static enum ndr_err_code ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
    2720             : {
    2721             :         uint32_t cntr_array_1;
    2722          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2723          17 :         if (ndr_flags & NDR_SCALARS) {
    2724          17 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2725          17 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2726          17 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    2727          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2728             :         }
    2729          17 :         if (ndr_flags & NDR_BUFFERS) {
    2730          17 :                 if (r->array) {
    2731           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2732           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2733           4 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    2734             :                         }
    2735           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2736           4 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    2737             :                         }
    2738             :                 }
    2739             :         }
    2740          17 :         return NDR_ERR_SUCCESS;
    2741             : }
    2742             : 
    2743          16 : static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
    2744             : {
    2745             :         uint32_t _ptr_array;
    2746          16 :         uint32_t size_array_1 = 0;
    2747             :         uint32_t cntr_array_1;
    2748          16 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    2749          16 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    2750          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2751          16 :         if (ndr_flags & NDR_SCALARS) {
    2752          16 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2753          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2754          16 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    2755          16 :                 if (_ptr_array) {
    2756           4 :                         NDR_PULL_ALLOC(ndr, r->array);
    2757             :                 } else {
    2758          12 :                         r->array = NULL;
    2759             :                 }
    2760          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2761             :         }
    2762          16 :         if (ndr_flags & NDR_BUFFERS) {
    2763          16 :                 if (r->array) {
    2764           4 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2765           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    2766           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    2767           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    2768           4 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    2769           4 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2770           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    2771           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2772           4 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    2773             :                         }
    2774           8 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2775           4 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    2776             :                         }
    2777           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    2778           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    2779             :                 }
    2780          16 :                 if (r->array) {
    2781           4 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    2782             :                 }
    2783          18 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2784             :                 }
    2785             :         }
    2786          16 :         return NDR_ERR_SUCCESS;
    2787             : }
    2788             : 
    2789           2 : _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r)
    2790             : {
    2791             :         uint32_t cntr_array_1;
    2792           2 :         ndr_print_struct(ndr, name, "srvsvc_NetSessCtr0");
    2793           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2794           2 :         ndr->depth++;
    2795           2 :         ndr_print_uint32(ndr, "count", r->count);
    2796           2 :         ndr_print_ptr(ndr, "array", r->array);
    2797           2 :         ndr->depth++;
    2798           2 :         if (r->array) {
    2799           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    2800           0 :                 ndr->depth++;
    2801           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2802           0 :                         ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
    2803             :                 }
    2804           0 :                 ndr->depth--;
    2805             :         }
    2806           2 :         ndr->depth--;
    2807           2 :         ndr->depth--;
    2808             : }
    2809             : 
    2810          28 : static enum ndr_err_code ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
    2811             : {
    2812          28 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2813          28 :         if (ndr_flags & NDR_SCALARS) {
    2814          14 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2815          14 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
    2816          14 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    2817          14 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
    2818          14 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
    2819          14 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
    2820          14 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
    2821          14 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2822             :         }
    2823          28 :         if (ndr_flags & NDR_BUFFERS) {
    2824          14 :                 if (r->client) {
    2825          14 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    2826          14 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    2827          14 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    2828          14 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    2829             :                 }
    2830          14 :                 if (r->user) {
    2831          14 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    2832          14 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    2833          14 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    2834          14 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    2835             :                 }
    2836             :         }
    2837          28 :         return NDR_ERR_SUCCESS;
    2838             : }
    2839             : 
    2840          28 : static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
    2841             : {
    2842             :         uint32_t _ptr_client;
    2843          28 :         uint32_t size_client_1 = 0;
    2844          28 :         uint32_t length_client_1 = 0;
    2845          28 :         TALLOC_CTX *_mem_save_client_0 = NULL;
    2846             :         uint32_t _ptr_user;
    2847          28 :         uint32_t size_user_1 = 0;
    2848          28 :         uint32_t length_user_1 = 0;
    2849          28 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    2850          28 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2851          28 :         if (ndr_flags & NDR_SCALARS) {
    2852          14 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2853          14 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
    2854          14 :                 if (_ptr_client) {
    2855          14 :                         NDR_PULL_ALLOC(ndr, r->client);
    2856             :                 } else {
    2857           0 :                         r->client = NULL;
    2858             :                 }
    2859          14 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    2860          14 :                 if (_ptr_user) {
    2861          14 :                         NDR_PULL_ALLOC(ndr, r->user);
    2862             :                 } else {
    2863           0 :                         r->user = NULL;
    2864             :                 }
    2865          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
    2866          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
    2867          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
    2868          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
    2869          14 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2870             :         }
    2871          28 :         if (ndr_flags & NDR_BUFFERS) {
    2872          14 :                 if (r->client) {
    2873          14 :                         _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2874          14 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
    2875          14 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
    2876          14 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
    2877          14 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client, &size_client_1));
    2878          14 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client, &length_client_1));
    2879          14 :                         if (length_client_1 > size_client_1) {
    2880           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
    2881             :                         }
    2882          14 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
    2883          14 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
    2884          14 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
    2885             :                 }
    2886          14 :                 if (r->user) {
    2887          14 :                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2888          14 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    2889          14 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
    2890          14 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
    2891          14 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
    2892          14 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
    2893          14 :                         if (length_user_1 > size_user_1) {
    2894           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
    2895             :                         }
    2896          14 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
    2897          14 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
    2898          14 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    2899             :                 }
    2900             :         }
    2901          28 :         return NDR_ERR_SUCCESS;
    2902             : }
    2903             : 
    2904           0 : _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r)
    2905             : {
    2906           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSessInfo1");
    2907           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2908           0 :         ndr->depth++;
    2909           0 :         ndr_print_ptr(ndr, "client", r->client);
    2910           0 :         ndr->depth++;
    2911           0 :         if (r->client) {
    2912           0 :                 ndr_print_string(ndr, "client", r->client);
    2913             :         }
    2914           0 :         ndr->depth--;
    2915           0 :         ndr_print_ptr(ndr, "user", r->user);
    2916           0 :         ndr->depth++;
    2917           0 :         if (r->user) {
    2918           0 :                 ndr_print_string(ndr, "user", r->user);
    2919             :         }
    2920           0 :         ndr->depth--;
    2921           0 :         ndr_print_uint32(ndr, "num_open", r->num_open);
    2922           0 :         ndr_print_uint32(ndr, "time", r->time);
    2923           0 :         ndr_print_uint32(ndr, "idle_time", r->idle_time);
    2924           0 :         ndr_print_uint32(ndr, "user_flags", r->user_flags);
    2925           0 :         ndr->depth--;
    2926             : }
    2927             : 
    2928          45 : static enum ndr_err_code ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
    2929             : {
    2930             :         uint32_t cntr_array_1;
    2931          45 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2932          45 :         if (ndr_flags & NDR_SCALARS) {
    2933          45 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2934          45 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    2935          45 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    2936          45 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2937             :         }
    2938          45 :         if (ndr_flags & NDR_BUFFERS) {
    2939          45 :                 if (r->array) {
    2940          14 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    2941          28 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2942          14 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    2943             :                         }
    2944          28 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    2945          14 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    2946             :                         }
    2947             :                 }
    2948             :         }
    2949          45 :         return NDR_ERR_SUCCESS;
    2950             : }
    2951             : 
    2952          44 : static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
    2953             : {
    2954             :         uint32_t _ptr_array;
    2955          44 :         uint32_t size_array_1 = 0;
    2956             :         uint32_t cntr_array_1;
    2957          44 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    2958          44 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    2959          44 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2960          44 :         if (ndr_flags & NDR_SCALARS) {
    2961          44 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2962          44 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    2963          44 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    2964          44 :                 if (_ptr_array) {
    2965          14 :                         NDR_PULL_ALLOC(ndr, r->array);
    2966             :                 } else {
    2967          30 :                         r->array = NULL;
    2968             :                 }
    2969          44 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2970             :         }
    2971          44 :         if (ndr_flags & NDR_BUFFERS) {
    2972          44 :                 if (r->array) {
    2973          14 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2974          14 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    2975          14 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    2976          14 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    2977          14 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    2978          14 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    2979          14 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    2980          28 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2981          14 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    2982             :                         }
    2983          28 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2984          14 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    2985             :                         }
    2986          14 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    2987          14 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    2988             :                 }
    2989          44 :                 if (r->array) {
    2990          14 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    2991             :                 }
    2992          51 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    2993             :                 }
    2994             :         }
    2995          44 :         return NDR_ERR_SUCCESS;
    2996             : }
    2997             : 
    2998           2 : _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r)
    2999             : {
    3000             :         uint32_t cntr_array_1;
    3001           2 :         ndr_print_struct(ndr, name, "srvsvc_NetSessCtr1");
    3002           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3003           2 :         ndr->depth++;
    3004           2 :         ndr_print_uint32(ndr, "count", r->count);
    3005           2 :         ndr_print_ptr(ndr, "array", r->array);
    3006           2 :         ndr->depth++;
    3007           2 :         if (r->array) {
    3008           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    3009           0 :                 ndr->depth++;
    3010           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3011           0 :                         ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
    3012             :                 }
    3013           0 :                 ndr->depth--;
    3014             :         }
    3015           2 :         ndr->depth--;
    3016           2 :         ndr->depth--;
    3017             : }
    3018             : 
    3019           0 : static enum ndr_err_code ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
    3020             : {
    3021           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3022           0 :         if (ndr_flags & NDR_SCALARS) {
    3023           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3024           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
    3025           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    3026           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
    3027           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
    3028           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
    3029           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
    3030           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
    3031           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3032             :         }
    3033           0 :         if (ndr_flags & NDR_BUFFERS) {
    3034           0 :                 if (r->client) {
    3035           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    3036           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3037           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    3038           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3039             :                 }
    3040           0 :                 if (r->user) {
    3041           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    3042           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3043           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    3044           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3045             :                 }
    3046           0 :                 if (r->client_type) {
    3047           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
    3048           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3049           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
    3050           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3051             :                 }
    3052             :         }
    3053           0 :         return NDR_ERR_SUCCESS;
    3054             : }
    3055             : 
    3056           0 : static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
    3057             : {
    3058             :         uint32_t _ptr_client;
    3059           0 :         uint32_t size_client_1 = 0;
    3060           0 :         uint32_t length_client_1 = 0;
    3061           0 :         TALLOC_CTX *_mem_save_client_0 = NULL;
    3062             :         uint32_t _ptr_user;
    3063           0 :         uint32_t size_user_1 = 0;
    3064           0 :         uint32_t length_user_1 = 0;
    3065           0 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    3066             :         uint32_t _ptr_client_type;
    3067           0 :         uint32_t size_client_type_1 = 0;
    3068           0 :         uint32_t length_client_type_1 = 0;
    3069           0 :         TALLOC_CTX *_mem_save_client_type_0 = NULL;
    3070           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3071           0 :         if (ndr_flags & NDR_SCALARS) {
    3072           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3073           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
    3074           0 :                 if (_ptr_client) {
    3075           0 :                         NDR_PULL_ALLOC(ndr, r->client);
    3076             :                 } else {
    3077           0 :                         r->client = NULL;
    3078             :                 }
    3079           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    3080           0 :                 if (_ptr_user) {
    3081           0 :                         NDR_PULL_ALLOC(ndr, r->user);
    3082             :                 } else {
    3083           0 :                         r->user = NULL;
    3084             :                 }
    3085           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
    3086           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
    3087           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
    3088           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
    3089           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
    3090           0 :                 if (_ptr_client_type) {
    3091           0 :                         NDR_PULL_ALLOC(ndr, r->client_type);
    3092             :                 } else {
    3093           0 :                         r->client_type = NULL;
    3094             :                 }
    3095           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3096             :         }
    3097           0 :         if (ndr_flags & NDR_BUFFERS) {
    3098           0 :                 if (r->client) {
    3099           0 :                         _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3100           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
    3101           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
    3102           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
    3103           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client, &size_client_1));
    3104           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client, &length_client_1));
    3105           0 :                         if (length_client_1 > size_client_1) {
    3106           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
    3107             :                         }
    3108           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
    3109           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
    3110           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
    3111             :                 }
    3112           0 :                 if (r->user) {
    3113           0 :                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3114           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    3115           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
    3116           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
    3117           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
    3118           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
    3119           0 :                         if (length_user_1 > size_user_1) {
    3120           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
    3121             :                         }
    3122           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
    3123           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
    3124           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    3125             :                 }
    3126           0 :                 if (r->client_type) {
    3127           0 :                         _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3128           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
    3129           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
    3130           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
    3131           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_type, &size_client_type_1));
    3132           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_type, &length_client_type_1));
    3133           0 :                         if (length_client_type_1 > size_client_type_1) {
    3134           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_type_1, length_client_type_1);
    3135             :                         }
    3136           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_type_1, sizeof(uint16_t)));
    3137           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, length_client_type_1, sizeof(uint16_t), CH_UTF16));
    3138           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
    3139             :                 }
    3140             :         }
    3141           0 :         return NDR_ERR_SUCCESS;
    3142             : }
    3143             : 
    3144           0 : _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r)
    3145             : {
    3146           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSessInfo2");
    3147           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3148           0 :         ndr->depth++;
    3149           0 :         ndr_print_ptr(ndr, "client", r->client);
    3150           0 :         ndr->depth++;
    3151           0 :         if (r->client) {
    3152           0 :                 ndr_print_string(ndr, "client", r->client);
    3153             :         }
    3154           0 :         ndr->depth--;
    3155           0 :         ndr_print_ptr(ndr, "user", r->user);
    3156           0 :         ndr->depth++;
    3157           0 :         if (r->user) {
    3158           0 :                 ndr_print_string(ndr, "user", r->user);
    3159             :         }
    3160           0 :         ndr->depth--;
    3161           0 :         ndr_print_uint32(ndr, "num_open", r->num_open);
    3162           0 :         ndr_print_uint32(ndr, "time", r->time);
    3163           0 :         ndr_print_uint32(ndr, "idle_time", r->idle_time);
    3164           0 :         ndr_print_uint32(ndr, "user_flags", r->user_flags);
    3165           0 :         ndr_print_ptr(ndr, "client_type", r->client_type);
    3166           0 :         ndr->depth++;
    3167           0 :         if (r->client_type) {
    3168           0 :                 ndr_print_string(ndr, "client_type", r->client_type);
    3169             :         }
    3170           0 :         ndr->depth--;
    3171           0 :         ndr->depth--;
    3172             : }
    3173             : 
    3174          17 : static enum ndr_err_code ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
    3175             : {
    3176             :         uint32_t cntr_array_1;
    3177          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3178          17 :         if (ndr_flags & NDR_SCALARS) {
    3179          17 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3180          17 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    3181          17 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    3182          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3183             :         }
    3184          17 :         if (ndr_flags & NDR_BUFFERS) {
    3185          17 :                 if (r->array) {
    3186           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    3187           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3188           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    3189             :                         }
    3190           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3191           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    3192             :                         }
    3193             :                 }
    3194             :         }
    3195          17 :         return NDR_ERR_SUCCESS;
    3196             : }
    3197             : 
    3198          16 : static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
    3199             : {
    3200             :         uint32_t _ptr_array;
    3201          16 :         uint32_t size_array_1 = 0;
    3202             :         uint32_t cntr_array_1;
    3203          16 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    3204          16 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    3205          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3206          16 :         if (ndr_flags & NDR_SCALARS) {
    3207          16 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3208          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    3209          16 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    3210          16 :                 if (_ptr_array) {
    3211           0 :                         NDR_PULL_ALLOC(ndr, r->array);
    3212             :                 } else {
    3213          16 :                         r->array = NULL;
    3214             :                 }
    3215          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3216             :         }
    3217          16 :         if (ndr_flags & NDR_BUFFERS) {
    3218          16 :                 if (r->array) {
    3219           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3220           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    3221           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    3222           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    3223           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    3224           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3225           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    3226           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3227           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    3228             :                         }
    3229           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3230           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    3231             :                         }
    3232           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    3233           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    3234             :                 }
    3235          16 :                 if (r->array) {
    3236           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    3237             :                 }
    3238          16 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3239             :                 }
    3240             :         }
    3241          16 :         return NDR_ERR_SUCCESS;
    3242             : }
    3243             : 
    3244           2 : _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r)
    3245             : {
    3246             :         uint32_t cntr_array_1;
    3247           2 :         ndr_print_struct(ndr, name, "srvsvc_NetSessCtr2");
    3248           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3249           2 :         ndr->depth++;
    3250           2 :         ndr_print_uint32(ndr, "count", r->count);
    3251           2 :         ndr_print_ptr(ndr, "array", r->array);
    3252           2 :         ndr->depth++;
    3253           2 :         if (r->array) {
    3254           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    3255           0 :                 ndr->depth++;
    3256           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3257           0 :                         ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
    3258             :                 }
    3259           0 :                 ndr->depth--;
    3260             :         }
    3261           2 :         ndr->depth--;
    3262           2 :         ndr->depth--;
    3263             : }
    3264             : 
    3265           0 : static enum ndr_err_code ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
    3266             : {
    3267           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3268           0 :         if (ndr_flags & NDR_SCALARS) {
    3269           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3270           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
    3271           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    3272           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
    3273           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
    3274           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3275             :         }
    3276           0 :         if (ndr_flags & NDR_BUFFERS) {
    3277           0 :                 if (r->client) {
    3278           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    3279           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3280           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    3281           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3282             :                 }
    3283           0 :                 if (r->user) {
    3284           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    3285           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3286           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    3287           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3288             :                 }
    3289             :         }
    3290           0 :         return NDR_ERR_SUCCESS;
    3291             : }
    3292             : 
    3293           0 : static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
    3294             : {
    3295             :         uint32_t _ptr_client;
    3296           0 :         uint32_t size_client_1 = 0;
    3297           0 :         uint32_t length_client_1 = 0;
    3298           0 :         TALLOC_CTX *_mem_save_client_0 = NULL;
    3299             :         uint32_t _ptr_user;
    3300           0 :         uint32_t size_user_1 = 0;
    3301           0 :         uint32_t length_user_1 = 0;
    3302           0 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    3303           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3304           0 :         if (ndr_flags & NDR_SCALARS) {
    3305           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3306           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
    3307           0 :                 if (_ptr_client) {
    3308           0 :                         NDR_PULL_ALLOC(ndr, r->client);
    3309             :                 } else {
    3310           0 :                         r->client = NULL;
    3311             :                 }
    3312           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    3313           0 :                 if (_ptr_user) {
    3314           0 :                         NDR_PULL_ALLOC(ndr, r->user);
    3315             :                 } else {
    3316           0 :                         r->user = NULL;
    3317             :                 }
    3318           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
    3319           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
    3320           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3321             :         }
    3322           0 :         if (ndr_flags & NDR_BUFFERS) {
    3323           0 :                 if (r->client) {
    3324           0 :                         _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3325           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
    3326           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
    3327           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
    3328           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client, &size_client_1));
    3329           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client, &length_client_1));
    3330           0 :                         if (length_client_1 > size_client_1) {
    3331           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
    3332             :                         }
    3333           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
    3334           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
    3335           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
    3336             :                 }
    3337           0 :                 if (r->user) {
    3338           0 :                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3339           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    3340           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
    3341           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
    3342           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
    3343           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
    3344           0 :                         if (length_user_1 > size_user_1) {
    3345           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
    3346             :                         }
    3347           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
    3348           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
    3349           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    3350             :                 }
    3351             :         }
    3352           0 :         return NDR_ERR_SUCCESS;
    3353             : }
    3354             : 
    3355           0 : _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r)
    3356             : {
    3357           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSessInfo10");
    3358           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3359           0 :         ndr->depth++;
    3360           0 :         ndr_print_ptr(ndr, "client", r->client);
    3361           0 :         ndr->depth++;
    3362           0 :         if (r->client) {
    3363           0 :                 ndr_print_string(ndr, "client", r->client);
    3364             :         }
    3365           0 :         ndr->depth--;
    3366           0 :         ndr_print_ptr(ndr, "user", r->user);
    3367           0 :         ndr->depth++;
    3368           0 :         if (r->user) {
    3369           0 :                 ndr_print_string(ndr, "user", r->user);
    3370             :         }
    3371           0 :         ndr->depth--;
    3372           0 :         ndr_print_uint32(ndr, "time", r->time);
    3373           0 :         ndr_print_uint32(ndr, "idle_time", r->idle_time);
    3374           0 :         ndr->depth--;
    3375             : }
    3376             : 
    3377          17 : static enum ndr_err_code ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
    3378             : {
    3379             :         uint32_t cntr_array_1;
    3380          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3381          17 :         if (ndr_flags & NDR_SCALARS) {
    3382          17 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3383          17 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    3384          17 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    3385          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3386             :         }
    3387          17 :         if (ndr_flags & NDR_BUFFERS) {
    3388          17 :                 if (r->array) {
    3389           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    3390           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3391           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    3392             :                         }
    3393           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3394           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    3395             :                         }
    3396             :                 }
    3397             :         }
    3398          17 :         return NDR_ERR_SUCCESS;
    3399             : }
    3400             : 
    3401          16 : static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
    3402             : {
    3403             :         uint32_t _ptr_array;
    3404          16 :         uint32_t size_array_1 = 0;
    3405             :         uint32_t cntr_array_1;
    3406          16 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    3407          16 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    3408          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3409          16 :         if (ndr_flags & NDR_SCALARS) {
    3410          16 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3411          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    3412          16 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    3413          16 :                 if (_ptr_array) {
    3414           0 :                         NDR_PULL_ALLOC(ndr, r->array);
    3415             :                 } else {
    3416          16 :                         r->array = NULL;
    3417             :                 }
    3418          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3419             :         }
    3420          16 :         if (ndr_flags & NDR_BUFFERS) {
    3421          16 :                 if (r->array) {
    3422           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3423           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    3424           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    3425           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    3426           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    3427           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3428           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    3429           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3430           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    3431             :                         }
    3432           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3433           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    3434             :                         }
    3435           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    3436           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    3437             :                 }
    3438          16 :                 if (r->array) {
    3439           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    3440             :                 }
    3441          16 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3442             :                 }
    3443             :         }
    3444          16 :         return NDR_ERR_SUCCESS;
    3445             : }
    3446             : 
    3447           2 : _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r)
    3448             : {
    3449             :         uint32_t cntr_array_1;
    3450           2 :         ndr_print_struct(ndr, name, "srvsvc_NetSessCtr10");
    3451           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3452           2 :         ndr->depth++;
    3453           2 :         ndr_print_uint32(ndr, "count", r->count);
    3454           2 :         ndr_print_ptr(ndr, "array", r->array);
    3455           2 :         ndr->depth++;
    3456           2 :         if (r->array) {
    3457           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    3458           0 :                 ndr->depth++;
    3459           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3460           0 :                         ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
    3461             :                 }
    3462           0 :                 ndr->depth--;
    3463             :         }
    3464           2 :         ndr->depth--;
    3465           2 :         ndr->depth--;
    3466             : }
    3467             : 
    3468           0 : static enum ndr_err_code ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
    3469             : {
    3470           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3471           0 :         if (ndr_flags & NDR_SCALARS) {
    3472           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3473           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
    3474           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
    3475           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
    3476           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
    3477           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
    3478           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
    3479           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
    3480           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport));
    3481           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3482             :         }
    3483           0 :         if (ndr_flags & NDR_BUFFERS) {
    3484           0 :                 if (r->client) {
    3485           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    3486           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3487           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
    3488           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3489             :                 }
    3490           0 :                 if (r->user) {
    3491           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    3492           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3493           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
    3494           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3495             :                 }
    3496           0 :                 if (r->client_type) {
    3497           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
    3498           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3499           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
    3500           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3501             :                 }
    3502           0 :                 if (r->transport) {
    3503           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
    3504           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    3505           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
    3506           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->transport, ndr_charset_length(r->transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    3507             :                 }
    3508             :         }
    3509           0 :         return NDR_ERR_SUCCESS;
    3510             : }
    3511             : 
    3512           0 : static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
    3513             : {
    3514             :         uint32_t _ptr_client;
    3515           0 :         uint32_t size_client_1 = 0;
    3516           0 :         uint32_t length_client_1 = 0;
    3517           0 :         TALLOC_CTX *_mem_save_client_0 = NULL;
    3518             :         uint32_t _ptr_user;
    3519           0 :         uint32_t size_user_1 = 0;
    3520           0 :         uint32_t length_user_1 = 0;
    3521           0 :         TALLOC_CTX *_mem_save_user_0 = NULL;
    3522             :         uint32_t _ptr_client_type;
    3523           0 :         uint32_t size_client_type_1 = 0;
    3524           0 :         uint32_t length_client_type_1 = 0;
    3525           0 :         TALLOC_CTX *_mem_save_client_type_0 = NULL;
    3526             :         uint32_t _ptr_transport;
    3527           0 :         uint32_t size_transport_1 = 0;
    3528           0 :         uint32_t length_transport_1 = 0;
    3529           0 :         TALLOC_CTX *_mem_save_transport_0 = NULL;
    3530           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3531           0 :         if (ndr_flags & NDR_SCALARS) {
    3532           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3533           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
    3534           0 :                 if (_ptr_client) {
    3535           0 :                         NDR_PULL_ALLOC(ndr, r->client);
    3536             :                 } else {
    3537           0 :                         r->client = NULL;
    3538             :                 }
    3539           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
    3540           0 :                 if (_ptr_user) {
    3541           0 :                         NDR_PULL_ALLOC(ndr, r->user);
    3542             :                 } else {
    3543           0 :                         r->user = NULL;
    3544             :                 }
    3545           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
    3546           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
    3547           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
    3548           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
    3549           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
    3550           0 :                 if (_ptr_client_type) {
    3551           0 :                         NDR_PULL_ALLOC(ndr, r->client_type);
    3552             :                 } else {
    3553           0 :                         r->client_type = NULL;
    3554             :                 }
    3555           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
    3556           0 :                 if (_ptr_transport) {
    3557           0 :                         NDR_PULL_ALLOC(ndr, r->transport);
    3558             :                 } else {
    3559           0 :                         r->transport = NULL;
    3560             :                 }
    3561           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3562             :         }
    3563           0 :         if (ndr_flags & NDR_BUFFERS) {
    3564           0 :                 if (r->client) {
    3565           0 :                         _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3566           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
    3567           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
    3568           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
    3569           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client, &size_client_1));
    3570           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client, &length_client_1));
    3571           0 :                         if (length_client_1 > size_client_1) {
    3572           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
    3573             :                         }
    3574           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
    3575           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
    3576           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
    3577             :                 }
    3578           0 :                 if (r->user) {
    3579           0 :                         _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3580           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
    3581           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
    3582           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
    3583           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user, &size_user_1));
    3584           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user, &length_user_1));
    3585           0 :                         if (length_user_1 > size_user_1) {
    3586           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
    3587             :                         }
    3588           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
    3589           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
    3590           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
    3591             :                 }
    3592           0 :                 if (r->client_type) {
    3593           0 :                         _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3594           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
    3595           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
    3596           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
    3597           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->client_type, &size_client_type_1));
    3598           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->client_type, &length_client_type_1));
    3599           0 :                         if (length_client_type_1 > size_client_type_1) {
    3600           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_type_1, length_client_type_1);
    3601             :                         }
    3602           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_client_type_1, sizeof(uint16_t)));
    3603           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, length_client_type_1, sizeof(uint16_t), CH_UTF16));
    3604           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
    3605             :                 }
    3606           0 :                 if (r->transport) {
    3607           0 :                         _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3608           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->transport, 0);
    3609           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->transport));
    3610           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->transport));
    3611           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->transport, &size_transport_1));
    3612           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->transport, &length_transport_1));
    3613           0 :                         if (length_transport_1 > size_transport_1) {
    3614           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_transport_1, length_transport_1);
    3615             :                         }
    3616           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_1, sizeof(uint16_t)));
    3617           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport, length_transport_1, sizeof(uint16_t), CH_UTF16));
    3618           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
    3619             :                 }
    3620             :         }
    3621           0 :         return NDR_ERR_SUCCESS;
    3622             : }
    3623             : 
    3624           0 : _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r)
    3625             : {
    3626           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSessInfo502");
    3627           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3628           0 :         ndr->depth++;
    3629           0 :         ndr_print_ptr(ndr, "client", r->client);
    3630           0 :         ndr->depth++;
    3631           0 :         if (r->client) {
    3632           0 :                 ndr_print_string(ndr, "client", r->client);
    3633             :         }
    3634           0 :         ndr->depth--;
    3635           0 :         ndr_print_ptr(ndr, "user", r->user);
    3636           0 :         ndr->depth++;
    3637           0 :         if (r->user) {
    3638           0 :                 ndr_print_string(ndr, "user", r->user);
    3639             :         }
    3640           0 :         ndr->depth--;
    3641           0 :         ndr_print_uint32(ndr, "num_open", r->num_open);
    3642           0 :         ndr_print_uint32(ndr, "time", r->time);
    3643           0 :         ndr_print_uint32(ndr, "idle_time", r->idle_time);
    3644           0 :         ndr_print_uint32(ndr, "user_flags", r->user_flags);
    3645           0 :         ndr_print_ptr(ndr, "client_type", r->client_type);
    3646           0 :         ndr->depth++;
    3647           0 :         if (r->client_type) {
    3648           0 :                 ndr_print_string(ndr, "client_type", r->client_type);
    3649             :         }
    3650           0 :         ndr->depth--;
    3651           0 :         ndr_print_ptr(ndr, "transport", r->transport);
    3652           0 :         ndr->depth++;
    3653           0 :         if (r->transport) {
    3654           0 :                 ndr_print_string(ndr, "transport", r->transport);
    3655             :         }
    3656           0 :         ndr->depth--;
    3657           0 :         ndr->depth--;
    3658             : }
    3659             : 
    3660          17 : static enum ndr_err_code ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
    3661             : {
    3662             :         uint32_t cntr_array_1;
    3663          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3664          17 :         if (ndr_flags & NDR_SCALARS) {
    3665          17 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3666          17 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    3667          17 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    3668          17 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3669             :         }
    3670          17 :         if (ndr_flags & NDR_BUFFERS) {
    3671          17 :                 if (r->array) {
    3672           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    3673           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3674           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    3675             :                         }
    3676           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3677           0 :                                 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    3678             :                         }
    3679             :                 }
    3680             :         }
    3681          17 :         return NDR_ERR_SUCCESS;
    3682             : }
    3683             : 
    3684          16 : static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
    3685             : {
    3686             :         uint32_t _ptr_array;
    3687          16 :         uint32_t size_array_1 = 0;
    3688             :         uint32_t cntr_array_1;
    3689          16 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    3690          16 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    3691          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3692          16 :         if (ndr_flags & NDR_SCALARS) {
    3693          16 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3694          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    3695          16 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    3696          16 :                 if (_ptr_array) {
    3697           0 :                         NDR_PULL_ALLOC(ndr, r->array);
    3698             :                 } else {
    3699          16 :                         r->array = NULL;
    3700             :                 }
    3701          16 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3702             :         }
    3703          16 :         if (ndr_flags & NDR_BUFFERS) {
    3704          16 :                 if (r->array) {
    3705           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3706           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    3707           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    3708           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    3709           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    3710           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    3711           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    3712           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3713           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    3714             :                         }
    3715           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3716           0 :                                 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    3717             :                         }
    3718           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    3719           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    3720             :                 }
    3721          16 :                 if (r->array) {
    3722           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    3723             :                 }
    3724          16 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    3725             :                 }
    3726             :         }
    3727          16 :         return NDR_ERR_SUCCESS;
    3728             : }
    3729             : 
    3730           2 : _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r)
    3731             : {
    3732             :         uint32_t cntr_array_1;
    3733           2 :         ndr_print_struct(ndr, name, "srvsvc_NetSessCtr502");
    3734           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3735           2 :         ndr->depth++;
    3736           2 :         ndr_print_uint32(ndr, "count", r->count);
    3737           2 :         ndr_print_ptr(ndr, "array", r->array);
    3738           2 :         ndr->depth++;
    3739           2 :         if (r->array) {
    3740           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    3741           0 :                 ndr->depth++;
    3742           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    3743           0 :                         ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
    3744             :                 }
    3745           0 :                 ndr->depth--;
    3746             :         }
    3747           2 :         ndr->depth--;
    3748           2 :         ndr->depth--;
    3749             : }
    3750             : 
    3751         226 : static enum ndr_err_code ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
    3752             : {
    3753             :         uint32_t level;
    3754         226 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3755         226 :         if (ndr_flags & NDR_SCALARS) {
    3756             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3757         113 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3758         113 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    3759         113 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    3760         113 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    3761         113 :                 switch (level) {
    3762          17 :                         case 0: {
    3763          17 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
    3764          17 :                         break; }
    3765             : 
    3766          45 :                         case 1: {
    3767          45 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
    3768          45 :                         break; }
    3769             : 
    3770          17 :                         case 2: {
    3771          17 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
    3772          17 :                         break; }
    3773             : 
    3774          17 :                         case 10: {
    3775          17 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr10));
    3776          17 :                         break; }
    3777             : 
    3778          17 :                         case 502: {
    3779          17 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
    3780          17 :                         break; }
    3781             : 
    3782           0 :                         default: {
    3783           0 :                         break; }
    3784             : 
    3785             :                 }
    3786          83 :         }
    3787         226 :         if (ndr_flags & NDR_BUFFERS) {
    3788         113 :                 if (!(ndr_flags & NDR_SCALARS)) {
    3789             :                         /* We didn't get it above, and the token is not needed after this. */
    3790         113 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3791             :                 }
    3792         113 :                 switch (level) {
    3793          17 :                         case 0:
    3794          17 :                                 if (r->ctr0) {
    3795          17 :                                         NDR_CHECK(ndr_push_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
    3796             :                                 }
    3797          17 :                         break;
    3798             : 
    3799          45 :                         case 1:
    3800          45 :                                 if (r->ctr1) {
    3801          45 :                                         NDR_CHECK(ndr_push_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    3802             :                                 }
    3803          45 :                         break;
    3804             : 
    3805          17 :                         case 2:
    3806          17 :                                 if (r->ctr2) {
    3807          17 :                                         NDR_CHECK(ndr_push_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
    3808             :                                 }
    3809          17 :                         break;
    3810             : 
    3811          17 :                         case 10:
    3812          17 :                                 if (r->ctr10) {
    3813          17 :                                         NDR_CHECK(ndr_push_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
    3814             :                                 }
    3815          17 :                         break;
    3816             : 
    3817          17 :                         case 502:
    3818          17 :                                 if (r->ctr502) {
    3819          17 :                                         NDR_CHECK(ndr_push_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
    3820             :                                 }
    3821          17 :                         break;
    3822             : 
    3823           0 :                         default:
    3824           0 :                         break;
    3825             : 
    3826             :                 }
    3827          83 :         }
    3828         226 :         return NDR_ERR_SUCCESS;
    3829             : }
    3830             : 
    3831         216 : static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
    3832             : {
    3833             :         uint32_t level;
    3834             :         uint32_t _level;
    3835         216 :         TALLOC_CTX *_mem_save_ctr0_0 = NULL;
    3836             :         uint32_t _ptr_ctr0;
    3837         216 :         TALLOC_CTX *_mem_save_ctr1_0 = NULL;
    3838             :         uint32_t _ptr_ctr1;
    3839         216 :         TALLOC_CTX *_mem_save_ctr2_0 = NULL;
    3840             :         uint32_t _ptr_ctr2;
    3841         216 :         TALLOC_CTX *_mem_save_ctr10_0 = NULL;
    3842             :         uint32_t _ptr_ctr10;
    3843         216 :         TALLOC_CTX *_mem_save_ctr502_0 = NULL;
    3844             :         uint32_t _ptr_ctr502;
    3845         216 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3846         216 :         if (ndr_flags & NDR_SCALARS) {
    3847             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3848         108 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3849         108 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    3850         108 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    3851         108 :                 if (_level != level) {
    3852           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    3853             :                 }
    3854         108 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    3855         108 :                 switch (level) {
    3856          16 :                         case 0: {
    3857          16 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
    3858          16 :                                 if (_ptr_ctr0) {
    3859          16 :                                         NDR_PULL_ALLOC(ndr, r->ctr0);
    3860             :                                 } else {
    3861           0 :                                         r->ctr0 = NULL;
    3862             :                                 }
    3863          16 :                         break; }
    3864             : 
    3865          44 :                         case 1: {
    3866          44 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
    3867          44 :                                 if (_ptr_ctr1) {
    3868          44 :                                         NDR_PULL_ALLOC(ndr, r->ctr1);
    3869             :                                 } else {
    3870           0 :                                         r->ctr1 = NULL;
    3871             :                                 }
    3872          44 :                         break; }
    3873             : 
    3874          16 :                         case 2: {
    3875          16 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
    3876          16 :                                 if (_ptr_ctr2) {
    3877          16 :                                         NDR_PULL_ALLOC(ndr, r->ctr2);
    3878             :                                 } else {
    3879           0 :                                         r->ctr2 = NULL;
    3880             :                                 }
    3881          16 :                         break; }
    3882             : 
    3883          16 :                         case 10: {
    3884          16 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr10));
    3885          16 :                                 if (_ptr_ctr10) {
    3886          16 :                                         NDR_PULL_ALLOC(ndr, r->ctr10);
    3887             :                                 } else {
    3888           0 :                                         r->ctr10 = NULL;
    3889             :                                 }
    3890          16 :                         break; }
    3891             : 
    3892          16 :                         case 502: {
    3893          16 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
    3894          16 :                                 if (_ptr_ctr502) {
    3895          16 :                                         NDR_PULL_ALLOC(ndr, r->ctr502);
    3896             :                                 } else {
    3897           0 :                                         r->ctr502 = NULL;
    3898             :                                 }
    3899          16 :                         break; }
    3900             : 
    3901           0 :                         default: {
    3902           0 :                         break; }
    3903             : 
    3904             :                 }
    3905          78 :         }
    3906         216 :         if (ndr_flags & NDR_BUFFERS) {
    3907         108 :                 if (!(ndr_flags & NDR_SCALARS)) {
    3908             :                         /* We didn't get it above, and the token is not needed after this. */
    3909         108 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3910             :                 }
    3911         108 :                 switch (level) {
    3912          16 :                         case 0:
    3913          16 :                                 if (r->ctr0) {
    3914          16 :                                         _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3915          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
    3916          16 :                                         NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
    3917          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
    3918             :                                 }
    3919          16 :                         break;
    3920             : 
    3921          44 :                         case 1:
    3922          44 :                                 if (r->ctr1) {
    3923          44 :                                         _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3924          44 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
    3925          44 :                                         NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    3926          44 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
    3927             :                                 }
    3928          44 :                         break;
    3929             : 
    3930          16 :                         case 2:
    3931          16 :                                 if (r->ctr2) {
    3932          16 :                                         _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3933          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
    3934          16 :                                         NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
    3935          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
    3936             :                                 }
    3937          16 :                         break;
    3938             : 
    3939          16 :                         case 10:
    3940          16 :                                 if (r->ctr10) {
    3941          16 :                                         _mem_save_ctr10_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3942          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr10, 0);
    3943          16 :                                         NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
    3944          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr10_0, 0);
    3945             :                                 }
    3946          16 :                         break;
    3947             : 
    3948          16 :                         case 502:
    3949          16 :                                 if (r->ctr502) {
    3950          16 :                                         _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3951          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
    3952          16 :                                         NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
    3953          16 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
    3954             :                                 }
    3955          16 :                         break;
    3956             : 
    3957           0 :                         default:
    3958           0 :                         break;
    3959             : 
    3960             :                 }
    3961          78 :         }
    3962         216 :         return NDR_ERR_SUCCESS;
    3963             : }
    3964             : 
    3965          10 : _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r)
    3966             : {
    3967             :         uint32_t level;
    3968          10 :         level = ndr_print_steal_switch_value(ndr, r);
    3969          10 :         ndr_print_union(ndr, name, level, "srvsvc_NetSessCtr");
    3970          10 :         switch (level) {
    3971           2 :                 case 0:
    3972           2 :                         ndr_print_ptr(ndr, "ctr0", r->ctr0);
    3973           2 :                         ndr->depth++;
    3974           2 :                         if (r->ctr0) {
    3975           2 :                                 ndr_print_srvsvc_NetSessCtr0(ndr, "ctr0", r->ctr0);
    3976             :                         }
    3977           2 :                         ndr->depth--;
    3978           2 :                 break;
    3979             : 
    3980           2 :                 case 1:
    3981           2 :                         ndr_print_ptr(ndr, "ctr1", r->ctr1);
    3982           2 :                         ndr->depth++;
    3983           2 :                         if (r->ctr1) {
    3984           2 :                                 ndr_print_srvsvc_NetSessCtr1(ndr, "ctr1", r->ctr1);
    3985             :                         }
    3986           2 :                         ndr->depth--;
    3987           2 :                 break;
    3988             : 
    3989           2 :                 case 2:
    3990           2 :                         ndr_print_ptr(ndr, "ctr2", r->ctr2);
    3991           2 :                         ndr->depth++;
    3992           2 :                         if (r->ctr2) {
    3993           2 :                                 ndr_print_srvsvc_NetSessCtr2(ndr, "ctr2", r->ctr2);
    3994             :                         }
    3995           2 :                         ndr->depth--;
    3996           2 :                 break;
    3997             : 
    3998           2 :                 case 10:
    3999           2 :                         ndr_print_ptr(ndr, "ctr10", r->ctr10);
    4000           2 :                         ndr->depth++;
    4001           2 :                         if (r->ctr10) {
    4002           2 :                                 ndr_print_srvsvc_NetSessCtr10(ndr, "ctr10", r->ctr10);
    4003             :                         }
    4004           2 :                         ndr->depth--;
    4005           2 :                 break;
    4006             : 
    4007           2 :                 case 502:
    4008           2 :                         ndr_print_ptr(ndr, "ctr502", r->ctr502);
    4009           2 :                         ndr->depth++;
    4010           2 :                         if (r->ctr502) {
    4011           2 :                                 ndr_print_srvsvc_NetSessCtr502(ndr, "ctr502", r->ctr502);
    4012             :                         }
    4013           2 :                         ndr->depth--;
    4014           2 :                 break;
    4015             : 
    4016           0 :                 default:
    4017           0 :                 break;
    4018             : 
    4019             :         }
    4020          10 : }
    4021             : 
    4022         113 : static enum ndr_err_code ndr_push_srvsvc_NetSessInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfoCtr *r)
    4023             : {
    4024         113 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4025         113 :         if (ndr_flags & NDR_SCALARS) {
    4026         113 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4027         113 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
    4028         113 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    4029         113 :                 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
    4030         113 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4031             :         }
    4032         113 :         if (ndr_flags & NDR_BUFFERS) {
    4033         113 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    4034         113 :                 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
    4035             :         }
    4036         113 :         return NDR_ERR_SUCCESS;
    4037             : }
    4038             : 
    4039         108 : static enum ndr_err_code ndr_pull_srvsvc_NetSessInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfoCtr *r)
    4040             : {
    4041         108 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4042         108 :         if (ndr_flags & NDR_SCALARS) {
    4043         108 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4044         108 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
    4045         108 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    4046         108 :                 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
    4047         108 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4048             :         }
    4049         108 :         if (ndr_flags & NDR_BUFFERS) {
    4050         108 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    4051         108 :                 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
    4052             :         }
    4053         108 :         return NDR_ERR_SUCCESS;
    4054             : }
    4055             : 
    4056          10 : _PUBLIC_ void ndr_print_srvsvc_NetSessInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfoCtr *r)
    4057             : {
    4058          10 :         ndr_print_struct(ndr, name, "srvsvc_NetSessInfoCtr");
    4059          10 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4060          10 :         ndr->depth++;
    4061          10 :         ndr_print_uint32(ndr, "level", r->level);
    4062          10 :         ndr_print_set_switch_value(ndr, &r->ctr, r->level);
    4063          10 :         ndr_print_srvsvc_NetSessCtr(ndr, "ctr", &r->ctr);
    4064          10 :         ndr->depth--;
    4065             : }
    4066             : 
    4067       15878 : static enum ndr_err_code ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
    4068             : {
    4069             :         {
    4070       15878 :                 uint32_t _flags_save_ENUM = ndr->flags;
    4071       15878 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    4072       15878 :                 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    4073       15878 :                 ndr->flags = _flags_save_ENUM;
    4074             :         }
    4075       15878 :         return NDR_ERR_SUCCESS;
    4076             : }
    4077             : 
    4078       15693 : static enum ndr_err_code ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
    4079             : {
    4080             :         uint32_t v;
    4081             :         {
    4082       15693 :                 uint32_t _flags_save_ENUM = ndr->flags;
    4083       15693 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    4084       15693 :                 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    4085       15693 :                 *r = v;
    4086       15693 :                 ndr->flags = _flags_save_ENUM;
    4087             :         }
    4088       15693 :         return NDR_ERR_SUCCESS;
    4089             : }
    4090             : 
    4091         370 : _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r)
    4092             : {
    4093         370 :         const char *val = NULL;
    4094             : 
    4095             :         {
    4096         370 :                 uint32_t _flags_save_ENUM = ndr->flags;
    4097         370 :                 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
    4098         370 :                 switch (r) {
    4099         336 :                         case STYPE_DISKTREE: val = "STYPE_DISKTREE"; break;
    4100           0 :                         case STYPE_DISKTREE_TEMPORARY: val = "STYPE_DISKTREE_TEMPORARY"; break;
    4101           0 :                         case STYPE_DISKTREE_HIDDEN: val = "STYPE_DISKTREE_HIDDEN"; break;
    4102           0 :                         case STYPE_PRINTQ: val = "STYPE_PRINTQ"; break;
    4103           0 :                         case STYPE_PRINTQ_TEMPORARY: val = "STYPE_PRINTQ_TEMPORARY"; break;
    4104           0 :                         case STYPE_PRINTQ_HIDDEN: val = "STYPE_PRINTQ_HIDDEN"; break;
    4105           0 :                         case STYPE_DEVICE: val = "STYPE_DEVICE"; break;
    4106           0 :                         case STYPE_DEVICE_TEMPORARY: val = "STYPE_DEVICE_TEMPORARY"; break;
    4107           0 :                         case STYPE_DEVICE_HIDDEN: val = "STYPE_DEVICE_HIDDEN"; break;
    4108           4 :                         case STYPE_IPC: val = "STYPE_IPC"; break;
    4109           0 :                         case STYPE_IPC_TEMPORARY: val = "STYPE_IPC_TEMPORARY"; break;
    4110          30 :                         case STYPE_IPC_HIDDEN: val = "STYPE_IPC_HIDDEN"; break;
    4111           0 :                         case STYPE_CLUSTER_FS: val = "STYPE_CLUSTER_FS"; break;
    4112           0 :                         case STYPE_CLUSTER_FS_TEMPORARY: val = "STYPE_CLUSTER_FS_TEMPORARY"; break;
    4113           0 :                         case STYPE_CLUSTER_FS_HIDDEN: val = "STYPE_CLUSTER_FS_HIDDEN"; break;
    4114           0 :                         case STYPE_CLUSTER_SOFS: val = "STYPE_CLUSTER_SOFS"; break;
    4115           0 :                         case STYPE_CLUSTER_SOFS_TEMPORARY: val = "STYPE_CLUSTER_SOFS_TEMPORARY"; break;
    4116           0 :                         case STYPE_CLUSTER_SOFS_HIDDEN: val = "STYPE_CLUSTER_SOFS_HIDDEN"; break;
    4117           0 :                         case STYPE_CLUSTER_DFS: val = "STYPE_CLUSTER_DFS"; break;
    4118           0 :                         case STYPE_CLUSTER_DFS_TEMPORARY: val = "STYPE_CLUSTER_DFS_TEMPORARY"; break;
    4119           0 :                         case STYPE_CLUSTER_DFS_HIDDEN: val = "STYPE_CLUSTER_DFS_HIDDEN"; break;
    4120             :                 }
    4121         370 :                 ndr_print_enum(ndr, name, "ENUM", val, r);
    4122         370 :                 ndr->flags = _flags_save_ENUM;
    4123             :         }
    4124         370 : }
    4125             : 
    4126        3467 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
    4127             : {
    4128        3467 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4129        3467 :         if (ndr_flags & NDR_SCALARS) {
    4130        1779 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4131        1779 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    4132        1779 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4133             :         }
    4134        3467 :         if (ndr_flags & NDR_BUFFERS) {
    4135        1779 :                 if (r->name) {
    4136        1779 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4137        1779 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4138        1779 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4139        1779 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4140             :                 }
    4141             :         }
    4142        3467 :         return NDR_ERR_SUCCESS;
    4143             : }
    4144             : 
    4145        3352 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
    4146             : {
    4147             :         uint32_t _ptr_name;
    4148        3352 :         uint32_t size_name_1 = 0;
    4149        3352 :         uint32_t length_name_1 = 0;
    4150        3352 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    4151        3352 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4152        3352 :         if (ndr_flags & NDR_SCALARS) {
    4153        1714 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4154        1714 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    4155        1714 :                 if (_ptr_name) {
    4156        1714 :                         NDR_PULL_ALLOC(ndr, r->name);
    4157             :                 } else {
    4158           0 :                         r->name = NULL;
    4159             :                 }
    4160        1714 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4161             :         }
    4162        3352 :         if (ndr_flags & NDR_BUFFERS) {
    4163        1714 :                 if (r->name) {
    4164        1714 :                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4165        1714 :                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    4166        1714 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    4167        1714 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    4168        1714 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    4169        1714 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    4170        1714 :                         if (length_name_1 > size_name_1) {
    4171           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
    4172             :                         }
    4173        1714 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    4174        1714 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    4175        1714 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    4176             :                 }
    4177             :         }
    4178        3352 :         return NDR_ERR_SUCCESS;
    4179             : }
    4180             : 
    4181         130 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r)
    4182             : {
    4183         130 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo0");
    4184         130 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4185         130 :         ndr->depth++;
    4186         130 :         ndr_print_ptr(ndr, "name", r->name);
    4187         130 :         ndr->depth++;
    4188         130 :         if (r->name) {
    4189         130 :                 ndr_print_string(ndr, "name", r->name);
    4190             :         }
    4191         130 :         ndr->depth--;
    4192         130 :         ndr->depth--;
    4193             : }
    4194             : 
    4195          78 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
    4196             : {
    4197             :         uint32_t cntr_array_1;
    4198          78 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4199          78 :         if (ndr_flags & NDR_SCALARS) {
    4200          78 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4201          78 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    4202          78 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    4203          78 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4204             :         }
    4205          78 :         if (ndr_flags & NDR_BUFFERS) {
    4206          78 :                 if (r->array) {
    4207          41 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    4208        1729 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4209        1688 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    4210             :                         }
    4211        1729 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4212        1688 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    4213             :                         }
    4214             :                 }
    4215             :         }
    4216          78 :         return NDR_ERR_SUCCESS;
    4217             : }
    4218             : 
    4219          74 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
    4220             : {
    4221             :         uint32_t _ptr_array;
    4222          74 :         uint32_t size_array_1 = 0;
    4223             :         uint32_t cntr_array_1;
    4224          74 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    4225          74 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    4226          74 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4227          74 :         if (ndr_flags & NDR_SCALARS) {
    4228          74 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4229          74 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    4230          74 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    4231          74 :                 if (_ptr_array) {
    4232          37 :                         NDR_PULL_ALLOC(ndr, r->array);
    4233             :                 } else {
    4234          37 :                         r->array = NULL;
    4235             :                 }
    4236          74 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4237             :         }
    4238          74 :         if (ndr_flags & NDR_BUFFERS) {
    4239          74 :                 if (r->array) {
    4240          37 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4241          37 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    4242          37 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    4243          37 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    4244          37 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    4245          37 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    4246          37 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    4247        1675 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4248        1638 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    4249             :                         }
    4250        1675 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4251        1638 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    4252             :                         }
    4253          37 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    4254          37 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    4255             :                 }
    4256          74 :                 if (r->array) {
    4257          37 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    4258             :                 }
    4259         592 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4260             :                 }
    4261             :         }
    4262          74 :         return NDR_ERR_SUCCESS;
    4263             : }
    4264             : 
    4265           8 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r)
    4266             : {
    4267             :         uint32_t cntr_array_1;
    4268           8 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr0");
    4269           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4270           8 :         ndr->depth++;
    4271           8 :         ndr_print_uint32(ndr, "count", r->count);
    4272           8 :         ndr_print_ptr(ndr, "array", r->array);
    4273           8 :         ndr->depth++;
    4274           8 :         if (r->array) {
    4275           8 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    4276           8 :                 ndr->depth++;
    4277         108 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4278         100 :                         ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
    4279             :                 }
    4280           8 :                 ndr->depth--;
    4281             :         }
    4282           8 :         ndr->depth--;
    4283           8 :         ndr->depth--;
    4284             : }
    4285             : 
    4286       21230 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
    4287             : {
    4288       21230 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4289       21230 :         if (ndr_flags & NDR_SCALARS) {
    4290       10661 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4291       10661 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    4292       10661 :                 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
    4293       10661 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    4294       10661 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4295             :         }
    4296       21230 :         if (ndr_flags & NDR_BUFFERS) {
    4297       10661 :                 if (r->name) {
    4298       10661 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4299       10661 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4300       10661 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4301       10661 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4302             :                 }
    4303       10661 :                 if (r->comment) {
    4304       10661 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    4305       10661 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4306       10661 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    4307       10661 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4308             :                 }
    4309             :         }
    4310       21230 :         return NDR_ERR_SUCCESS;
    4311             : }
    4312             : 
    4313       21115 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
    4314             : {
    4315             :         uint32_t _ptr_name;
    4316       21115 :         uint32_t size_name_1 = 0;
    4317       21115 :         uint32_t length_name_1 = 0;
    4318       21115 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    4319             :         uint32_t _ptr_comment;
    4320       21115 :         uint32_t size_comment_1 = 0;
    4321       21115 :         uint32_t length_comment_1 = 0;
    4322       21115 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    4323       21115 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4324       21115 :         if (ndr_flags & NDR_SCALARS) {
    4325       10596 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4326       10596 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    4327       10596 :                 if (_ptr_name) {
    4328       10596 :                         NDR_PULL_ALLOC(ndr, r->name);
    4329             :                 } else {
    4330           0 :                         r->name = NULL;
    4331             :                 }
    4332       10596 :                 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
    4333       10596 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    4334       10596 :                 if (_ptr_comment) {
    4335       10596 :                         NDR_PULL_ALLOC(ndr, r->comment);
    4336             :                 } else {
    4337           0 :                         r->comment = NULL;
    4338             :                 }
    4339       10596 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4340             :         }
    4341       21115 :         if (ndr_flags & NDR_BUFFERS) {
    4342       10596 :                 if (r->name) {
    4343       10596 :                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4344       10596 :                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    4345       10596 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    4346       10596 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    4347       10596 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    4348       10596 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    4349       10596 :                         if (length_name_1 > size_name_1) {
    4350           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
    4351             :                         }
    4352       10596 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    4353       10596 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    4354       10596 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    4355             :                 }
    4356       10596 :                 if (r->comment) {
    4357       10596 :                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4358       10596 :                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    4359       10596 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
    4360       10596 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
    4361       10596 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
    4362       10596 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
    4363       10596 :                         if (length_comment_1 > size_comment_1) {
    4364           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
    4365             :                         }
    4366       10596 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
    4367       10596 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
    4368       10596 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    4369             :                 }
    4370             :         }
    4371       21115 :         return NDR_ERR_SUCCESS;
    4372             : }
    4373             : 
    4374         130 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r)
    4375             : {
    4376         130 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1");
    4377         130 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4378         130 :         ndr->depth++;
    4379         130 :         ndr_print_ptr(ndr, "name", r->name);
    4380         130 :         ndr->depth++;
    4381         130 :         if (r->name) {
    4382         130 :                 ndr_print_string(ndr, "name", r->name);
    4383             :         }
    4384         130 :         ndr->depth--;
    4385         130 :         ndr_print_srvsvc_ShareType(ndr, "type", r->type);
    4386         130 :         ndr_print_ptr(ndr, "comment", r->comment);
    4387         130 :         ndr->depth++;
    4388         130 :         if (r->comment) {
    4389         130 :                 ndr_print_string(ndr, "comment", r->comment);
    4390             :         }
    4391         130 :         ndr->depth--;
    4392         130 :         ndr->depth--;
    4393             : }
    4394             : 
    4395         264 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
    4396             : {
    4397             :         uint32_t cntr_array_1;
    4398         264 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4399         264 :         if (ndr_flags & NDR_SCALARS) {
    4400         264 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4401         264 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    4402         264 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    4403         264 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4404             :         }
    4405         264 :         if (ndr_flags & NDR_BUFFERS) {
    4406         264 :                 if (r->array) {
    4407         134 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    4408       10703 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4409       10569 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    4410             :                         }
    4411       10703 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4412       10569 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    4413             :                         }
    4414             :                 }
    4415             :         }
    4416         264 :         return NDR_ERR_SUCCESS;
    4417             : }
    4418             : 
    4419         260 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
    4420             : {
    4421             :         uint32_t _ptr_array;
    4422         260 :         uint32_t size_array_1 = 0;
    4423             :         uint32_t cntr_array_1;
    4424         260 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    4425         260 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    4426         260 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4427         260 :         if (ndr_flags & NDR_SCALARS) {
    4428         260 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4429         260 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    4430         260 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    4431         260 :                 if (_ptr_array) {
    4432         130 :                         NDR_PULL_ALLOC(ndr, r->array);
    4433             :                 } else {
    4434         130 :                         r->array = NULL;
    4435             :                 }
    4436         260 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4437             :         }
    4438         260 :         if (ndr_flags & NDR_BUFFERS) {
    4439         260 :                 if (r->array) {
    4440         130 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4441         130 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    4442         130 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    4443         130 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    4444         130 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    4445         130 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    4446         130 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    4447       10649 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4448       10519 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    4449             :                         }
    4450       10649 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4451       10519 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    4452             :                         }
    4453         130 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    4454         130 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    4455             :                 }
    4456         260 :                 if (r->array) {
    4457         130 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    4458             :                 }
    4459        1731 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4460             :                 }
    4461             :         }
    4462         260 :         return NDR_ERR_SUCCESS;
    4463             : }
    4464             : 
    4465           8 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r)
    4466             : {
    4467             :         uint32_t cntr_array_1;
    4468           8 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1");
    4469           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4470           8 :         ndr->depth++;
    4471           8 :         ndr_print_uint32(ndr, "count", r->count);
    4472           8 :         ndr_print_ptr(ndr, "array", r->array);
    4473           8 :         ndr->depth++;
    4474           8 :         if (r->array) {
    4475           8 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    4476           8 :                 ndr->depth++;
    4477         108 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4478         100 :                         ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
    4479             :                 }
    4480           8 :                 ndr->depth--;
    4481             :         }
    4482           8 :         ndr->depth--;
    4483           8 :         ndr->depth--;
    4484             : }
    4485             : 
    4486        4966 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
    4487             : {
    4488        4966 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4489        4966 :         if (ndr_flags & NDR_SCALARS) {
    4490        2527 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4491        2527 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    4492        2527 :                 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
    4493        2527 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    4494        2527 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
    4495        2527 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
    4496        2527 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
    4497        2527 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
    4498        2527 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
    4499        2527 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4500             :         }
    4501        4966 :         if (ndr_flags & NDR_BUFFERS) {
    4502        2527 :                 if (r->name) {
    4503        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4504        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4505        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4506        2527 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4507             :                 }
    4508        2527 :                 if (r->comment) {
    4509        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    4510        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4511        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    4512        2527 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4513             :                 }
    4514        2527 :                 if (r->path) {
    4515        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
    4516        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4517        2527 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
    4518        2527 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4519             :                 }
    4520        2527 :                 if (r->password) {
    4521        2330 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
    4522        2330 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4523        2330 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
    4524        2330 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4525             :                 }
    4526             :         }
    4527        4966 :         return NDR_ERR_SUCCESS;
    4528             : }
    4529             : 
    4530        4902 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
    4531             : {
    4532             :         uint32_t _ptr_name;
    4533        4902 :         uint32_t size_name_1 = 0;
    4534        4902 :         uint32_t length_name_1 = 0;
    4535        4902 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    4536             :         uint32_t _ptr_comment;
    4537        4902 :         uint32_t size_comment_1 = 0;
    4538        4902 :         uint32_t length_comment_1 = 0;
    4539        4902 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    4540             :         uint32_t _ptr_path;
    4541        4902 :         uint32_t size_path_1 = 0;
    4542        4902 :         uint32_t length_path_1 = 0;
    4543        4902 :         TALLOC_CTX *_mem_save_path_0 = NULL;
    4544             :         uint32_t _ptr_password;
    4545        4902 :         uint32_t size_password_1 = 0;
    4546        4902 :         uint32_t length_password_1 = 0;
    4547        4902 :         TALLOC_CTX *_mem_save_password_0 = NULL;
    4548        4902 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4549        4902 :         if (ndr_flags & NDR_SCALARS) {
    4550        2488 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4551        2488 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    4552        2488 :                 if (_ptr_name) {
    4553        2488 :                         NDR_PULL_ALLOC(ndr, r->name);
    4554             :                 } else {
    4555           0 :                         r->name = NULL;
    4556             :                 }
    4557        2488 :                 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
    4558        2488 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    4559        2488 :                 if (_ptr_comment) {
    4560        2488 :                         NDR_PULL_ALLOC(ndr, r->comment);
    4561             :                 } else {
    4562           0 :                         r->comment = NULL;
    4563             :                 }
    4564        2488 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
    4565        2488 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
    4566        2488 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
    4567        2488 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
    4568        2488 :                 if (_ptr_path) {
    4569        2488 :                         NDR_PULL_ALLOC(ndr, r->path);
    4570             :                 } else {
    4571           0 :                         r->path = NULL;
    4572             :                 }
    4573        2488 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
    4574        2488 :                 if (_ptr_password) {
    4575        2330 :                         NDR_PULL_ALLOC(ndr, r->password);
    4576             :                 } else {
    4577         158 :                         r->password = NULL;
    4578             :                 }
    4579        2488 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4580             :         }
    4581        4902 :         if (ndr_flags & NDR_BUFFERS) {
    4582        2488 :                 if (r->name) {
    4583        2488 :                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4584        2488 :                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    4585        2488 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    4586        2488 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    4587        2488 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    4588        2488 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    4589        2488 :                         if (length_name_1 > size_name_1) {
    4590           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
    4591             :                         }
    4592        2488 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    4593        2488 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    4594        2488 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    4595             :                 }
    4596        2488 :                 if (r->comment) {
    4597        2488 :                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4598        2488 :                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    4599        2488 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
    4600        2488 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
    4601        2488 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
    4602        2488 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
    4603        2488 :                         if (length_comment_1 > size_comment_1) {
    4604           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
    4605             :                         }
    4606        2488 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
    4607        2488 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
    4608        2488 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    4609             :                 }
    4610        2488 :                 if (r->path) {
    4611        2488 :                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4612        2488 :                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
    4613        2488 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
    4614        2488 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
    4615        2488 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->path, &size_path_1));
    4616        2488 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->path, &length_path_1));
    4617        2488 :                         if (length_path_1 > size_path_1) {
    4618           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
    4619             :                         }
    4620        2488 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
    4621        2488 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
    4622        2488 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
    4623             :                 }
    4624        2488 :                 if (r->password) {
    4625        2330 :                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4626        2330 :                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
    4627        2330 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
    4628        2330 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
    4629        2330 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->password, &size_password_1));
    4630        2330 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->password, &length_password_1));
    4631        2330 :                         if (length_password_1 > size_password_1) {
    4632           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
    4633             :                         }
    4634        2330 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
    4635        2330 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, length_password_1, sizeof(uint16_t), CH_UTF16));
    4636        2330 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
    4637             :                 }
    4638             :         }
    4639        4902 :         return NDR_ERR_SUCCESS;
    4640             : }
    4641             : 
    4642          78 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r)
    4643             : {
    4644          78 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo2");
    4645          78 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4646          78 :         ndr->depth++;
    4647          78 :         ndr_print_ptr(ndr, "name", r->name);
    4648          78 :         ndr->depth++;
    4649          78 :         if (r->name) {
    4650          78 :                 ndr_print_string(ndr, "name", r->name);
    4651             :         }
    4652          78 :         ndr->depth--;
    4653          78 :         ndr_print_srvsvc_ShareType(ndr, "type", r->type);
    4654          78 :         ndr_print_ptr(ndr, "comment", r->comment);
    4655          78 :         ndr->depth++;
    4656          78 :         if (r->comment) {
    4657          78 :                 ndr_print_string(ndr, "comment", r->comment);
    4658             :         }
    4659          78 :         ndr->depth--;
    4660          78 :         ndr_print_uint32(ndr, "permissions", r->permissions);
    4661          78 :         ndr_print_uint32(ndr, "max_users", r->max_users);
    4662          78 :         ndr_print_uint32(ndr, "current_users", r->current_users);
    4663          78 :         ndr_print_ptr(ndr, "path", r->path);
    4664          78 :         ndr->depth++;
    4665          78 :         if (r->path) {
    4666          78 :                 ndr_print_string(ndr, "path", r->path);
    4667             :         }
    4668          78 :         ndr->depth--;
    4669          78 :         ndr_print_ptr(ndr, "password", r->password);
    4670          78 :         ndr->depth++;
    4671          78 :         if (r->password) {
    4672           0 :                 ndr_print_string(ndr, "password", r->password);
    4673             :         }
    4674          78 :         ndr->depth--;
    4675          78 :         ndr->depth--;
    4676             : }
    4677             : 
    4678          94 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
    4679             : {
    4680             :         uint32_t cntr_array_1;
    4681          94 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4682          94 :         if (ndr_flags & NDR_SCALARS) {
    4683          94 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4684          94 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    4685          94 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    4686          94 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4687             :         }
    4688          94 :         if (ndr_flags & NDR_BUFFERS) {
    4689          94 :                 if (r->array) {
    4690          39 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    4691        2478 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4692        2439 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    4693             :                         }
    4694        2478 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4695        2439 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    4696             :                         }
    4697             :                 }
    4698             :         }
    4699          94 :         return NDR_ERR_SUCCESS;
    4700             : }
    4701             : 
    4702          90 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
    4703             : {
    4704             :         uint32_t _ptr_array;
    4705          90 :         uint32_t size_array_1 = 0;
    4706             :         uint32_t cntr_array_1;
    4707          90 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    4708          90 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    4709          90 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4710          90 :         if (ndr_flags & NDR_SCALARS) {
    4711          90 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4712          90 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    4713          90 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    4714          90 :                 if (_ptr_array) {
    4715          37 :                         NDR_PULL_ALLOC(ndr, r->array);
    4716             :                 } else {
    4717          53 :                         r->array = NULL;
    4718             :                 }
    4719          90 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4720             :         }
    4721          90 :         if (ndr_flags & NDR_BUFFERS) {
    4722          90 :                 if (r->array) {
    4723          37 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4724          37 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    4725          37 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    4726          37 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    4727          37 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    4728          37 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    4729          37 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    4730        2451 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4731        2414 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    4732             :                         }
    4733        2451 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4734        2414 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    4735             :                         }
    4736          37 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    4737          37 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    4738             :                 }
    4739          90 :                 if (r->array) {
    4740          37 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    4741             :                 }
    4742         608 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4743             :                 }
    4744             :         }
    4745          90 :         return NDR_ERR_SUCCESS;
    4746             : }
    4747             : 
    4748           8 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r)
    4749             : {
    4750             :         uint32_t cntr_array_1;
    4751           8 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr2");
    4752           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4753           8 :         ndr->depth++;
    4754           8 :         ndr_print_uint32(ndr, "count", r->count);
    4755           8 :         ndr_print_ptr(ndr, "array", r->array);
    4756           8 :         ndr->depth++;
    4757           8 :         if (r->array) {
    4758           4 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    4759           4 :                 ndr->depth++;
    4760          54 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4761          50 :                         ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
    4762             :                 }
    4763           4 :                 ndr->depth--;
    4764             :         }
    4765           8 :         ndr->depth--;
    4766           8 :         ndr->depth--;
    4767             : }
    4768             : 
    4769        1589 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
    4770             : {
    4771        1589 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4772        1589 :         if (ndr_flags & NDR_SCALARS) {
    4773         834 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4774         834 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    4775         834 :                 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
    4776         834 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    4777         834 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->csc_policy));
    4778         834 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4779             :         }
    4780        1589 :         if (ndr_flags & NDR_BUFFERS) {
    4781         834 :                 if (r->name) {
    4782         834 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4783         834 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4784         834 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4785         834 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4786             :                 }
    4787         834 :                 if (r->comment) {
    4788         834 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    4789         834 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4790         834 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    4791         834 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4792             :                 }
    4793             :         }
    4794        1589 :         return NDR_ERR_SUCCESS;
    4795             : }
    4796             : 
    4797        1548 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
    4798             : {
    4799             :         uint32_t _ptr_name;
    4800        1548 :         uint32_t size_name_1 = 0;
    4801        1548 :         uint32_t length_name_1 = 0;
    4802        1548 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    4803             :         uint32_t _ptr_comment;
    4804        1548 :         uint32_t size_comment_1 = 0;
    4805        1548 :         uint32_t length_comment_1 = 0;
    4806        1548 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    4807        1548 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4808        1548 :         if (ndr_flags & NDR_SCALARS) {
    4809         806 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4810         806 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    4811         806 :                 if (_ptr_name) {
    4812         806 :                         NDR_PULL_ALLOC(ndr, r->name);
    4813             :                 } else {
    4814           0 :                         r->name = NULL;
    4815             :                 }
    4816         806 :                 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
    4817         806 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    4818         806 :                 if (_ptr_comment) {
    4819         806 :                         NDR_PULL_ALLOC(ndr, r->comment);
    4820             :                 } else {
    4821           0 :                         r->comment = NULL;
    4822             :                 }
    4823         806 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->csc_policy));
    4824         806 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4825             :         }
    4826        1548 :         if (ndr_flags & NDR_BUFFERS) {
    4827         806 :                 if (r->name) {
    4828         806 :                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4829         806 :                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    4830         806 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    4831         806 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    4832         806 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    4833         806 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    4834         806 :                         if (length_name_1 > size_name_1) {
    4835           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
    4836             :                         }
    4837         806 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    4838         806 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    4839         806 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    4840             :                 }
    4841         806 :                 if (r->comment) {
    4842         806 :                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4843         806 :                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    4844         806 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
    4845         806 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
    4846         806 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
    4847         806 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
    4848         806 :                         if (length_comment_1 > size_comment_1) {
    4849           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
    4850             :                         }
    4851         806 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
    4852         806 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
    4853         806 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    4854             :                 }
    4855             :         }
    4856        1548 :         return NDR_ERR_SUCCESS;
    4857             : }
    4858             : 
    4859          56 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r)
    4860             : {
    4861          56 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo501");
    4862          56 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4863          56 :         ndr->depth++;
    4864          56 :         ndr_print_ptr(ndr, "name", r->name);
    4865          56 :         ndr->depth++;
    4866          56 :         if (r->name) {
    4867          56 :                 ndr_print_string(ndr, "name", r->name);
    4868             :         }
    4869          56 :         ndr->depth--;
    4870          56 :         ndr_print_srvsvc_ShareType(ndr, "type", r->type);
    4871          56 :         ndr_print_ptr(ndr, "comment", r->comment);
    4872          56 :         ndr->depth++;
    4873          56 :         if (r->comment) {
    4874          56 :                 ndr_print_string(ndr, "comment", r->comment);
    4875             :         }
    4876          56 :         ndr->depth--;
    4877          56 :         ndr_print_uint32(ndr, "csc_policy", r->csc_policy);
    4878          56 :         ndr->depth--;
    4879             : }
    4880             : 
    4881          54 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
    4882             : {
    4883             :         uint32_t cntr_array_1;
    4884          54 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4885          54 :         if (ndr_flags & NDR_SCALARS) {
    4886          54 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4887          54 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    4888          54 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    4889          54 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4890             :         }
    4891          54 :         if (ndr_flags & NDR_BUFFERS) {
    4892          54 :                 if (r->array) {
    4893          14 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    4894         769 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4895         755 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    4896             :                         }
    4897         769 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4898         755 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    4899             :                         }
    4900             :                 }
    4901             :         }
    4902          54 :         return NDR_ERR_SUCCESS;
    4903             : }
    4904             : 
    4905          50 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
    4906             : {
    4907             :         uint32_t _ptr_array;
    4908          50 :         uint32_t size_array_1 = 0;
    4909             :         uint32_t cntr_array_1;
    4910          50 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    4911          50 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    4912          50 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4913          50 :         if (ndr_flags & NDR_SCALARS) {
    4914          50 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4915          50 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    4916          50 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    4917          50 :                 if (_ptr_array) {
    4918          13 :                         NDR_PULL_ALLOC(ndr, r->array);
    4919             :                 } else {
    4920          37 :                         r->array = NULL;
    4921             :                 }
    4922          50 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4923             :         }
    4924          50 :         if (ndr_flags & NDR_BUFFERS) {
    4925          50 :                 if (r->array) {
    4926          13 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4927          13 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    4928          13 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    4929          13 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    4930          13 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    4931          13 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    4932          13 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    4933         755 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4934         742 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    4935             :                         }
    4936         755 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4937         742 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    4938             :                         }
    4939          13 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    4940          13 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    4941             :                 }
    4942          50 :                 if (r->array) {
    4943          13 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    4944             :                 }
    4945         194 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    4946             :                 }
    4947             :         }
    4948          50 :         return NDR_ERR_SUCCESS;
    4949             : }
    4950             : 
    4951           8 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r)
    4952             : {
    4953             :         uint32_t cntr_array_1;
    4954           8 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr501");
    4955           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4956           8 :         ndr->depth++;
    4957           8 :         ndr_print_uint32(ndr, "count", r->count);
    4958           8 :         ndr_print_ptr(ndr, "array", r->array);
    4959           8 :         ndr->depth++;
    4960           8 :         if (r->array) {
    4961           2 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    4962           2 :                 ndr->depth++;
    4963          28 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    4964          26 :                         ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
    4965             :                 }
    4966           2 :                 ndr->depth--;
    4967             :         }
    4968           8 :         ndr->depth--;
    4969           8 :         ndr->depth--;
    4970             : }
    4971             : 
    4972        2357 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
    4973             : {
    4974        2357 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4975        2357 :         if (ndr_flags & NDR_SCALARS) {
    4976        1786 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4977        1786 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    4978        1786 :                 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
    4979        1786 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    4980        1786 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
    4981        1786 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
    4982        1786 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
    4983        1786 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
    4984        1786 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
    4985        1786 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
    4986        1786 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4987             :         }
    4988        2357 :         if (ndr_flags & NDR_BUFFERS) {
    4989        1786 :                 if (r->name) {
    4990        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4991        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4992        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    4993        1786 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    4994             :                 }
    4995        1786 :                 if (r->comment) {
    4996        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    4997        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    4998        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    4999        1786 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5000             :                 }
    5001        1786 :                 if (r->path) {
    5002        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
    5003        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5004        1786 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
    5005        1786 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5006             :                 }
    5007        1786 :                 if (r->password) {
    5008        1588 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
    5009        1588 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5010        1588 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
    5011        1588 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5012             :                 }
    5013        1786 :                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
    5014             :         }
    5015        2357 :         return NDR_ERR_SUCCESS;
    5016             : }
    5017             : 
    5018        2293 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
    5019             : {
    5020             :         uint32_t _ptr_name;
    5021        2293 :         uint32_t size_name_1 = 0;
    5022        2293 :         uint32_t length_name_1 = 0;
    5023        2293 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    5024             :         uint32_t _ptr_comment;
    5025        2293 :         uint32_t size_comment_1 = 0;
    5026        2293 :         uint32_t length_comment_1 = 0;
    5027        2293 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    5028             :         uint32_t _ptr_path;
    5029        2293 :         uint32_t size_path_1 = 0;
    5030        2293 :         uint32_t length_path_1 = 0;
    5031        2293 :         TALLOC_CTX *_mem_save_path_0 = NULL;
    5032             :         uint32_t _ptr_password;
    5033        2293 :         uint32_t size_password_1 = 0;
    5034        2293 :         uint32_t length_password_1 = 0;
    5035        2293 :         TALLOC_CTX *_mem_save_password_0 = NULL;
    5036        2293 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5037        2293 :         if (ndr_flags & NDR_SCALARS) {
    5038        1747 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5039        1747 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    5040        1747 :                 if (_ptr_name) {
    5041        1747 :                         NDR_PULL_ALLOC(ndr, r->name);
    5042             :                 } else {
    5043           0 :                         r->name = NULL;
    5044             :                 }
    5045        1747 :                 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
    5046        1747 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    5047        1747 :                 if (_ptr_comment) {
    5048        1747 :                         NDR_PULL_ALLOC(ndr, r->comment);
    5049             :                 } else {
    5050           0 :                         r->comment = NULL;
    5051             :                 }
    5052        1747 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
    5053        1747 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
    5054        1747 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
    5055        1747 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
    5056        1747 :                 if (_ptr_path) {
    5057        1747 :                         NDR_PULL_ALLOC(ndr, r->path);
    5058             :                 } else {
    5059           0 :                         r->path = NULL;
    5060             :                 }
    5061        1747 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
    5062        1747 :                 if (_ptr_password) {
    5063        1588 :                         NDR_PULL_ALLOC(ndr, r->password);
    5064             :                 } else {
    5065         159 :                         r->password = NULL;
    5066             :                 }
    5067        1747 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
    5068        1747 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5069             :         }
    5070        2293 :         if (ndr_flags & NDR_BUFFERS) {
    5071        1747 :                 if (r->name) {
    5072        1747 :                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5073        1747 :                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    5074        1747 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    5075        1747 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    5076        1747 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    5077        1747 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    5078        1747 :                         if (length_name_1 > size_name_1) {
    5079           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
    5080             :                         }
    5081        1747 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    5082        1747 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    5083        1747 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    5084             :                 }
    5085        1747 :                 if (r->comment) {
    5086        1747 :                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5087        1747 :                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    5088        1747 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
    5089        1747 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
    5090        1747 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
    5091        1747 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
    5092        1747 :                         if (length_comment_1 > size_comment_1) {
    5093           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
    5094             :                         }
    5095        1747 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
    5096        1747 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
    5097        1747 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    5098             :                 }
    5099        1747 :                 if (r->path) {
    5100        1747 :                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5101        1747 :                         NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
    5102        1747 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
    5103        1747 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
    5104        1747 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->path, &size_path_1));
    5105        1747 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->path, &length_path_1));
    5106        1747 :                         if (length_path_1 > size_path_1) {
    5107           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
    5108             :                         }
    5109        1747 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
    5110        1747 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
    5111        1747 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
    5112             :                 }
    5113        1747 :                 if (r->password) {
    5114        1588 :                         _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5115        1588 :                         NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
    5116        1588 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
    5117        1588 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
    5118        1588 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->password, &size_password_1));
    5119        1588 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->password, &length_password_1));
    5120        1588 :                         if (length_password_1 > size_password_1) {
    5121           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
    5122             :                         }
    5123        1588 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
    5124        1588 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, length_password_1, sizeof(uint16_t), CH_UTF16));
    5125        1588 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
    5126             :                 }
    5127        1747 :                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
    5128             :         }
    5129        2293 :         return NDR_ERR_SUCCESS;
    5130             : }
    5131             : 
    5132          78 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r)
    5133             : {
    5134          78 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo502");
    5135          78 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5136          78 :         ndr->depth++;
    5137          78 :         ndr_print_ptr(ndr, "name", r->name);
    5138          78 :         ndr->depth++;
    5139          78 :         if (r->name) {
    5140          78 :                 ndr_print_string(ndr, "name", r->name);
    5141             :         }
    5142          78 :         ndr->depth--;
    5143          78 :         ndr_print_srvsvc_ShareType(ndr, "type", r->type);
    5144          78 :         ndr_print_ptr(ndr, "comment", r->comment);
    5145          78 :         ndr->depth++;
    5146          78 :         if (r->comment) {
    5147          78 :                 ndr_print_string(ndr, "comment", r->comment);
    5148             :         }
    5149          78 :         ndr->depth--;
    5150          78 :         ndr_print_uint32(ndr, "permissions", r->permissions);
    5151          78 :         ndr_print_uint32(ndr, "max_users", r->max_users);
    5152          78 :         ndr_print_uint32(ndr, "current_users", r->current_users);
    5153          78 :         ndr_print_ptr(ndr, "path", r->path);
    5154          78 :         ndr->depth++;
    5155          78 :         if (r->path) {
    5156          78 :                 ndr_print_string(ndr, "path", r->path);
    5157             :         }
    5158          78 :         ndr->depth--;
    5159          78 :         ndr_print_ptr(ndr, "password", r->password);
    5160          78 :         ndr->depth++;
    5161          78 :         if (r->password) {
    5162           0 :                 ndr_print_string(ndr, "password", r->password);
    5163             :         }
    5164          78 :         ndr->depth--;
    5165          78 :         ndr_print_sec_desc_buf(ndr, "sd_buf", &r->sd_buf);
    5166          78 :         ndr->depth--;
    5167             : }
    5168             : 
    5169          46 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
    5170             : {
    5171             :         uint32_t cntr_array_1;
    5172          46 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5173          46 :         if (ndr_flags & NDR_SCALARS) {
    5174          46 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5175          46 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5176          46 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    5177          46 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5178             :         }
    5179          46 :         if (ndr_flags & NDR_BUFFERS) {
    5180          46 :                 if (r->array) {
    5181          15 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5182         586 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5183         571 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5184             :                         }
    5185         586 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5186         571 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    5187             :                         }
    5188             :                 }
    5189             :         }
    5190          46 :         return NDR_ERR_SUCCESS;
    5191             : }
    5192             : 
    5193          42 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
    5194             : {
    5195             :         uint32_t _ptr_array;
    5196          42 :         uint32_t size_array_1 = 0;
    5197             :         uint32_t cntr_array_1;
    5198          42 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    5199          42 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    5200          42 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5201          42 :         if (ndr_flags & NDR_SCALARS) {
    5202          42 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5203          42 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5204          42 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    5205          42 :                 if (_ptr_array) {
    5206          13 :                         NDR_PULL_ALLOC(ndr, r->array);
    5207             :                 } else {
    5208          29 :                         r->array = NULL;
    5209             :                 }
    5210          42 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5211             :         }
    5212          42 :         if (ndr_flags & NDR_BUFFERS) {
    5213          42 :                 if (r->array) {
    5214          13 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5215          13 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5216          13 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    5217          13 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    5218          13 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    5219          13 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5220          13 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5221         559 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5222         546 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5223             :                         }
    5224         559 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5225         546 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    5226             :                         }
    5227          13 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    5228          13 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    5229             :                 }
    5230          42 :                 if (r->array) {
    5231          13 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    5232             :                 }
    5233          64 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5234             :                 }
    5235             :         }
    5236          42 :         return NDR_ERR_SUCCESS;
    5237             : }
    5238             : 
    5239           8 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r)
    5240             : {
    5241             :         uint32_t cntr_array_1;
    5242           8 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr502");
    5243           8 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5244           8 :         ndr->depth++;
    5245           8 :         ndr_print_uint32(ndr, "count", r->count);
    5246           8 :         ndr_print_ptr(ndr, "array", r->array);
    5247           8 :         ndr->depth++;
    5248           8 :         if (r->array) {
    5249           4 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    5250           4 :                 ndr->depth++;
    5251          54 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5252          50 :                         ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
    5253             :                 }
    5254           4 :                 ndr->depth--;
    5255             :         }
    5256           8 :         ndr->depth--;
    5257           8 :         ndr->depth--;
    5258             : }
    5259             : 
    5260         848 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
    5261             : {
    5262         848 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5263         848 :         if (ndr_flags & NDR_SCALARS) {
    5264         426 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5265         426 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    5266         426 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5267             :         }
    5268         848 :         if (ndr_flags & NDR_BUFFERS) {
    5269         426 :                 if (r->comment) {
    5270         426 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    5271         426 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5272         426 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    5273         426 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5274             :                 }
    5275             :         }
    5276         848 :         return NDR_ERR_SUCCESS;
    5277             : }
    5278             : 
    5279         848 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
    5280             : {
    5281             :         uint32_t _ptr_comment;
    5282         848 :         uint32_t size_comment_1 = 0;
    5283         848 :         uint32_t length_comment_1 = 0;
    5284         848 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    5285         848 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5286         848 :         if (ndr_flags & NDR_SCALARS) {
    5287         426 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5288         426 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    5289         426 :                 if (_ptr_comment) {
    5290         426 :                         NDR_PULL_ALLOC(ndr, r->comment);
    5291             :                 } else {
    5292           0 :                         r->comment = NULL;
    5293             :                 }
    5294         426 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5295             :         }
    5296         848 :         if (ndr_flags & NDR_BUFFERS) {
    5297         426 :                 if (r->comment) {
    5298         426 :                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5299         426 :                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    5300         426 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
    5301         426 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
    5302         426 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
    5303         426 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
    5304         426 :                         if (length_comment_1 > size_comment_1) {
    5305           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
    5306             :                         }
    5307         426 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
    5308         426 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
    5309         426 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    5310             :                 }
    5311             :         }
    5312         848 :         return NDR_ERR_SUCCESS;
    5313             : }
    5314             : 
    5315           0 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r)
    5316             : {
    5317           0 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1004");
    5318           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5319           0 :         ndr->depth++;
    5320           0 :         ndr_print_ptr(ndr, "comment", r->comment);
    5321           0 :         ndr->depth++;
    5322           0 :         if (r->comment) {
    5323           0 :                 ndr_print_string(ndr, "comment", r->comment);
    5324             :         }
    5325           0 :         ndr->depth--;
    5326           0 :         ndr->depth--;
    5327             : }
    5328             : 
    5329           8 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
    5330             : {
    5331             :         uint32_t cntr_array_1;
    5332           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5333           8 :         if (ndr_flags & NDR_SCALARS) {
    5334           8 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5335           8 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5336           8 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    5337           8 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5338             :         }
    5339           8 :         if (ndr_flags & NDR_BUFFERS) {
    5340           8 :                 if (r->array) {
    5341           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5342         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5343         422 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5344             :                         }
    5345         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5346         422 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    5347             :                         }
    5348             :                 }
    5349             :         }
    5350           8 :         return NDR_ERR_SUCCESS;
    5351             : }
    5352             : 
    5353           8 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
    5354             : {
    5355             :         uint32_t _ptr_array;
    5356           8 :         uint32_t size_array_1 = 0;
    5357             :         uint32_t cntr_array_1;
    5358           8 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    5359           8 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    5360           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5361           8 :         if (ndr_flags & NDR_SCALARS) {
    5362           8 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5363           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5364           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    5365           8 :                 if (_ptr_array) {
    5366           4 :                         NDR_PULL_ALLOC(ndr, r->array);
    5367             :                 } else {
    5368           4 :                         r->array = NULL;
    5369             :                 }
    5370           8 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5371             :         }
    5372           8 :         if (ndr_flags & NDR_BUFFERS) {
    5373           8 :                 if (r->array) {
    5374           4 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5375           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5376           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    5377           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    5378           4 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    5379           4 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5380           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5381         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5382         422 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5383             :                         }
    5384         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5385         422 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    5386             :                         }
    5387           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    5388           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    5389             :                 }
    5390           8 :                 if (r->array) {
    5391           4 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    5392             :                 }
    5393          30 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5394             :                 }
    5395             :         }
    5396           8 :         return NDR_ERR_SUCCESS;
    5397             : }
    5398             : 
    5399           0 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r)
    5400             : {
    5401             :         uint32_t cntr_array_1;
    5402           0 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1004");
    5403           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5404           0 :         ndr->depth++;
    5405           0 :         ndr_print_uint32(ndr, "count", r->count);
    5406           0 :         ndr_print_ptr(ndr, "array", r->array);
    5407           0 :         ndr->depth++;
    5408           0 :         if (r->array) {
    5409           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    5410           0 :                 ndr->depth++;
    5411           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5412           0 :                         ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
    5413             :                 }
    5414           0 :                 ndr->depth--;
    5415             :         }
    5416           0 :         ndr->depth--;
    5417           0 :         ndr->depth--;
    5418             : }
    5419             : 
    5420         510 : static enum ndr_err_code ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    5421             : {
    5422         510 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    5423         510 :         return NDR_ERR_SUCCESS;
    5424             : }
    5425             : 
    5426         495 : static enum ndr_err_code ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    5427             : {
    5428             :         uint32_t v;
    5429         495 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    5430         495 :         *r = v;
    5431         495 :         return NDR_ERR_SUCCESS;
    5432             : }
    5433             : 
    5434          30 : _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r)
    5435             : {
    5436          30 :         ndr_print_uint32(ndr, name, r);
    5437          30 :         ndr->depth++;
    5438          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_IN_DFS", SHARE_1005_IN_DFS, r);
    5439          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_DFS_ROOT", SHARE_1005_DFS_ROOT, r);
    5440          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_CSC_CACHE_AUTO_REINT", SHARE_1005_CSC_CACHE_AUTO_REINT, r);
    5441          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_CSC_CACHE_VDO", SHARE_1005_CSC_CACHE_VDO, r);
    5442          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_CSC_CACHE_NONE", SHARE_1005_CSC_CACHE_NONE, r);
    5443          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_RESTRICT_EXCLUSIVE_OPENS", SHARE_1005_RESTRICT_EXCLUSIVE_OPENS, r);
    5444          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_FORCE_SHARED_DELETE", SHARE_1005_FORCE_SHARED_DELETE, r);
    5445          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_ALLOW_NAMESPACE_CACHING", SHARE_1005_ALLOW_NAMESPACE_CACHING, r);
    5446          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM", SHARE_1005_ACCESS_BASED_DIRECTORY_ENUM, r);
    5447          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_FORCE_LEVELII_OPLOCK", SHARE_1005_FORCE_LEVELII_OPLOCK, r);
    5448          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_ENABLE_HASH", SHARE_1005_ENABLE_HASH, r);
    5449          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_ENABLE_CA", SHARE_1005_ENABLE_CA, r);
    5450          30 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_ENCRYPT_DATA", SHARE_1005_ENCRYPT_DATA, r);
    5451          30 :         ndr->depth--;
    5452          30 : }
    5453             : 
    5454         510 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
    5455             : {
    5456         510 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5457         510 :         if (ndr_flags & NDR_SCALARS) {
    5458         510 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    5459         510 :                 NDR_CHECK(ndr_push_NetShareInfo1005Flags(ndr, NDR_SCALARS, r->dfs_flags));
    5460         510 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    5461             :         }
    5462         510 :         if (ndr_flags & NDR_BUFFERS) {
    5463             :         }
    5464         510 :         return NDR_ERR_SUCCESS;
    5465             : }
    5466             : 
    5467         495 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
    5468             : {
    5469         495 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5470         495 :         if (ndr_flags & NDR_SCALARS) {
    5471         495 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    5472         495 :                 NDR_CHECK(ndr_pull_NetShareInfo1005Flags(ndr, NDR_SCALARS, &r->dfs_flags));
    5473         495 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    5474             :         }
    5475         495 :         if (ndr_flags & NDR_BUFFERS) {
    5476             :         }
    5477         495 :         return NDR_ERR_SUCCESS;
    5478             : }
    5479             : 
    5480          30 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r)
    5481             : {
    5482          30 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1005");
    5483          30 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5484          30 :         ndr->depth++;
    5485          30 :         ndr_print_NetShareInfo1005Flags(ndr, "dfs_flags", r->dfs_flags);
    5486          30 :         ndr->depth--;
    5487             : }
    5488             : 
    5489           8 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
    5490             : {
    5491             :         uint32_t cntr_array_1;
    5492           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5493           8 :         if (ndr_flags & NDR_SCALARS) {
    5494           8 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5495           8 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5496           8 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    5497           8 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5498             :         }
    5499           8 :         if (ndr_flags & NDR_BUFFERS) {
    5500           8 :                 if (r->array) {
    5501           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5502         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5503         422 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5504             :                         }
    5505             :                 }
    5506             :         }
    5507           8 :         return NDR_ERR_SUCCESS;
    5508             : }
    5509             : 
    5510           8 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
    5511             : {
    5512             :         uint32_t _ptr_array;
    5513           8 :         uint32_t size_array_1 = 0;
    5514             :         uint32_t cntr_array_1;
    5515           8 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    5516           8 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    5517           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5518           8 :         if (ndr_flags & NDR_SCALARS) {
    5519           8 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5520           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5521           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    5522           8 :                 if (_ptr_array) {
    5523           4 :                         NDR_PULL_ALLOC(ndr, r->array);
    5524             :                 } else {
    5525           4 :                         r->array = NULL;
    5526             :                 }
    5527           8 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5528             :         }
    5529           8 :         if (ndr_flags & NDR_BUFFERS) {
    5530           8 :                 if (r->array) {
    5531           4 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5532           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5533           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    5534           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    5535           4 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    5536           4 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5537           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5538         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5539         422 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5540             :                         }
    5541           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    5542           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    5543             :                 }
    5544           8 :                 if (r->array) {
    5545           4 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
    5546             :                 }
    5547             :         }
    5548           8 :         return NDR_ERR_SUCCESS;
    5549             : }
    5550             : 
    5551           0 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r)
    5552             : {
    5553             :         uint32_t cntr_array_1;
    5554           0 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1005");
    5555           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5556           0 :         ndr->depth++;
    5557           0 :         ndr_print_uint32(ndr, "count", r->count);
    5558           0 :         ndr_print_ptr(ndr, "array", r->array);
    5559           0 :         ndr->depth++;
    5560           0 :         if (r->array) {
    5561           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    5562           0 :                 ndr->depth++;
    5563           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5564           0 :                         ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
    5565             :                 }
    5566           0 :                 ndr->depth--;
    5567             :         }
    5568           0 :         ndr->depth--;
    5569           0 :         ndr->depth--;
    5570             : }
    5571             : 
    5572         426 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
    5573             : {
    5574         426 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5575         426 :         if (ndr_flags & NDR_SCALARS) {
    5576         426 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    5577         426 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
    5578         426 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    5579             :         }
    5580         426 :         if (ndr_flags & NDR_BUFFERS) {
    5581             :         }
    5582         426 :         return NDR_ERR_SUCCESS;
    5583             : }
    5584             : 
    5585         426 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
    5586             : {
    5587         426 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5588         426 :         if (ndr_flags & NDR_SCALARS) {
    5589         426 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    5590         426 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
    5591         426 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    5592             :         }
    5593         426 :         if (ndr_flags & NDR_BUFFERS) {
    5594             :         }
    5595         426 :         return NDR_ERR_SUCCESS;
    5596             : }
    5597             : 
    5598           0 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r)
    5599             : {
    5600           0 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1006");
    5601           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5602           0 :         ndr->depth++;
    5603           0 :         ndr_print_uint32(ndr, "max_users", r->max_users);
    5604           0 :         ndr->depth--;
    5605             : }
    5606             : 
    5607           8 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
    5608             : {
    5609             :         uint32_t cntr_array_1;
    5610           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5611           8 :         if (ndr_flags & NDR_SCALARS) {
    5612           8 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5613           8 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5614           8 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    5615           8 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5616             :         }
    5617           8 :         if (ndr_flags & NDR_BUFFERS) {
    5618           8 :                 if (r->array) {
    5619           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5620         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5621         422 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5622             :                         }
    5623             :                 }
    5624             :         }
    5625           8 :         return NDR_ERR_SUCCESS;
    5626             : }
    5627             : 
    5628           8 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
    5629             : {
    5630             :         uint32_t _ptr_array;
    5631           8 :         uint32_t size_array_1 = 0;
    5632             :         uint32_t cntr_array_1;
    5633           8 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    5634           8 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    5635           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5636           8 :         if (ndr_flags & NDR_SCALARS) {
    5637           8 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5638           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5639           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    5640           8 :                 if (_ptr_array) {
    5641           4 :                         NDR_PULL_ALLOC(ndr, r->array);
    5642             :                 } else {
    5643           4 :                         r->array = NULL;
    5644             :                 }
    5645           8 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5646             :         }
    5647           8 :         if (ndr_flags & NDR_BUFFERS) {
    5648           8 :                 if (r->array) {
    5649           4 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5650           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5651           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    5652           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    5653           4 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    5654           4 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5655           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5656         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5657         422 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5658             :                         }
    5659           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    5660           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    5661             :                 }
    5662           8 :                 if (r->array) {
    5663           4 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->array, r->count));
    5664             :                 }
    5665             :         }
    5666           8 :         return NDR_ERR_SUCCESS;
    5667             : }
    5668             : 
    5669           0 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r)
    5670             : {
    5671             :         uint32_t cntr_array_1;
    5672           0 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1006");
    5673           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5674           0 :         ndr->depth++;
    5675           0 :         ndr_print_uint32(ndr, "count", r->count);
    5676           0 :         ndr_print_ptr(ndr, "array", r->array);
    5677           0 :         ndr->depth++;
    5678           0 :         if (r->array) {
    5679           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    5680           0 :                 ndr->depth++;
    5681           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5682           0 :                         ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
    5683             :                 }
    5684           0 :                 ndr->depth--;
    5685             :         }
    5686           0 :         ndr->depth--;
    5687           0 :         ndr->depth--;
    5688             : }
    5689             : 
    5690         848 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
    5691             : {
    5692         848 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5693         848 :         if (ndr_flags & NDR_SCALARS) {
    5694         426 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5695         426 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
    5696         426 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alternate_directory_name));
    5697         426 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5698             :         }
    5699         848 :         if (ndr_flags & NDR_BUFFERS) {
    5700         426 :                 if (r->alternate_directory_name) {
    5701         426 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
    5702         426 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5703         426 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
    5704         426 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alternate_directory_name, ndr_charset_length(r->alternate_directory_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5705             :                 }
    5706             :         }
    5707         848 :         return NDR_ERR_SUCCESS;
    5708             : }
    5709             : 
    5710         848 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
    5711             : {
    5712             :         uint32_t _ptr_alternate_directory_name;
    5713         848 :         uint32_t size_alternate_directory_name_1 = 0;
    5714         848 :         uint32_t length_alternate_directory_name_1 = 0;
    5715         848 :         TALLOC_CTX *_mem_save_alternate_directory_name_0 = NULL;
    5716         848 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5717         848 :         if (ndr_flags & NDR_SCALARS) {
    5718         426 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5719         426 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
    5720         426 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alternate_directory_name));
    5721         426 :                 if (_ptr_alternate_directory_name) {
    5722         426 :                         NDR_PULL_ALLOC(ndr, r->alternate_directory_name);
    5723             :                 } else {
    5724           0 :                         r->alternate_directory_name = NULL;
    5725             :                 }
    5726         426 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5727             :         }
    5728         848 :         if (ndr_flags & NDR_BUFFERS) {
    5729         426 :                 if (r->alternate_directory_name) {
    5730         426 :                         _mem_save_alternate_directory_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5731         426 :                         NDR_PULL_SET_MEM_CTX(ndr, r->alternate_directory_name, 0);
    5732         426 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->alternate_directory_name));
    5733         426 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->alternate_directory_name));
    5734         426 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->alternate_directory_name, &size_alternate_directory_name_1));
    5735         426 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->alternate_directory_name, &length_alternate_directory_name_1));
    5736         426 :                         if (length_alternate_directory_name_1 > size_alternate_directory_name_1) {
    5737           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alternate_directory_name_1, length_alternate_directory_name_1);
    5738             :                         }
    5739         426 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_alternate_directory_name_1, sizeof(uint16_t)));
    5740         426 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alternate_directory_name, length_alternate_directory_name_1, sizeof(uint16_t), CH_UTF16));
    5741         426 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alternate_directory_name_0, 0);
    5742             :                 }
    5743             :         }
    5744         848 :         return NDR_ERR_SUCCESS;
    5745             : }
    5746             : 
    5747           0 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r)
    5748             : {
    5749           0 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1007");
    5750           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5751           0 :         ndr->depth++;
    5752           0 :         ndr_print_uint32(ndr, "flags", r->flags);
    5753           0 :         ndr_print_ptr(ndr, "alternate_directory_name", r->alternate_directory_name);
    5754           0 :         ndr->depth++;
    5755           0 :         if (r->alternate_directory_name) {
    5756           0 :                 ndr_print_string(ndr, "alternate_directory_name", r->alternate_directory_name);
    5757             :         }
    5758           0 :         ndr->depth--;
    5759           0 :         ndr->depth--;
    5760             : }
    5761             : 
    5762           8 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
    5763             : {
    5764             :         uint32_t cntr_array_1;
    5765           8 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5766           8 :         if (ndr_flags & NDR_SCALARS) {
    5767           8 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5768           8 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5769           8 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    5770           8 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5771             :         }
    5772           8 :         if (ndr_flags & NDR_BUFFERS) {
    5773           8 :                 if (r->array) {
    5774           4 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5775         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5776         422 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5777             :                         }
    5778         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5779         422 :                                 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    5780             :                         }
    5781             :                 }
    5782             :         }
    5783           8 :         return NDR_ERR_SUCCESS;
    5784             : }
    5785             : 
    5786           8 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
    5787             : {
    5788             :         uint32_t _ptr_array;
    5789           8 :         uint32_t size_array_1 = 0;
    5790             :         uint32_t cntr_array_1;
    5791           8 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    5792           8 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    5793           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5794           8 :         if (ndr_flags & NDR_SCALARS) {
    5795           8 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5796           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5797           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    5798           8 :                 if (_ptr_array) {
    5799           4 :                         NDR_PULL_ALLOC(ndr, r->array);
    5800             :                 } else {
    5801           4 :                         r->array = NULL;
    5802             :                 }
    5803           8 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5804             :         }
    5805           8 :         if (ndr_flags & NDR_BUFFERS) {
    5806           8 :                 if (r->array) {
    5807           4 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5808           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5809           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    5810           4 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    5811           4 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    5812           4 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5813           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5814         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5815         422 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5816             :                         }
    5817         426 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5818         422 :                                 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    5819             :                         }
    5820           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    5821           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    5822             :                 }
    5823           8 :                 if (r->array) {
    5824           4 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    5825             :                 }
    5826          30 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5827             :                 }
    5828             :         }
    5829           8 :         return NDR_ERR_SUCCESS;
    5830             : }
    5831             : 
    5832           0 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r)
    5833             : {
    5834             :         uint32_t cntr_array_1;
    5835           0 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1007");
    5836           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5837           0 :         ndr->depth++;
    5838           0 :         ndr_print_uint32(ndr, "count", r->count);
    5839           0 :         ndr_print_ptr(ndr, "array", r->array);
    5840           0 :         ndr->depth++;
    5841           0 :         if (r->array) {
    5842           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    5843           0 :                 ndr->depth++;
    5844           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5845           0 :                         ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
    5846             :                 }
    5847           0 :                 ndr->depth--;
    5848             :         }
    5849           0 :         ndr->depth--;
    5850           0 :         ndr->depth--;
    5851             : }
    5852             : 
    5853           0 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
    5854             : {
    5855             :         uint32_t cntr_array_1;
    5856           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5857           0 :         if (ndr_flags & NDR_SCALARS) {
    5858           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5859           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
    5860           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
    5861           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5862             :         }
    5863           0 :         if (ndr_flags & NDR_BUFFERS) {
    5864           0 :                 if (r->array) {
    5865           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
    5866           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5867           0 :                                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5868             :                         }
    5869           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5870           0 :                                 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    5871             :                         }
    5872             :                 }
    5873             :         }
    5874           0 :         return NDR_ERR_SUCCESS;
    5875             : }
    5876             : 
    5877           0 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
    5878             : {
    5879             :         uint32_t _ptr_array;
    5880           0 :         uint32_t size_array_1 = 0;
    5881             :         uint32_t cntr_array_1;
    5882           0 :         TALLOC_CTX *_mem_save_array_0 = NULL;
    5883           0 :         TALLOC_CTX *_mem_save_array_1 = NULL;
    5884           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5885           0 :         if (ndr_flags & NDR_SCALARS) {
    5886           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5887           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
    5888           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
    5889           0 :                 if (_ptr_array) {
    5890           0 :                         NDR_PULL_ALLOC(ndr, r->array);
    5891             :                 } else {
    5892           0 :                         r->array = NULL;
    5893             :                 }
    5894           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5895             :         }
    5896           0 :         if (ndr_flags & NDR_BUFFERS) {
    5897           0 :                 if (r->array) {
    5898           0 :                         _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5899           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5900           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
    5901           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->array, &size_array_1));
    5902           0 :                         NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
    5903           0 :                         _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
    5904           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
    5905           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5906           0 :                                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
    5907             :                         }
    5908           0 :                         for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5909           0 :                                 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
    5910             :                         }
    5911           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
    5912           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
    5913             :                 }
    5914           0 :                 if (r->array) {
    5915           0 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
    5916             :                 }
    5917           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (size_array_1); cntr_array_1++) {
    5918             :                 }
    5919             :         }
    5920           0 :         return NDR_ERR_SUCCESS;
    5921             : }
    5922             : 
    5923           0 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r)
    5924             : {
    5925             :         uint32_t cntr_array_1;
    5926           0 :         ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1501");
    5927           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5928           0 :         ndr->depth++;
    5929           0 :         ndr_print_uint32(ndr, "count", r->count);
    5930           0 :         ndr_print_ptr(ndr, "array", r->array);
    5931           0 :         ndr->depth++;
    5932           0 :         if (r->array) {
    5933           0 :                 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
    5934           0 :                 ndr->depth++;
    5935           0 :                 for (cntr_array_1 = 0; cntr_array_1 < (r->count); cntr_array_1++) {
    5936           0 :                         ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
    5937             :                 }
    5938           0 :                 ndr->depth--;
    5939             :         }
    5940           0 :         ndr->depth--;
    5941           0 :         ndr->depth--;
    5942             : }
    5943             : 
    5944        1706 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
    5945             : {
    5946             :         uint32_t level;
    5947        1706 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5948        1706 :         if (ndr_flags & NDR_SCALARS) {
    5949             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5950        1706 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5951        1706 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5952        1706 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    5953        1706 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    5954        1706 :                 switch (level) {
    5955          91 :                         case 0: {
    5956          91 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
    5957          91 :                         break; }
    5958             : 
    5959          92 :                         case 1: {
    5960          92 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
    5961          92 :                         break; }
    5962             : 
    5963          93 :                         case 2: {
    5964          93 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
    5965          93 :                         break; }
    5966             : 
    5967          79 :                         case 501: {
    5968          79 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info501));
    5969          79 :                         break; }
    5970             : 
    5971        1220 :                         case 502: {
    5972        1220 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
    5973        1220 :                         break; }
    5974             : 
    5975           4 :                         case 1004: {
    5976           4 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1004));
    5977           4 :                         break; }
    5978             : 
    5979          91 :                         case 1005: {
    5980          91 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
    5981          91 :                         break; }
    5982             : 
    5983           4 :                         case 1006: {
    5984           4 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1006));
    5985           4 :                         break; }
    5986             : 
    5987           4 :                         case 1007: {
    5988           4 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1007));
    5989           4 :                         break; }
    5990             : 
    5991          28 :                         case 1501: {
    5992          28 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
    5993          28 :                         break; }
    5994             : 
    5995           0 :                         default: {
    5996           0 :                         break; }
    5997             : 
    5998             :                 }
    5999           0 :         }
    6000        1706 :         if (ndr_flags & NDR_BUFFERS) {
    6001        1706 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6002             :                         /* We didn't get it above, and the token is not needed after this. */
    6003           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6004             :                 }
    6005        1706 :                 switch (level) {
    6006          91 :                         case 0:
    6007          91 :                                 if (r->info0) {
    6008          91 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
    6009             :                                 }
    6010          91 :                         break;
    6011             : 
    6012          92 :                         case 1:
    6013          92 :                                 if (r->info1) {
    6014          92 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
    6015             :                                 }
    6016          92 :                         break;
    6017             : 
    6018          93 :                         case 2:
    6019          93 :                                 if (r->info2) {
    6020          88 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
    6021             :                                 }
    6022          93 :                         break;
    6023             : 
    6024          79 :                         case 501:
    6025          79 :                                 if (r->info501) {
    6026          79 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
    6027             :                                 }
    6028          79 :                         break;
    6029             : 
    6030        1220 :                         case 502:
    6031        1220 :                                 if (r->info502) {
    6032        1215 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
    6033             :                                 }
    6034        1220 :                         break;
    6035             : 
    6036           4 :                         case 1004:
    6037           4 :                                 if (r->info1004) {
    6038           4 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
    6039             :                                 }
    6040           4 :                         break;
    6041             : 
    6042          91 :                         case 1005:
    6043          91 :                                 if (r->info1005) {
    6044          88 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
    6045             :                                 }
    6046          91 :                         break;
    6047             : 
    6048           4 :                         case 1006:
    6049           4 :                                 if (r->info1006) {
    6050           4 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
    6051             :                                 }
    6052           4 :                         break;
    6053             : 
    6054           4 :                         case 1007:
    6055           4 :                                 if (r->info1007) {
    6056           4 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
    6057             :                                 }
    6058           4 :                         break;
    6059             : 
    6060          28 :                         case 1501:
    6061          28 :                                 if (r->info1501) {
    6062          28 :                                         NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
    6063             :                                 }
    6064          28 :                         break;
    6065             : 
    6066           0 :                         default:
    6067           0 :                         break;
    6068             : 
    6069             :                 }
    6070           0 :         }
    6071        1706 :         return NDR_ERR_SUCCESS;
    6072             : }
    6073             : 
    6074        1616 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
    6075             : {
    6076             :         uint32_t level;
    6077             :         uint32_t _level;
    6078        1616 :         TALLOC_CTX *_mem_save_info0_0 = NULL;
    6079             :         uint32_t _ptr_info0;
    6080        1616 :         TALLOC_CTX *_mem_save_info1_0 = NULL;
    6081             :         uint32_t _ptr_info1;
    6082        1616 :         TALLOC_CTX *_mem_save_info2_0 = NULL;
    6083             :         uint32_t _ptr_info2;
    6084        1616 :         TALLOC_CTX *_mem_save_info501_0 = NULL;
    6085             :         uint32_t _ptr_info501;
    6086        1616 :         TALLOC_CTX *_mem_save_info502_0 = NULL;
    6087             :         uint32_t _ptr_info502;
    6088        1616 :         TALLOC_CTX *_mem_save_info1004_0 = NULL;
    6089             :         uint32_t _ptr_info1004;
    6090        1616 :         TALLOC_CTX *_mem_save_info1005_0 = NULL;
    6091             :         uint32_t _ptr_info1005;
    6092        1616 :         TALLOC_CTX *_mem_save_info1006_0 = NULL;
    6093             :         uint32_t _ptr_info1006;
    6094        1616 :         TALLOC_CTX *_mem_save_info1007_0 = NULL;
    6095             :         uint32_t _ptr_info1007;
    6096        1616 :         TALLOC_CTX *_mem_save_info1501_0 = NULL;
    6097             :         uint32_t _ptr_info1501;
    6098        1616 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6099        1616 :         if (ndr_flags & NDR_SCALARS) {
    6100             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6101        1616 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6102        1616 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6103        1616 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6104        1616 :                 if (_level != level) {
    6105           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    6106             :                 }
    6107        1616 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6108        1616 :                 switch (level) {
    6109          76 :                         case 0: {
    6110          76 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
    6111          76 :                                 if (_ptr_info0) {
    6112          76 :                                         NDR_PULL_ALLOC(ndr, r->info0);
    6113             :                                 } else {
    6114           0 :                                         r->info0 = NULL;
    6115             :                                 }
    6116          76 :                         break; }
    6117             : 
    6118          77 :                         case 1: {
    6119          77 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
    6120          77 :                                 if (_ptr_info1) {
    6121          77 :                                         NDR_PULL_ALLOC(ndr, r->info1);
    6122             :                                 } else {
    6123           0 :                                         r->info1 = NULL;
    6124             :                                 }
    6125          77 :                         break; }
    6126             : 
    6127          78 :                         case 2: {
    6128          78 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
    6129          78 :                                 if (_ptr_info2) {
    6130          74 :                                         NDR_PULL_ALLOC(ndr, r->info2);
    6131             :                                 } else {
    6132           4 :                                         r->info2 = NULL;
    6133             :                                 }
    6134          78 :                         break; }
    6135             : 
    6136          64 :                         case 501: {
    6137          64 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info501));
    6138          64 :                                 if (_ptr_info501) {
    6139          64 :                                         NDR_PULL_ALLOC(ndr, r->info501);
    6140             :                                 } else {
    6141           0 :                                         r->info501 = NULL;
    6142             :                                 }
    6143          64 :                         break; }
    6144             : 
    6145        1205 :                         case 502: {
    6146        1205 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
    6147        1205 :                                 if (_ptr_info502) {
    6148        1201 :                                         NDR_PULL_ALLOC(ndr, r->info502);
    6149             :                                 } else {
    6150           4 :                                         r->info502 = NULL;
    6151             :                                 }
    6152        1205 :                         break; }
    6153             : 
    6154           4 :                         case 1004: {
    6155           4 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1004));
    6156           4 :                                 if (_ptr_info1004) {
    6157           4 :                                         NDR_PULL_ALLOC(ndr, r->info1004);
    6158             :                                 } else {
    6159           0 :                                         r->info1004 = NULL;
    6160             :                                 }
    6161           4 :                         break; }
    6162             : 
    6163          76 :                         case 1005: {
    6164          76 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
    6165          76 :                                 if (_ptr_info1005) {
    6166          73 :                                         NDR_PULL_ALLOC(ndr, r->info1005);
    6167             :                                 } else {
    6168           3 :                                         r->info1005 = NULL;
    6169             :                                 }
    6170          76 :                         break; }
    6171             : 
    6172           4 :                         case 1006: {
    6173           4 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1006));
    6174           4 :                                 if (_ptr_info1006) {
    6175           4 :                                         NDR_PULL_ALLOC(ndr, r->info1006);
    6176             :                                 } else {
    6177           0 :                                         r->info1006 = NULL;
    6178             :                                 }
    6179           4 :                         break; }
    6180             : 
    6181           4 :                         case 1007: {
    6182           4 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1007));
    6183           4 :                                 if (_ptr_info1007) {
    6184           4 :                                         NDR_PULL_ALLOC(ndr, r->info1007);
    6185             :                                 } else {
    6186           0 :                                         r->info1007 = NULL;
    6187             :                                 }
    6188           4 :                         break; }
    6189             : 
    6190          28 :                         case 1501: {
    6191          28 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
    6192          28 :                                 if (_ptr_info1501) {
    6193          28 :                                         NDR_PULL_ALLOC(ndr, r->info1501);
    6194             :                                 } else {
    6195           0 :                                         r->info1501 = NULL;
    6196             :                                 }
    6197          28 :                         break; }
    6198             : 
    6199           0 :                         default: {
    6200           0 :                         break; }
    6201             : 
    6202             :                 }
    6203           0 :         }
    6204        1616 :         if (ndr_flags & NDR_BUFFERS) {
    6205        1616 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6206             :                         /* We didn't get it above, and the token is not needed after this. */
    6207           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6208             :                 }
    6209        1616 :                 switch (level) {
    6210          76 :                         case 0:
    6211          76 :                                 if (r->info0) {
    6212          76 :                                         _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6213          76 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
    6214          76 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
    6215          76 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
    6216             :                                 }
    6217          76 :                         break;
    6218             : 
    6219          77 :                         case 1:
    6220          77 :                                 if (r->info1) {
    6221          77 :                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6222          77 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
    6223          77 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
    6224          77 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
    6225             :                                 }
    6226          77 :                         break;
    6227             : 
    6228          78 :                         case 2:
    6229          78 :                                 if (r->info2) {
    6230          74 :                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6231          74 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
    6232          74 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
    6233          74 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
    6234             :                                 }
    6235          78 :                         break;
    6236             : 
    6237          64 :                         case 501:
    6238          64 :                                 if (r->info501) {
    6239          64 :                                         _mem_save_info501_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6240          64 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info501, 0);
    6241          64 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
    6242          64 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info501_0, 0);
    6243             :                                 }
    6244          64 :                         break;
    6245             : 
    6246        1205 :                         case 502:
    6247        1205 :                                 if (r->info502) {
    6248        1201 :                                         _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6249        1201 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
    6250        1201 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
    6251        1201 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
    6252             :                                 }
    6253        1205 :                         break;
    6254             : 
    6255           4 :                         case 1004:
    6256           4 :                                 if (r->info1004) {
    6257           4 :                                         _mem_save_info1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6258           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1004, 0);
    6259           4 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
    6260           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1004_0, 0);
    6261             :                                 }
    6262           4 :                         break;
    6263             : 
    6264          76 :                         case 1005:
    6265          76 :                                 if (r->info1005) {
    6266          73 :                                         _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6267          73 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
    6268          73 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
    6269          73 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
    6270             :                                 }
    6271          76 :                         break;
    6272             : 
    6273           4 :                         case 1006:
    6274           4 :                                 if (r->info1006) {
    6275           4 :                                         _mem_save_info1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6276           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1006, 0);
    6277           4 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
    6278           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1006_0, 0);
    6279             :                                 }
    6280           4 :                         break;
    6281             : 
    6282           4 :                         case 1007:
    6283           4 :                                 if (r->info1007) {
    6284           4 :                                         _mem_save_info1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6285           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1007, 0);
    6286           4 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
    6287           4 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1007_0, 0);
    6288             :                                 }
    6289           4 :                         break;
    6290             : 
    6291          28 :                         case 1501:
    6292          28 :                                 if (r->info1501) {
    6293          28 :                                         _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6294          28 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
    6295          28 :                                         NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
    6296          28 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
    6297             :                                 }
    6298          28 :                         break;
    6299             : 
    6300           0 :                         default:
    6301           0 :                         break;
    6302             : 
    6303             :                 }
    6304           0 :         }
    6305        1616 :         return NDR_ERR_SUCCESS;
    6306             : }
    6307             : 
    6308         180 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r)
    6309             : {
    6310             :         uint32_t level;
    6311         180 :         level = ndr_print_steal_switch_value(ndr, r);
    6312         180 :         ndr_print_union(ndr, name, level, "srvsvc_NetShareInfo");
    6313         180 :         switch (level) {
    6314          30 :                 case 0:
    6315          30 :                         ndr_print_ptr(ndr, "info0", r->info0);
    6316          30 :                         ndr->depth++;
    6317          30 :                         if (r->info0) {
    6318          30 :                                 ndr_print_srvsvc_NetShareInfo0(ndr, "info0", r->info0);
    6319             :                         }
    6320          30 :                         ndr->depth--;
    6321          30 :                 break;
    6322             : 
    6323          30 :                 case 1:
    6324          30 :                         ndr_print_ptr(ndr, "info1", r->info1);
    6325          30 :                         ndr->depth++;
    6326          30 :                         if (r->info1) {
    6327          30 :                                 ndr_print_srvsvc_NetShareInfo1(ndr, "info1", r->info1);
    6328             :                         }
    6329          30 :                         ndr->depth--;
    6330          30 :                 break;
    6331             : 
    6332          30 :                 case 2:
    6333          30 :                         ndr_print_ptr(ndr, "info2", r->info2);
    6334          30 :                         ndr->depth++;
    6335          30 :                         if (r->info2) {
    6336          28 :                                 ndr_print_srvsvc_NetShareInfo2(ndr, "info2", r->info2);
    6337             :                         }
    6338          30 :                         ndr->depth--;
    6339          30 :                 break;
    6340             : 
    6341          30 :                 case 501:
    6342          30 :                         ndr_print_ptr(ndr, "info501", r->info501);
    6343          30 :                         ndr->depth++;
    6344          30 :                         if (r->info501) {
    6345          30 :                                 ndr_print_srvsvc_NetShareInfo501(ndr, "info501", r->info501);
    6346             :                         }
    6347          30 :                         ndr->depth--;
    6348          30 :                 break;
    6349             : 
    6350          30 :                 case 502:
    6351          30 :                         ndr_print_ptr(ndr, "info502", r->info502);
    6352          30 :                         ndr->depth++;
    6353          30 :                         if (r->info502) {
    6354          28 :                                 ndr_print_srvsvc_NetShareInfo502(ndr, "info502", r->info502);
    6355             :                         }
    6356          30 :                         ndr->depth--;
    6357          30 :                 break;
    6358             : 
    6359           0 :                 case 1004:
    6360           0 :                         ndr_print_ptr(ndr, "info1004", r->info1004);
    6361           0 :                         ndr->depth++;
    6362           0 :                         if (r->info1004) {
    6363           0 :                                 ndr_print_srvsvc_NetShareInfo1004(ndr, "info1004", r->info1004);
    6364             :                         }
    6365           0 :                         ndr->depth--;
    6366           0 :                 break;
    6367             : 
    6368          30 :                 case 1005:
    6369          30 :                         ndr_print_ptr(ndr, "info1005", r->info1005);
    6370          30 :                         ndr->depth++;
    6371          30 :                         if (r->info1005) {
    6372          30 :                                 ndr_print_srvsvc_NetShareInfo1005(ndr, "info1005", r->info1005);
    6373             :                         }
    6374          30 :                         ndr->depth--;
    6375          30 :                 break;
    6376             : 
    6377           0 :                 case 1006:
    6378           0 :                         ndr_print_ptr(ndr, "info1006", r->info1006);
    6379           0 :                         ndr->depth++;
    6380           0 :                         if (r->info1006) {
    6381           0 :                                 ndr_print_srvsvc_NetShareInfo1006(ndr, "info1006", r->info1006);
    6382             :                         }
    6383           0 :                         ndr->depth--;
    6384           0 :                 break;
    6385             : 
    6386           0 :                 case 1007:
    6387           0 :                         ndr_print_ptr(ndr, "info1007", r->info1007);
    6388           0 :                         ndr->depth++;
    6389           0 :                         if (r->info1007) {
    6390           0 :                                 ndr_print_srvsvc_NetShareInfo1007(ndr, "info1007", r->info1007);
    6391             :                         }
    6392           0 :                         ndr->depth--;
    6393           0 :                 break;
    6394             : 
    6395           0 :                 case 1501:
    6396           0 :                         ndr_print_ptr(ndr, "info1501", r->info1501);
    6397           0 :                         ndr->depth++;
    6398           0 :                         if (r->info1501) {
    6399           0 :                                 ndr_print_sec_desc_buf(ndr, "info1501", r->info1501);
    6400             :                         }
    6401           0 :                         ndr->depth--;
    6402           0 :                 break;
    6403             : 
    6404           0 :                 default:
    6405           0 :                 break;
    6406             : 
    6407             :         }
    6408         180 : }
    6409             : 
    6410        1136 : static enum ndr_err_code ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
    6411             : {
    6412             :         uint32_t level;
    6413        1136 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6414        1136 :         if (ndr_flags & NDR_SCALARS) {
    6415             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6416         568 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6417         568 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6418         568 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    6419         568 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    6420         568 :                 switch (level) {
    6421          78 :                         case 0: {
    6422          78 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
    6423          78 :                         break; }
    6424             : 
    6425         264 :                         case 1: {
    6426         264 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
    6427         264 :                         break; }
    6428             : 
    6429          94 :                         case 2: {
    6430          94 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
    6431          94 :                         break; }
    6432             : 
    6433          54 :                         case 501: {
    6434          54 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr501));
    6435          54 :                         break; }
    6436             : 
    6437          46 :                         case 502: {
    6438          46 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
    6439          46 :                         break; }
    6440             : 
    6441           8 :                         case 1004: {
    6442           8 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1004));
    6443           8 :                         break; }
    6444             : 
    6445           8 :                         case 1005: {
    6446           8 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1005));
    6447           8 :                         break; }
    6448             : 
    6449           8 :                         case 1006: {
    6450           8 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1006));
    6451           8 :                         break; }
    6452             : 
    6453           8 :                         case 1007: {
    6454           8 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1007));
    6455           8 :                         break; }
    6456             : 
    6457           0 :                         case 1501: {
    6458           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1501));
    6459           0 :                         break; }
    6460             : 
    6461           0 :                         default: {
    6462           0 :                         break; }
    6463             : 
    6464             :                 }
    6465         472 :         }
    6466        1136 :         if (ndr_flags & NDR_BUFFERS) {
    6467         568 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6468             :                         /* We didn't get it above, and the token is not needed after this. */
    6469         568 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    6470             :                 }
    6471         568 :                 switch (level) {
    6472          78 :                         case 0:
    6473          78 :                                 if (r->ctr0) {
    6474          78 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
    6475             :                                 }
    6476          78 :                         break;
    6477             : 
    6478         264 :                         case 1:
    6479         264 :                                 if (r->ctr1) {
    6480         264 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    6481             :                                 }
    6482         264 :                         break;
    6483             : 
    6484          94 :                         case 2:
    6485          94 :                                 if (r->ctr2) {
    6486          94 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
    6487             :                                 }
    6488          94 :                         break;
    6489             : 
    6490          54 :                         case 501:
    6491          54 :                                 if (r->ctr501) {
    6492          54 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
    6493             :                                 }
    6494          54 :                         break;
    6495             : 
    6496          46 :                         case 502:
    6497          46 :                                 if (r->ctr502) {
    6498          46 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
    6499             :                                 }
    6500          46 :                         break;
    6501             : 
    6502           8 :                         case 1004:
    6503           8 :                                 if (r->ctr1004) {
    6504           8 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
    6505             :                                 }
    6506           8 :                         break;
    6507             : 
    6508           8 :                         case 1005:
    6509           8 :                                 if (r->ctr1005) {
    6510           8 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
    6511             :                                 }
    6512           8 :                         break;
    6513             : 
    6514           8 :                         case 1006:
    6515           8 :                                 if (r->ctr1006) {
    6516           8 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
    6517             :                                 }
    6518           8 :                         break;
    6519             : 
    6520           8 :                         case 1007:
    6521           8 :                                 if (r->ctr1007) {
    6522           8 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
    6523             :                                 }
    6524           8 :                         break;
    6525             : 
    6526           0 :                         case 1501:
    6527           0 :                                 if (r->ctr1501) {
    6528           0 :                                         NDR_CHECK(ndr_push_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
    6529             :                                 }
    6530           0 :                         break;
    6531             : 
    6532           0 :                         default:
    6533           0 :                         break;
    6534             : 
    6535             :                 }
    6536         472 :         }
    6537        1136 :         return NDR_ERR_SUCCESS;
    6538             : }
    6539             : 
    6540        1096 : static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
    6541             : {
    6542             :         uint32_t level;
    6543             :         uint32_t _level;
    6544        1096 :         TALLOC_CTX *_mem_save_ctr0_0 = NULL;
    6545             :         uint32_t _ptr_ctr0;
    6546        1096 :         TALLOC_CTX *_mem_save_ctr1_0 = NULL;
    6547             :         uint32_t _ptr_ctr1;
    6548        1096 :         TALLOC_CTX *_mem_save_ctr2_0 = NULL;
    6549             :         uint32_t _ptr_ctr2;
    6550        1096 :         TALLOC_CTX *_mem_save_ctr501_0 = NULL;
    6551             :         uint32_t _ptr_ctr501;
    6552        1096 :         TALLOC_CTX *_mem_save_ctr502_0 = NULL;
    6553             :         uint32_t _ptr_ctr502;
    6554        1096 :         TALLOC_CTX *_mem_save_ctr1004_0 = NULL;
    6555             :         uint32_t _ptr_ctr1004;
    6556        1096 :         TALLOC_CTX *_mem_save_ctr1005_0 = NULL;
    6557             :         uint32_t _ptr_ctr1005;
    6558        1096 :         TALLOC_CTX *_mem_save_ctr1006_0 = NULL;
    6559             :         uint32_t _ptr_ctr1006;
    6560        1096 :         TALLOC_CTX *_mem_save_ctr1007_0 = NULL;
    6561             :         uint32_t _ptr_ctr1007;
    6562        1096 :         TALLOC_CTX *_mem_save_ctr1501_0 = NULL;
    6563             :         uint32_t _ptr_ctr1501;
    6564        1096 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6565        1096 :         if (ndr_flags & NDR_SCALARS) {
    6566             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    6567         548 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6568         548 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6569         548 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    6570         548 :                 if (_level != level) {
    6571           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    6572             :                 }
    6573         548 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    6574         548 :                 switch (level) {
    6575          74 :                         case 0: {
    6576          74 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
    6577          74 :                                 if (_ptr_ctr0) {
    6578          74 :                                         NDR_PULL_ALLOC(ndr, r->ctr0);
    6579             :                                 } else {
    6580           0 :                                         r->ctr0 = NULL;
    6581             :                                 }
    6582          74 :                         break; }
    6583             : 
    6584         260 :                         case 1: {
    6585         260 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
    6586         260 :                                 if (_ptr_ctr1) {
    6587         260 :                                         NDR_PULL_ALLOC(ndr, r->ctr1);
    6588             :                                 } else {
    6589           0 :                                         r->ctr1 = NULL;
    6590             :                                 }
    6591         260 :                         break; }
    6592             : 
    6593          90 :                         case 2: {
    6594          90 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
    6595          90 :                                 if (_ptr_ctr2) {
    6596          90 :                                         NDR_PULL_ALLOC(ndr, r->ctr2);
    6597             :                                 } else {
    6598           0 :                                         r->ctr2 = NULL;
    6599             :                                 }
    6600          90 :                         break; }
    6601             : 
    6602          50 :                         case 501: {
    6603          50 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr501));
    6604          50 :                                 if (_ptr_ctr501) {
    6605          50 :                                         NDR_PULL_ALLOC(ndr, r->ctr501);
    6606             :                                 } else {
    6607           0 :                                         r->ctr501 = NULL;
    6608             :                                 }
    6609          50 :                         break; }
    6610             : 
    6611          42 :                         case 502: {
    6612          42 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
    6613          42 :                                 if (_ptr_ctr502) {
    6614          42 :                                         NDR_PULL_ALLOC(ndr, r->ctr502);
    6615             :                                 } else {
    6616           0 :                                         r->ctr502 = NULL;
    6617             :                                 }
    6618          42 :                         break; }
    6619             : 
    6620           8 :                         case 1004: {
    6621           8 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1004));
    6622           8 :                                 if (_ptr_ctr1004) {
    6623           8 :                                         NDR_PULL_ALLOC(ndr, r->ctr1004);
    6624             :                                 } else {
    6625           0 :                                         r->ctr1004 = NULL;
    6626             :                                 }
    6627           8 :                         break; }
    6628             : 
    6629           8 :                         case 1005: {
    6630           8 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1005));
    6631           8 :                                 if (_ptr_ctr1005) {
    6632           8 :                                         NDR_PULL_ALLOC(ndr, r->ctr1005);
    6633             :                                 } else {
    6634           0 :                                         r->ctr1005 = NULL;
    6635             :                                 }
    6636           8 :                         break; }
    6637             : 
    6638           8 :                         case 1006: {
    6639           8 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1006));
    6640           8 :                                 if (_ptr_ctr1006) {
    6641           8 :                                         NDR_PULL_ALLOC(ndr, r->ctr1006);
    6642             :                                 } else {
    6643           0 :                                         r->ctr1006 = NULL;
    6644             :                                 }
    6645           8 :                         break; }
    6646             : 
    6647           8 :                         case 1007: {
    6648           8 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1007));
    6649           8 :                                 if (_ptr_ctr1007) {
    6650           8 :                                         NDR_PULL_ALLOC(ndr, r->ctr1007);
    6651             :                                 } else {
    6652           0 :                                         r->ctr1007 = NULL;
    6653             :                                 }
    6654           8 :                         break; }
    6655             : 
    6656           0 :                         case 1501: {
    6657           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1501));
    6658           0 :                                 if (_ptr_ctr1501) {
    6659           0 :                                         NDR_PULL_ALLOC(ndr, r->ctr1501);
    6660             :                                 } else {
    6661           0 :                                         r->ctr1501 = NULL;
    6662             :                                 }
    6663           0 :                         break; }
    6664             : 
    6665           0 :                         default: {
    6666           0 :                         break; }
    6667             : 
    6668             :                 }
    6669         452 :         }
    6670        1096 :         if (ndr_flags & NDR_BUFFERS) {
    6671         548 :                 if (!(ndr_flags & NDR_SCALARS)) {
    6672             :                         /* We didn't get it above, and the token is not needed after this. */
    6673         548 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    6674             :                 }
    6675         548 :                 switch (level) {
    6676          74 :                         case 0:
    6677          74 :                                 if (r->ctr0) {
    6678          74 :                                         _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6679          74 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
    6680          74 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
    6681          74 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
    6682             :                                 }
    6683          74 :                         break;
    6684             : 
    6685         260 :                         case 1:
    6686         260 :                                 if (r->ctr1) {
    6687         260 :                                         _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6688         260 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
    6689         260 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
    6690         260 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
    6691             :                                 }
    6692         260 :                         break;
    6693             : 
    6694          90 :                         case 2:
    6695          90 :                                 if (r->ctr2) {
    6696          90 :                                         _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6697          90 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
    6698          90 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
    6699          90 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
    6700             :                                 }
    6701          90 :                         break;
    6702             : 
    6703          50 :                         case 501:
    6704          50 :                                 if (r->ctr501) {
    6705          50 :                                         _mem_save_ctr501_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6706          50 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr501, 0);
    6707          50 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
    6708          50 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr501_0, 0);
    6709             :                                 }
    6710          50 :                         break;
    6711             : 
    6712          42 :                         case 502:
    6713          42 :                                 if (r->ctr502) {
    6714          42 :                                         _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6715          42 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
    6716          42 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
    6717          42 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
    6718             :                                 }
    6719          42 :                         break;
    6720             : 
    6721           8 :                         case 1004:
    6722           8 :                                 if (r->ctr1004) {
    6723           8 :                                         _mem_save_ctr1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6724           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1004, 0);
    6725           8 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
    6726           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1004_0, 0);
    6727             :                                 }
    6728           8 :                         break;
    6729             : 
    6730           8 :                         case 1005:
    6731           8 :                                 if (r->ctr1005) {
    6732           8 :                                         _mem_save_ctr1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6733           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1005, 0);
    6734           8 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
    6735           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1005_0, 0);
    6736             :                                 }
    6737           8 :                         break;
    6738             : 
    6739           8 :                         case 1006:
    6740           8 :                                 if (r->ctr1006) {
    6741           8 :                                         _mem_save_ctr1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6742           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1006, 0);
    6743           8 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
    6744           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1006_0, 0);
    6745             :                                 }
    6746           8 :                         break;
    6747             : 
    6748           8 :                         case 1007:
    6749           8 :                                 if (r->ctr1007) {
    6750           8 :                                         _mem_save_ctr1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6751           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1007, 0);
    6752           8 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
    6753           8 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1007_0, 0);
    6754             :                                 }
    6755           8 :                         break;
    6756             : 
    6757           0 :                         case 1501:
    6758           0 :                                 if (r->ctr1501) {
    6759           0 :                                         _mem_save_ctr1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6760           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->ctr1501, 0);
    6761           0 :                                         NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
    6762           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1501_0, 0);
    6763             :                                 }
    6764           0 :                         break;
    6765             : 
    6766           0 :                         default:
    6767           0 :                         break;
    6768             : 
    6769             :                 }
    6770         452 :         }
    6771        1096 :         return NDR_ERR_SUCCESS;
    6772             : }
    6773             : 
    6774          40 : _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r)
    6775             : {
    6776             :         uint32_t level;
    6777          40 :         level = ndr_print_steal_switch_value(ndr, r);
    6778          40 :         ndr_print_union(ndr, name, level, "srvsvc_NetShareCtr");
    6779          40 :         switch (level) {
    6780           8 :                 case 0:
    6781           8 :                         ndr_print_ptr(ndr, "ctr0", r->ctr0);
    6782           8 :                         ndr->depth++;
    6783           8 :                         if (r->ctr0) {
    6784           8 :                                 ndr_print_srvsvc_NetShareCtr0(ndr, "ctr0", r->ctr0);
    6785             :                         }
    6786           8 :                         ndr->depth--;
    6787           8 :                 break;
    6788             : 
    6789           8 :                 case 1:
    6790           8 :                         ndr_print_ptr(ndr, "ctr1", r->ctr1);
    6791           8 :                         ndr->depth++;
    6792           8 :                         if (r->ctr1) {
    6793           8 :                                 ndr_print_srvsvc_NetShareCtr1(ndr, "ctr1", r->ctr1);
    6794             :                         }
    6795           8 :                         ndr->depth--;
    6796           8 :                 break;
    6797             : 
    6798           8 :                 case 2:
    6799           8 :                         ndr_print_ptr(ndr, "ctr2", r->ctr2);
    6800           8 :                         ndr->depth++;
    6801           8 :                         if (r->ctr2) {
    6802           8 :                                 ndr_print_srvsvc_NetShareCtr2(ndr, "ctr2", r->ctr2);
    6803             :                         }
    6804           8 :                         ndr->depth--;
    6805           8 :                 break;
    6806             : 
    6807           8 :                 case 501:
    6808           8 :                         ndr_print_ptr(ndr, "ctr501", r->ctr501);
    6809           8 :                         ndr->depth++;
    6810           8 :                         if (r->ctr501) {
    6811           8 :                                 ndr_print_srvsvc_NetShareCtr501(ndr, "ctr501", r->ctr501);
    6812             :                         }
    6813           8 :                         ndr->depth--;
    6814           8 :                 break;
    6815             : 
    6816           8 :                 case 502:
    6817           8 :                         ndr_print_ptr(ndr, "ctr502", r->ctr502);
    6818           8 :                         ndr->depth++;
    6819           8 :                         if (r->ctr502) {
    6820           8 :                                 ndr_print_srvsvc_NetShareCtr502(ndr, "ctr502", r->ctr502);
    6821             :                         }
    6822           8 :                         ndr->depth--;
    6823           8 :                 break;
    6824             : 
    6825           0 :                 case 1004:
    6826           0 :                         ndr_print_ptr(ndr, "ctr1004", r->ctr1004);
    6827           0 :                         ndr->depth++;
    6828           0 :                         if (r->ctr1004) {
    6829           0 :                                 ndr_print_srvsvc_NetShareCtr1004(ndr, "ctr1004", r->ctr1004);
    6830             :                         }
    6831           0 :                         ndr->depth--;
    6832           0 :                 break;
    6833             : 
    6834           0 :                 case 1005:
    6835           0 :                         ndr_print_ptr(ndr, "ctr1005", r->ctr1005);
    6836           0 :                         ndr->depth++;
    6837           0 :                         if (r->ctr1005) {
    6838           0 :                                 ndr_print_srvsvc_NetShareCtr1005(ndr, "ctr1005", r->ctr1005);
    6839             :                         }
    6840           0 :                         ndr->depth--;
    6841           0 :                 break;
    6842             : 
    6843           0 :                 case 1006:
    6844           0 :                         ndr_print_ptr(ndr, "ctr1006", r->ctr1006);
    6845           0 :                         ndr->depth++;
    6846           0 :                         if (r->ctr1006) {
    6847           0 :                                 ndr_print_srvsvc_NetShareCtr1006(ndr, "ctr1006", r->ctr1006);
    6848             :                         }
    6849           0 :                         ndr->depth--;
    6850           0 :                 break;
    6851             : 
    6852           0 :                 case 1007:
    6853           0 :                         ndr_print_ptr(ndr, "ctr1007", r->ctr1007);
    6854           0 :                         ndr->depth++;
    6855           0 :                         if (r->ctr1007) {
    6856           0 :                                 ndr_print_srvsvc_NetShareCtr1007(ndr, "ctr1007", r->ctr1007);
    6857             :                         }
    6858           0 :                         ndr->depth--;
    6859           0 :                 break;
    6860             : 
    6861           0 :                 case 1501:
    6862           0 :                         ndr_print_ptr(ndr, "ctr1501", r->ctr1501);
    6863           0 :                         ndr->depth++;
    6864           0 :                         if (r->ctr1501) {
    6865           0 :                                 ndr_print_srvsvc_NetShareCtr1501(ndr, "ctr1501", r->ctr1501);
    6866             :                         }
    6867           0 :                         ndr->depth--;
    6868           0 :                 break;
    6869             : 
    6870           0 :                 default:
    6871           0 :                 break;
    6872             : 
    6873             :         }
    6874          40 : }
    6875             : 
    6876         568 : static enum ndr_err_code ndr_push_srvsvc_NetShareInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfoCtr *r)
    6877             : {
    6878         568 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6879         568 :         if (ndr_flags & NDR_SCALARS) {
    6880         568 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6881         568 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
    6882         568 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    6883         568 :                 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
    6884         568 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6885             :         }
    6886         568 :         if (ndr_flags & NDR_BUFFERS) {
    6887         568 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
    6888         568 :                 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
    6889             :         }
    6890         568 :         return NDR_ERR_SUCCESS;
    6891             : }
    6892             : 
    6893         548 : static enum ndr_err_code ndr_pull_srvsvc_NetShareInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfoCtr *r)
    6894             : {
    6895         548 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6896         548 :         if (ndr_flags & NDR_SCALARS) {
    6897         548 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6898         548 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
    6899         548 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    6900         548 :                 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
    6901         548 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6902             :         }
    6903         548 :         if (ndr_flags & NDR_BUFFERS) {
    6904         548 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
    6905         548 :                 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
    6906             :         }
    6907         548 :         return NDR_ERR_SUCCESS;
    6908             : }
    6909             : 
    6910          40 : _PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r)
    6911             : {
    6912          40 :         ndr_print_struct(ndr, name, "srvsvc_NetShareInfoCtr");
    6913          40 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6914          40 :         ndr->depth++;
    6915          40 :         ndr_print_uint32(ndr, "level", r->level);
    6916          40 :         ndr_print_set_switch_value(ndr, &r->ctr, r->level);
    6917          40 :         ndr_print_srvsvc_NetShareCtr(ndr, "ctr", &r->ctr);
    6918          40 :         ndr->depth--;
    6919             : }
    6920             : 
    6921          89 : _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r)
    6922             : {
    6923          89 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    6924          89 :         return NDR_ERR_SUCCESS;
    6925             : }
    6926             : 
    6927          83 : _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r)
    6928             : {
    6929             :         uint32_t v;
    6930          83 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    6931          83 :         *r = v;
    6932          83 :         return NDR_ERR_SUCCESS;
    6933             : }
    6934             : 
    6935          12 : _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r)
    6936             : {
    6937          12 :         const char *val = NULL;
    6938             : 
    6939          12 :         switch (r) {
    6940           0 :                 case PLATFORM_ID_DOS: val = "PLATFORM_ID_DOS"; break;
    6941           0 :                 case PLATFORM_ID_OS2: val = "PLATFORM_ID_OS2"; break;
    6942          10 :                 case PLATFORM_ID_NT: val = "PLATFORM_ID_NT"; break;
    6943           0 :                 case PLATFORM_ID_OSF: val = "PLATFORM_ID_OSF"; break;
    6944           0 :                 case PLATFORM_ID_VMS: val = "PLATFORM_ID_VMS"; break;
    6945             :         }
    6946          12 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    6947          12 : }
    6948             : 
    6949          17 : _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
    6950             : {
    6951          17 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6952          17 :         if (ndr_flags & NDR_SCALARS) {
    6953          13 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6954          13 :                 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
    6955          13 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
    6956          13 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6957             :         }
    6958          17 :         if (ndr_flags & NDR_BUFFERS) {
    6959          13 :                 if (r->server_name) {
    6960           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    6961           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6962           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    6963           9 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6964             :                 }
    6965             :         }
    6966          17 :         return NDR_ERR_SUCCESS;
    6967             : }
    6968             : 
    6969          16 : _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
    6970             : {
    6971             :         uint32_t _ptr_server_name;
    6972          16 :         uint32_t size_server_name_1 = 0;
    6973          16 :         uint32_t length_server_name_1 = 0;
    6974          16 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    6975          16 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6976          16 :         if (ndr_flags & NDR_SCALARS) {
    6977          12 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6978          12 :                 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
    6979          12 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    6980          12 :                 if (_ptr_server_name) {
    6981           8 :                         NDR_PULL_ALLOC(ndr, r->server_name);
    6982             :                 } else {
    6983           4 :                         r->server_name = NULL;
    6984             :                 }
    6985          12 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6986             :         }
    6987          16 :         if (ndr_flags & NDR_BUFFERS) {
    6988          12 :                 if (r->server_name) {
    6989           8 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6990           8 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    6991           8 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
    6992           8 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
    6993           8 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
    6994           8 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
    6995           8 :                         if (length_server_name_1 > size_server_name_1) {
    6996           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
    6997             :                         }
    6998           8 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
    6999           8 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
    7000           8 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    7001             :                 }
    7002             :         }
    7003          16 :         return NDR_ERR_SUCCESS;
    7004             : }
    7005             : 
    7006           0 : static void ndr_print_flags_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, int unused, const struct srvsvc_NetSrvInfo100 *r)
    7007             : {
    7008           0 :         ndr_print_srvsvc_NetSrvInfo100(ndr, name, r);
    7009           0 : }
    7010             : 
    7011           2 : _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r)
    7012             : {
    7013           2 :         ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo100");
    7014           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7015           2 :         ndr->depth++;
    7016           2 :         ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
    7017           2 :         ndr_print_ptr(ndr, "server_name", r->server_name);
    7018           2 :         ndr->depth++;
    7019           2 :         if (r->server_name) {
    7020           2 :                 ndr_print_string(ndr, "server_name", r->server_name);
    7021             :         }
    7022           2 :         ndr->depth--;
    7023           2 :         ndr->depth--;
    7024             : }
    7025             : 
    7026          56 : _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
    7027             : {
    7028          56 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7029          56 :         if (ndr_flags & NDR_SCALARS) {
    7030          47 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7031          47 :                 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
    7032          47 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
    7033          47 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
    7034          47 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
    7035          47 :                 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
    7036          47 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    7037          47 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7038             :         }
    7039          56 :         if (ndr_flags & NDR_BUFFERS) {
    7040          47 :                 if (r->server_name) {
    7041          38 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    7042          38 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7043          38 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    7044          38 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7045             :                 }
    7046          47 :                 if (r->comment) {
    7047          38 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    7048          38 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7049          38 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    7050          38 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7051             :                 }
    7052             :         }
    7053          56 :         return NDR_ERR_SUCCESS;
    7054             : }
    7055             : 
    7056          53 : _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
    7057             : {
    7058             :         uint32_t _ptr_server_name;
    7059          53 :         uint32_t size_server_name_1 = 0;
    7060          53 :         uint32_t length_server_name_1 = 0;
    7061          53 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    7062             :         uint32_t _ptr_comment;
    7063          53 :         uint32_t size_comment_1 = 0;
    7064          53 :         uint32_t length_comment_1 = 0;
    7065          53 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    7066          53 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7067          53 :         if (ndr_flags & NDR_SCALARS) {
    7068          45 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7069          45 :                 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
    7070          45 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    7071          45 :                 if (_ptr_server_name) {
    7072          37 :                         NDR_PULL_ALLOC(ndr, r->server_name);
    7073             :                 } else {
    7074           8 :                         r->server_name = NULL;
    7075             :                 }
    7076          45 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
    7077          45 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
    7078          45 :                 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
    7079          45 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    7080          45 :                 if (_ptr_comment) {
    7081          37 :                         NDR_PULL_ALLOC(ndr, r->comment);
    7082             :                 } else {
    7083           8 :                         r->comment = NULL;
    7084             :                 }
    7085          45 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7086             :         }
    7087          53 :         if (ndr_flags & NDR_BUFFERS) {
    7088          45 :                 if (r->server_name) {
    7089          37 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7090          37 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    7091          37 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
    7092          37 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
    7093          37 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
    7094          37 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
    7095          37 :                         if (length_server_name_1 > size_server_name_1) {
    7096           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
    7097             :                         }
    7098          37 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
    7099          37 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
    7100          37 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    7101             :                 }
    7102          45 :                 if (r->comment) {
    7103          37 :                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7104          37 :                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    7105          37 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
    7106          37 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
    7107          37 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
    7108          37 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
    7109          37 :                         if (length_comment_1 > size_comment_1) {
    7110           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
    7111             :                         }
    7112          37 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
    7113          37 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
    7114          37 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    7115             :                 }
    7116             :         }
    7117          53 :         return NDR_ERR_SUCCESS;
    7118             : }
    7119             : 
    7120           0 : static void ndr_print_flags_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, int unused, const struct srvsvc_NetSrvInfo101 *r)
    7121             : {
    7122           0 :         ndr_print_srvsvc_NetSrvInfo101(ndr, name, r);
    7123           0 : }
    7124             : 
    7125           4 : _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r)
    7126             : {
    7127           4 :         ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo101");
    7128           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7129           4 :         ndr->depth++;
    7130           4 :         ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
    7131           4 :         ndr_print_ptr(ndr, "server_name", r->server_name);
    7132           4 :         ndr->depth++;
    7133           4 :         if (r->server_name) {
    7134           2 :                 ndr_print_string(ndr, "server_name", r->server_name);
    7135             :         }
    7136           4 :         ndr->depth--;
    7137           4 :         ndr_print_uint32(ndr, "version_major", r->version_major);
    7138           4 :         ndr_print_uint32(ndr, "version_minor", r->version_minor);
    7139           4 :         ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
    7140           4 :         ndr_print_ptr(ndr, "comment", r->comment);
    7141           4 :         ndr->depth++;
    7142           4 :         if (r->comment) {
    7143           2 :                 ndr_print_string(ndr, "comment", r->comment);
    7144             :         }
    7145           4 :         ndr->depth--;
    7146           4 :         ndr->depth--;
    7147             : }
    7148             : 
    7149           9 : static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
    7150             : {
    7151           9 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7152           9 :         if (ndr_flags & NDR_SCALARS) {
    7153           9 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7154           9 :                 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
    7155           9 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
    7156           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
    7157           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
    7158           9 :                 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
    7159           9 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    7160           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
    7161           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
    7162           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
    7163           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
    7164           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
    7165           9 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->licenses));
    7166           9 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->userpath));
    7167           9 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7168             :         }
    7169           9 :         if (ndr_flags & NDR_BUFFERS) {
    7170           9 :                 if (r->server_name) {
    7171           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    7172           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7173           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    7174           9 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7175             :                 }
    7176           9 :                 if (r->comment) {
    7177           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    7178           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7179           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    7180           9 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7181             :                 }
    7182           9 :                 if (r->userpath) {
    7183           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
    7184           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7185           9 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
    7186           9 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->userpath, ndr_charset_length(r->userpath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7187             :                 }
    7188             :         }
    7189           9 :         return NDR_ERR_SUCCESS;
    7190             : }
    7191             : 
    7192           8 : static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
    7193             : {
    7194             :         uint32_t _ptr_server_name;
    7195           8 :         uint32_t size_server_name_1 = 0;
    7196           8 :         uint32_t length_server_name_1 = 0;
    7197           8 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    7198             :         uint32_t _ptr_comment;
    7199           8 :         uint32_t size_comment_1 = 0;
    7200           8 :         uint32_t length_comment_1 = 0;
    7201           8 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    7202             :         uint32_t _ptr_userpath;
    7203           8 :         uint32_t size_userpath_1 = 0;
    7204           8 :         uint32_t length_userpath_1 = 0;
    7205           8 :         TALLOC_CTX *_mem_save_userpath_0 = NULL;
    7206           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7207           8 :         if (ndr_flags & NDR_SCALARS) {
    7208           8 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7209           8 :                 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
    7210           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    7211           8 :                 if (_ptr_server_name) {
    7212           8 :                         NDR_PULL_ALLOC(ndr, r->server_name);
    7213             :                 } else {
    7214           0 :                         r->server_name = NULL;
    7215             :                 }
    7216           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
    7217           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
    7218           8 :                 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
    7219           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    7220           8 :                 if (_ptr_comment) {
    7221           8 :                         NDR_PULL_ALLOC(ndr, r->comment);
    7222             :                 } else {
    7223           0 :                         r->comment = NULL;
    7224             :                 }
    7225           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
    7226           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
    7227           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
    7228           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
    7229           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
    7230           8 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->licenses));
    7231           8 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_userpath));
    7232           8 :                 if (_ptr_userpath) {
    7233           8 :                         NDR_PULL_ALLOC(ndr, r->userpath);
    7234             :                 } else {
    7235           0 :                         r->userpath = NULL;
    7236             :                 }
    7237           8 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7238             :         }
    7239           8 :         if (ndr_flags & NDR_BUFFERS) {
    7240           8 :                 if (r->server_name) {
    7241           8 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7242           8 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    7243           8 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
    7244           8 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
    7245           8 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
    7246           8 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
    7247           8 :                         if (length_server_name_1 > size_server_name_1) {
    7248           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
    7249             :                         }
    7250           8 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
    7251           8 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
    7252           8 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    7253             :                 }
    7254           8 :                 if (r->comment) {
    7255           8 :                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7256           8 :                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    7257           8 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
    7258           8 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
    7259           8 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
    7260           8 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
    7261           8 :                         if (length_comment_1 > size_comment_1) {
    7262           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
    7263             :                         }
    7264           8 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
    7265           8 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
    7266           8 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    7267             :                 }
    7268           8 :                 if (r->userpath) {
    7269           8 :                         _mem_save_userpath_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7270           8 :                         NDR_PULL_SET_MEM_CTX(ndr, r->userpath, 0);
    7271           8 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->userpath));
    7272           8 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->userpath));
    7273           8 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->userpath, &size_userpath_1));
    7274           8 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->userpath, &length_userpath_1));
    7275           8 :                         if (length_userpath_1 > size_userpath_1) {
    7276           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_userpath_1, length_userpath_1);
    7277             :                         }
    7278           8 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_userpath_1, sizeof(uint16_t)));
    7279           8 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->userpath, length_userpath_1, sizeof(uint16_t), CH_UTF16));
    7280           8 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userpath_0, 0);
    7281             :                 }
    7282             :         }
    7283           8 :         return NDR_ERR_SUCCESS;
    7284             : }
    7285             : 
    7286           2 : _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r)
    7287             : {
    7288           2 :         ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo102");
    7289           2 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7290           2 :         ndr->depth++;
    7291           2 :         ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
    7292           2 :         ndr_print_ptr(ndr, "server_name", r->server_name);
    7293           2 :         ndr->depth++;
    7294           2 :         if (r->server_name) {
    7295           2 :                 ndr_print_string(ndr, "server_name", r->server_name);
    7296             :         }
    7297           2 :         ndr->depth--;
    7298           2 :         ndr_print_uint32(ndr, "version_major", r->version_major);
    7299           2 :         ndr_print_uint32(ndr, "version_minor", r->version_minor);
    7300           2 :         ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
    7301           2 :         ndr_print_ptr(ndr, "comment", r->comment);
    7302           2 :         ndr->depth++;
    7303           2 :         if (r->comment) {
    7304           2 :                 ndr_print_string(ndr, "comment", r->comment);
    7305             :         }
    7306           2 :         ndr->depth--;
    7307           2 :         ndr_print_uint32(ndr, "users", r->users);
    7308           2 :         ndr_print_uint32(ndr, "disc", r->disc);
    7309           2 :         ndr_print_uint32(ndr, "hidden", r->hidden);
    7310           2 :         ndr_print_uint32(ndr, "announce", r->announce);
    7311           2 :         ndr_print_uint32(ndr, "anndelta", r->anndelta);
    7312           2 :         ndr_print_uint32(ndr, "licenses", r->licenses);
    7313           2 :         ndr_print_ptr(ndr, "userpath", r->userpath);
    7314           2 :         ndr->depth++;
    7315           2 :         if (r->userpath) {
    7316           2 :                 ndr_print_string(ndr, "userpath", r->userpath);
    7317             :         }
    7318           2 :         ndr->depth--;
    7319           2 :         ndr->depth--;
    7320             : }
    7321             : 
    7322           0 : static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
    7323             : {
    7324           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7325           0 :         if (ndr_flags & NDR_SCALARS) {
    7326           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7327           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
    7328           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
    7329           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
    7330           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
    7331           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
    7332           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
    7333           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
    7334           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
    7335           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
    7336           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
    7337           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
    7338           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
    7339           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
    7340           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
    7341           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
    7342           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
    7343           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
    7344           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
    7345           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
    7346           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numreqbufs));
    7347           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
    7348           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
    7349           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
    7350           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
    7351           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
    7352           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
    7353           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
    7354           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
    7355           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
    7356           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
    7357           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
    7358           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7359             :         }
    7360           0 :         if (ndr_flags & NDR_BUFFERS) {
    7361           0 :                 if (r->alerts) {
    7362           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
    7363           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7364           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
    7365           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7366             :                 }
    7367           0 :                 if (r->guestaccount) {
    7368           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
    7369           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7370           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
    7371           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7372             :                 }
    7373           0 :                 if (r->srvheuristics) {
    7374           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
    7375           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7376           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
    7377           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7378             :                 }
    7379             :         }
    7380           0 :         return NDR_ERR_SUCCESS;
    7381             : }
    7382             : 
    7383           0 : static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
    7384             : {
    7385             :         uint32_t _ptr_alerts;
    7386           0 :         uint32_t size_alerts_1 = 0;
    7387           0 :         uint32_t length_alerts_1 = 0;
    7388           0 :         TALLOC_CTX *_mem_save_alerts_0 = NULL;
    7389             :         uint32_t _ptr_guestaccount;
    7390           0 :         uint32_t size_guestaccount_1 = 0;
    7391           0 :         uint32_t length_guestaccount_1 = 0;
    7392           0 :         TALLOC_CTX *_mem_save_guestaccount_0 = NULL;
    7393             :         uint32_t _ptr_srvheuristics;
    7394           0 :         uint32_t size_srvheuristics_1 = 0;
    7395           0 :         uint32_t length_srvheuristics_1 = 0;
    7396           0 :         TALLOC_CTX *_mem_save_srvheuristics_0 = NULL;
    7397           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7398           0 :         if (ndr_flags & NDR_SCALARS) {
    7399           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7400           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
    7401           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
    7402           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
    7403           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
    7404           0 :                 if (_ptr_alerts) {
    7405           0 :                         NDR_PULL_ALLOC(ndr, r->alerts);
    7406             :                 } else {
    7407           0 :                         r->alerts = NULL;
    7408             :                 }
    7409           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
    7410           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
    7411           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
    7412           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
    7413           0 :                 if (_ptr_guestaccount) {
    7414           0 :                         NDR_PULL_ALLOC(ndr, r->guestaccount);
    7415             :                 } else {
    7416           0 :                         r->guestaccount = NULL;
    7417             :                 }
    7418           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
    7419           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
    7420           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
    7421           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
    7422           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
    7423           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
    7424           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
    7425           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
    7426           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
    7427           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
    7428           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
    7429           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numreqbufs));
    7430           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
    7431           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
    7432           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
    7433           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
    7434           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
    7435           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
    7436           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
    7437           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
    7438           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
    7439           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
    7440           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
    7441           0 :                 if (_ptr_srvheuristics) {
    7442           0 :                         NDR_PULL_ALLOC(ndr, r->srvheuristics);
    7443             :                 } else {
    7444           0 :                         r->srvheuristics = NULL;
    7445             :                 }
    7446           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7447             :         }
    7448           0 :         if (ndr_flags & NDR_BUFFERS) {
    7449           0 :                 if (r->alerts) {
    7450           0 :                         _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7451           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
    7452           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
    7453           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
    7454           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->alerts, &size_alerts_1));
    7455           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->alerts, &length_alerts_1));
    7456           0 :                         if (length_alerts_1 > size_alerts_1) {
    7457           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alerts_1, length_alerts_1);
    7458             :                         }
    7459           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_alerts_1, sizeof(uint16_t)));
    7460           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, length_alerts_1, sizeof(uint16_t), CH_UTF16));
    7461           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
    7462             :                 }
    7463           0 :                 if (r->guestaccount) {
    7464           0 :                         _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7465           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
    7466           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
    7467           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
    7468           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->guestaccount, &size_guestaccount_1));
    7469           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->guestaccount, &length_guestaccount_1));
    7470           0 :                         if (length_guestaccount_1 > size_guestaccount_1) {
    7471           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_guestaccount_1, length_guestaccount_1);
    7472             :                         }
    7473           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_guestaccount_1, sizeof(uint16_t)));
    7474           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, length_guestaccount_1, sizeof(uint16_t), CH_UTF16));
    7475           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
    7476             :                 }
    7477           0 :                 if (r->srvheuristics) {
    7478           0 :                         _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7479           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
    7480           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
    7481           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
    7482           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->srvheuristics, &size_srvheuristics_1));
    7483           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->srvheuristics, &length_srvheuristics_1));
    7484           0 :                         if (length_srvheuristics_1 > size_srvheuristics_1) {
    7485           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_srvheuristics_1, length_srvheuristics_1);
    7486             :                         }
    7487           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_srvheuristics_1, sizeof(uint16_t)));
    7488           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, length_srvheuristics_1, sizeof(uint16_t), CH_UTF16));
    7489           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
    7490             :                 }
    7491             :         }
    7492           0 :         return NDR_ERR_SUCCESS;
    7493             : }
    7494             : 
    7495           0 : _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r)
    7496             : {
    7497           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo402");
    7498           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7499           0 :         ndr->depth++;
    7500           0 :         ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
    7501           0 :         ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
    7502           0 :         ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
    7503           0 :         ndr_print_ptr(ndr, "alerts", r->alerts);
    7504           0 :         ndr->depth++;
    7505           0 :         if (r->alerts) {
    7506           0 :                 ndr_print_string(ndr, "alerts", r->alerts);
    7507             :         }
    7508           0 :         ndr->depth--;
    7509           0 :         ndr_print_uint32(ndr, "security", r->security);
    7510           0 :         ndr_print_uint32(ndr, "numadmin", r->numadmin);
    7511           0 :         ndr_print_uint32(ndr, "lanmask", r->lanmask);
    7512           0 :         ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
    7513           0 :         ndr->depth++;
    7514           0 :         if (r->guestaccount) {
    7515           0 :                 ndr_print_string(ndr, "guestaccount", r->guestaccount);
    7516             :         }
    7517           0 :         ndr->depth--;
    7518           0 :         ndr_print_uint32(ndr, "chdevs", r->chdevs);
    7519           0 :         ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
    7520           0 :         ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
    7521           0 :         ndr_print_uint32(ndr, "connections", r->connections);
    7522           0 :         ndr_print_uint32(ndr, "shares", r->shares);
    7523           0 :         ndr_print_uint32(ndr, "openfiles", r->openfiles);
    7524           0 :         ndr_print_uint32(ndr, "sessopen", r->sessopen);
    7525           0 :         ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
    7526           0 :         ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
    7527           0 :         ndr_print_uint32(ndr, "opensearch", r->opensearch);
    7528           0 :         ndr_print_uint32(ndr, "activelocks", r->activelocks);
    7529           0 :         ndr_print_uint32(ndr, "numreqbufs", r->numreqbufs);
    7530           0 :         ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
    7531           0 :         ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
    7532           0 :         ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
    7533           0 :         ndr_print_uint32(ndr, "alertsched", r->alertsched);
    7534           0 :         ndr_print_uint32(ndr, "erroralert", r->erroralert);
    7535           0 :         ndr_print_uint32(ndr, "logonalert", r->logonalert);
    7536           0 :         ndr_print_uint32(ndr, "accessalert", r->accessalert);
    7537           0 :         ndr_print_uint32(ndr, "diskalert", r->diskalert);
    7538           0 :         ndr_print_uint32(ndr, "netioalert", r->netioalert);
    7539           0 :         ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
    7540           0 :         ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
    7541           0 :         ndr->depth++;
    7542           0 :         if (r->srvheuristics) {
    7543           0 :                 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
    7544             :         }
    7545           0 :         ndr->depth--;
    7546           0 :         ndr->depth--;
    7547             : }
    7548             : 
    7549           0 : static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
    7550             : {
    7551           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7552           0 :         if (ndr_flags & NDR_SCALARS) {
    7553           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7554           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
    7555           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
    7556           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
    7557           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
    7558           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
    7559           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
    7560           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
    7561           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
    7562           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
    7563           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
    7564           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
    7565           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
    7566           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
    7567           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
    7568           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
    7569           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
    7570           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
    7571           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
    7572           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
    7573           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numreqbufs));
    7574           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
    7575           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
    7576           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
    7577           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
    7578           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
    7579           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
    7580           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
    7581           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
    7582           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
    7583           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
    7584           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
    7585           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditedevents));
    7586           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditprofile));
    7587           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->autopath));
    7588           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7589             :         }
    7590           0 :         if (ndr_flags & NDR_BUFFERS) {
    7591           0 :                 if (r->alerts) {
    7592           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
    7593           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7594           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
    7595           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7596             :                 }
    7597           0 :                 if (r->guestaccount) {
    7598           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
    7599           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7600           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
    7601           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7602             :                 }
    7603           0 :                 if (r->srvheuristics) {
    7604           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
    7605           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7606           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
    7607           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7608             :                 }
    7609           0 :                 if (r->autopath) {
    7610           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
    7611           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7612           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
    7613           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->autopath, ndr_charset_length(r->autopath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7614             :                 }
    7615             :         }
    7616           0 :         return NDR_ERR_SUCCESS;
    7617             : }
    7618             : 
    7619           0 : static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
    7620             : {
    7621             :         uint32_t _ptr_alerts;
    7622           0 :         uint32_t size_alerts_1 = 0;
    7623           0 :         uint32_t length_alerts_1 = 0;
    7624           0 :         TALLOC_CTX *_mem_save_alerts_0 = NULL;
    7625             :         uint32_t _ptr_guestaccount;
    7626           0 :         uint32_t size_guestaccount_1 = 0;
    7627           0 :         uint32_t length_guestaccount_1 = 0;
    7628           0 :         TALLOC_CTX *_mem_save_guestaccount_0 = NULL;
    7629             :         uint32_t _ptr_srvheuristics;
    7630           0 :         uint32_t size_srvheuristics_1 = 0;
    7631           0 :         uint32_t length_srvheuristics_1 = 0;
    7632           0 :         TALLOC_CTX *_mem_save_srvheuristics_0 = NULL;
    7633             :         uint32_t _ptr_autopath;
    7634           0 :         uint32_t size_autopath_1 = 0;
    7635           0 :         uint32_t length_autopath_1 = 0;
    7636           0 :         TALLOC_CTX *_mem_save_autopath_0 = NULL;
    7637           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7638           0 :         if (ndr_flags & NDR_SCALARS) {
    7639           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7640           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
    7641           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
    7642           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
    7643           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
    7644           0 :                 if (_ptr_alerts) {
    7645           0 :                         NDR_PULL_ALLOC(ndr, r->alerts);
    7646             :                 } else {
    7647           0 :                         r->alerts = NULL;
    7648             :                 }
    7649           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
    7650           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
    7651           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
    7652           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
    7653           0 :                 if (_ptr_guestaccount) {
    7654           0 :                         NDR_PULL_ALLOC(ndr, r->guestaccount);
    7655             :                 } else {
    7656           0 :                         r->guestaccount = NULL;
    7657             :                 }
    7658           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
    7659           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
    7660           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
    7661           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
    7662           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
    7663           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
    7664           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
    7665           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
    7666           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
    7667           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
    7668           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
    7669           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numreqbufs));
    7670           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
    7671           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
    7672           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
    7673           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
    7674           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
    7675           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
    7676           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
    7677           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
    7678           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
    7679           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
    7680           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
    7681           0 :                 if (_ptr_srvheuristics) {
    7682           0 :                         NDR_PULL_ALLOC(ndr, r->srvheuristics);
    7683             :                 } else {
    7684           0 :                         r->srvheuristics = NULL;
    7685             :                 }
    7686           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditedevents));
    7687           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditprofile));
    7688           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_autopath));
    7689           0 :                 if (_ptr_autopath) {
    7690           0 :                         NDR_PULL_ALLOC(ndr, r->autopath);
    7691             :                 } else {
    7692           0 :                         r->autopath = NULL;
    7693             :                 }
    7694           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7695             :         }
    7696           0 :         if (ndr_flags & NDR_BUFFERS) {
    7697           0 :                 if (r->alerts) {
    7698           0 :                         _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7699           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
    7700           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
    7701           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
    7702           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->alerts, &size_alerts_1));
    7703           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->alerts, &length_alerts_1));
    7704           0 :                         if (length_alerts_1 > size_alerts_1) {
    7705           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alerts_1, length_alerts_1);
    7706             :                         }
    7707           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_alerts_1, sizeof(uint16_t)));
    7708           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, length_alerts_1, sizeof(uint16_t), CH_UTF16));
    7709           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
    7710             :                 }
    7711           0 :                 if (r->guestaccount) {
    7712           0 :                         _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7713           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
    7714           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
    7715           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
    7716           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->guestaccount, &size_guestaccount_1));
    7717           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->guestaccount, &length_guestaccount_1));
    7718           0 :                         if (length_guestaccount_1 > size_guestaccount_1) {
    7719           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_guestaccount_1, length_guestaccount_1);
    7720             :                         }
    7721           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_guestaccount_1, sizeof(uint16_t)));
    7722           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, length_guestaccount_1, sizeof(uint16_t), CH_UTF16));
    7723           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
    7724             :                 }
    7725           0 :                 if (r->srvheuristics) {
    7726           0 :                         _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7727           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
    7728           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
    7729           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
    7730           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->srvheuristics, &size_srvheuristics_1));
    7731           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->srvheuristics, &length_srvheuristics_1));
    7732           0 :                         if (length_srvheuristics_1 > size_srvheuristics_1) {
    7733           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_srvheuristics_1, length_srvheuristics_1);
    7734             :                         }
    7735           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_srvheuristics_1, sizeof(uint16_t)));
    7736           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, length_srvheuristics_1, sizeof(uint16_t), CH_UTF16));
    7737           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
    7738             :                 }
    7739           0 :                 if (r->autopath) {
    7740           0 :                         _mem_save_autopath_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7741           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->autopath, 0);
    7742           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->autopath));
    7743           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->autopath));
    7744           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->autopath, &size_autopath_1));
    7745           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->autopath, &length_autopath_1));
    7746           0 :                         if (length_autopath_1 > size_autopath_1) {
    7747           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_autopath_1, length_autopath_1);
    7748             :                         }
    7749           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_autopath_1, sizeof(uint16_t)));
    7750           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->autopath, length_autopath_1, sizeof(uint16_t), CH_UTF16));
    7751           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_autopath_0, 0);
    7752             :                 }
    7753             :         }
    7754           0 :         return NDR_ERR_SUCCESS;
    7755             : }
    7756             : 
    7757           0 : _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r)
    7758             : {
    7759           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo403");
    7760           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7761           0 :         ndr->depth++;
    7762           0 :         ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
    7763           0 :         ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
    7764           0 :         ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
    7765           0 :         ndr_print_ptr(ndr, "alerts", r->alerts);
    7766           0 :         ndr->depth++;
    7767           0 :         if (r->alerts) {
    7768           0 :                 ndr_print_string(ndr, "alerts", r->alerts);
    7769             :         }
    7770           0 :         ndr->depth--;
    7771           0 :         ndr_print_uint32(ndr, "security", r->security);
    7772           0 :         ndr_print_uint32(ndr, "numadmin", r->numadmin);
    7773           0 :         ndr_print_uint32(ndr, "lanmask", r->lanmask);
    7774           0 :         ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
    7775           0 :         ndr->depth++;
    7776           0 :         if (r->guestaccount) {
    7777           0 :                 ndr_print_string(ndr, "guestaccount", r->guestaccount);
    7778             :         }
    7779           0 :         ndr->depth--;
    7780           0 :         ndr_print_uint32(ndr, "chdevs", r->chdevs);
    7781           0 :         ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
    7782           0 :         ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
    7783           0 :         ndr_print_uint32(ndr, "connections", r->connections);
    7784           0 :         ndr_print_uint32(ndr, "shares", r->shares);
    7785           0 :         ndr_print_uint32(ndr, "openfiles", r->openfiles);
    7786           0 :         ndr_print_uint32(ndr, "sessopen", r->sessopen);
    7787           0 :         ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
    7788           0 :         ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
    7789           0 :         ndr_print_uint32(ndr, "opensearch", r->opensearch);
    7790           0 :         ndr_print_uint32(ndr, "activelocks", r->activelocks);
    7791           0 :         ndr_print_uint32(ndr, "numreqbufs", r->numreqbufs);
    7792           0 :         ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
    7793           0 :         ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
    7794           0 :         ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
    7795           0 :         ndr_print_uint32(ndr, "alertsched", r->alertsched);
    7796           0 :         ndr_print_uint32(ndr, "erroralert", r->erroralert);
    7797           0 :         ndr_print_uint32(ndr, "logonalert", r->logonalert);
    7798           0 :         ndr_print_uint32(ndr, "accessalert", r->accessalert);
    7799           0 :         ndr_print_uint32(ndr, "diskalert", r->diskalert);
    7800           0 :         ndr_print_uint32(ndr, "netioalert", r->netioalert);
    7801           0 :         ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
    7802           0 :         ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
    7803           0 :         ndr->depth++;
    7804           0 :         if (r->srvheuristics) {
    7805           0 :                 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
    7806             :         }
    7807           0 :         ndr->depth--;
    7808           0 :         ndr_print_uint32(ndr, "auditedevents", r->auditedevents);
    7809           0 :         ndr_print_uint32(ndr, "auditprofile", r->auditprofile);
    7810           0 :         ndr_print_ptr(ndr, "autopath", r->autopath);
    7811           0 :         ndr->depth++;
    7812           0 :         if (r->autopath) {
    7813           0 :                 ndr_print_string(ndr, "autopath", r->autopath);
    7814             :         }
    7815           0 :         ndr->depth--;
    7816           0 :         ndr->depth--;
    7817             : }
    7818             : 
    7819           0 : static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
    7820             : {
    7821           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7822           0 :         if (ndr_flags & NDR_SCALARS) {
    7823           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    7824           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
    7825           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
    7826           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
    7827           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
    7828           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
    7829           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
    7830           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
    7831           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
    7832           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
    7833           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
    7834           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
    7835           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
    7836           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
    7837           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
    7838           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
    7839           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
    7840           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
    7841           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
    7842           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    7843             :         }
    7844           0 :         if (ndr_flags & NDR_BUFFERS) {
    7845             :         }
    7846           0 :         return NDR_ERR_SUCCESS;
    7847             : }
    7848             : 
    7849           0 : static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
    7850             : {
    7851           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7852           0 :         if (ndr_flags & NDR_SCALARS) {
    7853           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    7854           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
    7855           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
    7856           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
    7857           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
    7858           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
    7859           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
    7860           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
    7861           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
    7862           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
    7863           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
    7864           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
    7865           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
    7866           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
    7867           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
    7868           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
    7869           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
    7870           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
    7871           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
    7872           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    7873             :         }
    7874           0 :         if (ndr_flags & NDR_BUFFERS) {
    7875             :         }
    7876           0 :         return NDR_ERR_SUCCESS;
    7877             : }
    7878             : 
    7879           0 : _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r)
    7880             : {
    7881           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo502");
    7882           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7883           0 :         ndr->depth++;
    7884           0 :         ndr_print_uint32(ndr, "sessopen", r->sessopen);
    7885           0 :         ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
    7886           0 :         ndr_print_uint32(ndr, "opensearch", r->opensearch);
    7887           0 :         ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
    7888           0 :         ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
    7889           0 :         ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
    7890           0 :         ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
    7891           0 :         ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
    7892           0 :         ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
    7893           0 :         ndr_print_uint32(ndr, "sessusers", r->sessusers);
    7894           0 :         ndr_print_uint32(ndr, "sessconns", r->sessconns);
    7895           0 :         ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
    7896           0 :         ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
    7897           0 :         ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
    7898           0 :         ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
    7899           0 :         ndr_print_uint32(ndr, "timesource", r->timesource);
    7900           0 :         ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
    7901           0 :         ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
    7902           0 :         ndr->depth--;
    7903             : }
    7904             : 
    7905           0 : static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
    7906             : {
    7907           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7908           0 :         if (ndr_flags & NDR_SCALARS) {
    7909           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7910           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
    7911           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
    7912           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
    7913           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
    7914           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
    7915           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
    7916           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
    7917           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
    7918           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
    7919           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
    7920           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
    7921           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
    7922           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
    7923           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
    7924           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
    7925           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
    7926           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
    7927           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
    7928           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    7929           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
    7930           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
    7931           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
    7932           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
    7933           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
    7934           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
    7935           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
    7936           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
    7937           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
    7938           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
    7939           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
    7940           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
    7941           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
    7942           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
    7943           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
    7944           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
    7945           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
    7946           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
    7947           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
    7948           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
    7949           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
    7950           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
    7951           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
    7952           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7953             :         }
    7954           0 :         if (ndr_flags & NDR_BUFFERS) {
    7955           0 :                 if (r->domain) {
    7956           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    7957           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7958           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    7959           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7960             :                 }
    7961             :         }
    7962           0 :         return NDR_ERR_SUCCESS;
    7963             : }
    7964             : 
    7965           0 : static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
    7966             : {
    7967             :         uint32_t _ptr_domain;
    7968           0 :         uint32_t size_domain_1 = 0;
    7969           0 :         uint32_t length_domain_1 = 0;
    7970           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
    7971           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7972           0 :         if (ndr_flags & NDR_SCALARS) {
    7973           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7974           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
    7975           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
    7976           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
    7977           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
    7978           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
    7979           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
    7980           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
    7981           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
    7982           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
    7983           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
    7984           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
    7985           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
    7986           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
    7987           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
    7988           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
    7989           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
    7990           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
    7991           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
    7992           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    7993           0 :                 if (_ptr_domain) {
    7994           0 :                         NDR_PULL_ALLOC(ndr, r->domain);
    7995             :                 } else {
    7996           0 :                         r->domain = NULL;
    7997             :                 }
    7998           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
    7999           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
    8000           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
    8001           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
    8002           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
    8003           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
    8004           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
    8005           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
    8006           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
    8007           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
    8008           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
    8009           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
    8010           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
    8011           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
    8012           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
    8013           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
    8014           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
    8015           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
    8016           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
    8017           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
    8018           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
    8019           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
    8020           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
    8021           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    8022             :         }
    8023           0 :         if (ndr_flags & NDR_BUFFERS) {
    8024           0 :                 if (r->domain) {
    8025           0 :                         _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
    8026           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
    8027           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
    8028           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
    8029           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->domain, &size_domain_1));
    8030           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->domain, &length_domain_1));
    8031           0 :                         if (length_domain_1 > size_domain_1) {
    8032           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
    8033             :                         }
    8034           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
    8035           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
    8036           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
    8037             :                 }
    8038             :         }
    8039           0 :         return NDR_ERR_SUCCESS;
    8040             : }
    8041             : 
    8042           0 : _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r)
    8043             : {
    8044           0 :         ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo503");
    8045           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    8046           0 :         ndr->depth++;
    8047           0 :         ndr_print_uint32(ndr, "sessopen", r->sessopen);
    8048           0 :         ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
    8049           0 :         ndr_print_uint32(ndr, "opensearch", r->opensearch);
    8050           0 :         ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
    8051           0 :         ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
    8052           0 :         ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
    8053           0 :         ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
    8054           0 :         ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
    8055           0 :         ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
    8056           0 :         ndr_print_uint32(ndr, "sessusers", r->sessusers);
    8057           0 :         ndr_print_uint32(ndr, "sessconns", r->sessconns);
    8058           0 :         ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
    8059           0 :         ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
    8060           0 :         ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
    8061           0 :         ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
    8062           0 :         ndr_print_uint32(ndr, "timesource", r->timesource);
    8063           0 :         ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
    8064           0 :         ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
    8065           0 :         ndr_print_ptr(ndr, "domain", r->domain);
    8066           0 :         ndr->depth++;
    8067           0 :         if (r->domain) {
    8068           0 :                 ndr_print_string(ndr, "domain", r->domain);
    8069             :         }
    8070           0 :         ndr->depth--;
    8071           0 :         ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
    8072           0 :         ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
    8073           0 :         ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
    8074           0 :         ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
    8075           0 :         ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
    8076           0 :         ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
    8077           0 :         ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
    8078           0 :         ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
    8079           0 :         ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
    8080           0 :         ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
    8081           0 :         ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
    8082           0 :         ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
    8083           0 :         ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
    8084           0 :         ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
    8085           0 :         ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
    8086           0 :         ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
    8087           0 :         ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
    8088           0 :         ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
    8089           0 :         ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
    8090           0 :         ndr_print_uint32(ndr, "enableraw", r->enableraw);
    8091           0 :         ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
    8092           0 :         ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
    8093           0 :         ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
    8094           0 :         ndr->depth--;
    8095             : }
    8096             : 
    8097           0 : static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
    8098             : {
    8099           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    8100           0 :         if (ndr_flags & NDR_SCALARS) {
    8101           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    8102           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
    8103           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
    8104           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
    8105           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
    8106           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
    8107           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
    8108           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
    8109           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
    8110           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
    8111           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
    8112           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
    8113           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
    8114           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
    8115           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
    8116           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
    8117           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
    8118           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
    8119           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
    8120           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
    8121           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
    8122           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
    8123           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
    8124           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
    8125           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
    8126           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
    8127           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
    8128           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
    8129           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
    8130           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
    8131           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
    8132           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
    8133           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
    8134           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
    8135           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
    8136           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
    8137           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
    8138           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
    8139           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
    8140           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
    8141           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
    8142           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
    8143           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
    8144           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
    8145           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
    8146           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
    8147           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
    8148           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
    8149           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
    8150           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
    8151           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
    8152           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
    8153           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
    8154           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
    8155           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
    8156           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
    8157           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    8158             :         }
    8159           0 :         if (ndr_flags & NDR_BUFFERS) {
    8160           0 :                 if (r->domain) {
    8161           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    8162           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    8163           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
    8164           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    8165             :                 }
    8166             :         }
    8167           0 :         return NDR_ERR_SUCCESS;
    8168             : }
    8169             : 
    8170           0 : static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
    8171             : {
    8172             :         uint32_t _ptr_domain;
    8173           0 :         uint32_t size_domain_1 = 0;
    8174           0 :         uint32_t length_domain_1 = 0;
    8175           0 :         TALLOC_CTX *_mem_save_domain_0 = NULL;
    8176           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    8177           0 :         if (ndr_flags & NDR_SCALARS) {
    8178           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    8179           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
    8180           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
    8181           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
    8182           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
    8183           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
    8184           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
    8185           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
    8186           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
    8187           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
    8188           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
    8189           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
    8190           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
    8191           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
    8192           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
    8193           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
    8194           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
    8195           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
    8196           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
    8197           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
    8198           0 :                 if (_ptr_domain) {
    8199           0 :                         NDR_PULL_ALLOC(ndr, r->domain);
    8200             :                 } else {
    8201           0 :                         r->domain = NULL;
    8202             :                 }
    8203           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
    8204           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
    8205           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
    8206           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
    8207           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
    8208           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
    8209           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
    8210           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
    8211           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
    8212           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
    8213           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
    8214           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
    8215           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
    8216           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
    8217           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
    8218           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
    8219           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
    8220           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
    8221           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
    8222           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
    8223           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
    8224           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
    8225           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
    8226           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
    8227           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
    8228           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
    8229           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
    8230           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
    8231           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
    8232           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
    8233           0 :                 NDR_CHECK(ndr_pull_uint32