LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_mdssvc.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 362 557 65.0 %
Date: 2024-04-21 15:09:00 Functions: 10 16 62.5 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_mdssvc.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_misc.h"
       7          84 : _PUBLIC_ enum ndr_err_code ndr_push_mdssvc_blob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct mdssvc_blob *r)
       8             : {
       9          84 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      10          84 :         if (ndr_flags & NDR_SCALARS) {
      11          84 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      12          84 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
      13          84 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
      14          84 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->spotlight_blob));
      15          84 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
      16             :         }
      17          84 :         if (ndr_flags & NDR_BUFFERS) {
      18          84 :                 if (r->spotlight_blob) {
      19          82 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
      20          82 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
      21          82 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->length));
      22          82 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->spotlight_blob, r->length));
      23             :                 }
      24             :         }
      25          84 :         return NDR_ERR_SUCCESS;
      26             : }
      27             : 
      28          84 : _PUBLIC_ enum ndr_err_code ndr_pull_mdssvc_blob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct mdssvc_blob *r)
      29             : {
      30           0 :         uint32_t _ptr_spotlight_blob;
      31          84 :         uint32_t size_spotlight_blob_1 = 0;
      32          84 :         uint32_t length_spotlight_blob_1 = 0;
      33          84 :         TALLOC_CTX *_mem_save_spotlight_blob_0 = NULL;
      34          84 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      35          84 :         if (ndr_flags & NDR_SCALARS) {
      36          84 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
      37          84 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
      38          84 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
      39          84 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_spotlight_blob));
      40          84 :                 if (_ptr_spotlight_blob) {
      41          82 :                         NDR_PULL_ALLOC(ndr, r->spotlight_blob);
      42             :                 } else {
      43           2 :                         r->spotlight_blob = NULL;
      44             :                 }
      45          84 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
      46             :         }
      47          84 :         if (ndr_flags & NDR_BUFFERS) {
      48          84 :                 if (r->spotlight_blob) {
      49          82 :                         _mem_save_spotlight_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
      50          82 :                         NDR_PULL_SET_MEM_CTX(ndr, r->spotlight_blob, 0);
      51          82 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->spotlight_blob));
      52          82 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->spotlight_blob));
      53          82 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->spotlight_blob, &size_spotlight_blob_1));
      54          82 :                         NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->spotlight_blob, &length_spotlight_blob_1));
      55          82 :                         if (length_spotlight_blob_1 > size_spotlight_blob_1) {
      56           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_spotlight_blob_1, length_spotlight_blob_1);
      57             :                         }
      58          82 :                         NDR_PULL_ALLOC_N(ndr, r->spotlight_blob, size_spotlight_blob_1);
      59          82 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->spotlight_blob, length_spotlight_blob_1));
      60          82 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_spotlight_blob_0, 0);
      61             :                 }
      62          84 :                 if (r->spotlight_blob) {
      63          82 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->spotlight_blob, r->size));
      64             :                 }
      65          84 :                 if (r->spotlight_blob) {
      66          82 :                         NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->spotlight_blob, r->length));
      67             :                 }
      68             :         }
      69          84 :         return NDR_ERR_SUCCESS;
      70             : }
      71             : 
      72           0 : static void ndr_print_flags_mdssvc_blob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct mdssvc_blob *r)
      73             : {
      74           0 :         ndr_print_mdssvc_blob(ndr, name, r);
      75           0 : }
      76             : 
      77           0 : _PUBLIC_ void ndr_print_mdssvc_blob(struct ndr_print *ndr, const char *name, const struct mdssvc_blob *r)
      78             : {
      79           0 :         ndr_print_struct(ndr, name, "mdssvc_blob");
      80           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
      81           0 :         ndr->depth++;
      82           0 :         ndr_print_uint32(ndr, "length", r->length);
      83           0 :         ndr_print_uint32(ndr, "size", r->size);
      84           0 :         ndr_print_ptr(ndr, "spotlight_blob", r->spotlight_blob);
      85           0 :         ndr->depth++;
      86           0 :         if (r->spotlight_blob) {
      87           0 :                 ndr_print_array_uint8(ndr, "spotlight_blob", r->spotlight_blob, r->length);
      88             :         }
      89           0 :         ndr->depth--;
      90           0 :         ndr->depth--;
      91             : }
      92             : 
      93          40 : static enum ndr_err_code ndr_push_mdssvc_open(struct ndr_push *ndr, ndr_flags_type flags, const struct mdssvc_open *r)
      94             : {
      95          40 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
      96          40 :         if (flags & NDR_IN) {
      97          24 :                 if (r->in.device_id == NULL) {
      98           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
      99             :                 }
     100          24 :                 if (r->in.unkn2 == NULL) {
     101           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     102             :                 }
     103          24 :                 if (r->in.unkn3 == NULL) {
     104           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     105             :                 }
     106          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.device_id));
     107          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unkn2));
     108          24 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unkn3));
     109          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1025));
     110          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     111          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_mount_path, CH_UTF8)));
     112          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_mount_path, ndr_charset_length(r->in.share_mount_path, CH_UTF8), sizeof(uint8_t), CH_UTF8));
     113          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1025));
     114          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     115          24 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF8)));
     116          24 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
     117             :         }
     118          40 :         if (flags & NDR_OUT) {
     119          16 :                 if (r->out.device_id == NULL) {
     120           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     121             :                 }
     122          16 :                 if (r->out.unkn2 == NULL) {
     123           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     124             :                 }
     125          16 :                 if (r->out.unkn3 == NULL) {
     126           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     127             :                 }
     128          16 :                 if (r->out.handle == NULL) {
     129           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     130             :                 }
     131          16 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.device_id));
     132          16 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unkn2));
     133          16 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unkn3));
     134          16 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 1025));
     135          16 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     136          16 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->out.share_path, CH_UTF8)));
     137          16 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->out.share_path, ndr_charset_length(r->out.share_path, CH_UTF8), sizeof(uint8_t), CH_UTF8));
     138          16 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
     139             :         }
     140          40 :         return NDR_ERR_SUCCESS;
     141             : }
     142             : 
     143          40 : static enum ndr_err_code ndr_pull_mdssvc_open(struct ndr_pull *ndr, ndr_flags_type flags, struct mdssvc_open *r)
     144             : {
     145          40 :         uint32_t size_share_mount_path_0 = 0;
     146          40 :         uint32_t length_share_mount_path_0 = 0;
     147          40 :         uint32_t size_share_name_0 = 0;
     148          40 :         uint32_t length_share_name_0 = 0;
     149          40 :         uint32_t size_share_path_0 = 0;
     150          40 :         uint32_t length_share_path_0 = 0;
     151          40 :         TALLOC_CTX *_mem_save_device_id_0 = NULL;
     152          40 :         TALLOC_CTX *_mem_save_unkn2_0 = NULL;
     153          40 :         TALLOC_CTX *_mem_save_unkn3_0 = NULL;
     154          40 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
     155          40 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     156          40 :         if (flags & NDR_IN) {
     157          16 :                 NDR_ZERO_STRUCT(r->out);
     158             : 
     159          16 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     160          16 :                         NDR_PULL_ALLOC(ndr, r->in.device_id);
     161             :                 }
     162          16 :                 _mem_save_device_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
     163          16 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.device_id, LIBNDR_FLAG_REF_ALLOC);
     164          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.device_id));
     165          16 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_id_0, LIBNDR_FLAG_REF_ALLOC);
     166          16 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     167          16 :                         NDR_PULL_ALLOC(ndr, r->in.unkn2);
     168             :                 }
     169          16 :                 _mem_save_unkn2_0 = NDR_PULL_GET_MEM_CTX(ndr);
     170          16 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.unkn2, LIBNDR_FLAG_REF_ALLOC);
     171          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unkn2));
     172          16 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unkn2_0, LIBNDR_FLAG_REF_ALLOC);
     173          16 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     174          16 :                         NDR_PULL_ALLOC(ndr, r->in.unkn3);
     175             :                 }
     176          16 :                 _mem_save_unkn3_0 = NDR_PULL_GET_MEM_CTX(ndr);
     177          16 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.unkn3, LIBNDR_FLAG_REF_ALLOC);
     178          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unkn3));
     179          16 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unkn3_0, LIBNDR_FLAG_REF_ALLOC);
     180          16 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_mount_path));
     181          16 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_mount_path));
     182          16 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.share_mount_path, &size_share_mount_path_0));
     183          16 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.share_mount_path, &length_share_mount_path_0));
     184          16 :                 if (length_share_mount_path_0 > size_share_mount_path_0) {
     185           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_share_mount_path_0, length_share_mount_path_0);
     186             :                 }
     187          16 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_mount_path_0, sizeof(uint8_t)));
     188          16 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_mount_path, length_share_mount_path_0, sizeof(uint8_t), CH_UTF8));
     189          16 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
     190          16 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
     191          16 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.share_name, &size_share_name_0));
     192          16 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.share_name, &length_share_name_0));
     193          16 :                 if (length_share_name_0 > size_share_name_0) {
     194           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_share_name_0, length_share_name_0);
     195             :                 }
     196          16 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint8_t)));
     197          16 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint8_t), CH_UTF8));
     198          16 :                 NDR_PULL_ALLOC(ndr, r->out.device_id);
     199          16 :                 *r->out.device_id = *r->in.device_id;
     200          16 :                 NDR_PULL_ALLOC(ndr, r->out.unkn2);
     201          16 :                 *r->out.unkn2 = *r->in.unkn2;
     202          16 :                 NDR_PULL_ALLOC(ndr, r->out.unkn3);
     203          16 :                 *r->out.unkn3 = *r->in.unkn3;
     204          16 :                 NDR_PULL_ALLOC(ndr, r->out.handle);
     205          16 :                 NDR_ZERO_STRUCTP(r->out.handle);
     206          16 :                 if (r->in.share_mount_path) {
     207          16 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.share_mount_path, 1025));
     208             :                 }
     209          16 :                 if (r->in.share_name) {
     210          16 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.share_name, 1025));
     211             :                 }
     212             :         }
     213          40 :         if (flags & NDR_OUT) {
     214             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     215             :                 if (r->in.device_id == NULL) {
     216             :                         NDR_PULL_ALLOC(ndr, r->in.device_id);
     217             :                         NDR_ZERO_STRUCTP(r->in.device_id);
     218             :                 }
     219             :                 if (r->in.unkn2 == NULL) {
     220             :                         NDR_PULL_ALLOC(ndr, r->in.unkn2);
     221             :                         NDR_ZERO_STRUCTP(r->in.unkn2);
     222             :                 }
     223             :                 if (r->in.unkn3 == NULL) {
     224             :                         NDR_PULL_ALLOC(ndr, r->in.unkn3);
     225             :                         NDR_ZERO_STRUCTP(r->in.unkn3);
     226             :                 }
     227             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     228          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     229          10 :                         NDR_PULL_ALLOC(ndr, r->out.device_id);
     230             :                 }
     231          24 :                 _mem_save_device_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
     232          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.device_id, LIBNDR_FLAG_REF_ALLOC);
     233          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.device_id));
     234          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_id_0, LIBNDR_FLAG_REF_ALLOC);
     235          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     236          10 :                         NDR_PULL_ALLOC(ndr, r->out.unkn2);
     237             :                 }
     238          24 :                 _mem_save_unkn2_0 = NDR_PULL_GET_MEM_CTX(ndr);
     239          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.unkn2, LIBNDR_FLAG_REF_ALLOC);
     240          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unkn2));
     241          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unkn2_0, LIBNDR_FLAG_REF_ALLOC);
     242          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     243          10 :                         NDR_PULL_ALLOC(ndr, r->out.unkn3);
     244             :                 }
     245          24 :                 _mem_save_unkn3_0 = NDR_PULL_GET_MEM_CTX(ndr);
     246          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.unkn3, LIBNDR_FLAG_REF_ALLOC);
     247          24 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unkn3));
     248          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unkn3_0, LIBNDR_FLAG_REF_ALLOC);
     249          24 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.share_path));
     250          24 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->out.share_path));
     251          24 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.share_path, &size_share_path_0));
     252          24 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->out.share_path, &length_share_path_0));
     253          24 :                 if (length_share_path_0 > size_share_path_0) {
     254           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_share_path_0, length_share_path_0);
     255             :                 }
     256          24 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_path_0, sizeof(uint8_t)));
     257          24 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->out.share_path, length_share_path_0, sizeof(uint8_t), CH_UTF8));
     258          24 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     259          10 :                         NDR_PULL_ALLOC(ndr, r->out.handle);
     260             :                 }
     261          24 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
     262          24 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
     263          24 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
     264          24 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
     265          24 :                 if (r->out.share_path) {
     266          24 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.share_path, 1025));
     267             :                 }
     268             :         }
     269          40 :         return NDR_ERR_SUCCESS;
     270             : }
     271             : 
     272           0 : _PUBLIC_ void ndr_print_mdssvc_open(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mdssvc_open *r)
     273             : {
     274           0 :         ndr_print_struct(ndr, name, "mdssvc_open");
     275           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     276           0 :         ndr->depth++;
     277           0 :         if (flags & NDR_SET_VALUES) {
     278           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     279             :         }
     280           0 :         if (flags & NDR_IN) {
     281           0 :                 ndr_print_struct(ndr, "in", "mdssvc_open");
     282           0 :                 ndr->depth++;
     283           0 :                 ndr_print_ptr(ndr, "device_id", r->in.device_id);
     284           0 :                 ndr->depth++;
     285           0 :                 ndr_print_uint32(ndr, "device_id", *r->in.device_id);
     286           0 :                 ndr->depth--;
     287           0 :                 ndr_print_ptr(ndr, "unkn2", r->in.unkn2);
     288           0 :                 ndr->depth++;
     289           0 :                 ndr_print_uint32(ndr, "unkn2", *r->in.unkn2);
     290           0 :                 ndr->depth--;
     291           0 :                 ndr_print_ptr(ndr, "unkn3", r->in.unkn3);
     292           0 :                 ndr->depth++;
     293           0 :                 ndr_print_uint32(ndr, "unkn3", *r->in.unkn3);
     294           0 :                 ndr->depth--;
     295           0 :                 ndr_print_string(ndr, "share_mount_path", r->in.share_mount_path);
     296           0 :                 ndr_print_string(ndr, "share_name", r->in.share_name);
     297           0 :                 ndr->depth--;
     298             :         }
     299           0 :         if (flags & NDR_OUT) {
     300           0 :                 ndr_print_struct(ndr, "out", "mdssvc_open");
     301           0 :                 ndr->depth++;
     302           0 :                 ndr_print_ptr(ndr, "device_id", r->out.device_id);
     303           0 :                 ndr->depth++;
     304           0 :                 ndr_print_uint32(ndr, "device_id", *r->out.device_id);
     305           0 :                 ndr->depth--;
     306           0 :                 ndr_print_ptr(ndr, "unkn2", r->out.unkn2);
     307           0 :                 ndr->depth++;
     308           0 :                 ndr_print_uint32(ndr, "unkn2", *r->out.unkn2);
     309           0 :                 ndr->depth--;
     310           0 :                 ndr_print_ptr(ndr, "unkn3", r->out.unkn3);
     311           0 :                 ndr->depth++;
     312           0 :                 ndr_print_uint32(ndr, "unkn3", *r->out.unkn3);
     313           0 :                 ndr->depth--;
     314           0 :                 ndr_print_string(ndr, "share_path", r->out.share_path);
     315           0 :                 ndr_print_ptr(ndr, "handle", r->out.handle);
     316           0 :                 ndr->depth++;
     317           0 :                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
     318           0 :                 ndr->depth--;
     319           0 :                 ndr->depth--;
     320             :         }
     321           0 :         ndr->depth--;
     322             : }
     323             : 
     324          34 : static enum ndr_err_code ndr_push_mdssvc_unknown1(struct ndr_push *ndr, ndr_flags_type flags, const struct mdssvc_unknown1 *r)
     325             : {
     326          34 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     327          34 :         if (flags & NDR_IN) {
     328          22 :                 if (r->in.handle == NULL) {
     329           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     330             :                 }
     331          22 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
     332          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn1));
     333          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.device_id));
     334          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn3));
     335          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn4));
     336          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.uid));
     337          22 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.gid));
     338             :         }
     339          34 :         if (flags & NDR_OUT) {
     340          12 :                 if (r->out.status == NULL) {
     341           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     342             :                 }
     343          12 :                 if (r->out.flags == NULL) {
     344           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     345             :                 }
     346          12 :                 if (r->out.unkn7 == NULL) {
     347           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     348             :                 }
     349          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.status));
     350          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.flags));
     351          12 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unkn7));
     352             :         }
     353          34 :         return NDR_ERR_SUCCESS;
     354             : }
     355             : 
     356          34 : static enum ndr_err_code ndr_pull_mdssvc_unknown1(struct ndr_pull *ndr, ndr_flags_type flags, struct mdssvc_unknown1 *r)
     357             : {
     358          34 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
     359          34 :         TALLOC_CTX *_mem_save_status_0 = NULL;
     360          34 :         TALLOC_CTX *_mem_save_flags_0 = NULL;
     361          34 :         TALLOC_CTX *_mem_save_unkn7_0 = NULL;
     362          34 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     363          34 :         if (flags & NDR_IN) {
     364          14 :                 NDR_ZERO_STRUCT(r->out);
     365             : 
     366          14 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     367          14 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
     368             :                 }
     369          14 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
     370          14 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
     371          14 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
     372          14 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
     373          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn1));
     374          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.device_id));
     375          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn3));
     376          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn4));
     377          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.uid));
     378          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.gid));
     379          14 :                 NDR_PULL_ALLOC(ndr, r->out.status);
     380          14 :                 NDR_ZERO_STRUCTP(r->out.status);
     381          14 :                 NDR_PULL_ALLOC(ndr, r->out.flags);
     382          14 :                 NDR_ZERO_STRUCTP(r->out.flags);
     383          14 :                 NDR_PULL_ALLOC(ndr, r->out.unkn7);
     384          14 :                 NDR_ZERO_STRUCTP(r->out.unkn7);
     385             :         }
     386          34 :         if (flags & NDR_OUT) {
     387             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     388             :                 if (r->in.handle == NULL) {
     389             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
     390             :                         NDR_ZERO_STRUCTP(r->in.handle);
     391             :                 }
     392             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     393          20 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     394          10 :                         NDR_PULL_ALLOC(ndr, r->out.status);
     395             :                 }
     396          20 :                 _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
     397          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.status, LIBNDR_FLAG_REF_ALLOC);
     398          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.status));
     399          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, LIBNDR_FLAG_REF_ALLOC);
     400          20 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     401          10 :                         NDR_PULL_ALLOC(ndr, r->out.flags);
     402             :                 }
     403          20 :                 _mem_save_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
     404          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.flags, LIBNDR_FLAG_REF_ALLOC);
     405          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.flags));
     406          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_flags_0, LIBNDR_FLAG_REF_ALLOC);
     407          20 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     408          10 :                         NDR_PULL_ALLOC(ndr, r->out.unkn7);
     409             :                 }
     410          20 :                 _mem_save_unkn7_0 = NDR_PULL_GET_MEM_CTX(ndr);
     411          20 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.unkn7, LIBNDR_FLAG_REF_ALLOC);
     412          20 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unkn7));
     413          20 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unkn7_0, LIBNDR_FLAG_REF_ALLOC);
     414             :         }
     415          34 :         return NDR_ERR_SUCCESS;
     416             : }
     417             : 
     418           0 : _PUBLIC_ void ndr_print_mdssvc_unknown1(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mdssvc_unknown1 *r)
     419             : {
     420           0 :         ndr_print_struct(ndr, name, "mdssvc_unknown1");
     421           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     422           0 :         ndr->depth++;
     423           0 :         if (flags & NDR_SET_VALUES) {
     424           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     425             :         }
     426           0 :         if (flags & NDR_IN) {
     427           0 :                 ndr_print_struct(ndr, "in", "mdssvc_unknown1");
     428           0 :                 ndr->depth++;
     429           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
     430           0 :                 ndr->depth++;
     431           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
     432           0 :                 ndr->depth--;
     433           0 :                 ndr_print_uint32(ndr, "unkn1", r->in.unkn1);
     434           0 :                 ndr_print_uint32(ndr, "device_id", r->in.device_id);
     435           0 :                 ndr_print_uint32(ndr, "unkn3", r->in.unkn3);
     436           0 :                 ndr_print_uint32(ndr, "unkn4", r->in.unkn4);
     437           0 :                 ndr_print_uint32(ndr, "uid", r->in.uid);
     438           0 :                 ndr_print_uint32(ndr, "gid", r->in.gid);
     439           0 :                 ndr->depth--;
     440             :         }
     441           0 :         if (flags & NDR_OUT) {
     442           0 :                 ndr_print_struct(ndr, "out", "mdssvc_unknown1");
     443           0 :                 ndr->depth++;
     444           0 :                 ndr_print_ptr(ndr, "status", r->out.status);
     445           0 :                 ndr->depth++;
     446           0 :                 ndr_print_uint32(ndr, "status", *r->out.status);
     447           0 :                 ndr->depth--;
     448           0 :                 ndr_print_ptr(ndr, "flags", r->out.flags);
     449           0 :                 ndr->depth++;
     450           0 :                 ndr_print_uint32(ndr, "flags", *r->out.flags);
     451           0 :                 ndr->depth--;
     452           0 :                 ndr_print_ptr(ndr, "unkn7", r->out.unkn7);
     453           0 :                 ndr->depth++;
     454           0 :                 ndr_print_uint32(ndr, "unkn7", *r->out.unkn7);
     455           0 :                 ndr->depth--;
     456           0 :                 ndr->depth--;
     457             :         }
     458           0 :         ndr->depth--;
     459             : }
     460             : 
     461          84 : static enum ndr_err_code ndr_push_mdssvc_cmd(struct ndr_push *ndr, ndr_flags_type flags, const struct mdssvc_cmd *r)
     462             : {
     463          84 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     464          84 :         if (flags & NDR_IN) {
     465          64 :                 if (r->in.handle == NULL) {
     466           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     467             :                 }
     468          64 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
     469          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn1));
     470          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.device_id));
     471          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn3));
     472          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.next_fragment));
     473          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
     474          64 :                 NDR_CHECK(ndr_push_mdssvc_blob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.request_blob));
     475          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn5));
     476          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_fragment_size1));
     477          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn6));
     478          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_fragment_size2));
     479          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn7));
     480          64 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn8));
     481             :         }
     482          84 :         if (flags & NDR_OUT) {
     483          20 :                 if (r->out.fragment == NULL) {
     484           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     485             :                 }
     486          20 :                 if (r->out.response_blob == NULL) {
     487           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     488             :                 }
     489          20 :                 if (r->out.unkn9 == NULL) {
     490           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     491             :                 }
     492          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.fragment));
     493          20 :                 NDR_CHECK(ndr_push_mdssvc_blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.response_blob));
     494          20 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unkn9));
     495             :         }
     496          84 :         return NDR_ERR_SUCCESS;
     497             : }
     498             : 
     499          84 : static enum ndr_err_code ndr_pull_mdssvc_cmd(struct ndr_pull *ndr, ndr_flags_type flags, struct mdssvc_cmd *r)
     500             : {
     501          84 :         TALLOC_CTX *_mem_save_handle_0 = NULL;
     502          84 :         TALLOC_CTX *_mem_save_fragment_0 = NULL;
     503          84 :         TALLOC_CTX *_mem_save_response_blob_0 = NULL;
     504          84 :         TALLOC_CTX *_mem_save_unkn9_0 = NULL;
     505          84 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     506          84 :         if (flags & NDR_IN) {
     507          22 :                 NDR_ZERO_STRUCT(r->out);
     508             : 
     509          22 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     510          22 :                         NDR_PULL_ALLOC(ndr, r->in.handle);
     511             :                 }
     512          22 :                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
     513          22 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
     514          22 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
     515          22 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
     516          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn1));
     517          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.device_id));
     518          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn3));
     519          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.next_fragment));
     520          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
     521          22 :                 NDR_CHECK(ndr_pull_mdssvc_blob(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.request_blob));
     522          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn5));
     523          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_fragment_size1));
     524          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn6));
     525          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_fragment_size2));
     526          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn7));
     527          22 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn8));
     528          22 :                 NDR_PULL_ALLOC(ndr, r->out.fragment);
     529          22 :                 NDR_ZERO_STRUCTP(r->out.fragment);
     530          22 :                 NDR_PULL_ALLOC(ndr, r->out.response_blob);
     531          22 :                 NDR_ZERO_STRUCTP(r->out.response_blob);
     532          22 :                 NDR_PULL_ALLOC(ndr, r->out.unkn9);
     533          22 :                 NDR_ZERO_STRUCTP(r->out.unkn9);
     534             :         }
     535          84 :         if (flags & NDR_OUT) {
     536             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     537             :                 if (r->in.handle == NULL) {
     538             :                         NDR_PULL_ALLOC(ndr, r->in.handle);
     539             :                         NDR_ZERO_STRUCTP(r->in.handle);
     540             :                 }
     541             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     542          62 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     543          56 :                         NDR_PULL_ALLOC(ndr, r->out.fragment);
     544             :                 }
     545          62 :                 _mem_save_fragment_0 = NDR_PULL_GET_MEM_CTX(ndr);
     546          62 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.fragment, LIBNDR_FLAG_REF_ALLOC);
     547          62 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.fragment));
     548          62 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_fragment_0, LIBNDR_FLAG_REF_ALLOC);
     549          62 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     550          56 :                         NDR_PULL_ALLOC(ndr, r->out.response_blob);
     551             :                 }
     552          62 :                 _mem_save_response_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
     553          62 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.response_blob, LIBNDR_FLAG_REF_ALLOC);
     554          62 :                 NDR_CHECK(ndr_pull_mdssvc_blob(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.response_blob));
     555          62 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_response_blob_0, LIBNDR_FLAG_REF_ALLOC);
     556          62 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     557          56 :                         NDR_PULL_ALLOC(ndr, r->out.unkn9);
     558             :                 }
     559          62 :                 _mem_save_unkn9_0 = NDR_PULL_GET_MEM_CTX(ndr);
     560          62 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.unkn9, LIBNDR_FLAG_REF_ALLOC);
     561          62 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unkn9));
     562          62 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unkn9_0, LIBNDR_FLAG_REF_ALLOC);
     563             :         }
     564          84 :         return NDR_ERR_SUCCESS;
     565             : }
     566             : 
     567           0 : _PUBLIC_ void ndr_print_mdssvc_cmd(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mdssvc_cmd *r)
     568             : {
     569           0 :         ndr_print_struct(ndr, name, "mdssvc_cmd");
     570           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     571           0 :         ndr->depth++;
     572           0 :         if (flags & NDR_SET_VALUES) {
     573           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     574             :         }
     575           0 :         if (flags & NDR_IN) {
     576           0 :                 ndr_print_struct(ndr, "in", "mdssvc_cmd");
     577           0 :                 ndr->depth++;
     578           0 :                 ndr_print_ptr(ndr, "handle", r->in.handle);
     579           0 :                 ndr->depth++;
     580           0 :                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
     581           0 :                 ndr->depth--;
     582           0 :                 ndr_print_uint32(ndr, "unkn1", r->in.unkn1);
     583           0 :                 ndr_print_uint32(ndr, "device_id", r->in.device_id);
     584           0 :                 ndr_print_uint32(ndr, "unkn3", r->in.unkn3);
     585           0 :                 ndr_print_uint32(ndr, "next_fragment", r->in.next_fragment);
     586           0 :                 ndr_print_uint32(ndr, "flags", r->in.flags);
     587           0 :                 ndr_print_mdssvc_blob(ndr, "request_blob", &r->in.request_blob);
     588           0 :                 ndr_print_uint32(ndr, "unkn5", r->in.unkn5);
     589           0 :                 ndr_print_uint32(ndr, "max_fragment_size1", r->in.max_fragment_size1);
     590           0 :                 ndr_print_uint32(ndr, "unkn6", r->in.unkn6);
     591           0 :                 ndr_print_uint32(ndr, "max_fragment_size2", r->in.max_fragment_size2);
     592           0 :                 ndr_print_uint32(ndr, "unkn7", r->in.unkn7);
     593           0 :                 ndr_print_uint32(ndr, "unkn8", r->in.unkn8);
     594           0 :                 ndr->depth--;
     595             :         }
     596           0 :         if (flags & NDR_OUT) {
     597           0 :                 ndr_print_struct(ndr, "out", "mdssvc_cmd");
     598           0 :                 ndr->depth++;
     599           0 :                 ndr_print_ptr(ndr, "fragment", r->out.fragment);
     600           0 :                 ndr->depth++;
     601           0 :                 ndr_print_uint32(ndr, "fragment", *r->out.fragment);
     602           0 :                 ndr->depth--;
     603           0 :                 ndr_print_ptr(ndr, "response_blob", r->out.response_blob);
     604           0 :                 ndr->depth++;
     605           0 :                 ndr_print_mdssvc_blob(ndr, "response_blob", r->out.response_blob);
     606           0 :                 ndr->depth--;
     607           0 :                 ndr_print_ptr(ndr, "unkn9", r->out.unkn9);
     608           0 :                 ndr->depth++;
     609           0 :                 ndr_print_uint32(ndr, "unkn9", *r->out.unkn9);
     610           0 :                 ndr->depth--;
     611           0 :                 ndr->depth--;
     612             :         }
     613           0 :         ndr->depth--;
     614             : }
     615             : 
     616          26 : static enum ndr_err_code ndr_push_mdssvc_close(struct ndr_push *ndr, ndr_flags_type flags, const struct mdssvc_close *r)
     617             : {
     618          26 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     619          26 :         if (flags & NDR_IN) {
     620          18 :                 if (r->in.in_handle == NULL) {
     621           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     622             :                 }
     623          18 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.in_handle));
     624          18 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn1));
     625          18 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.device_id));
     626          18 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn2));
     627          18 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unkn3));
     628             :         }
     629          26 :         if (flags & NDR_OUT) {
     630           8 :                 if (r->out.out_handle == NULL) {
     631           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     632             :                 }
     633           8 :                 if (r->out.status == NULL) {
     634           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     635             :                 }
     636           8 :                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.out_handle));
     637           8 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.status));
     638             :         }
     639          26 :         return NDR_ERR_SUCCESS;
     640             : }
     641             : 
     642          26 : static enum ndr_err_code ndr_pull_mdssvc_close(struct ndr_pull *ndr, ndr_flags_type flags, struct mdssvc_close *r)
     643             : {
     644          26 :         TALLOC_CTX *_mem_save_in_handle_0 = NULL;
     645          26 :         TALLOC_CTX *_mem_save_out_handle_0 = NULL;
     646          26 :         TALLOC_CTX *_mem_save_status_0 = NULL;
     647          26 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     648          26 :         if (flags & NDR_IN) {
     649          10 :                 NDR_ZERO_STRUCT(r->out);
     650             : 
     651          10 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     652          10 :                         NDR_PULL_ALLOC(ndr, r->in.in_handle);
     653             :                 }
     654          10 :                 _mem_save_in_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
     655          10 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.in_handle, LIBNDR_FLAG_REF_ALLOC);
     656          10 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.in_handle));
     657          10 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_in_handle_0, LIBNDR_FLAG_REF_ALLOC);
     658          10 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn1));
     659          10 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.device_id));
     660          10 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn2));
     661          10 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unkn3));
     662          10 :                 NDR_PULL_ALLOC(ndr, r->out.out_handle);
     663          10 :                 NDR_ZERO_STRUCTP(r->out.out_handle);
     664          10 :                 NDR_PULL_ALLOC(ndr, r->out.status);
     665          10 :                 NDR_ZERO_STRUCTP(r->out.status);
     666             :         }
     667          26 :         if (flags & NDR_OUT) {
     668             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     669             :                 if (r->in.in_handle == NULL) {
     670             :                         NDR_PULL_ALLOC(ndr, r->in.in_handle);
     671             :                         NDR_ZERO_STRUCTP(r->in.in_handle);
     672             :                 }
     673             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     674          16 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     675          10 :                         NDR_PULL_ALLOC(ndr, r->out.out_handle);
     676             :                 }
     677          16 :                 _mem_save_out_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
     678          16 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.out_handle, LIBNDR_FLAG_REF_ALLOC);
     679          16 :                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.out_handle));
     680          16 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_handle_0, LIBNDR_FLAG_REF_ALLOC);
     681          16 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     682          10 :                         NDR_PULL_ALLOC(ndr, r->out.status);
     683             :                 }
     684          16 :                 _mem_save_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
     685          16 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.status, LIBNDR_FLAG_REF_ALLOC);
     686          16 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.status));
     687          16 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_0, LIBNDR_FLAG_REF_ALLOC);
     688             :         }
     689          26 :         return NDR_ERR_SUCCESS;
     690             : }
     691             : 
     692           0 : _PUBLIC_ void ndr_print_mdssvc_close(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct mdssvc_close *r)
     693             : {
     694           0 :         ndr_print_struct(ndr, name, "mdssvc_close");
     695           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     696           0 :         ndr->depth++;
     697           0 :         if (flags & NDR_SET_VALUES) {
     698           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     699             :         }
     700           0 :         if (flags & NDR_IN) {
     701           0 :                 ndr_print_struct(ndr, "in", "mdssvc_close");
     702           0 :                 ndr->depth++;
     703           0 :                 ndr_print_ptr(ndr, "in_handle", r->in.in_handle);
     704           0 :                 ndr->depth++;
     705           0 :                 ndr_print_policy_handle(ndr, "in_handle", r->in.in_handle);
     706           0 :                 ndr->depth--;
     707           0 :                 ndr_print_uint32(ndr, "unkn1", r->in.unkn1);
     708           0 :                 ndr_print_uint32(ndr, "device_id", r->in.device_id);
     709           0 :                 ndr_print_uint32(ndr, "unkn2", r->in.unkn2);
     710           0 :                 ndr_print_uint32(ndr, "unkn3", r->in.unkn3);
     711           0 :                 ndr->depth--;
     712             :         }
     713           0 :         if (flags & NDR_OUT) {
     714           0 :                 ndr_print_struct(ndr, "out", "mdssvc_close");
     715           0 :                 ndr->depth++;
     716           0 :                 ndr_print_ptr(ndr, "out_handle", r->out.out_handle);
     717           0 :                 ndr->depth++;
     718           0 :                 ndr_print_policy_handle(ndr, "out_handle", r->out.out_handle);
     719           0 :                 ndr->depth--;
     720           0 :                 ndr_print_ptr(ndr, "status", r->out.status);
     721           0 :                 ndr->depth++;
     722           0 :                 ndr_print_uint32(ndr, "status", *r->out.status);
     723           0 :                 ndr->depth--;
     724           0 :                 ndr->depth--;
     725             :         }
     726           0 :         ndr->depth--;
     727             : }
     728             : 
     729             : #ifndef SKIP_NDR_TABLE_mdssvc
     730             : static const struct ndr_interface_public_struct mdssvc_public_structs[] = {
     731             :         {
     732             :                 .name = "mdssvc_blob",
     733             :                 .struct_size = sizeof(struct mdssvc_blob ),
     734             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_mdssvc_blob,
     735             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_mdssvc_blob,
     736             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_mdssvc_blob,
     737             :         },
     738             :         { .name = NULL }
     739             : };
     740             : 
     741             : static const struct ndr_interface_call mdssvc_calls[] = {
     742             :         {
     743             :                 "mdssvc_open",
     744             :                 sizeof(struct mdssvc_open),
     745             :                 (ndr_push_flags_fn_t) ndr_push_mdssvc_open,
     746             :                 (ndr_pull_flags_fn_t) ndr_pull_mdssvc_open,
     747             :                 (ndr_print_function_t) ndr_print_mdssvc_open,
     748             :                 { 0, NULL },
     749             :                 { 0, NULL },
     750             :         },
     751             :         {
     752             :                 "mdssvc_unknown1",
     753             :                 sizeof(struct mdssvc_unknown1),
     754             :                 (ndr_push_flags_fn_t) ndr_push_mdssvc_unknown1,
     755             :                 (ndr_pull_flags_fn_t) ndr_pull_mdssvc_unknown1,
     756             :                 (ndr_print_function_t) ndr_print_mdssvc_unknown1,
     757             :                 { 0, NULL },
     758             :                 { 0, NULL },
     759             :         },
     760             :         {
     761             :                 "mdssvc_cmd",
     762             :                 sizeof(struct mdssvc_cmd),
     763             :                 (ndr_push_flags_fn_t) ndr_push_mdssvc_cmd,
     764             :                 (ndr_pull_flags_fn_t) ndr_pull_mdssvc_cmd,
     765             :                 (ndr_print_function_t) ndr_print_mdssvc_cmd,
     766             :                 { 0, NULL },
     767             :                 { 0, NULL },
     768             :         },
     769             :         {
     770             :                 "mdssvc_close",
     771             :                 sizeof(struct mdssvc_close),
     772             :                 (ndr_push_flags_fn_t) ndr_push_mdssvc_close,
     773             :                 (ndr_pull_flags_fn_t) ndr_pull_mdssvc_close,
     774             :                 (ndr_print_function_t) ndr_print_mdssvc_close,
     775             :                 { 0, NULL },
     776             :                 { 0, NULL },
     777             :         },
     778             :         { .name = NULL }
     779             : };
     780             : 
     781             : static const char * const mdssvc_endpoint_strings[] = {
     782             :         "ncacn_np:[\\pipe\\mdssvc]", 
     783             :         "ncalrpc:", 
     784             : };
     785             : 
     786             : static const struct ndr_interface_string_array mdssvc_endpoints = {
     787             :         .count  = 2,
     788             :         .names  = mdssvc_endpoint_strings
     789             : };
     790             : 
     791             : static const char * const mdssvc_authservice_strings[] = {
     792             :         "host", 
     793             : };
     794             : 
     795             : static const struct ndr_interface_string_array mdssvc_authservices = {
     796             :         .count  = 1,
     797             :         .names  = mdssvc_authservice_strings
     798             : };
     799             : 
     800             : 
     801             : const struct ndr_interface_table ndr_table_mdssvc = {
     802             :         .name           = "mdssvc",
     803             :         .syntax_id      = {
     804             :                 {0x885d85fb,0xc754,0x4062,{0xa0,0xe7},{0x68,0x72,0xce,0x00,0x64,0xf4}},
     805             :                 NDR_MDSSVC_VERSION
     806             :         },
     807             :         .helpstring     = NDR_MDSSVC_HELPSTRING,
     808             :         .num_calls      = 4,
     809             :         .calls          = mdssvc_calls,
     810             :         .num_public_structs     = 1,
     811             :         .public_structs         = mdssvc_public_structs,
     812             :         .endpoints      = &mdssvc_endpoints,
     813             :         .authservices   = &mdssvc_authservices
     814             : };
     815             : 
     816             : #endif /* SKIP_NDR_TABLE_mdssvc */

Generated by: LCOV version 1.14